-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathOryUI.agc
1931 lines (1865 loc) · 77.2 KB
/
OryUI.agc
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
/*
* OryUI
*
* OryUI is a UI framework to be used with AGK2 (AppGameKit)
*
* Author : Kevin Cross
* License : MIT
*/
// OryUI
foldstart
type typeOryUICreatedWidgets
id as integer
type$ as string
endtype
type typeOryUIDefaults
// OryUIButton
buttonDisabledColor# as float[4]
buttonDisabledIconColor# as float[4]
buttonDisabledIconPlacement$ as string
buttonDisabledIconSize# as float[2]
buttonDisabledTextAlignment as integer
buttonDisabledTextBold as integer
buttonDisabledTextColor# as float[4]
buttonDisabledTextSize# as float
buttonEnabledColor# as float[4]
buttonEnabledIconColor# as float[4]
buttonEnabledIconPlacement$ as string
buttonEnabledIconSize# as float[2]
buttonEnabledTextAlignment as integer
buttonEnabledTextBold as integer
buttonEnabledTextColor# as float[4]
buttonEnabledTextSize# as float
buttonSize# as float[2]
// OryUICheckbox
checkboxCheckedColor# as float[4]
checkboxCheckedImage as integer
checkboxDepth as integer
checkboxSize# as float[2]
checkboxUncheckedColor# as float[4]
checkboxUncheckedImage as integer
// OryUIDialog
dialogAutoHeight as integer
dialogBottomMargin# as float
dialogButtonColor# as float[4]
dialogButtonHeight# as float
dialogButtonTextBold as integer
dialogButtonTextColor# as float[4]
dialogButtonTextSize# as float
dialogButtonXSpacing# as float
dialogButtonYSpacing# as float
dialogCheckboxAlignment as integer
dialogCheckboxCheckedImage as integer
dialogCheckboxColor# as float[4]
dialogCheckboxHeight# as float
dialogCheckboxTextBold as integer
dialogCheckboxTextColor# as float[4]
dialogCheckboxTextSize# as float
dialogCheckboxUncheckedImage as integer
dialogCheckboxWidth# as float
dialogColor# as float[4]
dialogDepth as integer
dialogFlexButtons as integer
dialogHeight# as float
dialogLeftMargin# as float
dialogRightMargin# as float
dialogScrimColor# as float[4]
dialogSpacingBetweenSupportingTextAndButtons# as float
dialogSpacingBetweenTitleAndSupportingText# as float
dialogStackButtons as integer
dialogSupportingTextAlignment as integer
dialogSupportingTextColor# as float[4]
dialogSupportingTextSize# as float
dialogTitleTextAlignment as integer
dialogTitleTextColor# as float[4]
dialogTitleTextSize# as float
dialogTopMargin# as float
dialogWidth# as float
// OryUIFloatingActionButton
floatingActionButtonColor# as float[4]
floatingActionButtonDepth as integer
floatingActionButtonIcon as integer
floatingActionButtonIconColor# as float[4]
floatingActionButtonIconSize# as float[2]
floatingActionButtonMini as integer
floatingActionButtonPlacement$ as string
floatingActionButtonShadow as integer
floatingActionButtonSize# as float[2]
// OryUIInputSpinner
inputSpinnerAutoCorrectIfOutOfRange as integer
inputSpinnerBackgroundColor# as float[4]
inputSpinnerButtonActiveColor# as float[4]
inputSpinnerButtonActiveIconColor# as float[4]
inputSpinnerButtonColor# as float[4]
inputSpinnerButtonHeight# as float
inputSpinnerButtonIconHeight# as float
inputSpinnerButtonIconWidth# as float
inputSpinnerButtonInactiveColor# as float[4]
inputSpinnerButtonInactiveIconColor# as float[4]
inputSpinnerButtonWidth# as float
inputSpinnerHeight# as float
inputSpinnerTextColor# as float[4]
inputSpinnerTextSize# as float
inputSpinnerWidth# as float
// OryUIMenu
menuColor# as float[4]
menuDepth as integer
menuDividerColor# as float[4]
menuDividerHeight# as float
menuItemHeight# as float
menuItemLeftIconColor# as float[4]
menuItemLeftIconHeight# as float
menuItemLeftIconLeftPadding# as float
menuItemRightIconColor# as float[4]
menuItemRightIconHeight# as float
menuItemRightIconRightPadding# as float
menuItemTextBold as integer
menuItemTextColor# as float[4]
menuItemTextPadding# as float
menuItemTextSize# as float
menuScrimColor# as float[4]
menuShowLeftIcon as integer
menuShowRightIcon as integer
menuWidth# as float
// OryUINavigationDrawer
navigationDrawerColor# as float[4]
navigationDrawerDepth as integer
navigationDrawerDividerColor# as float[4]
navigationDrawerDividerHeight# as float
navigationDrawerHeaderBackroundImage as integer
navigationDrawerHeaderColor# as float[4]
navigationDrawerHeaderHeight# as float
navigationDrawerHeaderTextBold as integer
navigationDrawerHeaderTextColor# as float[4]
navigationDrawerHeaderTextLeftPadding# as float
navigationDrawerHeaderTextScrimColor# as float[4]
navigationDrawerHeaderTextScrimHeight# as float
navigationDrawerHeaderTextSize# as float
navigationDrawerLocation$ as string
navigationDrawerOptionActiveOverlayColor# as float[4]
navigationDrawerOptionActiveOverlayHeight# as float
navigationDrawerOptionColor# as float[4]
navigationDrawerOptionHeight# as float
navigationDrawerOptionIconColor# as float[4]
navigationDrawerOptionIconHeight# as float
navigationDrawerOptionIconLeftPadding# as float
navigationDrawerOptionRightTextBold as integer
navigationDrawerOptionRightTextColor# as float[4]
navigationDrawerOptionRightTextRightPadding# as float
navigationDrawerOptionRightTextSize# as float
navigationDrawerOptionTextBold as integer
navigationDrawerOptionTextColor# as float[4]
navigationDrawerOptionTextLeftPadding# as float
navigationDrawerOptionTextSize# as float
navigationDrawerScrimColor# as float[4]
navigationDrawerShowOptionIcon as integer
navigationDrawerShowOptionRightText as integer
navigationDrawerShowShadow as integer
navigationDrawerStatusBarColor# as float[4]
navigationDrawerSubtitleColor# as float[4]
navigationDrawerSubtitleHeight# as float
navigationDrawerSubtitleTextBold as integer
navigationDrawerSubtitleTextColor# as float[4]
navigationDrawerSubtitleTextLeftPadding# as float
navigationDrawerSubtitleTextSize# as float
navigationDrawerType$ as string
navigationDrawerWidth# as float
// OryUIPagination
//paginationButtonHeight# as float
paginationButtonMargin# as float
//paginationButtonWidth# as float
paginationColor# as float[4]
paginationDepth as integer
//paginationFlexButtons as integer
paginationHeight# as float
paginationIconHeight# as float
paginationIconWidth# as float
paginationInactiveColor# as float[4]
paginationInactiveIconColor# as float[4]
paginationInactiveTextBold as integer
paginationInactiveTextColor# as float[4]
paginationInactiveTextSize# as float
paginationMaximumButtonsToDisplay as integer
paginationSelectedColor# as float[4]
paginationSelectedIconColor# as float[4]
paginationSelectedTextBold as integer
paginationSelectedTextColor# as float[4]
paginationSelectedTextSize# as float
paginationShowSkipToEndButtons as integer
paginationUnselectedColor# as float[4]
paginationUnselectedIconColor# as float[4]
paginationUnselectedTextBold as integer
paginationUnselectedTextColor# as float[4]
paginationUnselectedTextSize# as float
paginationWidth# as float
// OryUIPicker
pickerAutoHeight as integer
pickerBottomMargin# as float
pickerButtonColor# as float[4]
pickerButtonHeight# as float
pickerButtonTextBold as integer
pickerButtonTextColor# as float[4]
pickerButtonTextSize# as float
pickerButtonXSpacing# as float
pickerButtonYSpacing# as float
pickerColor# as float[4]
pickerDepth as integer
pickerFlexButtons as integer
pickerHeight# as float
pickerLeftMargin# as float
pickerRightMargin# as float
pickerScrimColor# as float[4]
pickerSpacingBetweenSupportingTextAndButtons# as float
pickerSpacingBetweenTitleAndSupportingText# as float
pickerStackButtons as integer
pickerSupportingTextAlignment as integer
pickerSupportingTextColor# as float[4]
pickerSupportingTextSize# as float
pickerTitleTextAlignment as integer
pickerTitleTextColor# as float[4]
pickerTitleTextSize# as float
pickerTopMargin# as float
pickerWidth# as float
// OryUIProgressIndicator
progressIndicatorAnimationFPS as integer
progressIndicatorAnimationFrame as integer[101]
progressIndicatorColor# as float[4]
progressIndicatorTrackColor# as float[4]
progressIndicatorTrackHeight# as float
progressIndicatorTrackWidth# as float
// OryUIScrollBar
scrollBarGripColor# as float[4]
scrollBarGripIconColor# as float[4]
scrollBarTrackColor# as float[4]
// OryUIScrollToTop
scrollToTopColor# as float[4]
scrollToTopDepth as integer
scrollToTopHeight# as float
scrollToTopIconColor# as float[4]
scrollToTopIconHeight# as float
scrollToTopIconImage as integer
scrollToTopIconWidth# as float
scrollToTopPlacement$ as string
scrollToTopShowShadow as integer
scrollToTopStartY# as float
scrollToTopWidth# as float
// OryUISwitch
switchCheckedColor# as float[4]
switchDepth as integer
switchHeight# as float
switchTrackCheckedColor# as float[4]
switchTrackDepth as integer
switchTrackHeight# as float
switchTrackUncheckedColor# as float[4]
switchTrackWidth# as float
switchUncheckedColor# as float[4]
switchWidth# as float
// OryUITemplate
templateColor# as float[4]
templateDepth as integer
templateHeight# as float
templateItemColor# as float[4]
templateItemHeight# as float
templateItemWidth# as float
templateWidth# as float
// OryUITooltip
tooltipColor# as float[4]
tooltipDepth as integer
tooltipHeight# as float
tooltipTextAlignment as integer
tooltipTextBold as integer
tooltipTextColor# as float[4]
tooltipTextSize# as float
endtype
type typeOryUIJSONVariables
variable$ as string
value$ as string
endtype
type typeOryUIMaterialIcon
sortKey$ as string
imageID as integer
index as integer
name$ as string
endtype
type typeOryUIParameters
activeButtonColor# as float[4]
activeColor# as float[4]
activeIconColor# as float[4]
addIcon$ as string
addIconColor# as float[4]
addIconID as integer
addIconSize# as float[2]
addToFront as integer
alignment as integer
alwaysVisible as integer
angle# as float
attachToSpriteID as integer
autoCorrectIfOutOfRange as integer
autoResize as integer
autoHeight as integer
backgroundColor# as float[4]
blockOrder$ as string[]
bold as integer
buttonMargin# as float
cancelText$ as string
checkboxAlignment as integer
checkboxColor# as float[4]
checkboxText$ as string
checkboxTextBold as integer
checkboxTextColor# as float[4]
checkboxTextSize# as float
checkedColor# as float[4]
checkedImageID as integer
color# as float[4]
contentSize# as float[2]
decimals as integer
decisionRequired as integer
defaultValue# as float
delay# as float
depth as integer
dialogType$ as string
direction$ as string
disabledColor# as float[4]
disabledIcon$ as string
disabledIconColor# as float[4]
disabledIconID as integer
disabledIconPlacement$ as string
disabledIconSize# as float[2]
disabledImageID as integer
disabledText$ as string
disabledTextAlignment as integer
disabledTextBold as integer
disabledTextColor# as float[4]
disabledTextSize# as float
disableKeyboardInput as integer
domain$ as string
draggable as integer
drawerLocation$ as string
drawerType$ as string
enabled as integer
enabledColor# as float[4]
enabledIcon$ as string
enabledIconColor# as float[4]
enabledIconID as integer
enabledIconPlacement$ as string
enabledIconSize# as float[2]
enabledImageID as integer
enabledText$ as string
enabledTextAlignment as integer
enabledTextBold as integer
enabledTextColor# as float[4]
enabledTextSize# as float
endY# as float
extended as integer
file$ as string
fileID as integer
fixToscreen as integer
flexButtons as integer
frameShape$ as String
gripColor# as float[4]
gripIcon$ as string
gripIconColor# as float[4]
gripIconID as integer
gripIconSize# as float[2]
gripImageID as integer
gripPosition# as float[2]
gripSize# as float[2]
group as integer
headerText$ as string
headerTextAlignment as integer
headerTextBold as integer
headerTextColor# as float[4]
headerTextSize# as float
helperText$ as string
helperTextBold as integer
helperTextColor# as float[4]
helperTextSize# as float
icon$ as string
iconColor# as float[4]
iconID as integer
iconPlacement$ as string
iconSize# as float[2]
imageID as integer
inactiveButtonColor# as float[4]
inactiveColor# as float[4]
inactiveIconColor# as float[4]
inactiveTextBold as integer
inactiveTextColor# as float[4]
inactiveTextSize# as float
index as integer
indicatorColor# as float[4]
inputText$ as string
inputType$ as string
invisibleGripSize# as float[2]
itemHeight# as float
itemSize# as float[2]
itemType$ as string
labelText$ as string
leadingIcon$ as string
leadingIconID as integer
leftIcon$ as string
leftIconID as integer
leftIconColor# as float[4]
leftLine1Text$ as string
leftLine1TextBold as integer
leftLine1TextColor# as float[4]
leftLine1TextSize# as float
leftLine2Text$ as string
leftLine2TextBold as integer
leftLine2TextColor# as float[4]
leftLine2TextSize# as float
leftText$ as string
leftTextBold as integer
leftTextColor# as float[4]
leftTextSize# as float
leftThumbnailImageID as float
max# as float
maxButtonsToDisplay
maxLength as integer
maxPosition# as float[2]
maxView# as float[2]
maxZoom# as float
multiline as integer
min# as float
minGripSize# as float[2]
mini as integer
minPosition# as float[2]
minView# as float[2]
name$ as String
navigationIcon$ as string
navigationIconColor# as float[4]
navigationIconID as integer
navigationName$ as string
noOfLeftLines as integer
noOfPages as integer
noOfRightLines as integer
offset# as float[2]
offsetBottomCenter as integer
offsetBottomLeft as integer
offsetBottomRight as integer
offsetCenter as integer
offsetCenterLeft as integer
offsetCenterRight as integer
offsetTopCenter as integer
offsetTopLeft as integer
offsetTopRight as integer
placeholderText$ as string
placement$ as string
placementOffset# as float[2]
platformStyle$ as string
position# as float[2]
postData$ as string
progressType$ as string
rightIcon$ as string
rightIconID as integer
rightIconColor# as float[4]
rightLine1Text$ as string
rightLine1TextBold as integer
rightLine1TextColor# as float[4]
rightLine1TextSize# as float
rightLine2Text$ as string
rightLine2TextBold as integer
rightLine2TextColor# as float[4]
rightLine2TextSize# as float
rightText$ as string
rightTextBold as integer
rightTextColor# as float[4]
rightTextSize# as float
saveText$ as string
scrollable as integer
scrollType$ as string
scrimColor# as float[4]
script$ as string
selected as integer
selectedColor# as float[4]
selectedIconColor# as float[4]
selectedTextBold as integer
selectedTextColor# as float[4]
selectedTextSize# as float
shadow as integer
showCheckbox as integer
showGripIcon as integer
showHelperText as integer
showIcon as integer
showItemDivider as integer
showLeadingIcon as integer
showLeftIcon as integer
showLeftThumbnail as integer
showRightButton as integer
showRightIcon as integer
showRightText as integer
showShadow as integer
showSkipToEndButtons as integer
showTrailingIcon as integer
size# as float[2]
spriteShader as integer
ssl as integer
stackButtons as integer
startY# as float
step# as float
stickUntilComplete as integer
strokeColor# as float[4]
style$ as string
subtitleText$ as string
subtitleTextAlignment as integer
subtitleTextBold as integer
subtitleTextColor# as float[4]
subtitleTextSize# as float
subtractIcon$ as string
subtractIconColor# as float[4]
subtractIconID as integer
subtractIconSize# as float[2]
supportingText$ as string
supportingTextAlignment as integer
supportingTextBold as integer
supportingTextColor# as float[4]
supportingTextSize# as float
switchCheckedColor# as float[4]
switchCheckedImageID as integer
switchImageID as integer
switchUncheckedColor# as float[4]
switchUncheckedImageID as integer
switchSize# as float[2]
text$ as string
textAlignment as integer
textBold as integer
textColor# as float[4]
textSize# as float
timeout as integer
titleText$ as string
titleTextAlignment as integer
titleTextBold as integer
titleTextColor# as float[4]
titleTextSize# as float
trackCheckedColor# as float[4]
trackCheckedImageID as integer
trackColor# as float[4]
trackImageID as integer
trackPosition# as float[2]
trackSize# as float[2]
trackUncheckedColor# as float[4]
trackUncheckedImageID as integer
trailingIcon$ as string
trailingIconID as integer
uncheckedColor# as float[4]
uncheckedImageID as integer
unselectedColor# as float[4]
unselectedIconColor# as float[4]
unselectedTextBold as integer
unselectedTextColor# as float[4]
unselectedTextSize# as float
widget$ as string
wrapList as integer
wrapListBottomY# as float
wrapListTopY# as float
endtype
foldend
foldstart
global oryUIBlankLocalJSONVariable as typeOryUIJSONVariables
global oryUIBlockFlickScroll as integer
global oryUIBlockScreenScrolling as integer
global oryUIBottomBannerAdOnScreen as integer
global oryUIContentHeight# as float // NOT YET USED
global oryUIContentStartX# as float // NOT YET USED
global oryUIContentStartY# as float // NOT YET USED
global oryUIContentWidth# as float // NOT YET USED
global oryUICreatedWidgets as typeOryUICreatedWidgets[]
global oryUIDefaults as typeOryUIDefaults
global oryUIDialogVisible as integer
global oryUILocalJSONVariables as typeOryUIJSONVariables[]
if (GetFileExists("OryUILocalVariables.json")) then oryUILocalJSONVariables.load("OryUILocalVariables.json")
global oryUIMaterialIcon as typeOryUIMaterialIcon[]
global oryUIParameters as typeoryUIParameters
global oryUIPickerVisible as integer
global OryUIScreenActive as integer
global oryUIScrimDepth as integer
global oryUIScrimVisible as integer
global oryUIMaxSyncRate# as integer : oryUIMaxSyncRate# = 60.0
global oryUIStatusBarHeight# as float : oryUIStatusBarHeight# = 3.6
global oryUITouchingTabs as integer
global oryUITouchingTopBar as integer
foldend
foldstart
function OryUIAddCreatedWidget(oryUIID as integer, oryUIType$ as string)
local oryUIT as typeOryUICreatedWidgets
oryUIT.type$ = oryUIType$
oryUIT.id = oryUIID
endfunction oryUIT
function OryUIAddLeadingZeros(oryUINumber$ as string, oryUINumberOfZeros as integer)
local oryUIForI as integer
for oryUIForI = 1 to oryUINumberOfZeros
if (len(oryUINumber$) < oryUINumberOfZeros)
oryUINumber$ = "0" + oryUINumber$
endif
next
endfunction oryUINumber$
function OryUIAddToContentHeight(oryUIHeight# as float)
oryUIContentHeight# = oryUIContentHeight# + oryUIHeight#
endfunction
function OryUIConvertBoolean(oryUIBoolean$ as string)
local oryUIBoolean as integer
if (lower(oryUIBoolean$) = "true" or lower(oryUIBoolean$) = "y" or lower(oryUIBoolean$) = "yes" or oryUIBoolean$ = "1")
oryUIBoolean = 1
elseif (lower(oryUIBoolean$) = "false" or lower(oryUIBoolean$) = "n" or lower(oryUIBoolean$) = "no" or oryUIBoolean$ = "0")
oryUIBoolean = 0
endif
endfunction oryUIBoolean
function OryUIConvertColor(oryUIColor$ as string)
local oryUICommaCount as integer
local oryUIHexInt as integer[6]
local oryUIRGBA# as float[4] : oryUIRGBA#[1] = 255 : oryUIRGBA#[2] = 255 : oryUIRGBA#[3] = 255 : oryUIRGBA#[4] = 255
oryUICommaCount = CountStringTokens(oryUIColor$, ",")
if (oryUICommaCount = 1)
if (FindString(oryUIColor$, "#") > 0)
oryUIColor$ = ReplaceString(oryUIColor$, "#", "", -1)
if (len(oryUIColor$) = 3)
oryUIRGBA#[1] = val(mid(oryUIColor$, 1, 1) + mid(oryUIColor$, 1, 1), 16)
oryUIRGBA#[2] = val(mid(oryUIColor$, 2, 1) + mid(oryUIColor$, 2, 1), 16)
oryUIRGBA#[3] = val(mid(oryUIColor$, 3, 1) + mid(oryUIColor$, 3, 1), 16)
elseif (len(oryUIColor$) = 6)
oryUIRGBA#[1] = val(mid(oryUIColor$, 1, 2), 16)
oryUIRGBA#[2] = val(mid(oryUIColor$, 3, 2), 16)
oryUIRGBA#[3] = val(mid(oryUIColor$, 5, 2), 16)
endif
else
oryUIRGBA#[1] = GetColorRed(val(oryUIColor$))
oryUIRGBA#[2] = GetColorGreen(val(oryUIColor$))
oryUIRGBA#[3] = GetColorBlue(val(oryUIColor$))
endif
elseif (oryUICommaCount >= 3)
oryUIRGBA#[1] = valFloat(GetStringToken(oryUIColor$, ",", 1))
oryUIRGBA#[2] = valFloat(GetStringToken(oryUIColor$, ",", 2))
oryUIRGBA#[3] = valFloat(GetStringToken(oryUIColor$, ",", 3))
if (oryUICommaCount = 4) then oryUIRGBA#[4] = valFloat(GetStringToken(oryUIColor$, ",", 4))
endif
endfunction oryUIRGBA#
function OryUIConvertMaterialIconSubImages(oryUIAMax as integer, oryUIBMax as integer)
local oryUIBlankIcon as typeOryUIMaterialIcon
local oryUIFileID as integer
local oryUIForA as integer
local oryUIForB as integer
local oryUIID as integer
local oryUIImage as integer
local oryUILine$ as string
local oryUISubImage as integer
oryUIFileID = OpenToRead("OryUIMedia/Material-Icons/Material-Icons.txt")
for oryUIForA = 1 to oryUIAMax
oryUIImage = LoadImage("OryUIMedia/Material-Icons/Material-Icons-" + OryUIAddLeadingZeros(str(oryUIForA), len(str(oryUIAMax)) + 1) + ".png")
for oryUIForB = 1 to oryUIBMax
oryUILine$ = ReadLine(oryUIFileID)
oryUISubImage = LoadSubImage(oryUIImage, "icon" + str(oryUIForB))
oryUIMaterialIcon.insert(oryUIBlankIcon)
oryUIID = oryUIMaterialIcon.length
oryUIMaterialIcon[oryUIID].sortKey$ = oryUILine$
oryUIMaterialIcon[oryUIID].index = oryUIID
oryUIMaterialIcon[oryUIID].imageID = oryUISubImage
oryUIMaterialIcon[oryUIID].name$ = oryUILine$
next
next
CloseFile(oryUIFileID)
oryUIMaterialIcon.sort()
endfunction
function OryUICreateWidget(oryUIWidgetParameters$)
OryUIResetParametersType()
local oryUIForI as integer
local oryUIValue$ as string
local oryUIVariable$ as string
local oryUIWidget as integer
local oryUIWidgetEnd as integer
local oryUIWidgetParameter$ as string
local oryUIWidgetStart as integer
oryUIWidgetStart = FindString(oryUIWidgetParameters$, "widget:", 1, 1)
oryUIWidgetEnd = FindString(oryUIWidgetParameters$, ";", 1, oryUIWidgetStart)
oryUIWidgetParameter$ = Mid(oryUIWidgetParameters$, oryUIWidgetStart, oryUIWidgetEnd - oryUIWidgetStart)
oryUIVariable$ = lower(TrimString(GetStringToken(oryUIWidgetParameter$, ":", 1), " "))
oryUIValue$ = GetStringToken(oryUIWidgetParameter$, ":", 2)
oryUIValue$ = ReplaceString(oryUIValue$, "[colon]", ":", -1)
oryUIValue$ = ReplaceString(oryUIValue$, "[semicolon]", ";", -1)
if (oryUIValue$ = "") then oryUIValue$ = "null"
if (oryUIVariable$ = "widget")
oryUIParameters.widget$ = lower(oryUIValue$)
endif
select oryUIParameters.widget$
case "button"
oryUIWidget = OryUICreateButton(oryUIWidgetParameters$)
endcase
case "buttongroup"
oryUIWidget = OryUICreateButtonGroup(oryUIWidgetParameters$)
endcase
case "checkbox"
oryUIWidget = OryUICreateCheckbox(oryUIWidgetParameters$)
endcase
case "dialog"
oryUIWidget = OryUICreateDialog(oryUIWidgetParameters$)
endcase
case "editavatarscreen"
oryUIWidget = OryUICreateEditAvatarScreen(oryUIWidgetParameters$)
endcase
case "floatingactionbutton"
oryUIWidget = OryUICreateFloatingActionButton(oryUIWidgetParameters$)
endcase
case "httpsqueue"
oryUIWidget = OryUICreateHTTPSQueue(oryUIWidgetParameters$)
endcase
case "inputspinner"
oryUIWidget = OryUICreateInputSpinner(oryUIWidgetParameters$)
endcase
case "list"
oryUIWidget = OryUICreateList(oryUIWidgetParameters$)
endcase
case "menu"
oryUIWidget = OryUICreateMenu(oryUIWidgetParameters$)
endcase
case "navigationdrawer"
oryUIWidget = OryUICreateNavigationDrawer(oryUIWidgetParameters$)
endcase
case "pagination"
oryUIWidget = OryUICreatePagination(oryUIWidgetParameters$)
endcase
case "progressindicator"
oryUIWidget = OryUICreateProgressIndicator(oryUIWidgetParameters$)
endcase
case "scrollbar"
oryUIWidget = OryUICreateScrollBar(oryUIWidgetParameters$)
endcase
case "scrolltotop"
oryUIWidget = OryUICreateScrollToTop(oryUIWidgetParameters$)
endcase
case "sprite"
oryUIWidget = OryUICreateSprite(oryUIWidgetParameters$)
endcase
case "switch"
oryUIWidget = OryUICreateSwitch(oryUIWidgetParameters$)
endcase
case "tabs"
oryUIWidget = OryUICreateTabs(oryUIWidgetParameters$)
endcase
case "text"
oryUIWidget = OryUICreateText(oryUIWidgetParameters$)
endcase
case "textcard"
oryUIWidget = OryUICreateTextCard(oryUIWidgetParameters$)
endcase
case "textfield"
oryUIWidget = OryUICreateTextfield(oryUIWidgetParameters$)
endcase
case "tooltip"
oryUIWidget = OryUICreateTooltip(oryUIWidgetParameters$)
endcase
case "topbar"
oryUIWidget = OryUICreateTopBar(oryUIWidgetParameters$)
endcase
endselect
endfunction oryUIWidget
function OryUIDeleteAllWidgets()
local oryUIForI as integer
OryUISync()
for oryUIForI = 0 to oryUICreatedWidgets.length
select oryUICreatedWidgets[oryUIForI].type$
case "Button"
OryUIDeleteButton(oryUICreatedWidgets[oryUIForI].id)
endcase
case "ButtonGroup"
OryUIDeleteButtonGroup(oryUICreatedWidgets[oryUIForI].id)
endcase
case "Checkbox"
OryUIDeleteCheckbox(oryUICreatedWidgets[oryUIForI].id)
endcase
case "Dialog"
OryUIDeleteDialog(oryUICreatedWidgets[oryUIForI].id)
endcase
case "EditAvatarScreen"
OryUIDeleteEditAvatarScreen(oryUICreatedWidgets[oryUIForI].id)
endcase
case "FloatingActionButton"
OryUIDeleteFloatingActionButton(oryUICreatedWidgets[oryUIForI].id)
endcase
case "InputSpinner"
OryUIDeleteInputSpinner(oryUICreatedWidgets[oryUIForI].id)
endcase
case "List"
OryUIDeleteList(oryUICreatedWidgets[oryUIForI].id)
endcase
case "Menu"
OryUIDeleteMenu(oryUICreatedWidgets[oryUIForI].id)
endcase
case "NavigationDrawer"
OryUIDeleteNavigationDrawer(oryUICreatedWidgets[oryUIForI].id)
endcase
case "Pagination"
OryUIDeletePagination(oryUICreatedWidgets[oryUIForI].id)
endcase
case "ProgressIndicator"
OryUIDeleteProgressIndicator(oryUICreatedWidgets[oryUIForI].id)
endcase
case "ScrollBar"
OryUIDeleteScrollBar(oryUICreatedWidgets[oryUIForI].id)
endcase
case "ScrollToTop"
OryUIDeleteScrollToTop(oryUICreatedWidgets[oryUIForI].id)
endcase
case "Sprite"
DeleteSprite(oryUICreatedWidgets[oryUIForI].id)
endcase
case "Switch"
OryUIDeleteSwitch(oryUICreatedWidgets[oryUIForI].id)
endcase
case "Tabs"
OryUIDeleteTabs(oryUICreatedWidgets[oryUIForI].id)
endcase
case "Text"
DeleteText(oryUICreatedWidgets[oryUIForI].id)
endcase
case "TextCard"
OryUIDeleteTextCard(oryUICreatedWidgets[oryUIForI].id)
endcase
case "Textfield"
OryUIDeleteTextfield(oryUICreatedWidgets[oryUIForI].id)
endcase
case "Tooltip"
OryUIDeleteTooltip(oryUICreatedWidgets[oryUIForI].id)
endcase
case "TopBar"
OryUIDeleteTopBar(oryUICreatedWidgets[oryUIForI].id)
endcase
endselect
next
oryUICreatedWidgets.length = -1
endfunction
function OryUIGetLocalJSONVariable(oryUIVariable$ as string)
local oryUIForI as integer
local oryUIVariableValue$ as string
for oryUIForI = 0 to oryUILocalJSONVariables.length
if (oryUILocalJSONVariables[oryUIForI].variable$ = "") then oryUILocalJSONVariables.remove(oryUIForI)
if (lower(oryUILocalJSONVariables[oryUIForI].variable$) = lower(oryUIVariable$))
oryUIVariableValue$ = oryUILocalJSONVariables[oryUIForI].value$
endif
next
endfunction oryUIVariableValue$
function OryUILerp(oryUIMin# as float, oryUIMax# as float, oryUIF# as float)
local oryUIResult# as float
oryUIResult# = oryUIMin# + oryUIF# * (oryUIMax# - oryUIMin#)
endfunction oryUIResult#
function OryUIMaxFloat(oryUIA# as float, oryUIB# as float)
local oryUIMaxValue# as float
if (oryUIA# >= oryUIB#)
oryUIMaxValue# = oryUIA#
else
oryUIMaxValue# = oryUIB#
endif
endfunction oryUIMaxValue#
function OryUIMaxInt(oryUIA as integer, oryUIB as integer)
local oryUIMaxValue as integer
if (oryUIA >= oryUIB)
oryUIMaxValue = oryUIA
else
oryUIMaxValue = oryUIB
endif
endfunction oryUIMaxValue
function OryUIMinFloat(oryUIA# as float, oryUIB# as float)
local oryUIMinValue# as float
if (oryUIA# <= oryUIB#)
oryUIMinValue# = oryUIA#
else
oryUIMinValue# = oryUIB#
endif
endfunction oryUIMinValue#
function OryUIMinInt(oryUIA as integer, oryUIB as integer)
local oryUIMinValue as integer
if (oryUIA <= oryUIB)
oryUIMinValue = oryUIA
else
oryUIMinValue = oryUIB
endif
endfunction oryUIMinValue
function OryUIResetParametersType()
local oryUIForI as integer
oryUIParameters.addIcon$ = ""
oryUIParameters.addIconID = -999999
oryUIParameters.addToFront = -999999
oryUIParameters.alignment = -999999
oryUIParameters.alwaysVisible = -999999
oryUIParameters.angle# = -999999
oryUIParameters.attachToSpriteID = -999999
oryUIParameters.autoCorrectIfOutOfRange = -999999
oryUIParameters.autoHeight = -999999
oryUIParameters.autoResize = -999999
oryUIParameters.blockOrder$.length = -1
oryUIParameters.bold = -999999
oryUIParameters.buttonMargin# = -999999
oryUIParameters.cancelText$ = ""
oryUIParameters.checkboxAlignment = -999999
oryUIParameters.checkboxText$ = ""
oryUIParameters.checkboxTextBold = -999999
oryUIParameters.checkboxTextSize# = -999999
oryUIParameters.checkedImageID = -999999
oryUIParameters.decimals = -999999
oryUIParameters.decisionRequired = -999999
oryUIParameters.defaultValue# = -999999
oryUIParameters.delay# = -999999
oryUIParameters.depth = -999999
oryUIParameters.dialogType$ = ""
oryUIParameters.direction$ = ""
oryUIParameters.disabledIcon$ = ""
oryUIParameters.disabledIconID = -999999
oryUIParameters.disabledIconPlacement$ = ""
oryUIParameters.disabledImageID = -999999
oryUIParameters.disabledText$ = ""
oryUIParameters.disabledTextAlignment = -999999
oryUIParameters.disabledTextBold = -999999
oryUIParameters.disabledTextSize# = -999999
oryUIParameters.disableKeyboardInput = -999999
oryUIParameters.domain$ = ""
oryUIParameters.draggable = -999999
oryUIParameters.drawerLocation$ = ""
oryUIParameters.drawerType$ = ""
oryUIParameters.enabled = -999999
oryUIParameters.enabledIcon$ = ""
oryUIParameters.enabledIconID = -999999
oryUIParameters.enabledIconPlacement$ = ""
oryUIParameters.enabledImageID = -999999
oryUIParameters.enabledText$ = ""
oryUIParameters.enabledTextAlignment = -999999
oryUIParameters.enabledTextBold = -999999
oryUIParameters.enabledTextSize# = -999999
oryUIParameters.endY# = -999999
oryUIParameters.extended = -999999
oryUIParameters.file$ = ""
oryUIParameters.fileID = -999999
oryUIParameters.fixToscreen = -999999
oryUIParameters.flexButtons = -999999
oryUIParameters.frameShape$ = ""
oryUIParameters.gripIcon$ = ""
oryUIParameters.gripIconID = -999999
oryUIParameters.gripImageID = -999999
oryUIParameters.group = -999999
oryUIParameters.headerText$ = ""
oryUIParameters.headerTextAlignment = -999999
oryUIParameters.headerTextBold = -999999
oryUIParameters.headerTextSize# = -999999
oryUIParameters.helperText$ = ""
oryUIParameters.helperTextBold = -999999
oryUIParameters.helperTextSize# = -999999
oryUIParameters.icon$ = ""
oryUIParameters.iconID = -999999
oryUIParameters.iconPlacement$ = ""
oryUIParameters.imageID = -999999