TrackManiaControl/application/core/FML/Script/Templates/PageOnInit.txt
Steffen Schröder fed96b36d0 FML Update
2013-11-28 07:30:00 +01:00

19 lines
609 B
Plaintext

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;
}