FML Update
This commit is contained in:
4
application/core/FML/Script/Templates/Header.txt
Normal file
4
application/core/FML/Script/Templates/Header.txt
Normal file
@ -0,0 +1,4 @@
|
||||
/*********************************
|
||||
* FancyManiaLinks by steeffeen *
|
||||
* http://fml.steeffeen.com *
|
||||
*********************************/
|
@ -1,3 +1,4 @@
|
||||
Void Dummy() {}
|
||||
|
||||
main() {
|
||||
+++OnInit+++
|
||||
|
12
application/core/FML/Script/Templates/MenuMouseClick.txt
Normal file
12
application/core/FML/Script/Templates/MenuMouseClick.txt
Normal file
@ -0,0 +1,12 @@
|
||||
foreach (MenuIds in C_FML_MenuIds) {
|
||||
if (!MenuIds.existskey(Event.ControlId)) continue;
|
||||
|
||||
declare MenuId = MenuIds[Event.ControlId][0];
|
||||
declare SubMenuIds = MenuIds["__FML__Sub__Menus__"];
|
||||
|
||||
foreach (SubMenuId in SubMenuIds) {
|
||||
declare SubMenu <=> Page.GetFirstChild(SubMenuId);
|
||||
if (SubMenu == Null) continue;
|
||||
SubMenu.Visible = (SubMenu.ControlId == MenuId);
|
||||
}
|
||||
}
|
27
application/core/FML/Script/Templates/PageMouseClick.txt
Normal file
27
application/core/FML/Script/Templates/PageMouseClick.txt
Normal file
@ -0,0 +1,27 @@
|
||||
foreach (PageIds in C_FML_PageIds) {
|
||||
if (!PageIds.existskey(Event.ControlId)) continue;
|
||||
|
||||
declare Action = TextLib::ToInteger(PageIds[Event.ControlId][0]);
|
||||
declare PagesId = PageIds["__FML__Pages__Id__"][0];
|
||||
declare PagesIds = PageIds["__FML__Pages__Ids__"];
|
||||
|
||||
if (!G_FML_PageIndexes.existskey(PagesId)) {
|
||||
G_FML_PageIndexes[PagesId] = 0;
|
||||
}
|
||||
G_FML_PageIndexes[PagesId] += Action;
|
||||
if (G_FML_PageIndexes[PagesId] < 0) {
|
||||
G_FML_PageIndexes[PagesId] = 0;
|
||||
} else if (G_FML_PageIndexes[PagesId] >= PagesIds.count) {
|
||||
G_FML_PageIndexes[PagesId] = PagesIds.count - 1;
|
||||
}
|
||||
|
||||
foreach (PageIndex => PageId in PagesIds) {
|
||||
declare Control <=> Page.GetFirstChild(PageId);
|
||||
if (Control == Null) continue;
|
||||
Control.Visible = (PageIndex == G_FML_PageIndexes[PagesId]);
|
||||
}
|
||||
|
||||
declare Label_Counter <=> (Page.GetFirstChild(PagesId) as CMlLabel);
|
||||
if (Label_Counter == Null) continue;
|
||||
Label_Counter.Value = (G_FML_PageIndexes[PagesId]+1)^"/"^PagesIds.count;
|
||||
}
|
18
application/core/FML/Script/Templates/PageOnInit.txt
Normal file
18
application/core/FML/Script/Templates/PageOnInit.txt
Normal file
@ -0,0 +1,18 @@
|
||||
foreach (PageIds in C_FML_PageIds) {
|
||||
declare PagesId = PageIds["__FML__Pages__Id__"][0];
|
||||
declare PagesIds = PageIds["__FML__Pages__Ids__"];
|
||||
|
||||
if (!G_FML_PageIndexes.existskey(PagesId)) {
|
||||
G_FML_PageIndexes[PagesId] = 0;
|
||||
}
|
||||
|
||||
foreach (PageIndex => PageId in PagesIds) {
|
||||
declare Control <=> Page.GetFirstChild(PageId);
|
||||
if (Control == Null) continue;
|
||||
Control.Visible = (PageIndex == G_FML_PageIndexes[PagesId]);
|
||||
}
|
||||
|
||||
declare Label_Counter <=> (Page.GetFirstChild(PagesId) as CMlLabel);
|
||||
if (Label_Counter == Null) continue;
|
||||
Label_Counter.Value = (G_FML_PageIndexes[PagesId]+1)^"/"^PagesIds.count;
|
||||
}
|
@ -3,4 +3,4 @@ if (C_FML_TooltipIds.existskey(Event.ControlId)) {
|
||||
if (TooltipControl != Null) {
|
||||
TooltipControl.Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@ if (C_FML_TooltipIds.existskey(Event.ControlId)) {
|
||||
if (TooltipControl != Null) {
|
||||
TooltipControl.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user