This repository has been archived by the owner on Apr 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBrowserAPI.Script.txt
3601 lines (3332 loc) · 156 KB
/
BrowserAPI.Script.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* API for Browsers
*/
#Const Version "2021-09-14"
#Const ScriptName "Libs/Nadeo/TMNext/TrackMania/API/BrowserAPI.Script.txt"
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// Libraries
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
#Include "TextLib" as TL
#Include "Libs/Nadeo/MenuLibs/Common/Manialink/ManiaView2.Script.txt" as MV
#Include "Libs/Nadeo/CommonLibs/Common/Http.Script.txt" as Http
#Include "Libs/Nadeo/CommonLibs/Common/EnvironmentInfo.Script.txt" as EnvironmentInfo
#Include "Libs/Nadeo/TMNext/TrackMania/Structures/CampaignStruct.Script.txt" as CampaignStruct
#Include "Libs/Nadeo/TMNext/TrackMania/Structures/ClubStruct.Script.txt" as ClubStruct
#Include "Libs/Nadeo/TMNext/TrackMania/Stores/CampaignStore.Script.txt" as CampaignStore
#Include "Libs/Nadeo/TMNext/TrackMania/Stores/ClubStore.Script.txt" as ClubStore
#Include "Libs/Nadeo/MenuLibs/Common/Menu/Components/Scroll.Script.txt" as Scroll
#Include "Libs/Nadeo/TMNext/TrackMania/Menu/Constants.Script.txt" as Const
#Include "Libs/Nadeo/MenuLibs/Common/Menu/Components/Quad9.Script.txt" as Quad9
#Include "Libs/Nadeo/MenuLibs/Common/FontManager.Script.txt" as FontManager
#Include "Libs/Nadeo/MenuLibs/Common/Menu/Router.Script.txt" as Router
#Include "Libs/Nadeo/TMNext/TrackMania/Menu/RoutePaths.Script.txt" as RoutePaths
#Include "Libs/Nadeo/MenuLibs/Common/Menu/Components/Navigation.Script.txt" as Navigation
#Include "Libs/Nadeo/MenuLibs/Common/Menu/Components/Transition.Script.txt" as Transition
#Include "Libs/Nadeo/TMNext/TrackMania/ColorPalette.Script.txt" as ColorPalette
#Include "Libs/Nadeo/TMNext/TrackMania/Menu/Components/Button.Script.txt" as Button
#Include "Libs/Nadeo/MenuLibs/Common/Menu/Components/LoadingSpinner.Script.txt" as LoadingSpinner
#Include "Libs/Nadeo/MenuLibs/Common/Menu/Components/MenuSounds.Script.txt" as MenuSounds
#Include "Libs/Nadeo/TMNext/TrackMania/Menu/Components/PopUpBackground.Script.txt" as PopUpBackground
#Include "Libs/Nadeo/TMNext/TrackMania/RBAC.Script.txt" as RBAC
#Include "Libs/Nadeo/TMNext/TrackMania/Stores/UserStore.Script.txt" as UserStore
#Include "Libs/Nadeo/TMNext/TrackMania/Config.Script.txt" as Config
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// Constants
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
#Const C_Name "component-browser-api" //< Component name
#Const P "ComponentBrowserAPI_" //< Prefix use to differentiate functions/variables in the script
#Const C_Class_Browser "Class_Browser"
#Const C_NavGroupName "navgroup-component-browser"
#Const C_Class_Header "ComponentBrowserAPI_Class_Header"
#Const C_Class_Body "ComponentBrowserAPI_Class_Body"
#Const C_Class_Footer "ComponentBrowserAPI_Class_Footer"
#Const C_BrowserPopUpSize <299., 154.>
#Const C_BrowserPopUpPosY -3.
#Const C_BrowserType_None -1
#Const C_BrowserType_PathNavigation 0
#Const C_BrowserType_PathNavigationSmall 1
#Const C_BrowserType_List 2
#Const C_DelayBetweenRequest 1000 //< milliseconds
#Const C_DataType_None -1
#Const C_DataType_Image 0
#Const C_DataType_Skin 1
#Const C_DataType_Map 2
#Const C_DataType_Replay 3
#Const C_DataType_Campaign 4
#Const C_DataType_MonthlyCampaign 5
#Const C_DataType_Script 6
#Const C_DataType_MatchSettings 7
#Const C_DataType_Category 8
#Const C_DataType_Club 9
#Const C_DataType_ItemCollection 10
#Const C_TooltipPos_ScrollTop 0
#Const C_TooltipPos_Footer 1
#Const C_DataType_NameList [
//L16N Absence of name, there is no name
-1 => _("|DataType|None"),
//L16N 2D asset, drawing
0 => _("|DataType|Image"),
//L16N Customized 3D Vehicle Model
1 => _("|DataType|Skin"),
//L16N Track to race on
2 => _("|DataType|Map"),
//L16N Recording of a previous race performance
3 => _("|DataType|Replay"),
//L16N Bundle of tracks for solo play
4 => _("|DataType|Campaign"),
//L16N Server for online play
5 => _("|DataType|Room"),
//L16N Code for the software. Used to make game modes.
6 => _("|DataType|Script"),
//L16N All the settings realated to the match such as the warm-up duration or the number of rounds played
7 => _("|DataType|MatchSettings"),
//L16N A folder, also called a directory, is a special space used to store files, other folders...
8 => _("|DataType|Folder"),
//L16N Club is an in-game, private communitie where players can gather to discuss, drive, create, organize or participate to special events.
9 => _("|DataType|Club"),
//L16N Package of 3D assets use in the map editor as items
10 => _("|DataType|Item Collection")
]
#Const C_Path_Base "Path_Base"
#Const C_Path_Officials "Path_Officials"
#Const C_Path_Quarterly "Path_Quarterly"
#Const C_Path_Monthly "Path_Monthly"
#Const C_Path_Clubs "Path_Clubs"
#Const C_Path_ChosenClub "Path_ChosenClub"
#Const C_Path_Local "Path_Local"
#Const C_Path_Null "Path_Null"
#Const C_Paths_Names [
//L16N Campaigns created by Nadeo
"Path_Officials" => _("|Campaign|Official"),
//L16N Every three months
"Path_Quarterly" => _("|Campaign|Quarterly"),
//L16N Every month
"Path_Monthly" => _("|Campaign|Monthly"),
//L16N Clubs are in-game, private communities where players can gather to discuss, drive, create, organize or participate to special events.
"Path_Clubs" => _("Clubs"),
//L16N Refers to all local play activities
"Path_Local" => _("|Menu|Local")
]
#Const C_TaskListState_None -1
#Const C_TaskListState_IsProcessing 0
#Const C_TaskListState_HasSucceeded 1
#Const C_TaskListState_HasFailed 2
#Const C_TaskListState_IsCanceled 3
#Const C_EventType_UnFocusScroll 0
#Const C_EventType_Select 1
#Const C_EventType_Cancel 2
#Const C_EventType_ReachLimit 3
#Const C_EventType_Focus 4
#Const C_EventType_CreateMap 5
#Const C_EventType_ConfirmSelection 6
#Const C_EventType_EditorSettings 7
#Const C_EventType_MultiSelect 8
//L16N Page to search for a skin
#Const C_BrowserName_Skin _("Skin browser")
//L16N Page to search for an image
#Const C_BrowserName_Image _("Image browser")
//L16N Page to search for a map
#Const C_BrowserName_Map _("Maps")
//L16N Storage for campaigns
#Const C_BrowserName_Campaign _("Campaign library")
//L16N Page to search for an item collection
#Const C_BrowserName_ItemCollection _("Item Collection browser")
//L16N Track name
#Const C_Text_Name _("Name")
//L16N Racing track
#Const C_Text_Map _("Map")
//L16N Number of track validated singular (1 or less)
#Const C_Text_Validation _("Validation")
//L16N Number of track validated plural (2 or more)
#Const C_Text_Validations _("Validations")
//L16N Lacking elements to be valid. %1, %2, %3, %4 will be the elements that are needed for validation. (eg. "Missing: Name Logo Track")
#Const C_Text_Missing _("Missing: %1 %2 %3 %4")
//L16N No elements
#Const C_Text_NoElements _("No suitable elements were found in this folder")
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// Structures
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// Functions
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
/** Get the component
*
* @return The component id
*/
Text Component() {
declare Integer ColumnsNb = 5;
declare Integer RowsNb = 5;
declare Integer ElementsPerPage = ColumnsNb * RowsNb;
declare Vec2 Size_BrowsersScrollWindow = <268. - Const::C_PageWidth_MarginX, 75.>;
declare Vec2 Size_BrowserMargin = <0., 0.>;
declare Vec2 Size_Browser = Scroll::GetElementSize(Size_BrowsersScrollWindow, Size_BrowserMargin, ColumnsNb, RowsNb);
declare Integer ElementsNb = Scroll::GetRequiredElementsNb(Size_BrowsersScrollWindow, Size_Browser, Size_BrowserMargin, ColumnsNb);
declare Vec2 Size_Header = <0., 0.>;
declare Vec2 Size_Footer = <0., 0.>;
declare Vec2 Pos_BrowserElementName = <Size_Browser.X * 0.5, Size_Browser.Y * -0.5>;
declare Text Ml_BrowsersMap = "";
for (I, 1, ElementsNb) {
Ml_BrowsersMap ^= """
<frameinstance
modelid="{{{P}}}framemodel-browser-map-element"
class="{{{Scroll::C_Class_Element}}}"
hidden="1"
/>""";
}
declare Integer ColumnsNbSmallMap = 5;
RowsNb = 5;
declare Vec2 Size_SmallMapBrowserMargin = <0., 0.>;
declare Integer SmallMapsPerPage = ColumnsNbSmallMap * RowsNb;
declare Size_SmallBrowserScrollWindow = <190., 66.>;
declare Vec2 Size_BrowserSmallMaps = Scroll::GetElementSize(Size_SmallBrowserScrollWindow, Size_SmallMapBrowserMargin, ColumnsNbSmallMap, RowsNb);
ElementsNb = Scroll::GetRequiredElementsNb(Size_SmallBrowserScrollWindow, Size_BrowserSmallMaps, Size_SmallMapBrowserMargin, ColumnsNbSmallMap);
declare Vec2 Pos_BrowserElementName_SmallMaps = <Size_BrowserSmallMaps.X * 0.5, Size_BrowserSmallMaps.Y * -0.5>;
declare Text Ml_BrowsersSmallMap = "";
for (I, 1, ElementsNb) {
Ml_BrowsersSmallMap ^= """
<frameinstance
modelid="{{{P}}}framemodel-browser-small-map-element"
class="{{{Scroll::C_Class_Element}}}"
hidden="1"
/>""";
}
declare Integer ColumnsNbList = 1;
declare Integer RowsNbList = 7;
declare Integer ListsPerPage = ColumnsNbList * RowsNbList;
declare Vec2 Size_ListBrowserMargin = <0., 1.25>;
declare Size_ListBrowserScrollWindow = <270. - Const::C_PageWidth_MarginX, 65.>;
declare Vec2 Size_BrowserLists = Scroll::GetElementSize(Size_ListBrowserScrollWindow, Size_ListBrowserMargin, ColumnsNbList, RowsNbList);
ElementsNb = Scroll::GetRequiredElementsNb(Size_ListBrowserScrollWindow, Size_BrowserLists, Size_ListBrowserMargin, ColumnsNbList);
declare Vec2 Pos_BrowserElementName_Lists = <Size_BrowserLists.X * 0.5, Size_BrowserLists.Y * -0.5>;
declare Text Ml_BrowsersList = "";
for (I, 1, ElementsNb) {
Ml_BrowsersList ^= """
<frameinstance
modelid="{{{P}}}framemodel-browser-list-element"
class="{{{Scroll::C_Class_Element}}}"
hidden="1"
/>""";
}
declare SizeX_ListMargin = 5.;
declare SizeX_ListGutter = 1.;
declare SizeX_ListCheck = 6.;
return MV::Component(
C_Name,
"""
<stylesheet>
<style class="{{{P}}}image-base" halign="center" valign="center"/>
<style class="{{{P}}}text-base" halign="center" valign="center2" textfont="{{{FontManager::C_GameFontSemiBold}}}" textsize="5" textcolor="FFF" textprefix="$i"/>
</stylesheet>
<framemodel id="{{{P}}}framemodel-options-element">
<quad
size="10.5 8"
opacity="0" scriptevents="1"
class="{{{Navigation::C_Class_ActivationZone}}} {{{P}}}image-base"
id="{{{P}}}options-zone"
/>
<quad size="8 8" z-index="1" class="{{{P}}}image-base" id="{{{P}}}quad-image" colorize="FFF"/>
<quad
size="10.5 8"
class="{{{Navigation::C_Class_ActivationZone}}} {{{P}}}image-base"
image="{{{Const::C_ImageUrl_ButtonBG_SortingIcons}}}" colorize="FFF"
id="{{{P}}}quad-bg" opacity="0"
/>
</framemodel>
<framemodel id="{{{P}}}framemodel-browser-list-element">
<quad
id="{{{P}}}quad-check" class="{{{P}}}image-base"
pos="{{{Size_BrowserLists.X - SizeX_ListMargin}}} {{{Pos_BrowserElementName_Lists.Y}}}"
z-index="2"
size="6.5 6.5"
colorize="{{{ColorPalette::C_Color_GreenFour}}}"
hidden="1"
image="{{{Const::C_ImageUrl_Icon_Checkbox_Inactive_Square}}}"
/>
<label id="{{{P}}}label-name"
size="{{{Size_BrowserLists.X-3.}}} {{{Size_BrowserLists.Y}}}"
pos="{{{SizeX_ListMargin}}} {{{Pos_BrowserElementName_Lists.Y-.5}}}"
z-index="2"
class="{{{P}}}text-base" halign="left" textprefix="$i"
textfont="{{{FontManager::C_GameFontSemiBold}}}"
/>
<quad id="{{{P}}}quad-image" class="{{{P}}}image-base"
size="{{{Size_BrowserLists.X-2.}}} {{{Size_BrowserLists.Y-2.}}}"
pos="{{{Pos_BrowserElementName_Lists.X}}} {{{Pos_BrowserElementName_Lists.Y}}}"
hidden="1" z-index="3" keepratio="Fit"
/>
<quad
size="{{{Size_BrowserLists.X}}} {{{Size_BrowserLists.Y}}}"
opacity="0" scriptevents="1"
class="{{{Scroll::C_Class_ActivationZone}}}"
/>
<quad id="{{{P}}}quad-focus" z-index="1" size="{{{Size_BrowserLists.X}}} {{{Size_BrowserLists.Y}}}" image="{{{Const::C_ImageUrl_ButtonBG_Line}}}" colorize="{{{ColorPalette::C_Color_GreenFour}}}" hidden="1"/>
<quad id="{{{P}}}quad-bg" size="{{{Size_BrowserLists.X}}} {{{Size_BrowserLists.Y}}}" image="{{{Const::C_ImageUrl_ButtonBG_Line}}}" colorize="{{{ColorPalette::C_Color_GreenFour}}}"/>
</framemodel>
<framemodel id="{{{P}}}framemodel-browser-small-map-element">
<quad
id="{{{P}}}quad-check" class="{{{P}}}image-base"
pos="{{{Size_BrowserSmallMaps.X* 0.87}}} {{{Size_BrowserSmallMaps.Y * -0.25}}}"
z-index="2"
size="6 6"
colorize="{{{ColorPalette::C_Color_GreenFour}}}"
hidden="1"
image="{{{Const::C_ImageUrl_Icon_Checkbox_Inactive_Square}}}"
/>
<label id="{{{P}}}label-name"
size="{{{Size_BrowserSmallMaps.X-6.}}} {{{Size_BrowserSmallMaps.Y}}}"
pos="{{{Pos_BrowserElementName_SmallMaps.X-.25}}} {{{Pos_BrowserElementName_SmallMaps.Y}}}"
z-index="2"
class="{{{P}}}text-base" textcolor="000" textsize="2" textprefix="$i"
textfont="{{{FontManager::C_GameFontSemiBold}}}"
/>
<quad id="{{{P}}}quad-image" class="{{{P}}}image-base"
size="{{{Size_BrowserSmallMaps.X-2.}}} {{{Size_BrowserSmallMaps.Y-2.}}}"
pos="{{{Pos_BrowserElementName_SmallMaps.X}}} {{{Pos_BrowserElementName_SmallMaps.Y}}}"
hidden="1" z-index="3" keepratio="Fit"
/>
<quad
size="{{{Size_BrowserSmallMaps.X}}} {{{Size_BrowserSmallMaps.Y}}}"
opacity="0" scriptevents="1"
class="{{{Scroll::C_Class_ActivationZone}}}"
/>
<quad id="{{{P}}}quad-bg" class="{{{P}}}image-base"
size="{{{Size_BrowserSmallMaps.X-2.}}} {{{Size_BrowserSmallMaps.Y-2.}}}"
pos="{{{Pos_BrowserElementName_SmallMaps.X}}} {{{Pos_BrowserElementName_SmallMaps.Y}}}"
colorize="{{{ColorPalette::C_Color_GreenFour}}}"
image="{{{Const::C_ImageUrl_ButtonBG_Folder}}}"
/>
<quad id="{{{P}}}quad-focus" class="{{{P}}}image-base"
size="{{{Size_BrowserSmallMaps.X-2.}}} {{{Size_BrowserSmallMaps.Y-2.}}}"
pos="{{{Pos_BrowserElementName_SmallMaps.X}}} {{{Pos_BrowserElementName_SmallMaps.Y}}}"
colorize="{{{ColorPalette::C_Color_GreenFour}}}" image="{{{Const::C_ImageUrl_ButtonBG_Folder}}}"
z-index="1" hidden="1"
/>
</framemodel>
<framemodel id="{{{P}}}framemodel-browser-map-element">
<label id="{{{P}}}label-name"
size="{{{Size_Browser.X-7.5}}} {{{Size_Browser.Y}}}"
pos="{{{Pos_BrowserElementName.X-.25}}} {{{Pos_BrowserElementName.Y}}}"
z-index="2"
class="{{{P}}}text-base" textcolor="000" textsize="2.75" textprefix="$i"
textfont="{{{FontManager::C_GameFontSemiBold}}}"
/>
<quad id="{{{P}}}quad-image" class="{{{P}}}image-base"
size="{{{Size_Browser.X-10.}}} {{{Size_Browser.Y-4.}}}"
pos="{{{Pos_BrowserElementName.X-0.5}}} {{{Pos_BrowserElementName.Y}}}"
hidden="1" z-index="3" keepratio="Fit"
/>
<quad id="{{{P}}}quad-bg" class="{{{P}}}image-base"
size="{{{Size_Browser.X-2.}}} {{{Size_Browser.Y-2.}}}"
pos="{{{Pos_BrowserElementName.X}}} {{{Pos_BrowserElementName.Y}}}"
colorize="{{{ColorPalette::C_Color_GreenFour}}}"
image="{{{Const::C_ImageUrl_ButtonBG_Folder}}}" keepratio="Fit"
/>
<quad id="{{{P}}}quad-focus" class="{{{P}}}image-base"
size="{{{Size_Browser.X-2.}}} {{{Size_Browser.Y-2.}}}"
pos="{{{Pos_BrowserElementName.X}}} {{{Pos_BrowserElementName.Y}}}"
colorize="{{{ColorPalette::C_Color_GreenFour}}}" image="{{{Const::C_ImageUrl_ButtonBG_Folder}}}"
z-index="1" hidden="1" keepratio="Fit"
/>
<quad
size="{{{Size_Browser.X}}} {{{Size_Browser.Y}}}"
opacity="0" scriptevents="1"
class="{{{Scroll::C_Class_ActivationZone}}}"
/>
</framemodel>
<frame id="{{{P}}}frame-global">
<frameinstance modelid="{{{PopUpBackground::C_Name}}}" id="{{{P}}}frame-popup-background" data-pop-up-name="{{{C_Name}}}" z-index="-1" data-layout="{{{PopUpBackground::C_Layout_Type_Browser}}}"/>
<frameinstance id="{{{P}}}frame-loading-spinner" modelid="{{{LoadingSpinner::C_Name}}}" />
<label id="{{{P}}}label-title" class="{{{P}}}text-base" halign="left" textsize="9" textcolor="FFF" pos="-116 61.5" textprefix="$t$i" textfont="{{{FontManager::C_GameFontExtraBold}}}" size="200 15" />
<label id="{{{P}}}label-sub-title" class="{{{P}}}text-base" halign="left" textsize="5" textcolor="FFF" pos="-116 53" textprefix="$t$i" textfont="{{{FontManager::C_GameFontSemiBold}}}" size="200 15" />
<frame id="{{{P}}}frame-path-name" pos="0 40.75">
<frame id="{{{P}}}frame-parent-path"
z-index="2"
class="{{{Navigation::C_Class}}} {{{C_Class_Header}}} {{{MenuSounds::C_Class}}}"
data-nav-inputs="select;cancel;down;right"
data-nav-targets="_;_;{{{P}}}button-list-multi-select-select-all;{{{P}}}frame-options-refresh"
data-nav-group="{{{C_NavGroupName}}}"
data-nav-zone="{{{P}}}quad-bg"
pos="-112 0"
data-menusounds-selectsound="BrowserFolderBackward"
>
<quad image="{{{Const::C_ImageUrl_Icon_ParentPath}}}" size="7 7" z-index="3" class="{{{P}}}image-base" id="{{{P}}}quad-image" keepratio="Fit" colorize="FFF"/>
<quad id="{{{P}}}quad-bg"
image="{{{Const::C_ImageUrl_ButtonBG_SortingIcons}}}"
size="10.5 8" scriptevents="1"
class="{{{P}}}image-base {{{Navigation::C_Class_ActivationZone}}}"
colorize="FFF" opacity="0."
/>
</frame>
<label textcolor="000" class="{{{P}}}text-base" halign="left" pos="-95 -.5" size="145 10" z-index="2" id="{{{P}}}label-path" textsize="3" textprefix="$i" textfont="{{{FontManager::C_GameFontSemiBold}}}"/>
<quad id="{{{P}}}quad9-bg-search" z-index="1" pos="-96 0" size="152 8" image="{{{Const::C_ImageUrl_Background_Path}}}" colorize="FFF" valign="center" halign="left"/>
</frame>
<frame id="{{{P}}}frame-options" pos="66.5 40.75">
<frameinstance modelid="{{{P}}}framemodel-options-element" id="{{{P}}}frame-options-refresh"
pos="-168 0"
class="{{{Navigation::C_Class}}} {{{C_Class_Header}}} {{{MenuSounds::C_Class}}}"
data-nav-inputs="select;cancel;right;left;down"
data-nav-targets="_;_;{{{P}}}frame-options-explorer;{{{P}}}frame-parent-path;{{{P}}}button-list-multi-select-select-all"
data-nav-group="{{{C_NavGroupName}}}"
data-nav-zone="{{{P}}}options-zone"
data-menusounds-selectsound="SelectRefresh"
/>
<frameinstance modelid="{{{P}}}framemodel-options-element" id="{{{P}}}frame-options-order"
pos="69 0"
class="{{{Navigation::C_Class}}} {{{C_Class_Header}}} {{{MenuSounds::C_Class}}}"
data-nav-inputs="select;cancel;left;down"
data-nav-targets="_;_;{{{P}}}frame-options-criterion;{{{P}}}button-list-multi-select-select-all"
data-nav-group="{{{C_NavGroupName}}}"
data-nav-zone="{{{P}}}options-zone"
data-menusounds-selectsound="SelectBrowserSortOption"
/>
<frameinstance modelid="{{{P}}}framemodel-options-element" id="{{{P}}}frame-options-criterion"
pos="58 0"
class="{{{Navigation::C_Class}}} {{{C_Class_Header}}} {{{MenuSounds::C_Class}}}"
data-nav-inputs="select;cancel;right;left;down"
data-nav-targets="_;_;{{{P}}}frame-options-order;{{{P}}}frame-options-flatten;{{{P}}}button-list-multi-select-select-all"
data-nav-group="{{{C_NavGroupName}}}"
data-nav-zone="{{{P}}}options-zone"
data-menusounds-selectsound="SelectBrowserSortOption"
/>
<frameinstance modelid="{{{P}}}framemodel-options-element" id="{{{P}}}frame-options-flatten"
pos="47 0"
class="{{{Navigation::C_Class}}} {{{C_Class_Header}}} {{{MenuSounds::C_Class}}}"
data-nav-inputs="select;cancel;right;left;down"
data-nav-targets="_;_;{{{P}}}frame-options-criterion;{{{P}}}frame-options-explorer;{{{P}}}button-list-multi-select-select-all"
data-nav-group="{{{C_NavGroupName}}}"
data-nav-zone="{{{P}}}options-zone"
data-menusounds-selectsound="SelectBrowserSortOption"
/>
<frameinstance modelid="{{{P}}}framemodel-options-element" id="{{{P}}}frame-options-explorer"
pos="-4 0"
class="{{{Navigation::C_Class}}} {{{C_Class_Header}}} {{{MenuSounds::C_Class}}}"
data-nav-inputs="select;cancel;right;left;down"
data-nav-targets="_;_;{{{P}}}frame-options-flatten;{{{P}}}frame-options-refresh;{{{P}}}button-list-multi-select-select-all"
data-nav-group="{{{C_NavGroupName}}}"
data-nav-zone="{{{P}}}options-zone"
data-menusounds-selectsound="SelectOpenFolderInExplorer"
/>
</frame>
<frameinstance
modelid="{{{Button::C_Name}}}" id="{{{P}}}button-create-map"
class="{{{Navigation::C_Class}}} {{{C_Class_Footer}}}" pos="45 -68.5"
data-text="{{{ _("Create map")}}}"
data-size="48 8"
data-textsize="2.8"
data-textitalicslope=".2"
data-textfont="{{{FontManager::C_GameFontExtraBold}}}"
data-image="{{{Const::C_ImageUrl_ButtonBG_CreateMap}}}"
data-bgcolor="{{{ColorPalette::C_Color_GreenFour}}}"
data-imagefocus="{{{Const::C_ImageUrl_ButtonBG_CreateMap}}}"
data-textfocuscolor="{{{ColorPalette::C_Color_GreenFour}}}"
data-focuscolor="FFF"
data-halign="center"
data-valign="center"
data-nav-inputs="select;cancel;right;up"
data-nav-targets="_;_;{{{P}}}button-select-map;{{{P}}}frame-browser-map-scroll"
data-nav-group="{{{C_NavGroupName}}}"
data-nav-zone="{{{Button::C_NavZone}}}"
/>
<frame id="{{{P}}}frame-selected-map" pos="108 -14">
<frame pos="-28 22" z-index="5">
<label id="{{{P}}}label-map" size="65.5 8" class="{{{P}}}text-base" halign="left" valign="center2" textsize="5" textprefix="$i$t"/>
<label id="{{{P}}}label-author" size="65.5 8" pos="-1.5 -6" class="{{{P}}}text-base" halign="left" valign="center2" textsize="4" textprefix="$i$t" textfont="{{{FontManager::C_GameFontRegular}}}"/>
</frame>
<quad id="{{{P}}}quad-overlay-thumbnail" z-index="2" size="97 71" opacity=".4" image="{{{Const::C_ImageUrl_PopUp_Thumbnail_Overlay}}}" alphamask="{{{Const::C_ImageUrl_PopUp_Thumbnail_Mask}}}" colorize="000" class="{{{P}}}image-base"/>
<quad id="{{{P}}}quad-contour-thumbnail" z-index="4" size="97 71" image="{{{Const::C_ImageUrl_PopUp_Thumbnail_Contour}}}" class="{{{P}}}image-base"/>
<quad id="{{{P}}}quad-thumbnail" z-index="1" size="86. 62." keepratio="Clip" alphamask="{{{Const::C_ImageUrl_PopUp_Thumbnail_Mask2}}}" class="{{{P}}}image-base"/>
<quad id="{{{P}}}quad-map-thumbnail-bg" z-index="0" colorize="{{{ColorPalette::C_Color_GreenFour}}}" image="{{{Const::C_ImageUrl_PopUp_Thumbnail_Background}}}" size="97 71" keepratio="Clip" alphamask="{{{Const::C_ImageUrl_PopUp_Thumbnail_Mask}}}" class="{{{P}}}image-base"/>
<frame
id="{{{P}}}button-editor-settings"
class="{{{Navigation::C_Class}}} {{{C_Class_Body}}}"
pos="25 -22" z-index="6"
data-nav-inputs="select;cancel;left;up;down"
data-nav-targets="_;_;{{{P}}}frame-browser-map-scroll;{{{P}}}button-list-multi-select-select-all;{{{P}}}button-select-map"
data-nav-group="{{{C_NavGroupName}}}"
data-nav-zone="{{{P}}}quad-activation-zone"
>
<quad
size="10.5 8"
opacity="0" scriptevents="1"
class="{{{Navigation::C_Class_ActivationZone}}} {{{P}}}image-base"
id="{{{P}}}quad-activation-zone"
/>
<quad size="8 8" z-index="1" class="{{{P}}}image-base" id="{{{P}}}quad-image" colorize="FFF" image="{{{Const::C_ImageUrl_Icon_Edit}}}"/>
<quad
size="10.5 8"
class="{{{Navigation::C_Class_ActivationZone}}} {{{P}}}image-base"
image="{{{Const::C_ImageUrl_ButtonBG_SortingIcons}}}" colorize="FFF"
id="{{{P}}}quad-bg" opacity="0"
/>
</frame>
<frameinstance modelid="{{{Button::C_Name}}}" id="{{{P}}}button-select-map"
data-text="{{{_("Select map")}}}"
pos="-12 -54.5" data-size="48 8"
data-bgcolor="{{{ColorPalette::C_Color_GreenFour}}}" data-focuscolor="FFF"
data-textcolor="FFF" data-textsize="2.8"
data-textfont="{{{FontManager::C_GameFontExtraBold}}}"
data-image="{{{Const::C_ImageUrl_ButtonBG_CreateMap}}}"
data-imagefocus="{{{Const::C_ImageUrl_ButtonBG_CreateMap}}}"
data-textfocuscolor="{{{ColorPalette::C_Color_GreenFour}}}"
data-textitalicslope=".2"
data-valign="center" data-halign="center"
class="{{{Navigation::C_Class}}} {{{C_Class_Footer}}}"
data-nav-inputs="select;cancel;up;left"
data-nav-targets="_;_;{{{P}}}frame-browser-map-scroll;{{{P}}}button-create-map"
data-nav-group="{{{C_NavGroupName}}}"
data-nav-zone="{{{Button::C_NavZone}}}"
/>
</frame>
<frame id="{{{P}}}frame-selected-skin" pos="55 24">
<quad id="{{{P}}}quad-contour-thumbnail" z-index="4" size="105 76.8" image="{{{Const::C_ImageUrl_PopUp_Thumbnail_Contour}}}"/>
<quad id="{{{P}}}quad-thumbnail-bg" z-index="0" colorize="{{{ColorPalette::C_Color_GreenFour}}}" image="{{{Const::C_ImageUrl_PopUp_Thumbnail_Background}}}" size="105 76.8" keepratio="Clip" alphamask="{{{Const::C_ImageUrl_PopUp_Thumbnail_Mask}}}"/>
<label id="{{{P}}}label-skin" z-index="5" size="65.5 8" pos="22 -12.5" class="{{{P}}}text-base" halign="left" valign="center2" textsize="5" textprefix="$i"/>
<camera id="{{{P}}}camera-skin" z-index="5" pos="51 -33" halign="center" valign="center" size="80 75" hidden="1"/>
</frame>
<frame>
<frameinstance modelid="{{{Scroll::C_Name}}}" data-scroll-parent="{{{P}}}frame-browser-map-scroll" z-index="1" />
<frame
pos="{{{Size_BrowsersScrollWindow.X * -0.5 + 2.5}}} 24.5"
data-elements-per-line="{{{ColumnsNb}}}"
data-elements-per-page="{{{ElementsPerPage}}}"
data-element-size="{{{Size_Browser.X}}} {{{Size_Browser.Y}}}"
data-margin-size="{{{Size_BrowserMargin.X}}} {{{Size_BrowserMargin.Y}}}"
data-window-size="{{{Size_BrowsersScrollWindow.X}}} {{{Size_BrowsersScrollWindow.Y}}}"
data-header-height="{{{Size_Header.Y}}}"
data-footer-height="{{{Size_Footer.Y}}}"
data-scroll-indicator="1"
data-skew="-10"
data-scrollpadding="9"
data-scroll-indicator-y-offset="-8.5"
data-scroll-indicator-image="{{{Const::C_ImageUrl_Icon_Arrow_Bottom_Oblique}}}"
data-scroll-indicator-colorize="{{{ColorPalette::C_Color_GreenFour}}}"
class="{{{Scroll::C_Class_Window}}} {{{Navigation::C_Class}}} {{{C_Class_Body}}}"
data-nav-inputs="select;cancel;up;right;down"
data-nav-targets="_;_;{{{P}}}button-list-multi-select-select-all;{{{P}}}button-editor-settings;{{{P}}}button-select-map"
data-nav-group="{{{C_NavGroupName}}}"
id="{{{P}}}frame-browser-map-scroll"
>
<quad z-index="-1" scriptevents="1" class="{{{Scroll::C_Class_ScrollEvent}}}" />
{{{Ml_BrowsersMap}}}
</frame>
<label id="{{{P}}}label-no-elements" size="{{{Size_BrowsersScrollWindow.X-10.}}} 10" autonewline="1" halign="center" valign="center2" text="{{{C_Text_NoElements}}}" class="{{{P}}}text-base" z-index="1" hidden="1" />
</frame>
<frame>
<frameinstance modelid="{{{Scroll::C_Name}}}" data-scroll-parent="{{{P}}}frame-browser-small-map-scroll" z-index="1" />
<frame
pos="{{{Size_SmallBrowserScrollWindow.X * -0.5 - 29}}} 19"
data-elements-per-line="{{{ColumnsNbSmallMap}}}"
data-elements-per-page="{{{SmallMapsPerPage}}}"
data-element-size="{{{Size_BrowserSmallMaps.X}}} {{{Size_BrowserSmallMaps.Y}}}"
data-margin-size="{{{Size_SmallMapBrowserMargin.X}}} {{{Size_SmallMapBrowserMargin.Y}}}"
data-window-size="{{{Size_SmallBrowserScrollWindow.X}}} {{{Size_SmallBrowserScrollWindow.Y}}}"
data-header-height="{{{Size_Header.Y}}}"
data-footer-height="{{{Size_Footer.Y}}}"
data-scroll-indicator="1"
data-skew="-10"
data-scrollpadding="9"
data-scroll-indicator-y-offset="-10.5"
data-scroll-indicator-image="{{{Const::C_ImageUrl_Icon_Arrow_Bottom_Oblique}}}"
data-scroll-indicator-colorize="{{{ColorPalette::C_Color_GreenFour}}}"
data-scrollbar-visibility="{{{Scroll::C_ScrollBarVisibility_Never}}}"
class="{{{Scroll::C_Class_Window}}} {{{Navigation::C_Class}}} {{{C_Class_Body}}}"
data-nav-inputs="select;cancel;up;right;down"
data-nav-targets="_;_;{{{P}}}button-list-multi-select-select-all;{{{P}}}button-editor-settings;{{{P}}}button-select-map"
data-nav-group="{{{C_NavGroupName}}}"
id="{{{P}}}frame-browser-small-map-scroll"
>
<quad z-index="-1" scriptevents="1" class="{{{Scroll::C_Class_ScrollEvent}}}" />
{{{Ml_BrowsersSmallMap}}}
</frame>
<label id="{{{P}}}label-no-elements" pos="-30 0" size="{{{Size_SmallBrowserScrollWindow.X-10.}}} 10" autonewline="1" halign="center" valign="center2" text="{{{C_Text_NoElements}}}" class="{{{P}}}text-base" z-index="1" hidden="1" />
</frame>
<frame>
<frameinstance modelid="{{{Scroll::C_Name}}}" data-scroll-parent="{{{P}}}frame-browser-list-scroll" z-index="1" />
<frame
pos="{{{Size_ListBrowserScrollWindow.X * -0.5 + 2.5}}} 18.5"
data-elements-per-line="{{{ColumnsNbList}}}"
data-elements-per-page="{{{ListsPerPage}}}"
data-element-size="{{{Size_BrowserLists.X}}} {{{Size_BrowserLists.Y}}}"
data-margin-size="{{{Size_ListBrowserMargin.X}}} {{{Size_ListBrowserMargin.Y}}}"
data-window-size="{{{Size_ListBrowserScrollWindow.X}}} {{{Size_ListBrowserScrollWindow.Y}}}"
data-header-height="{{{Size_Header.Y}}}"
data-footer-height="{{{Size_Footer.Y}}}"
data-scroll-indicator="1"
data-skew="-10"
data-scrollpadding="11"
data-scroll-indicator-y-offset="-11.5"
data-scroll-indicator-image="{{{Const::C_ImageUrl_Icon_Arrow_Bottom_Oblique}}}"
data-scroll-indicator-colorize="{{{ColorPalette::C_Color_GreenFour}}}"
class="{{{Scroll::C_Class_Window}}} {{{Navigation::C_Class}}} {{{C_Class_Body}}}"
data-nav-inputs="select;cancel;up;down"
data-nav-targets="_;_;{{{P}}}button-list-multi-select-select-all;{{{P}}}button-select-map"
data-nav-group="{{{C_NavGroupName}}}"
id="{{{P}}}frame-browser-list-scroll"
>
<quad z-index="-1" scriptevents="1" class="{{{Scroll::C_Class_ScrollEvent}}}" />
{{{Ml_BrowsersList}}}
</frame>
<label id="{{{P}}}label-no-elements" size="{{{Size_ListBrowserScrollWindow.X-10.}}} 10" autonewline="1" halign="center" valign="center2" text="{{{C_Text_NoElements}}}" class="{{{P}}}text-base" z-index="1" hidden="1" />
</frame>
<frame id="{{{P}}}frame-list-buttons">
<frameinstance
modelid="{{{Button::C_Name}}}" id="{{{P}}}button-list-multi-select-valid"
class="{{{Navigation::C_Class}}} {{{C_Class_Footer}}}"
pos="93.5 -68.5" z-index="1"
data-text="{{{_("Confirm")}}}"
data-size="48 8"
data-bgcolor="{{{ColorPalette::C_Color_GreenFour}}}" data-focuscolor="FFF"
data-textcolor="FFF" data-textsize="2.8"
data-textfont="{{{FontManager::C_GameFontExtraBold}}}"
data-image="{{{Const::C_ImageUrl_ButtonBG_CreateMap}}}"
data-imagefocus="{{{Const::C_ImageUrl_ButtonBG_CreateMap}}}"
data-textfocuscolor="{{{ColorPalette::C_Color_GreenFour}}}"
data-textitalicslope=".2"
data-valign="center" data-halign="center"
data-nav-inputs="up;left;select;cancel"
data-nav-targets="{{{P}}}frame-browser-list-scroll;{{{P}}}button-create-map;_;_"
data-nav-group="{{{C_NavGroupName}}}"
data-nav-zone="{{{Button::C_NavZone}}}"
/>
<frameinstance
modelid="{{{Button::C_Name}}}" id="{{{P}}}button-list-multi-select-select-all"
class="{{{Navigation::C_Class}}} {{{C_Class_Body}}}"
pos="75 24" z-index="1"
data-text="{{{_("Select all")}}}"
data-size="48 8"
data-bgempty="1"
data-opacityunfocus=".5"
data-textcolor="FFF" data-textsize="2.8"
data-textfont="{{{FontManager::C_GameFontExtraBold}}}"
data-textfocuscolor="FFF"
data-textitalicslope=".2"
data-valign="center" data-halign="center"
data-nav-inputs="up;down;right;select;cancel"
data-nav-targets="{{{P}}}frame-parent-path;{{{P}}}frame-browser-list-scroll;{{{P}}}button-list-multi-select-unselect-all;_;_"
data-nav-group="{{{C_NavGroupName}}}"
data-nav-zone="{{{Button::C_NavZone}}}"
/>
<frameinstance
modelid="{{{Button::C_Name}}}" id="{{{P}}}button-list-multi-select-unselect-all"
class="{{{Navigation::C_Class}}} {{{C_Class_Body}}}"
pos="120 24" z-index="1"
data-text="{{{_("Unselect all")}}}"
data-size="48 8"
data-bgempty="1"
data-opacityunfocus=".5"
data-textcolor="FFF" data-textsize="2.8"
data-textfont="{{{FontManager::C_GameFontExtraBold}}}"
data-textfocuscolor="FFF"
data-textitalicslope=".2"
data-valign="center" data-halign="center"
data-nav-inputs="up;down;left;select;cancel"
data-nav-targets="{{{P}}}frame-parent-path;{{{P}}}frame-browser-list-scroll;{{{P}}}button-list-multi-select-select-all;_;_"
data-nav-group="{{{C_NavGroupName}}}"
data-nav-zone="{{{Button::C_NavZone}}}"
/>
</frame>
<frame id="{{{P}}}frame-tooltip" pos="5.5 28" hidden="1">
<label id="{{{P}}}label-tooltip" class="{{{P}}}text-base" size="278 10" textsize="4" />
</frame>
<label id="{{{P}}}label-error" pos="-65 -68.5" size="150 10" autonewline="1" maxline="2" textprefix="$i" halign="center" valign="center2" textsize="3" textfont="{{{FontManager::C_GameFontSemiBold}}}" textcolor="{{{ColorPalette::C_Color_ErrorRed}}}"/>
</frame>
""",
"""
#Include "TextLib" as {{{P}}}TL
#Include "ColorLib" as {{{P}}}CL
#Const {{{P}}}C_BrowserPopUpSize {{{dump(C_BrowserPopUpSize)}}}
#Const {{{P}}}C_BrowserPopUpPosY {{{dump(C_BrowserPopUpPosY)}}}
#Const {{{P}}}C_EventType_UnFocusScroll {{{C_EventType_UnFocusScroll}}}
#Const {{{P}}}C_EventType_Select {{{C_EventType_Select}}}
#Const {{{P}}}C_EventType_Cancel {{{C_EventType_Cancel}}}
#Const {{{P}}}C_EventType_CreateMap {{{C_EventType_CreateMap}}}
#Const {{{P}}}C_EventType_ReachLimit {{{C_EventType_ReachLimit}}}
#Const {{{P}}}C_EventType_Focus {{{C_EventType_Focus}}}
#Const {{{P}}}C_EventType_ConfirmSelection {{{C_EventType_ConfirmSelection}}}
#Const {{{P}}}C_EventType_EditorSettings {{{C_EventType_EditorSettings}}}
#Const {{{P}}}C_EventType_MultiSelect {{{C_EventType_MultiSelect}}}
#Const {{{P}}}C_BrowserType_None {{{dump(C_BrowserType_None)}}}
#Const {{{P}}}C_BrowserType_PathNavigation {{{dump(C_BrowserType_PathNavigation)}}}
#Const {{{P}}}C_BrowserType_PathNavigationSmall {{{dump(C_BrowserType_PathNavigationSmall)}}}
#Const {{{P}}}C_BrowserType_List {{{dump(C_BrowserType_List)}}}
#Const {{{P}}}C_TooltipPos_ScrollTop {{{dump(C_TooltipPos_ScrollTop )}}}
#Const {{{P}}}C_TooltipPos_Footer {{{dump(C_TooltipPos_Footer )}}}
#Const {{{P}}}C_TaskListState_None {{{C_TaskListState_None}}}
#Const {{{P}}}C_TaskListState_IsProcessing {{{C_TaskListState_IsProcessing}}}
#Const {{{P}}}C_TaskListState_HasSucceeded {{{C_TaskListState_HasSucceeded}}}
#Const {{{P}}}C_TaskListState_HasFailed {{{C_TaskListState_HasFailed}}}
#Const {{{P}}}C_TaskListState_IsCanceled {{{C_TaskListState_IsCanceled}}}
#Const {{{P}}}C_DataType_None {{{C_DataType_None}}}
#Const {{{P}}}C_DataType_Image {{{C_DataType_Image}}}
#Const {{{P}}}C_DataType_Skin {{{C_DataType_Skin}}}
#Const {{{P}}}C_DataType_Map {{{C_DataType_Map}}}
#Const {{{P}}}C_DataType_Replay {{{C_DataType_Replay}}}
#Const {{{P}}}C_DataType_Campaign {{{C_DataType_Campaign}}}
#Const {{{P}}}C_DataType_MonthlyCampaign {{{C_DataType_MonthlyCampaign}}}
#Const {{{P}}}C_DataType_Script {{{C_DataType_Script}}}
#Const {{{P}}}C_DataType_MatchSettings {{{C_DataType_MatchSettings}}}
#Const {{{P}}}C_DataType_Category {{{C_DataType_Category}}}
#Const {{{P}}}C_DataType_Club {{{C_DataType_Club}}}
#Const {{{P}}}C_DataType_ItemCollection {{{C_DataType_ItemCollection}}}
#Const {{{P}}}C_DataType_NameList {{{dump(C_DataType_NameList)}}}
#Const {{{P}}}C_DelayBetweenRequest {{{dump(C_DelayBetweenRequest)}}}
#Const {{{P}}}C_DataType_IsFileList [
{{{C_DataType_Image}}},
{{{C_DataType_Skin}}},
{{{C_DataType_Script}}},
{{{C_DataType_MatchSettings}}},
{{{C_DataType_ItemCollection}}}
]
#Const {{{P}}}C_DataType_CanBeMultiSelect [
{{{C_DataType_Replay}}},
{{{C_DataType_Map}}}
]
#Const {{{P}}}C_DataType_HasCloudFolder [
{{{C_DataType_Map}}}
]
#Const {{{P}}}C_Path_Base {{{dump(C_Path_Base)}}}
#Const {{{P}}}C_Path_Officials {{{dump(C_Path_Officials)}}}
#Const {{{P}}}C_Path_Quarterly {{{dump(C_Path_Quarterly)}}}
#Const {{{P}}}C_Path_Monthly {{{dump(C_Path_Monthly)}}}
#Const {{{P}}}C_Path_Clubs {{{dump(C_Path_Clubs)}}}
#Const {{{P}}}C_Path_ChosenClub {{{dump(C_Path_ChosenClub)}}}
#Const {{{P}}}C_Path_Local {{{dump(C_Path_Local)}}}
#Const {{{P}}}C_Path_Null {{{dump(C_Path_Null)}}}
#Const {{{P}}}C_Paths_Tree [
{{{dump(C_Path_Base)}}} => [{{{dump(C_Path_Local)}}}, {{{dump(C_Path_Officials)}}}, {{{dump(C_Path_Clubs)}}}],
{{{dump(C_Path_Officials)}}} => [{{{dump(C_Path_Quarterly)}}}, {{{dump(C_Path_Monthly)}}}],
{{{dump(C_Path_Clubs)}}} => [{{{dump(C_Path_ChosenClub)}}}]
]
#Const {{{P}}}C_Paths_Names {{{dump(C_Paths_Names)}}}
#Const {{{P}}}C_Month_Names {{{dump(Const::C_Month_Names)}}}
#Const {{{P}}}C_BasePath "file://"
#Const {{{P}}}C_BasePath_Media "Media/"
#Const {{{P}}}C_BasePath_Skins "Skins/"
#Const {{{P}}}C_Browser_NullDataCount 0
#Struct {{{P}}}K_ReplayInfo {
Text Id;
Text MapUid;
Text Name;
Text Path;
Text ParentPath;
Text FilePath;
Text FileName;
}
#Struct {{{P}}}K_MapBrowserData {
Text SubFolder;
{{{CampaignStruct::P}}}K_Map MapInfo;
Text Path;
Text ParentPath;
}
#Struct {{{P}}}K_ReplayBrowserData {
Text SubFolder;
{{{P}}}K_ReplayInfo ReplayInfo;
}
#Struct {{{P}}}K_SkinBrowserData {
Ident SceneId;
Ident CurrentItemId;
}
#Struct {{{P}}}K_FileBrowserData {
Text SubFolder;
Text File;
Text Path;
Text ParentPath;
}
#Struct {{{P}}}K_TaskResult_FileData {
Ident TaskId_GetFiles;
Integer TaskListState;
{{{P}}}K_FileBrowserData[Integer] Datas;
}
#Struct {{{P}}}K_BrowserElement {
Text Name;
Text File;
Text TypeName;
Text Missing;
Boolean IsSubfolder;
Text MapUid;
}
#Struct {{{P}}}K_RequestsManager {
Integer PageMonthly;
Integer PageQuarterly;
Integer PageClubCampaigns;
Integer PageClubs;
Boolean WaitingForMonthlyCampaigns;
Boolean WaitingForQuarterlyCampaigns;
Boolean WaitingForClubCampaigns;
Boolean WaitingForClubs;
Boolean WaitingForLoadedCampaign;
Boolean WaitingForLoadedMonthlyCampaign;
Boolean[Integer] DisplayLiveContent; // < Key is CampaignType from Campaign Struct
Boolean CampaignIsLoaded;
Boolean CampaignLoadFail;
Boolean MonthlyCampaignIsLoaded;
Boolean MonthlyCampaignLoadFail;
Integer NextPageLoadTime;
Boolean GetCampaign;
}
#Struct {{{P}}}K_Settings {
Boolean ShowOnlyUserMaps;
Boolean ShowOnlyPlayableMaps;
Text[] FilterByEnvironment;
Boolean DisplayCreateMapButton;
Boolean ListMultiSelect;
Boolean DisplayEditorSettingsButton;
Text[] FilterByExtension;
Boolean IsBrowsingForEdition;
Boolean DisableCloudFolder;
Boolean DisplayFileNameTooltip;
Integer PositionFileNameTooltip;
Text[] FilterByMapType;
}
#Struct {{{P}}}K_Browser {
Integer Type;
Text Name;
Text SubTitle;
Integer[] DataTypes;
Boolean IsFocused;
Text BasePath;
Text ParentPath;
Text CurrentPath;
Integer ChosenClubId;
{{{CampaignStruct::P}}}K_Campaign ChosenCampaign;
{{{CampaignStruct::P}}}K_MonthlyCampaign ChosenMonthlyCampaign;
Ident TaskId_GetMaps;
Ident TaskId_GetReplays;
Integer MapTaskListState;
Integer ReplayTaskListState;
{{{P}}}K_TaskResult_FileData[Integer] Files; // Key is the data type of the Files
{{{P}}}K_MapBrowserData[Integer] Maps;
{{{P}}}K_ReplayBrowserData[Integer] Replays;
{{{P}}}K_SkinBrowserData Skin;
{{{CampaignStruct::P}}}K_Campaign[Integer] Campaigns;
{{{ClubStruct::P}}}K_Club[Integer] Clubs;
{{{ClubStruct::P}}}K_Room[Integer] Rooms;
Boolean IsFlatten;
Boolean IsSortingFromAscendingOrder;
Boolean IsSortingByNameElseByDate;
{{{P}}}K_Settings Settings;
{{{P}}}K_ReplayInfo[Text] SelectedReplays;
{{{CampaignStruct::P}}}K_Map[Text] SelectedMaps;
}
#Struct {{{P}}}K_Event {
Integer Type;
CMlControl From;
CMlScriptEvent::EMenuNavAction MenuNavAction;
Integer DataType;
Text Data;
}
""",
"""
declare {{{P}}}K_Browser[Integer] {{{P}}}G_Browsers;
declare Integer {{{P}}}G_Type_CurrentBrowser;
declare {{{P}}}K_Event[] {{{P}}}PendingEvents;
declare CMlFrame {{{P}}}G_Frame_Global;
declare CMlFrame {{{P}}}G_Frame_CurrentScroll;
declare {{{P}}}K_RequestsManager {{{P}}}G_RequestsManager;
declare Text[][Text] {{{P}}}G_Paths_Tree;
declare {{{P}}}K_MapBrowserData {{{P}}}G_PreSelectedMapBrowserData;
declare CMlControl {{{P}}}G_Frame_FocusHeader;
declare CMlControl {{{P}}}G_Frame_FocusBody;
declare CMlControl {{{P}}}G_Frame_FocusFooter;
Text {{{P}}}GetCurrentBrowserName() {
if (!{{{P}}}G_Browsers.existskey({{{P}}}G_Type_CurrentBrowser)) return "";
return {{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Name;
}
{{{P}}}K_Settings {{{P}}}GetDefaultSettings() {
return {{{P}}}K_Settings {
ShowOnlyUserMaps = False,
ShowOnlyPlayableMaps = False,
FilterByEnvironment = ["{{{EnvironmentInfo::C_Collection_Stadium}}}"],
DisplayCreateMapButton = True,
ListMultiSelect = False,
DisplayEditorSettingsButton = False,
FilterByExtension = [],
IsBrowsingForEdition = False,
DisableCloudFolder = False,
DisplayFileNameTooltip = False,
PositionFileNameTooltip = {{{P}}}C_TooltipPos_Footer,
FilterByMapType = []
};
}
Void {{{P}}}ShowError(Text _ErrorMessage) {
if (!{{{P}}}G_Browsers.existskey({{{P}}}G_Type_CurrentBrowser)) return;
({{{P}}}G_Frame_Global.GetFirstChild("{{{P}}}label-error") as CMlLabel).SetText(_ErrorMessage);
}
Void {{{P}}}FocusScroll(Boolean _IsScrollFocused) {
if (_IsScrollFocused) {
{{{Scroll::P}}}Focus({{{P}}}G_Frame_CurrentScroll);
} else {
{{{Scroll::P}}}Unfocus({{{P}}}G_Frame_CurrentScroll);
}
}
Text {{{P}}}GetLastNameOfPath(Text _FolderPath) {
declare Text Path = {{{P}}}TL::Replace(_FolderPath, "\\", "/");
declare Text[] TmpSplit = {{{P}}}TL::Split("/", Path);
if (TmpSplit.count == 0) return _FolderPath;
return TmpSplit[TmpSplit.count-1];
}
Void {{{P}}}DestroyScene() {
if ({{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Skin.SceneId != NullId) {
if ({{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Skin.CurrentItemId != NullId) {
MenuSceneMgr.ItemDestroy({{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Skin.SceneId, {{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Skin.CurrentItemId);
{{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Skin.CurrentItemId = NullId;
}
MenuSceneMgr.SceneDestroy({{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Skin.SceneId);
{{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Skin.SceneId = NullId;
}
}
Void {{{P}}}FocusSkin(Boolean _Focused, Text _SkinName, Text _SkinPath) {
declare Frame_SelectedSkin <=> ({{{P}}}G_Frame_Global.GetFirstChild("{{{P}}}frame-selected-skin") as CMlFrame);
declare Label_Skin = (Frame_SelectedSkin.GetFirstChild("{{{P}}}label-skin") as CMlLabel);
declare CMlCamera Camera_Skin = (Frame_SelectedSkin.GetFirstChild("{{{P}}}camera-skin") as CMlCamera);
Camera_Skin.Visible = _Focused;
if (_Focused && {{{P}}}TL::EndsWith(".zip", _SkinPath)) {
if ({{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Skin.SceneId == NullId) {
{{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Skin.SceneId = MenuSceneMgr.SceneCreate("Empty");
if ({{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Skin.SceneId != NullId) {
MenuSceneMgr.CameraSetLocation({{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Skin.SceneId, <0., 2.5, -8.5>, 12., 30.);
MenuSceneMgr.PlaneReflectEnable({{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Skin.SceneId, 0.63, Null, Null, Null, Null, -2.1);
}
}
if ({{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Skin.SceneId != NullId) {
{{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Skin.CurrentItemId = MenuSceneMgr.ItemCreate({{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Skin.SceneId, {{{ClubStruct::P}}}C_CameraSkinModel, _SkinPath, "");
Label_Skin.SetText(_SkinName);
}
} else {
{{{P}}}DestroyScene();
Label_Skin.SetText("");
}
}
Void {{{P}}}FocusBrowserElement(CMlFrame _Frame_BrowserElement, Boolean _Focused) {
if (_Frame_BrowserElement == Null) return;
declare CMlFrame Quad9_Select <=> (_Frame_BrowserElement.GetFirstChild("{{{P}}}quad9-select") as CMlFrame);
if (Quad9_Select != Null) Quad9_Select.Visible = _Focused;
declare Quad_Focus <=> (_Frame_BrowserElement.GetFirstChild("{{{P}}}quad-focus") as CMlQuad);
declare Quad_Check <=> (_Frame_BrowserElement.GetFirstChild("{{{P}}}quad-check") as CMlQuad);
if (Quad_Focus != Null) Quad_Focus.Visible = _Focused;
if (_Focused) {
if (Quad_Check != Null) Quad_Check.Colorize = {{{P}}}CL::Hex3ToRgb("FFF");
(_Frame_BrowserElement.GetFirstChild("{{{P}}}label-name") as CMlLabel).TextColor = {{{P}}}CL::Hex3ToRgb("FFF");
} else {
if (Quad_Check != Null) Quad_Check.Colorize = {{{P}}}CL::Hex6ToRgb("{{{ColorPalette::C_Color_GreenFour}}}");
(_Frame_BrowserElement.GetFirstChild("{{{P}}}label-name") as CMlLabel).TextColor = {{{P}}}CL::Hex6ToRgb("{{{ColorPalette::C_Color_GreenFour}}}");
}
if (
{{{P}}}G_Browsers.existskey({{{P}}}G_Type_CurrentBrowser) &&
{{{P}}}G_Browsers[{{{P}}}G_Type_CurrentBrowser].Settings.DisplayFileNameTooltip
) {
declare Label_Tooltip <=> ({{{P}}}G_Frame_Global.GetFirstChild("{{{P}}}label-tooltip") as CMlLabel);
if (_Focused) {
declare Text {{{P}}}Tooltip for _Frame_BrowserElement;