-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathGMUI.gml
12232 lines (9907 loc) · 407 KB
/
GMUI.gml
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
#define _Debug_Button
// Show/hide debug for the first interface
if ((GMUIid(1)).DebugData) {
(GMUIid(1)).DebugData = false;
}
else {
(GMUIid(1)).DebugData = true;
}
#define _Disable_Button
if (argument0 == 1) {
GMUI_ControlDisable("BtnDisable1",true);
GMUI_ControlDisable("BtnDisable2",false);
}
else {
GMUI_ControlDisable("BtnDisable2",true);
GMUI_ControlDisable("BtnDisable1",false);
}
#define _Disable_Slider_Button
if (GMUI_GetControl("Slider").Disabled) {
GMUI_ControlDisable("Slider",false);
GMUI_ControlDisable("SliderV",false);
with (GMUI_GetControl("BtnDisableSlider")) {
GMUI_ControlSetButton("Disable It",-1,-1,-1);
}
}
else {
GMUI_ControlDisable("Slider",true);
GMUI_ControlDisable("SliderV",true);
with (GMUI_GetControl("BtnDisableSlider")) {
GMUI_ControlSetButton("Enable It",-1,-1,-1);
}
}
#define _Enlarge_Button
// Make window bigger
//show_message("Not implemented yet");
if (room == GMUIdemo)
room_goto_next();
GMUI_GridAdjust(ceil(room_width/(GMUII()).cellsize),ceil(room_height/(GMUII()).cellsize_h));
#define _Exit_Button
game_end();
#define _Hide_Button
GMUI_GroupHide(2, 0, 1-GMUI_ControlIsHidden("TestButton"));
#define _Hide_Button2
GMUI_GroupHide(1, 0, 1-GMUI_ControlIsHidden("Test1"));
#define _Hover_Checkbox
if (!GMUI_ControlIsHidden("CheckBox"))
GMUI_ControlHideTooltip("CheckBox",false);
#define _Hover_Int
if (!GMUI_ControlIsHidden("Test4"))
GMUI_ControlHideTooltip("Test4",false);
#define _HoverOff_Checkbox
GMUI_ControlHideTooltip("CheckBox",true);
#define _HoverOff_Int
GMUI_ControlHideTooltip("Test4",true);
#define _ListAction
// Action to execute on selecting an item from the list, with argument0 as the ID selected
show_message("You selected item of ID: " + string(argument0) + " From the control: " + string(valueName));
#define _Move_Button
var MyButton,MyButtonText;
MyButton = GMUI_GetControl("MoveButton");
if (MyButton >= 0)
MyButtonText = MyButton.ControlButtonText;
if (MyButtonText == "Move"+chr(13)+"Group") {
with (MyButton) GMUI_ControlSetButton("Return"+chr(13)+"Group",-1,-1,-1);
// Object is handling the group position here
testmoving.moving = 1;
}
else {
with (MyButton) GMUI_ControlSetButton("Move"+chr(13)+"Group",-1,-1,-1);
testmoving.moving = 0;
// Return the group to where it was
GMUI_SetOnLayer(0);
GMUI_GroupSetPosition(1,20,3,0,0);
}
#define _Popup_Button
// Actually show a popup
GMUI_ShowPopup("Test Popup",true,true);
#define _PopupClose_Button
//GMUI_ShowMenu("Test Menu",false,true);
GMUI_CloseMenu(true);
#define _PopupMenu_Button
GMUI_ShowMenu("Test Menu",true,true);
#define _PopupMenu2_Button
GMUI_ShowMenu("Test Menu 2",true,true);
#define _PopupReturnAction
// Show result
var str;
switch (GMUI_PopupGetResponse()) {
case -1: str = "Cancel"; break;
case 0: str = "No"; break;
case 1: str = "Yes/Ok" break;
default: str = "No response"; break;
}
with (GMUI_GetControl("ResponseLabel")) {
GMUI_ControlSetText("Responded with: " + str);
}
#define _SliderMid_Button
var slider;
slider = GMUI_GetControl("Slider");
GMUI_SetValue("Slider",(slider.ControlMinValue+slider.ControlMaxValue)/2,2);
#define _SliderSnap_Button
var slider;
slider = GMUI_GetControl("Slider");
// FOR DEMO PURPOSES... MAINLY
slider.SliderSnap = 1 - slider.SliderSnap;
#define _SliderValue_Changed
GMUI_SetValue("SliderVal",string(round(GMUI_GetValue("Slider"))),global.GMUIDataTypeString);
#define _Swipe_Button
var MyButton;
MyButton = GMUI_GetControl("SwipeButton");
if (!global.Swiped) {
GMUI_LayerTransitionToXY(0, 320, 20, .1, easeExpOut, room_speed);
global.Swiped = true;
with (MyButton) GMUI_ControlSetButton("Swipe"+chr(13)+"Back",-1,-1,-1);
}
else {
GMUI_LayerTransitionToXY(0, 0, 0, 1, easeExpOut, room_speed);
global.Swiped = false;
with (MyButton) GMUI_ControlSetButton("Swipe"+chr(13)+"Out",-1,-1,-1);
}
#define _Switch_Button
//switch group positions
if (!global.Switched) {
var anchoredRight;
anchoredRight = GMUI_GetAnchoredCellX(GMUI_GridGetWidth(GMUII(),0),11,global.GMUIAnchorTopRight);
GMUI_GroupTransitionToCell(0, 1, 2, 3, easeElasticOut, 30);
GMUI_GroupTransitionToCell(0, 2, anchoredRight, 3, easeElasticOut, 30);
global.Switched = true;
}
else {
var anchoredRight;
anchoredRight = GMUI_GetAnchoredCellX(GMUI_GridGetWidth(GMUII(),0),20,global.GMUIAnchorTopRight);
GMUI_GroupTransitionToCell(0, 1, anchoredRight, 3, easeElasticOut, 30);
GMUI_GroupTransitionToCell(0, 2, 2, 3, easeElasticOut, 30);
global.Switched = false;
}
#define _Test_Button
// Demo Test Button action
// Get all the values and display them:
var t1,t2,t3,t4;
t1 = GMUI_GetValueString("Test1");
t2 = GMUI_GetValueString("Test2");
t3 = GMUI_GetValueString("Test3");
t4 = GMUI_GetValueString("Test4");
show_message("Result:\n" + t1 + "\n" + t2 + "\n" + t3 + "\n" + t4);
#define _Show_Group
// Uses an argument to determine which group to show
// Hide group shown
var _grouplayer, _i, _group; _grouplayer = 0;
_group = argument0;
// Show group selected
// Right Group 2: Sliders
// Right Group 3: Inputs
// Right Group 4: Toggles
// Right Group 5: Selection
// Right Group 6: Disabling
// Right Group 7: Layering
// Right Group 8: Movement
// Right Group 9: Anchoring
// Right Group 10: Expand (may also be button action?)
for (_i=2; _i <=10; _i+=1) {
if (_i != _group) {
GMUI_GroupHide(_i,_grouplayer,true);
}
}
GMUI_GroupHide(_group,_grouplayer,false);
#define _Movement_Button
var _move;
switch (argument0) {
case 1:
_move = -1;
break
case 2:
_move = easeExpOut;
break;
case 3:
_move = easeOutBack;
break;
case 4:
_move = easeElasticOut;
break;
case 5:
_move = easeBounceOut;
break;
}
GMUI_ControlPosition("MovementBox", 2,2, 0,0, -1); // Use current anchor (-1)
GMUI_ControlPosition("MovementBox2", 1,1, 0,0, -1); // Use current anchor (-1)//testing
GMUI_ControlTransitionToCell("MovementBox", 10,2, _move, room_speed);
GMUI_ControlTransitionToCell("MovementBox2", 10,2, _move, room_speed);//testing
#define _Test_Form
///_Test_Form() This interface is for the testing form
// TESTING
// Set optional grid settings
GMUI_SetKeyNavigation(global.GMUIDirectionTypeVertical,vk_up,vk_down,vk_left,vk_right,true);
/*
1. Create any groups and objects you like for each layer, defaulting to layer 0
Note: Controls have unique names across layers,
whereas group numbers are specific to the layer.
*/
// Set the layer to change settings on [This one is optional: Already defaults to layer 0]
GMUI_SetOnLayer(0);
// Right side group
GMUI_CreateGroup(1, 20,3, global.GMUIAnchorTopRight);
GMUI_GroupSetSize(1, 20,4);
GMUI_GroupSetStyle(1, c_black, .2, c_black, .3, 0);
GMUI_GroupSetFadeOnHide(1, room_speed, 0);
//GMUI_GroupSetOverflow(1, global.GMUIOverflowScroll, -1);
//GMUI_GroupHideOverflow(global.GMUIOverflowScroll);
//GMUI_GroupStretchToGrid(1,true);
//GMUI_GroupSetSpriteMap(1, s2,s3,s4,s5,s6,s7,s8,s1,s9,false);
// Left side group
GMUI_CreateGroup(2, 2,3, global.GMUIAnchorTopLeft);
GMUI_GroupSetFadeOnHide(2, room_speed, 0);
/*
2. Create the controls, defaulting to layer 0 or the last layer created
NOTE: To switch layers, use GMUI_SwitchToLayer(#);
*/
/*with (GMUI_Add("test15","textstring",2,1,6,6,global.GMUIAnchorTop)) {
GMUI_ControlSetAttributes(14,0,0,0);
GMUI_ControlStretchToGrid(true);
}*/
with (GMUI_Add("Test1","textstring", 1,0, 16,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetAttributes(20,0,0,0);
GMUI_ControlSetInitValue("Select");
GMUI_ControlAddToGroup(1);
GMUI_ControlSetSprite(sprite24,0,1,0);//GMUIspr_input
}
with (GMUI_Add("Toggle3", "toggle", 3,3, 3,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetToggleSettings(1, c_lime, c_gray, global.GMUISlideFullRoundRect, $808080, $505050, room_speed/4, global.GMUIDirectionTypeHorizontal, 0);
GMUI_ControlAddToGroup(1);
}
/*
with (GMUI_Add("Test12","textstring", 1,4, 12,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetAttributes(14,0,0,0);
GMUI_ControlSetInitValue("test");
GMUI_ControlAddToGroup(1);
}*/
/*
with (GMUI_Add("test13","textstring",10,1,12,2,global.GMUIAnchorTopLeft)) {
GMUI_ControlSetAttributes(14,0,0,0);
}
*/
with (GMUI_Add("Test2", "textint", 0,0, 10,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetAttributes(5,0,-1000,1000);
GMUI_ControlSetStyle(GMUIhsv(85,55,255),GMUIrgb(20,20,20),-1,-1,-1,-1,-1,-1,-1,-1);
GMUI_ControlAddToGroup(2);
}
/*
with (GMUI_Add("test14","textstring",20,1,12,2,global.GMUIAnchorTopLeft)) {
GMUI_ControlSetAttributes(14,0,0,0);
}
*/
with (GMUI_Add("Test3", "textdecimal", 0,3, 10,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetAttributes(10,10,-999,999);
GMUI_ControlAddToGroup(2);
//GMUI_ControlSetSpriteMap(s2,s3,s4,s5,s6,s7,s8,s1,s9,false);
}
with (GMUI_Add("Test4", "intpicker", 0,6, 10,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetAttributes(0,0,-20,20);
GMUI_ControlSetInitValue(-1);
GMUI_ControlAddToGroup(2);
GMUI_ControlSetHoverAction(_Hover_Int);
GMUI_ControlSetHoverOffAction(_HoverOff_Int);
//sprite_set_offset(GMUIspr_arrow,10,12);sprite_set_offset(GMUIspr_arrowup,10,0); // If vertical, offset should be centered
//GMUI_ControlSetPicker(sprite_get_width(GMUIspr_arrowup) + 4,sprite_get_height(GMUIspr_arrowup) + 4,
// global.GMUIDirectionTypeVertical, GMUIspr_arrowup, GMUIspr_arrow);
with (GMUI_ControlAddTooltip("-20 to 20.",global.GMUIAnchorLeft,6,2,12,4,-1,-1)) {
GMUI_ControlSetFadeOnHide(id, room_speed/4);
}
}
with (GMUI_Add("TestButton", "textbutton", 3,9, 5,3, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetButtonAction(_Test_Button);
GMUI_ControlSetButton("Test!", -1, -1, -1);
GMUI_ControlSetStyle(-1, -1, c_red, 1, 0.85, -1, -1, -1, -1, -1);
GMUI_ControlAddToGroup(2);
}
// SELECT LIST TEST
with (GMUI_Add("TestSelectList", "selectlist", 8,16, 10,5, global.GMUIAnchorTopLeft)) {
GMUI_ItemListSettings(26, $E3E3E3, -1, -1);
GMUI_ItemListBackground($DEDEDE, $EAEAEA, 0.8, 1);
GMUI_ItemListSelectAction(_ListAction);
GMUI_AddItem(2,10,"2-One","",-1);
GMUI_AddItem(4,20,"4-Two","",-1);
GMUI_AddItem(6,30,"6-Three","",-1);
GMUI_AddItem(8,40,"8-Four","",-1);
GMUI_AddItem(10,50,"10-Five","",-1);
GMUI_AddItem(12,60,"12-Six","",-1);
GMUI_AddItem(14,70,"14-Seven","",-1);
GMUI_AddItem(16,70,"16-Eight","",-1);
GMUI_AddItem(18,70,"18-Nine","",-1);
GMUI_AddItem(20,70,"20-Ten","",-1);
GMUI_AddItem(22,70,"22-Eleven","",-1);
GMUI_AddItem(24,70,"24-Twelve","",-1);
GMUI_AddItem(26,80,"26-Thirteen","",-1);
}
with (GMUI_Add("PopupMenuButton", "textbutton", 1,7, 5,3, global.GMUIAnchorBottomLeft)) {
GMUI_ControlSetButtonAction(_PopupMenu_Button);
GMUI_ControlSetButton("Show"+chr(13)+"Menu", -1, -1, -1);
GMUI_ControlSetStyle(-1, -1, c_purple, 1, 0.85, -1, -1, -1, -1, -1);
}
with (GMUI_Add("DebugButton", "textbutton", 1,3, 5,3, global.GMUIAnchorBottomLeft)) {
GMUI_ControlSetButtonAction(_Debug_Button);
GMUI_ControlSetButton("Debug", -1, -1, -1);
GMUI_ControlSetStyle(-1, -1, c_gray, 1, 0.85, -1, -1, -1, -1, -1);
}
with (GMUI_Add("SwipeButton", "textbutton", 8,7, 5,3, global.GMUIAnchorBottomLeft)) {
GMUI_ControlSetButtonAction(_Swipe_Button);
GMUI_ControlSetButton("Swipe"+chr(13)+"Out",-1,-1,-1);
}
with (GMUI_Add("DisableButton", "textbutton", 8,3, 5,3, global.GMUIAnchorBottomLeft)) {
GMUI_ControlSetButtonAction(_Disable_Button);
GMUI_ControlSetButton("Disable"+chr(13)+"Test",-1,-1,-1);
}
with (GMUI_Add("HideButton2", "textbutton", 15,7, 5,3, global.GMUIAnchorBottomLeft)) {
GMUI_ControlSetButtonAction(_Hide_Button2);
GMUI_ControlSetButton("Hide"+chr(13)+"Group 2",-1,-1,-1);
}
with (GMUI_Add("HideButton", "textbutton", 15,3, 5,3, global.GMUIAnchorBottomLeft)) {
GMUI_ControlSetButtonAction(_Hide_Button);
GMUI_ControlSetButton("Hide"+chr(13)+"Group 1",-1,-1,-1);
}
with (GMUI_Add("MoveButton", "textbutton", 22,3, 6,3, global.GMUIAnchorBottomLeft)) {
GMUI_ControlSetButtonAction(_Move_Button);
GMUI_ControlSetButton("Move"+chr(13)+"Group",-1,-1,-1);
}
with (GMUI_Add("EnlargeButton", "textbutton", 30,3, 6,3, global.GMUIAnchorBottomLeft)) {
GMUI_ControlSetButtonAction(_Enlarge_Button);
GMUI_ControlSetButton("Enlarge"+chr(13)+"Window",-1,-1,-1);
}
with (GMUI_Add("MoveButton2", "button", 18,0, 2,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetButtonAction(_Move_Button);
GMUI_ControlSetButton("", GMUIspr_move, -1, -1);
GMUI_ControlAddToGroup(1);
}
with (GMUI_Add("SwitchButton", "button", -2,16, 4,2, global.GMUIAnchorTop)) {
GMUI_ControlSetButtonAction(_Switch_Button);
GMUI_ControlSetSprite(GMUIspr_switch,0,1,0);
}
with (GMUI_Add("ExitButton", "textbutton", 0,0, 1,1, global.GMUIAnchorTopRight)) {
GMUI_ControlSetButtonAction(_Exit_Button);
GMUI_ControlSetButton("x", -1, -1, -1);
// (Example:) Minor adjustment so that the control isnt cut off by the room
GMUI_ControlSetPositioning(-1,0,0,0);
GMUI_ControlPersistentToLayer(1); // Test multi-layer
}
// Test slider
with (GMUI_Add("Slider", "slider", 16,12, 10,2, global.GMUIAnchorBottomRight)) {
GMUI_ControlSetSliderSettings(13,10,34,true,true,true,global.GMUIDirectionTypeHorizontal);
GMUI_ControlSetSliderStyle(2,2,c_dkgray,0.6,c_teal,0.9,c_dkgray,0.4,c_aqua,1,c_gray,0.8);
GMUI_ControlSetSliderSize(16, 20, 1, 12, 10, 8, 6, 8);
GMUI_ControlSetInitValue(20);
GMUI_ControlSetValueChangedAction(_SliderValue_Changed);
}
// Button to set slider to mid point
with (GMUI_Add("MidSlider", "button", 19,12, 2,2, global.GMUIAnchorBottomRight)) {
GMUI_ControlSetButtonAction(_SliderMid_Button);
GMUI_ControlSetButton("Mid",-1,-1,-1);
GMUI_ControlSetPositioning(0,6,0,20);
}
// Button to set slider to snap or not
with (GMUI_Add("SnapSlider", "button", 23,12, 3,2, global.GMUIAnchorBottomRight)) {
GMUI_ControlSetButtonAction(_SliderSnap_Button);
GMUI_ControlSetButton("Snap",-1,-1,-1);
GMUI_ControlSetPositioning(0,6,0,20);
}
// Display of slider value to the side
with (GMUI_Add("SliderVal", "label", 5,12, 2,2, global.GMUIAnchorBottomRight)) {
GMUI_ControlSetText(string(round(GMUI_GetValue("Slider"))));
GMUI_ControlSetStyle($606060,c_gray,-1,-1,-1,-1,-1,-1,-1,-1);
GMUI_ControlSetFontStyle(fontNumericBold,$D9D9D9,fa_middle);
}
// Test checkbox and toggle
with (GMUI_Add("CheckBox", "checkbox", 4,12, 1,1, global.GMUIAnchorBottomLeft)) {
GMUI_ControlSetCheckboxSettings(1, c_lime, c_gray, global.GMUISlideRoundRect, $808080, $505050, room_speed/6);
GMUI_ControlSetHoverAction(_Hover_Checkbox);
GMUI_ControlSetHoverOffAction(_HoverOff_Checkbox);
GMUI_ControlSetSprite(s10, 0, 0, 0);
// Add a space at the end of the string to make sure it wraps. I know... but its Game Maker ;)
with (GMUI_ControlAddTooltip("Checkbox!",global.GMUIAnchorBottom,6,2,12,4,-1,-1)) {
GMUI_ControlSetFadeOnHide(id, room_speed/6);
}
}
with (GMUI_Add("Toggle", "toggle", 3,10, 3,2, global.GMUIAnchorBottomLeft)) {
GMUI_ControlSetToggleSettings(1, c_lime, c_gray, global.GMUISlideFullRoundRect, $808080, $505050, room_speed/4, global.GMUIDirectionTypeHorizontal, 0);
}
with (GMUI_Add("SpritePicker", "spritepicker", -10,10, 5,2, global.GMUIAnchorBottom)) {
GMUI_ControlAddOption(0, GMUIspr_arrowright);
GMUI_ControlAddOption(2, GMUIspr_arrowup);
GMUI_ControlAddOption(4, GMUIspr_arrowleft);
GMUI_ControlAddOption(6, GMUIspr_arrow);
GMUI_ControlSetPicker(sprite_get_width(GMUIspr_arrowleft) + 4,sprite_get_height(GMUIspr_arrowleft) + 4,
global.GMUIDirectionTypeHorizontal, GMUIspr_arrowright,GMUIspr_arrowleft);
GMUI_ControlSetInitValue(6);
}
// Example: overrides initial value:
GMUI_ControlSelectOption("SpritePicker",2);
//with (GMUI_Add("Graphic", "image", -12,10, 2,2, layer, global.GMUIAnchorBottom)) {
// GMUI_ControlSetSpriteExt(s10, 0, 0, 0, 2, 2, c_white, 0.2);
//}
// Object click group test
/*
NEW LAYER: 1 (Automatically switches setting layer to new layer
*/
GMUI_AddLayer(1,0,0);
GMUI_CreateGroup(3, 0,0, global.GMUIAnchorTopLeft);
//GMUI_GroupSetFadeOnHide(3,room_speed/8,1)
with (GMUI_Add("MenuInt", "intpicker", 0,0, 3,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetAttributes(0,0,0,9);
GMUI_ControlSetInitValue(0);
GMUI_ControlAddToGroup(3);
GMUI_GroupHide(3,1,true);
}
// Switch back to make instructions on layer 0
GMUI_SetOnLayer(0);
with (GMUI_Add("MenuIntInstructions", "label", 20,23, 12,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetInitValue("Click square to open sub menu");
}
/*
MENU EXAMPLES
*/
// Test Menu (Menu ID variable isn't used here... but could be if you want to)
var menuID; //-9,2
menuID = GMUI_CreateMenu("Test Menu", GMUI_CenterX(0, 18, global.GMUIAnchorTop) ,2, 18,24, global.GMUIAnchorTop);
GMUI_MenuSetClickOff("Test Menu", true);
GMUI_MenuSetStyle("Test Menu", c_black, .3, c_white, 0.75, true);
GMUI_MenuSetFadeOnHide("Test Menu", room_speed/4, 0);
GMUI_MenuSetHidePosition("Test Menu", -9, 6, easeExpOut, room_speed/2);
//GMUI_MenuSetActionIn("Test Menu",...)
with (GMUI_Add("CloseButton", "textbutton", 4,1, 4,1, global.GMUIAnchorTopRight)) {
GMUI_ControlSetButtonAction(_PopupClose_Button);
GMUI_ControlSetButton("Close",-1,-1,-1);
GMUI_ControlAddToMenu("Test Menu");
}
with (GMUI_Add("OpenButton", "textbutton", -3,8, 8,1, global.GMUIAnchorTop)) {
GMUI_ControlSetButtonAction(_PopupMenu2_Button);
GMUI_ControlSetButton("Open Another",-1,-1,-1);
GMUI_ControlAddToMenu("Test Menu");
}
with (GMUI_Add("Toggle2", "toggle", 2,4, 3,2, global.GMUIAnchorBottomLeft)) {
GMUI_ControlSetToggleSettings(1, c_lime, c_gray, global.GMUISlideFullRoundRect, $808080, $505050, room_speed/4, global.GMUIDirectionTypeHorizontal, 0);
GMUI_ControlAddToMenu("Test Menu");
}
// Test Menu 2
menuID = GMUI_CreateMenu("Test Menu 2", -6,8, 18,24, global.GMUIAnchorTop);
GMUI_MenuSetClickOff("Test Menu 2", true);
GMUI_MenuSetStyle("Test Menu 2", c_black, 0.3, c_white, 0.75, true);
GMUI_MenuSetFadeOnHide("Test Menu 2", room_speed/4, 0);
with (GMUI_Add("CloseButton2", "textbutton", 4,1, 4,1, global.GMUIAnchorTopRight)) {
GMUI_ControlSetButtonAction(_PopupClose_Button);
GMUI_ControlSetButton("Close",-1,-1,-1);
GMUI_ControlAddToMenu("Test Menu 2");
}
with (GMUI_Add("PopupTestButton","textbutton", -3,8, 8,1, global.GMUIAnchorTop)) {
GMUI_ControlSetButtonAction(_Popup_Button);
GMUI_ControlSetButton("Try Popup",-1,-1,-1);
GMUI_ControlAddToMenu("Test Menu 2");
}
with (GMUI_Add("ResponseLabel", "label", -8, 10, 16, 2, global.GMUIAnchorTop)) {
// This value will be set by the popup
//ControlBackgroundColor = c_black;
GMUI_ControlSetFontStyle(fontNumericBold,c_white,fa_center);
GMUI_ControlAddToMenu("Test Menu 2");
}
// Test Popup
//global.GMUIPopupBlank = -1;global.GMUIPopupInformation = 0;global.GMUIPopupConfirm = 1;global.GMUIPopupThreeOptions = 2;
menuID = GMUI_CreatePopup("Test Popup", -14,2, 28,12, global.GMUIAnchorTop, global.GMUIPopupThreeOptions);
GMUI_PopupSetMessage("Test Popup", "Click an option to return to the previous screen!", 2, -1, -1);
GMUI_PopupSetAction("Test Popup", _PopupReturnAction);
GMUI_PopupSetStyle("Test Popup", c_white, 0.99, c_white, 0.75, true);
GMUI_PopupSetFadeOnHide("Test Popup", room_speed/8, 0);
GMUI_PopupSetHidePosition("Test Popup", -14, 0, easeExpOut, room_speed/4);
//todo: change the popup style
// Options to change default controls and actions:
// GMUI_PopupSetButton("Test Popup", which button, Text or "", graphic or -1, text align, text color on hover)
// Additional Options:
//with (GMUI_Add("Button", "textbutton", 20,3, 4,2, 0, global.GMUIAnchorBottomRight)) {
//GMUI_ControlAddToPopup("Test Popup");}
//GMUI_PopupSetClickOff("Test Popup", false); // False is default
#define _Demo_Form_with_layers
///_Demo_Form() This interface is for the demo form
// DEMO INTERFACE:
// Set optional grid settings
GMUI_SetKeyNavigation(global.GMUIDirectionTypeVertical,vk_up,vk_down,vk_left,vk_right,true);
// Set the layer to change settings on [This one is optional: Already defaults to layer 0]
GMUI_SetOnLayer(0);
// Instead, lets create the menu on layer 10, and set each as persistent all the way to layer 0
GMUI_AddLayer(10,0,0);
//
// Setting the left choices
//
// Left side option buttons group
GMUI_CreateGroup(1, 2,2, global.GMUIAnchorTopLeft);
GMUI_GroupSetSize(1, 8,20);
GMUI_GroupSetStyle(1, c_black, .2, c_black, .3, 0);
GMUI_GroupSetFadeOnHide(1, room_speed/2, 0);
var _bW; _bW = 6;
with (GMUI_Add("BtnSliders", "button", 1,1, _bW,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(1);
GMUI_ControlSetButtonAction1(_Show_Group, 2);
GMUI_ControlSetButton("Sliders",-1,-1,-1);
GMUI_ControlPersistentToLayer(0);
}
with (GMUI_Add("BtnInputs", "button", 1,4, _bW,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(1);
GMUI_ControlSetButtonAction1(_Show_Group, 3);
GMUI_ControlSetButton("Inputs",-1,-1,-1);
GMUI_ControlPersistentToLayer(0);
}
with (GMUI_Add("BtnToggles", "button", 1,7, _bW,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(1);
GMUI_ControlSetButtonAction1(_Show_Group, 4);
GMUI_ControlSetButton("Toggles",-1,-1,-1);
GMUI_ControlPersistentToLayer(0);
}
with (GMUI_Add("BtnMenus", "button", 1,10, _bW,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(1);
//GMUI_ControlSetButtonAction1(_Show_Group, 2);
GMUI_ControlSetButton("Menus",-1,-1,-1);
GMUI_ControlPersistentToLayer(0);
}
with (GMUI_Add("BtnSelection", "button", 1,13, _bW,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(1);
GMUI_ControlSetButtonAction1(_Show_Group, 5);
GMUI_ControlSetButton("Selection",-1,-1,-1);
GMUI_ControlPersistentToLayer(0);
}
with (GMUI_Add("BtnDisabling", "button", 1,16, _bW,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(1);
GMUI_ControlSetButtonAction1(_Show_Group, 6);
GMUI_ControlSetButton("Disabling",-1,-1,-1);
GMUI_ControlPersistentToLayer(0);
}
with (GMUI_Add("BtnLayering", "button", 1,19, _bW,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(1);
GMUI_ControlSetButtonAction1(_Show_Group, 7);
GMUI_ControlSetButton("Layering",-1,-1,-1);
GMUI_ControlPersistentToLayer(0);
}
with (GMUI_Add("BtnMovement", "button", 1,22, _bW,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(1);
GMUI_ControlSetButtonAction1(_Show_Group, 8);
GMUI_ControlSetButton("Movement",-1,-1,-1);
GMUI_ControlPersistentToLayer(0);
}
with (GMUI_Add("BtnAnchoring", "button", 1,25, _bW,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(1);
GMUI_ControlSetButtonAction1(_Show_Group, 9);
GMUI_ControlSetButton("Anchoring",-1,-1,-1);
GMUI_ControlPersistentToLayer(0);
}
with (GMUI_Add("BtnExpand", "button", 1,28, _bW,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(1);
//GMUI_ControlSetButtonAction1(_Show_Group, 8);
GMUI_ControlSetButton("Expand",-1,-1,-1);
GMUI_ControlPersistentToLayer(0);
}
with (GMUI_Add("BtnDebug", "button", 1,31, _bW,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(1);
GMUI_ControlSetButtonAction(_Debug_Button);
GMUI_ControlSetButton("Debug",-1,-1,-1);
GMUI_ControlPersistentToLayer(0);
}
//
// RIGHT GROUP SECTION
//
GMUI_AddLayer(1,0,0);
//GMUI_SetOnLayer(1);
var _fadespeed; _fadespeed = room_speed/2;
// Right Group 2: Sliders (Default)
GMUI_CreateGroup(2, 20,2, global.GMUIAnchorTopRight);
GMUI_GroupSetFadeOnHide(2, _fadespeed, 0);
//SET SIZE TO GRID - X
with (GMUI_Add("Slider", "slider", 8,6, 10,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(2);
GMUI_ControlSetSliderSettings(13,10,34,true,true,true,global.GMUIDirectionTypeHorizontal);
GMUI_ControlSetSliderStyle(2,2,c_dkgray,0.6,c_teal,0.9,c_dkgray,0.4,c_aqua,1,c_gray,0.8);
GMUI_ControlSetSliderSize(16, 20, 1, 12, 10, 8, 6, 8);
GMUI_ControlSetInitValue(20);
GMUI_ControlSetValueChangedAction(_SliderValue_Changed);
}
// Button to set slider to mid point
with (GMUI_Add("MidSlider", "button", 3,4, 2,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(2);
GMUI_ControlSetButtonAction(_SliderMid_Button);
GMUI_ControlSetButton("Mid",-1,-1,-1);
GMUI_ControlSetPositioning(0,6,0,20);
}
// Button to set slider to snap or not
with (GMUI_Add("SnapSlider", "button", 3,6, 3,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(2);
GMUI_ControlSetButtonAction(_SliderSnap_Button);
GMUI_ControlSetButton("Snap",-1,-1,-1);
GMUI_ControlSetPositioning(0,6,0,20);
}
// Display of slider value to the side
with (GMUI_Add("SliderVal", "label", 19,8, 2,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(2);
GMUI_ControlSetText(string(round(GMUI_GetValue("Slider"))));
GMUI_ControlSetStyle($606060,c_gray,-1,-1,-1,-1,-1,-1,-1,-1);
GMUI_ControlSetFontStyle(fontNumericBold,$D9D9D9,fa_middle);
}
with (GMUI_Add("SliderV", "slider", 13,9, 4,8, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(2);
GMUI_ControlSetSliderSettings(13,10,34,true,true,true,global.GMUIDirectionTypeVertical);
GMUI_ControlSetSliderStyle(2,2,c_dkgray,0.6,c_teal,0.9,c_dkgray,0.4,c_aqua,1,c_gray,0.8);
GMUI_ControlSetSliderSize(16, 20, 1, 12, 10, 8, 6, 8);
GMUI_ControlSetInitValue(20);
}
//TESTESTESTESTESTEST
/*
with (GMUI_Add("Slider2", "slider", 10,6, 6,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetSliderSettings(13,10,34,true,true,true,global.GMUIDirectionTypeHorizontal);
GMUI_ControlSetSliderStyle(2,2,c_dkgray,0.6,c_teal,0.9,c_dkgray,0.4,c_aqua,1,c_gray,0.8);
GMUI_ControlSetSliderSize(16, 20, 1, 12, 10, 8, 6, 8);
GMUI_ControlSetInitValue(20);
GMUI_ControlSetValueChangedAction(_SliderValue_Changed);
}
with (GMUI_Add("SliderV2", "slider", 13,9, 4,8, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetSliderSettings(13,10,34,true,true,true,global.GMUIDirectionTypeVertical);
GMUI_ControlSetSliderStyle(2,2,c_dkgray,0.6,c_teal,0.9,c_dkgray,0.4,c_aqua,1,c_gray,0.8);
GMUI_ControlSetSliderSize(16, 20, 1, 12, 10, 8, 6, 8);
GMUI_ControlSetInitValue(20);
GMUI_ControlSetValueChangedAction(_SliderValue_Changed);
}
*/
GMUI_AddLayer(2,0,0);
//GMUI_SetOnLayer(2);
// Right Group 3: Inputs
GMUI_CreateGroup(3, 20,2, global.GMUIAnchorTopRight);
GMUI_GroupHide(3,GMUI_GetCurrentLayer(),true);
GMUI_GroupSetFadeOnHide(3, _fadespeed, 0);
//SET SIZE TO GRID - X
with (GMUI_Add("SpriteText","textstring", 1,1, 16,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlAddToGroup(3);
GMUI_ControlSetAttributes(20,0,0,0);
GMUI_ControlSetInitValue("Select");
GMUI_ControlSetSprite(sprite24,0,1,0);//GMUIspr_input
}
with (GMUI_Add("IntegerText", "textint", 1,4, 10,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetAttributes(5,0,-1000,1000);
GMUI_ControlSetStyle(GMUIhsv(85,55,255),GMUIrgb(20,20,20),-1,-1,-1,-1,-1,-1,-1,-1);
GMUI_ControlAddToGroup(3);
}
with (GMUI_Add("DecimalText", "textdecimal", 1,7, 10,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetAttributes(10,10,-999,999);
GMUI_ControlAddToGroup(3);
//GMUI_ControlSetSpriteMap(s2,s3,s4,s5,s6,s7,s8,s1,s9,false);
}
with (GMUI_Add("Test4", "intpicker", 1,10, 10,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetAttributes(0,0,-20,20);
GMUI_ControlSetInitValue(-1);
GMUI_ControlAddToGroup(3);
GMUI_ControlSetHoverAction(_Hover_Int);
GMUI_ControlSetHoverOffAction(_HoverOff_Int);
//sprite_set_offset(GMUIspr_arrow,10,12);sprite_set_offset(GMUIspr_arrowup,10,0); // If vertical, offset should be centered
//GMUI_ControlSetPicker(sprite_get_width(GMUIspr_arrowup) + 4,sprite_get_height(GMUIspr_arrowup) + 4,
// global.GMUIDirectionTypeVertical, GMUIspr_arrowup, GMUIspr_arrow);
with (GMUI_ControlAddTooltip("-20 to 20.",global.GMUIAnchorLeft,6,2,12,4,-1,-1)) {
GMUI_ControlSetFadeOnHide(id, room_speed/4);
}
}
GMUI_AddLayer(3,0,0);
//GMUI_SetOnLayer(3);
// Right Group 4: Toggles
GMUI_CreateGroup(4, 20,2, global.GMUIAnchorTopRight);
GMUI_GroupHide(4,GMUI_GetCurrentLayer(),true);
GMUI_GroupSetFadeOnHide(4, _fadespeed, 0);
//SET SIZE TO GRID - X
with (GMUI_Add("Toggle1", "toggle", 3,6, 3,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetToggleSettings(1, c_lime, c_gray, global.GMUISlideFullRoundRect, $808080, $505050, room_speed/4, global.GMUIDirectionTypeHorizontal, 0);
GMUI_ControlAddToGroup(4);
}
with (GMUI_Add("Toggle2", "toggle", 3,9, 3,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetToggleSettings(1, c_lime, c_gray, global.GMUISlideRoundRect, $808080, $505050, room_speed/4, global.GMUIDirectionTypeHorizontal, 0);
GMUI_ControlAddToGroup(4);
}
with (GMUI_Add("Toggle3", "toggle", 3,12, 3,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetToggleSettings(1, c_lime, c_gray, global.GMUISlideRect, $808080, $505050, room_speed/4, global.GMUIDirectionTypeHorizontal, 0);
GMUI_ControlAddToGroup(4);
GMUI_ControlSetInitValue(true);
}
with (GMUI_Add("Toggle4", "toggle", 3,15, 3,2, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetToggleSettings(1, c_lime, c_gray, global.GMUISlideLine, $808080, $505050, room_speed/4, global.GMUIDirectionTypeHorizontal, 0);
GMUI_ControlAddToGroup(4);
}
// Test checkbox and toggle
with (GMUI_Add("CheckBox", "checkbox", 3,18, 1,1, global.GMUIAnchorBottomLeft)) {
GMUI_ControlAddToGroup(4);
GMUI_ControlSetCheckboxSettings(1, c_lime, c_gray, global.GMUISlideRoundRect, $808080, $505050, room_speed/6);
GMUI_ControlSetHoverAction(_Hover_Checkbox);
GMUI_ControlSetHoverOffAction(_HoverOff_Checkbox);
GMUI_ControlSetSprite(s10, 0, 0, 0);
// Add a space at the end of the string to make sure it wraps. I know... but its Game Maker ;)
with (GMUI_ControlAddTooltip("Checkbox!",global.GMUIAnchorBottom,6,2,12,4,-1,-1)) {
GMUI_ControlSetFadeOnHide(id, room_speed/6);
}
}
// Open menu button (group 4/5)
GMUI_AddLayer(4,0,0);
// Right Group 5: Selection
GMUI_CreateGroup(5, 20,2, global.GMUIAnchorTopRight);
GMUI_GroupHide(5,GMUI_GetCurrentLayer(),true);
GMUI_GroupSetFadeOnHide(5, _fadespeed, 0);
//SET SIZE TO GRID - X
// SELECT LIST TEST
with (GMUI_Add("TestSelectList", "selectlist", 2,2, 10,5, global.GMUIAnchorTopLeft)) {
GMUI_ItemListSettings(26, $E3E3E3, -1, -1);
GMUI_ItemListBackground($DEDEDE, $EAEAEA, 0.8, 1);
GMUI_ItemListSelectAction(_ListAction);
GMUI_AddItem(2,10,"2-One","",-1);
GMUI_AddItem(4,20,"4-Two","",-1);
GMUI_AddItem(6,30,"6-Three","",-1);
GMUI_AddItem(8,40,"8-Four","",-1);
GMUI_AddItem(10,50,"10-Five","",-1);
GMUI_AddItem(12,60,"12-Six","",-1);
GMUI_AddItem(14,70,"14-Seven","",-1);
GMUI_AddItem(16,70,"16-Eight","",-1);
GMUI_AddItem(18,70,"18-Nine","",-1);
GMUI_AddItem(20,70,"20-Ten","",-1);
GMUI_AddItem(22,70,"22-Eleven","",-1);
GMUI_AddItem(24,70,"24-Twelve","",-1);
GMUI_AddItem(26,80,"26-Thirteen","",-1);
GMUI_ControlAddToGroup(5);
}
GMUI_AddLayer(5,0,0);
// Right Group 6: Disabling
GMUI_CreateGroup(6, 20,2, global.GMUIAnchorTopRight);
GMUI_GroupSetFadeOnHide(6, _fadespeed, 0);
//SET SIZE TO GRID - X
GMUI_GroupHide(6,GMUI_GetCurrentLayer(),true);
GMUI_AddLayer(6,0,0);
// Right Group 7: Layering
GMUI_CreateGroup(7, 20,2, global.GMUIAnchorTopRight);
GMUI_GroupSetFadeOnHide(7, _fadespeed, 0);
//SET SIZE TO GRID - X
GMUI_GroupHide(7,GMUI_GetCurrentLayer(),true);
GMUI_AddLayer(7,0,0);
// Right Group 8: Movement
GMUI_CreateGroup(8, 20,2, global.GMUIAnchorTopRight);
GMUI_GroupSetFadeOnHide(8, _fadespeed, 0);
//SET SIZE TO GRID - X
GMUI_GroupHide(8,GMUI_GetCurrentLayer(),true);
GMUI_AddLayer(8,0,0);
// Right Group 9: Anchoring
GMUI_CreateGroup(9, 20,2, global.GMUIAnchorTopRight);
GMUI_GroupSetFadeOnHide(9, _fadespeed, 0);
//SET SIZE TO GRID - X
GMUI_GroupHide(9,GMUI_GetCurrentLayer(),true);
GMUI_AddLayer(9,0,0);
// Right Group 10: Expand (may also be button action?)
GMUI_CreateGroup(10, 20,2, global.GMUIAnchorTopRight);
GMUI_GroupSetFadeOnHide(10, _fadespeed, 0);
//SET SIZE TO GRID - X
GMUI_GroupHide(10,GMUI_GetCurrentLayer(),true);
// Debug button (group 11)
// Set the layer back to 0 for this control
GMUI_SetOnLayer(0);
with (GMUI_Add("ExitButton", "textbutton", 0,0, 1,1, global.GMUIAnchorTopRight)) {
GMUI_ControlSetButtonAction(_Exit_Button);
GMUI_ControlSetButton("x", -1, -1, -1);
GMUI_ControlSetPositioning(-1,0,0,0); // Minor adjustment so that the control isnt cut off by the room
GMUI_ControlPersistentToLayer(9); // Works on all layers from 0 to 9
}
/*
with (GMUI_Add("test14","textstring",20,1,12,2,global.GMUIAnchorTopLeft)) {
GMUI_ControlSetAttributes(14,0,0,0);
}
*/
/*
with (GMUI_Add("TestButton", "textbutton", 3,9, 5,3, global.GMUIAnchorTopLeft)) {
GMUI_ControlSetButtonAction(_Test_Button);
GMUI_ControlSetButton("Test!", -1, -1, -1);
GMUI_ControlSetStyle(-1, -1, c_red, 1, 0.85, -1, -1, -1, -1, -1);
GMUI_ControlAddToGroup(2);
}
with (GMUI_Add("PopupMenuButton", "textbutton", 1,7, 5,3, global.GMUIAnchorBottomLeft)) {
GMUI_ControlSetButtonAction(_PopupMenu_Button);
GMUI_ControlSetButton("Show"+chr(13)+"Menu", -1, -1, -1);
GMUI_ControlSetStyle(-1, -1, c_purple, 1, 0.85, -1, -1, -1, -1, -1);
}
with (GMUI_Add("DebugButton", "textbutton", 1,3, 5,3, global.GMUIAnchorBottomLeft)) {
GMUI_ControlSetButtonAction(_Debug_Button);
GMUI_ControlSetButton("Debug", -1, -1, -1);
GMUI_ControlSetStyle(-1, -1, c_gray, 1, 0.85, -1, -1, -1, -1, -1);
}