-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlayout_149_presfml.nut
18517 lines (15456 loc) · 634 KB
/
layout_149_presfml.nut
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
// Arcadeflow - v 14.9
// Attract Mode Theme by zpaolo11x
//
// Based on carrier.nut scrolling module by Radek Dutkiewicz (oomek)
// Including code from the KeyboardSearch plugin by Andrew Mickelson (mickelson)
// Load file nut
fe.do_nut("nut_file.nut")
function z_write_line(file, line){
local b = blob( line.len() )
foreach (id, item in line)
b.writen( item, 'b' )
file.writeblob( b )
}
function split_complete(str_in, separator){
local outarray = []
local index = 0
while (str_in.find (separator) != null){
index = str_in.find (separator)
outarray.push (str_in.slice(0,index))
str_in = str_in.slice(index+separator.len())
}
outarray.push(str_in)
return outarray
}
// COME CAMBIA AR DA AF98
/*
Modificare la funzione GetAR in modo che restituisca l'AR _DA MOSTRARE_ pre-clamp,
così per il GG è 4/3 come letto da System, per MAME è 3:4 o 4:3 secondo "orientation"
per altri handheld è texture W/H stretto, se siamo in boxart mode è semplicemente texture W/H
l'AR poi viene clampato o snapcroppato, a quel punto viene definita la dimensione dell'artwork.
*/
//EASE PRINT
//local CCC = 0
local elapse = {
name = ""
t1 = 0
t2 = 0
timer = false
timetable = {}
}
local ap = '"'.tochar()
function timestart(name){
if (!elapse.timer) return
print ("\n "+name+" START\n")
elapse.timetable.rawset(name, fe.layout.time)
}
function timestop(name){
if (!elapse.timer) return
elapse.t2 = fe.layout.time
print(" "+name+" STOP: "+(elapse.t2-elapse.timetable[name])+"\n")
}
local IDX = array(100000)
// Support array for quick sort
foreach (i, item in IDX) {IDX[i] = format("%s%5u","\x00",i)}
// Support array for unicode mapping
function returngly(){
local uniglyph = [" ","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
return (uniglyph)
}
// General AF data table
local AF = {
dat_freeze = true
dat_freezecount = 0
bgs_freezecount = 0
uniglyphs = returngly()
version = "14.9"
vernum = 0
folder = fe.script_dir
subfolder = ""
romlistfolder = fe.path_expand(FeConfigDirectory + "romlists/")
emulatorsfolder = fe.path_expand(FeConfigDirectory + "emulators/")
bgsongs = []
config = null
soundvolume = 0
prefs = {
l0 = []
a0 = []
l1 = []
gl0 = [] //glyph array
imgpath = "help_images/"
imgext = ".jpg"
getout = false
defaults = null
driveletters = null
}
req = {
keyboard = -1
executef = -2
filereqs = -3
menusort = -4
exenoret = -5
textentr = -6
rgbvalue = -7
huevalue = -8
slideint = -9
liner = -100
}
updatechecking = false
boxmessage = [""]
messageoverlay = null
tsc = 1.0 // Scaling of timer for different parameters
scrape = null
emulatordata = {}
LNG = ""
bar = {
time0 = 0
time1 = 0
progress = 0
pic = null
picbg = null
size = 300
dark = 60
darkalpha = 90
}
}
function AFscrapeclear(){
AF.scrape = {
stack = []
regiontable = ["wor","us","eu","ss","jp"]
regionprefs = [] //This will be populated by options table
checktable = {}
purgedromdirlist = null
listoflists = null
emudata = null
forcemedia = false
romlist = ""
inprf = {}
scrapelist_file = null
scrapelist_lines = null
romlist_file = null
romlist_lines = null
quit = false
totalroms = 0
doneroms = 0
timeoutroms = []
columns = 60
separator1 = ""
separator2 = ""
onegame = ""
dispatchid = 0
requests = ""
report = {}
threads = 0
}
for (local i = 0 ; i < AF.scrape.columns;i++){
AF.scrape.separator1 += "-"
AF.scrape.separator2 += "="
}
}
AFscrapeclear()
AF.vernum = AF.version.tofloat()*10
// GitHub versioning data table
local gh = {
latest_version = 0
release_notes = 0
}
function gly(index){
local unizero = 0xe900
try {return (AF.uniglyphs[index - unizero + 1])} catch (err) {return ""}
}
AF.subfolder = AF.folder.slice(AF.folder.find("layouts"))
local zmenu = null
// Load language file
// Language is first taken from file if present. If it's not present "EN" is used. After settings the language is updated and file is updated too.
fe.do_nut("nut_language.nut")
AF.LNG = "EN"
try {AF.LNG = loadlanguage ()} catch (err){}
// font definition
local uifonts = {
gui = "fonts/font_Roboto-Allcaps-EXT4X.ttf"
general = "fonts/font_Roboto-Bold.ttf"
condensed = "fonts/font_Roboto-Condensed-Bold.ttf"
lite = "fonts/font_Roboto-Regular.ttf"
arcade = "fonts/font_CPMono_Black.otf"
arcadeborder = "fonts/font_CPMono_BlackBorder2.otf"
glyphs = "fonts/font_glyphs.ttf"
mono = "fonts/font_RobotoMono-VariableFont_wght.ttf"
monodata = "fonts/font_CQMono.otf"
pixel = 0.711
}
// Custom splash message wrappers with AF custom fonts
function z_splash_message(text){
fe.layout.font = uifonts.monodata
fe.overlay.splash_message(text)
fe.layout.font = uifonts.general
}
function z_edit_dialog(text1,text2){
fe.layout.font = uifonts.condensed
fe.overlay.edit_dialog(text1,text2)
fe.layout.font = uifonts.general
}
function bar_update(i,init,max){
// print ("i:"+i+" ")
local redraw = false
if (i == init){
//print("INIT\n")
AF.bar.time0 = 0
AF.bar.time1 = 0
AF.bar.progress = 0
AF.bar.pic.visible = true
AF.bar.picbg.visible = true
AF.bar.picbg.msg=gly(0xeafb+12)
AF.bar.pic.msg = gly(0xeafb)
return
}
if (i == max-1){
//print("CLOSE\n")
AF.bar.pic.visible = false
AF.bar.picbg.visible = false
return
}
AF.bar.time1 = clock()
if (AF.bar.time1 - AF.bar.time0 >= 1.0/ScreenRefreshRate) {
//print (" FRAME ")
if (i <= max*0.2) {
//print ("i<max*0.2")
redraw = true
AF.bar.pic.alpha = 255 * i/(max*0.2)
AF.bar.picbg.alpha = AF.bar.darkalpha * i/(max*0.2)
}
else if (i >= max*0.9){
//print ("i>max*0.8")
redraw = true
AF.bar.pic.alpha = 255 * (1.0-(i-max*0.9)/(max*0.1))
AF.bar.picbg.alpha = 0//AF.bar.darkalpha * (1.0-(i-max*0.8)/(max*0.2))
}
if (floor(11*i*1.0/max) != AF.bar.progress){
AF.bar.progress = floor(11*i*1.0/max)
AF.bar.pic.msg = gly(0xeafb+AF.bar.progress)
//print (" progress:"+AF.bar.progress+" ")
redraw = true
}
AF.bar.time0 = AF.bar.time1
if (redraw) fe.layout.redraw()
//print("\n")
}
}
/// Config management ///
/* Principles of ALLGAMES collections:
FUNCTIONS AND DATA STRUCTURES
parseconfig ()
scans the attract.cfg and returns a table with all the
config data.
During this scan the string "# Enable AF Collections" is
checekd and is used to determine if the function is
enabled as out.collections
The function is called at the beginning of the layout and
results passed to AF.config
z_af_collections
data structure of ALLGAMES collections including a table with
collections names and data and an array that is used to
force the sorting of the collections
buildconfig (allgames)
works directly on AF.config, runs through the AF.config and
removes all the entries related to the ALLGAMES, then
rebuilds the list with all the ALLGAMES entries at the end
of the list.
After rebuilding the config it writes the attract.cfg adding
the ""# Enable AF Collections" if prf.ALLGAMES is true
WORKFLOW
1) AF.config = parseconfig()
Populates the AF.config table, AF.config.collections is true or
false depending on the found string, but notice that this does
not guarantee that ALLGAMES displays are actually there
(someone could've altered them manually)
2) Load the whole layout data
3) prf.ALLGAMES != AF.config.collections
if prf.ALLGAMES is not coherent with AF.config.collections
buildconfig(prf.ALLGAMES) is called, this cleans the attract.cfg
and makes it coherent with the preference set.
After this, if prf.ALLGAMES is true all games collections
are updated using update_allgames_collections (true)
In the end the layout must be reloaded
*/
function restartAM(){
fe.signal("exit_to_desktop")
if (OS == "Windows") system ("start attractplus-console.exe")
else if (OS == "OSX") system ("./attractplus &")
else system ("attractplus &")
}
// This function parses the attract.cfg and builds a structure for all displays
function parseconfig(){
local cfgfile = ReadTextFile ( fe.path_expand( FeConfigDirectory + "attract.cfg" ) )
local displaytable = []
local inline = ""
local displayname = ""
local predisplays = []
local postdisplays = []
local id = 0
local af_collections = false
inline = cfgfile.read_line()
while (inline[0].tochar() == "#"){
if (inline.find("# Enable AF Collections") == 0) af_collections = true
else predisplays.push(inline)
inline = cfgfile.read_line()
}
while (inline.find("display\t") != 0){
predisplays.push(inline)
inline = cfgfile.read_line()
}
while (!cfgfile.eos()){
//inline = cfgfile.read_line()
if (inline.find("display\t") == 0) {
displayname = split(inline,"\t")[1]
displaytable.push ({"display": displayname})
inline = cfgfile.read_line()
displaytable[id].rawset("filters",[])
while (inline != ""){
switch (split(inline,"\t ")[0]){
case "layout":
case "romlist":
case "in_cycle":
case "in_menu":
displaytable[id].rawset(split(inline,"\t ")[0],inline.slice(21))
break
case "filter":
case "sort_by":
case "list_limit":
case "exception":
case "global_filter":
case "rule":
displaytable[id].filters.push(inline)
break
}
inline = cfgfile.read_line()
}
id ++
inline = cfgfile.read_line()
}
else {
postdisplays.push(inline)
inline = cfgfile.read_line()
}
}
//Add last read line from stream, which for sure is not a "display"
postdisplays.push(inline)
local warning = false
local tempval = null
foreach(i, item in postdisplays){
if (item.find("image_cache_mbytes")==0) {
tempval = split(item," ")[1]
if (tempval != "0" ) {
z_edit_dialog("*WARNING*\nSet Image Cache Size to zero to avoid issues","")
warning = true
}
}
if (item.find("menu_layout")==0) {
tempval = split(item," ")
if (tempval.len()>1){
if (tempval[1].find("Arcadeflow")==0){
z_edit_dialog("*WARNING*\nDon't use Arcadeflow as displays menu layout","")
warning = true
}
}
}
if (item.find("startup_mode")==0) {
tempval = split(item," ")[1]
if (tempval != "default" ) warning = true
}
}
if (warning) print ("\n\nWARNING: some options in attract.cfg clash with Arcadeflow\n\n")
local out = {
header = predisplays
displays = displaytable
footer = postdisplays
collections = af_collections
}
//foreach(i,val in out.footer) print (i+" "+val+"\n")
return (out)
}
// Define AF custom collections
local z_af_collections = {
tab = {}
arr = []
}
z_af_collections.tab = {
"AF All Games" : {
id = "AF All Games"
group = "COLLECTIONS"
groupedname = "All Games"
ungroupedname = "All Games"
filename = "_all_all"
}
"AF Favourites" : {
id = "AF Favourites"
group = "COLLECTIONS"
groupedname = "Favourites"
ungroupedname = "Favourites"
filename = "_favourites_all"
}
"AF Last Played" : {
id = "AF Last Played"
group = "COLLECTIONS"
groupedname = "Last Played"
ungroupedname = "Last Played"
filename = "_lastplayed_all"
}
"AF All Arcade Games" : {
id = "AF All Arcade Games"
group = "ARCADE"
groupedname = "All Games"
ungroupedname = "All Arcade Games"
filename = "_arcade_all"
}
"AF All Console Games" : {
id = "AF All Console Games"
group = "CONSOLE"
groupedname = "All Games"
ungroupedname = "All Console Games"
filename = "_console_all"
}
"AF All Handheld Games" : {
id = "AF All Handheld Games"
group = "HANDHELD"
groupedname = "All Games"
ungroupedname = "All Handheld Games"
filename = "_handheld_all"
}
"AF All Computer Games" : {
id = "AF All Computer Games"
group = "COMPUTER"
groupedname = "All Games"
ungroupedname = "All Computer Games"
filename = "_computer_all"
}
"AF All Pinball Games" : {
id = "AF All Pinball Games"
group = "PINBALL"
groupedname = "All Games"
ungroupedname = "All Pinball Games"
filename = "_pinball_all"
}
}
z_af_collections.arr.push (z_af_collections.tab["AF All Games"])
z_af_collections.arr.push (z_af_collections.tab["AF Favourites"])
z_af_collections.arr.push (z_af_collections.tab["AF Last Played"])
z_af_collections.arr.push (z_af_collections.tab["AF All Arcade Games"])
z_af_collections.arr.push (z_af_collections.tab["AF All Console Games"])
z_af_collections.arr.push (z_af_collections.tab["AF All Handheld Games"])
z_af_collections.arr.push (z_af_collections.tab["AF All Computer Games"])
z_af_collections.arr.push (z_af_collections.tab["AF All Pinball Games"])
z_af_collections.arr.reverse()
// Update the attract.cfg to incorporate all the collections
// This function doesn't reboot the layout, so changes are not effective
// until AM re-reads the config file
function buildconfig(allgames, tempprf){
local cfgtable = AF.config
// First step purges special AF collections
local i = 0
while (i < cfgtable.displays.len()){
if (cfgtable.displays[i].romlist.find("AF ") == 0) cfgtable.displays.remove(i)
else i++
}
// then rebuilds the display list with all collections at the end of the list
if (allgames){
foreach (item, val in z_af_collections.tab){
cfgtable.displays.push({
display = item
layout = fe.displays[fe.list.display_index].layout
romlist = item
in_cycle = "yes"
in_menu = "no"
filters = tempprf.MASTERLIST ? ["global_filter","rule FileIsAvailable equals 1", "filter All","filter Favourites","rule Favourite equals 1"] : ["filter All","filter Favourites","rule Favourite equals 1"]
})
}
}
// Starts writing the text file
local cfgfile = WriteTextFile ( fe.path_expand( FeConfigDirectory + "attract.cfg" ) )
foreach (id, item in cfgtable.header){
cfgfile.write_line(item+"\n")
}
if (allgames) cfgfile.write_line ("# Enable AF Collections\n")
foreach (item, value in cfgtable.displays){
cfgfile.write_line ("display\t"+value.display+"\n")
cfgfile.write_line ("\tlayout "+value.layout+"\n")
cfgfile.write_line ("\tromlist "+value.romlist+"\n")
cfgfile.write_line ("\tin_cycle "+value.in_cycle+"\n")
cfgfile.write_line ("\tin_menu "+value.in_menu+"\n")
foreach (item2, val2 in value.filters){
cfgfile.write_line( ((val2.slice(0,6) == "filter") || (val2 == "global_filter")) ? "\t"+val2+"\n" : "\t\t"+val2+"\n")
}
cfgfile.write_line("\n")
}
foreach (id, item in cfgtable.footer){
cfgfile.write_line(item+"\n")
}
cfgfile.close_file()
}
AF.config = parseconfig()
// for debug purposes
function loaddebug(){
local debugpath = fe.path_expand( AF.folder + "pref_debug.txt")
local debugfile = ReadTextFile (debugpath)
local out = debugfile.read_line()
return (out == "true")
}
function savedebug(savecode){
local debugpath = fe.path_expand( AF.folder + "pref_debug.txt")
local debugfile = WriteTextFile (debugpath)
debugfile.write_line(savecode)
debugfile.close_file()
}
local DBGON = false
try {DBGON = loaddebug()} catch (err) {}
function debugpr (instring){
if (DBGON) print (instring)
}
local dispatcher = []
local dispatchernum = 0
function scraprt (instring){
print (dispatchernum+" "+instring)
}
function testpr (instring){
print (instring)
}
function testprln (instring){
print (instring+"\n")
}
function testprln2 (instring){
print ("\n"+instring+"\n\n")
}
function unzipfile (zipfilepath, outputpath){
local ap = '"'.tochar()
local zipdir = zip_get_dir (zipfilepath)
local blb = null
local fout = null
// Create output folder if needed
system ("mkdir " + ap + outputpath + ap)
foreach (id, item in zipdir){
// Item is a folder, create it
if ((item.slice(-1)=="/") && (!(split(item,"/")[split(item,"/").len()-1].slice(0,1)=="."))) {
system ("mkdir " + ap + outputpath + item + ap)
}
// Item is a file, unpack it to the proper folder
if ((item.slice(-1)!="/") && (!(split(item,"/")[split(item,"/").len()-1].slice(0,1)=="."))) {
local savepath = fe.path_expand(outputpath + item)
fout = file( savepath, "wb" )
blb = zip_extract_file( zipfilepath, item )
fout.writeblob( blb )
}
}
}
function savetabletofile(table,file_name){
if (table == null) return
local tempfile = WriteTextFile ( fe.path_expand( AF.folder + file_name ) )
foreach (cell,val in table){
local savestring = "|"+cell
foreach (i, item in val){
savestring = savestring + "|" + item
}
savestring = savestring+"|\n"
tempfile.write_line(savestring)
}
tempfile.close_file()
}
function loadtablefromfile (file_name,textonly){
if (!(file_exist(fe.path_expand( AF.folder + file_name )))) return null
local tempfile = ReadTextFile ( fe.path_expand( AF.folder + file_name ) )
local table = {}
while (!tempfile.eos()){
local templine = tempfile.read_line()
local temparray = split(templine,"|")
local outarray = []
for (local i = 1 ; i < temparray.len();i++){
local tempval = temparray[i]
if (!textonly){
try {
tempval = tempval.tointeger()
} catch (err) {
if (tempval == "true") tempval = true
else if (tempval =="false") tempval = false
}
}
outarray.push (tempval)
}
table[temparray[0]] <- outarray
}
return table
}
fe.do_nut("nut_picfunctions.nut")
fe.do_nut("nut_gauss.nut")
fe.do_nut("nut_scraper.nut")
dofile( AF.folder + "nut_fileutil.nut" )
// CRC BANCHMARK
/*
local crr = {
tttt0 = 0
tttt1 = 0
fil = "/Volumes/Ext256/ROMS/snes/Star Ocean (Japan).zip"
}
crr.tttt0 = fe.layout.time
print ("CRC:" + (getromcrc_old(crr.fil))[0] + " ")
crr.tttt1 = fe.layout.time
print(crr.tttt1-crr.tttt0+"msec\n")
crr.tttt0 = fe.layout.time
print ("CRC:" + (getromcrc(crr.fil))[0] + " ")
crr.tttt1 = fe.layout.time
print(crr.tttt1-crr.tttt0+"msec\n")
crr.tttt0 = fe.layout.time
print ("CRC:" + (getromcrc_halfbyte(crr.fil))[0] + " ")
crr.tttt1 = fe.layout.time
print(crr.tttt1-crr.tttt0+"msec\n")
crr.tttt0 = fe.layout.time
print ("CRC:" + (getromcrc_lookup(crr.fil))[0] + " ")
crr.tttt1 = fe.layout.time
print(crr.tttt1-crr.tttt0+"msec\n")
crr.tttt0 = fe.layout.time
print ("CRC:" + (getromcrc_lookup4(crr.fil))[0] + " ")
crr.tttt1 = fe.layout.time
print(crr.tttt1-crr.tttt0+"msec\n")
*/
/// Preferences functions and table ///
function letterdrives(){
local letters = "CDEFGHIJKLMNOPQRSTUVWXYZ"
local drives = []
foreach (i, item in letters){
if (fe.path_test ( item.tochar() + ":" , PathTest.IsDirectory) ) drives.push (item.tochar()+":\\")
}
// return (drives.len() > 0 ? drives : ["/"])
return drives
}
AF.prefs.driveletters = letterdrives()
local prf = null
local selection_pre = null
local umtable = []
local umpresel = 0
local umvisible = false
local multifilterz = {}
multifilterz.l0 <- {}
function umtablenames(tablein){
local n0 = []
tablein.sort(@(a,b) a.id <=> b.id)
foreach (i, item in tablein){
n0.push((item.glyph == -1) ? "----- "+item.label: item.label)
}
return n0
}
function mfztablenames(tablein){
local outnames = []
foreach (item, val in tablein){
outnames.push (item)
}
outnames.sort(@(a,b) ltxt(a,AF.LNG).tolower() <=> ltxt(b,AF.LNG).tolower())
foreach (i, item in outnames){
outnames[i] = ltxt(item,AF.LNG)
}
return (outnames)
}
function sortstring(num){
local strz=""
for (local i=1;i<=num;i++){
strz=strz+i+","
}
return strz
}
function languageflags() {
local inputarray = languagetokenarray()
local out = inputarray
foreach (i, item in inputarray){
out[i] = "flags" + out[i] + AF.prefs.imgext
}
return out
}
function monitorlist(){
local out = []
foreach (id, item in fe.monitors){
out.push (id.tostring())
}
return (out)
}
local menucounter = 0
local sorter = {}
AF.prefs.l0.push({label = "GENERAL", glyph = 0xe993, description = "Define the main options of Arcadeflow like number of rows, general layout, control buttons, language, thumbnail source etc"})
AF.prefs.l1.push([
{v = 10.2, varname = "layoutlanguage", glyph = 0xe9ca, initvar = function(val,prf){prf.LAYOUTLANGUAGE <- val}, title = "Layout language", help = "Chose the language of the layout" , options = languagearray(), values = languagetokenarray(), selection = 1, picsel = languageflags(),pic="flags.jpg"},
{v = 10.5, varname = "powermenu", glyph = 0xe9b6, initvar = function(val,prf){prf.POWERMENU <- val}, title = "Power menu", help = "Enable or disable power options in exit menu" , options = ["Yes","No"], values = [true,false], selection = 1},
{v = 0.0, varname = "", glyph = -1, title = "Layout", selection = AF.req.liner},
{v = 7.2, varname = "horizontalrows", glyph = 0xea72, initvar = function(val,prf){prf.HORIZONTALROWS <- val}, title = "Rows in horizontal", help = "Number of rows to use in 'horizontal' mode" , options = ["1-Small", "1", "2", "3"], values = [-1,1,2,3], selection = 2, picsel = ["rows1mini"+AF.prefs.imgext,"rows1"+AF.prefs.imgext,"rows2"+AF.prefs.imgext,"rows3"+AF.prefs.imgext],pic = "rows2"+AF.prefs.imgext},
{v = 7.2, varname = "verticalrows", glyph = 0xea71, initvar = function(val,prf){prf.VERTICALROWS <- val}, title = "Rows in vertical", help = "Number of rows to use in 'vertical' mode" , options = ["1", "2", "3"], values = [1,2,3], selection = 2, picsel = ["rowsv1"+AF.prefs.imgext,"rowsv2"+AF.prefs.imgext,"rowsv3"+AF.prefs.imgext],pic = "rowsv3"+AF.prefs.imgext},
{v = 7.2, varname = "cleanlayout", glyph = 0xe997, initvar = function(val,prf){prf.CLEANLAYOUT <- val}, title = "Clean layout", help = "Reduce game data shown on screen" , options = ["Yes","No"], values = [true,false], selection = 1, picsel = ["cleanyes"+AF.prefs.imgext,"cleanno"+AF.prefs.imgext],pic = "cleanyes"+AF.prefs.imgext},
{v = 7.2, varname = "lowres", glyph = 0xe997, initvar = function(val,prf){prf.LOWRES <- val}, title = "Low resolution", help = "Optimize theme for low resolution screens, 1 row layout forced, increased font size and cleaner layout" , options = ["Yes","No"], values = [true,false], selection = 1,picsel = ["lowreson"+AF.prefs.imgext,"lowresoff"+AF.prefs.imgext],pic = "lowreson"+AF.prefs.imgext},
{v = 7.2, varname = "baserotation", glyph = 0xea2e, initvar = function(val,prf){prf.BASEROTATION <- val}, title = "Screen rotation", help = "Rotate screen" , options = ["None", "Left", "Right", "Flip"], values =["none", "left", "right", "flip"], selection =0,picsel=["rotnone"+AF.prefs.imgext,"rotleft"+AF.prefs.imgext,"rotright"+AF.prefs.imgext,"rotflip"+AF.prefs.imgext],pic = "rotright"+AF.prefs.imgext},
{v = 12.8, varname = "customcolor", glyph = 0xe90c, initvar = function(val,prf){prf.CUSTOMCOLOR <- val}, title = "Custom color", help = "Define a custom color for UI elements using sliders" , options = "", values = "", selection = AF.req.rgbvalue},
{v = 0.0, varname = "", glyph = -1, title = "Game Data", selection = AF.req.liner},
{v = 7.2, varname = "showsubname", glyph = 0xea6d, initvar = function(val,prf){prf.SHOWSUBNAME <- val}, title = "Display Game Long Name", help = "Shows the part of the rom name with version and region data" , options = ["Yes","No"], values = [true,false], selection = 0, picsel = ["subdefaultname"+AF.prefs.imgext,"subnosubname"+AF.prefs.imgext]},
{v = 7.2, varname = "showsysname", glyph = 0xea6d, initvar = function(val,prf){prf.SHOWSYSNAME <- val}, title = "Display System Name", help = "Shows the System name under the game title" , options = ["Yes","No"], values = [true,false], selection = 0, picsel = ["subdefaultname"+AF.prefs.imgext,"subnosystem"+AF.prefs.imgext]},
{v = 10.1, varname = "showarcadename", glyph = 0xea6d, initvar = function(val,prf){prf.SHOWARCADENAME <- val}, title = "Display Arcade System Name", help = "Shows the name of the Arcade system if available" , options = ["Yes","No"], values = [true,false], selection = 0},
{v = 7.2, varname = "showsysart", glyph = 0xea6d, initvar = function(val,prf){prf.SHOWSYSART <- val}, title = "System Name as artwork", help = "If enabled, the system name under the game title is rendered as a logo instead of plain text" , options = ["Yes","No"], values = [true,false], selection = 0, picsel = ["subdefaultname"+AF.prefs.imgext,"subnosystemart"+AF.prefs.imgext]},
{v = 0.0, varname = "", glyph = -1, title = "Scroll & Sort", selection = AF.req.liner},
{v = 10.3, varname = "scrollamount", glyph = 0xea45, initvar = function(val,prf){prf.SCROLLAMOUNT <- val}, title = "Page jump size", help = "Page jumps are one screen by default, you can increase it if you want to jump faster" , options = ["1 Screen", "2 Screens", "3 Screens"], values = [1, 2, 3] , selection = 0},
{v = 7.2, varname = "scrollertype", glyph = 0xea45, initvar = function(val,prf){prf.SCROLLERTYPE <- val}, title = "Scrollbar style", help = "Select how the scrollbar should look" , options = ["Timeline", "Scrollbar", "Label List"], values = ["timeline", "scrollbar", "labellist"] , selection = 0, picsel = ["scrolltimeline"+AF.prefs.imgext,"scrollscrollbar"+AF.prefs.imgext,"scrolllabellist"+AF.prefs.imgext],pic="scroll"+AF.prefs.imgext},
{v = 7.2, varname = "striparticle", glyph = 0xea4c, initvar = function(val,prf){prf.STRIPARTICLE <- val}, title = "Strip article from sort", help = "When sorting by Title ignore articles" , options = ["Yes","No"], values = [true,false], selection = 1},
{v = 10.9, varname = "enablesort", glyph = 0xea4c, initvar = function(val,prf){prf.ENABLESORT <- val}, title = "Enable sorting", help = "Enable custom realtime sorting, diable to keep romlist sort order" , options = ["Yes","No"], values = [true,false], selection = 0},
{v = 7.2, varname = "sortsave", glyph = 0xea4c, initvar = function(val,prf){prf.SORTSAVE <- val}, title = "Save sort order", help = "Custom sort order is saved through Arcadeflow sessions" , options = ["Yes","No"], values = [true,false], selection = 0},
])
menucounter ++
AF.prefs.l0.push({ label = "THUMBNAILS", glyph = 0xe915, description = "Chose the aspect ratio of thumbnails, video thumbnails and decorations"})
AF.prefs.l1.push([
{v = 7.2, varname = "cropsnaps", glyph = 0xea57, initvar = function(val,prf){prf.CROPSNAPS <- val}, title = "Aspect ratio", help = "Chose wether you want cropped, square snaps or adaptive snaps depending on game orientation", options = ["Adaptive", "Square"], values = [false, true], selection = 0, picsel= ["aradaptive"+AF.prefs.imgext,"arsquare"+AF.prefs.imgext],pic = "arsquare"+AF.prefs.imgext},
{v = 8.7, varname = "morphaspect", glyph = 0xea57, initvar = function(val,prf){prf.MORPHASPECT <- val}, title = "Morph snap ratio", help = "Chose if you want the box to morph into the actual game video or if it must be cropped", options = ["Morph video", "Crop video"], values = [true, false], selection = 0},
{v = 10.9, varname = "fix169", glyph = 0xea57, initvar = function(val,prf){prf.FIX169 <- val}, title = "Optimize vertical arcade", help = "Enable this option if you have 9:16 vertical artwork from the Vertical Arcade project", options = ["Yes", "No"], values = [true, false], selection = 1},
{v = 10.4, varname = "tilezoom", glyph = 0xea57, initvar = function(val,prf){prf.TILEZOOM <- val}, title = "Zoom thumbnails", help = "Chose if you want the selected thumbnail to zoom to a larger size", options = ["Standard", "Reduced", "None"], values = [2, 1, 0], selection = 0},
{v = 10.7, varname = "logosonly", glyph = 0xea6d, initvar = function(val,prf){prf.LOGOSONLY <- val}, title = "Show only logos", help = "If enabled, only game tilte logos will be shown instead of the screenshot", options = ["Yes", "No"], values = [true, false], selection = 1},
{v = 0.0, varname = "", glyph = -1, title = "Snapshot Options", selection = AF.req.liner},
{v = 8.8, varname = "titleart", glyph = 0xe915, initvar = function(val,prf){prf.TITLEART <- val}, title = "Snapshot artwork source", help = "Chose if you want the snapshot artwork from gameplay or title screen" options = ["Gameplay", "Title screen"], values = [false, true], selection = 0},
{v = 8.4, varname = "titleonsnap", glyph = 0xea6d, initvar = function(val,prf){prf.TITLEONSNAP <- val}, title = "Show game title", help = "Show the title of the game over the thumbnail" , options = ["Yes","No"], values = [true,false], selection = 0},
{v = 0.0, varname = "", glyph = -1, title = "Box Art Options", selection = AF.req.liner},
{v = 7.2, varname = "boxartmode", glyph = 0xe918, initvar = function(val,prf){prf.BOXARTMODE <- val}, title = "Box Art mode", help = "Show box art or flyers instead of screen captures by default (can be configured with menu or hotkey)" , options = ["Yes","No"], values = [true,false], selection = 1, picsel = ["boxarton"+AF.prefs.imgext,"boxartoff"+AF.prefs.imgext], pic = "boxart"+AF.prefs.imgext},
{v = 7.2, varname = "titleonbox", glyph = 0xe918, initvar = function(val,prf){prf.TITLEONBOX <- val}, title = "Game title over box art", help = "Shows the game title artwork overlayed on the box art graphics" , options = ["Yes","No"], values = [true,false], selection = 1,picsel = ["boxarttitle"+AF.prefs.imgext,"boxarton"+AF.prefs.imgext],pic = "boxarttitle"+AF.prefs.imgext},
{v = 7.2, varname = "boxartsource", glyph = 0xe918, initvar = function(val,prf){prf.BOXARTSOURCE <- val}, title = "Box Art artwork source", help = "Chose the artwork source for box art graphics" , options = ["flyer", "fanart"], values = ["flyer", "fanart"], selection = 0 },
{v = 0.0, varname = "", glyph = -1, title = "Video Snaps", selection = AF.req.liner},
{v = 7.2, varname = "thumbvideo", glyph = 0xe913, initvar = function(val,prf){prf.THUMBVIDEO <- val}, title = "Video thumbs", help = "Enable video overlay on snapshot thumbnails" , options = ["Yes","No"], values = [true,false], selection = 0},
{v = 8.5, varname = "fadevideotitle", glyph = 0xe913, initvar = function(val,prf){prf.FADEVIDEOTITLE <- val}, title = "Fade title on video", help = "Fades game title and decoration when the video is playing" , options = ["Yes","No"], values = [true,false], selection = 1},
{v = 8.4, varname = "thumbvidelay", glyph = 0xe913, initvar = function(val,prf){prf.THUMBVIDELAY <- val}, title = "Video delay multiplier", help = "Increase video load delay" , options = ["0.25x","0.5x","1x", "2x","3x","4x","5x"], values = [0.25,0.5,1,2,3,4,5], selection = 2},
{v = 7.2, varname = "missingwheel", glyph = 0xea6d, initvar = function(val,prf){prf.MISSINGWHEEL <- val}, title = "Generate missing title art", help = "If no game title is present, the layout can generate it" , options = ["Yes","No"], values = [true,false], selection = 0,picsel = ["missingwheelyes"+AF.prefs.imgext,"missingwheelno"+AF.prefs.imgext],pic = "missingwheel"+AF.prefs.imgext},
{v = 14.8, varname = "vid169", glyph = 0xea57, initvar = function(val,prf){prf.VID169 <- val}, title = "Vertical arcade videos", help = "Enable this option if you are using 9:16 videos from the Vertical Arcade project", options = ["Yes", "No"], values = [true, false], selection = 1},
{v = 0.0, varname = "", glyph = -1, title = "Decorations", selection = AF.req.liner},
{v = 9.6, varname = "redcross", glyph = 0xe936, initvar = function(val,prf){prf.REDCROSS <- val}, title = "Game not available indicator", help = "Games that are not available will be marked with a red cross overlay" , options = ["Yes","No"], values = [true,false], selection = 0},
{v = 7.2, varname = "newgame", glyph = 0xe936, initvar = function(val,prf){prf.NEWGAME <- val}, title = "New game indicator", help = "Games not played are marked with a glyph" , options = ["Yes","No"], values = [true,false], selection = 0, picsel=["decornewgame"+AF.prefs.imgext,"decornone"+AF.prefs.imgext],pic = "decornewgame"+AF.prefs.imgext},
{v = 7.2, varname = "tagshow", glyph = 0xe936, initvar = function(val,prf){prf.TAGSHOW <- val}, title = "Show tag indicator", help = "Shows a tag attached to thumbnails that contains any tag" , options = ["Yes","No"], values = [true,false], selection = 0, picsel=["decortag"+AF.prefs.imgext,"decornone"+AF.prefs.imgext],pic = "decortag"+AF.prefs.imgext},
{v = 7.2, varname = "tagname", glyph = 0xe936, initvar = function(val,prf){prf.TAGNAME <- val}, title = "Custom tag name", help = "You can see a tag glyph overlayed to the thumbs, chose the tag name to use", options = "", values = "", selection = AF.req.keyboard},
{v = 7.2, varname = "gbrecolor", glyph = 0xe90c, initvar = function(val,prf){prf.GBRECOLOR <- val}, title = "Game Boy color correction", help = "Apply a colorized palette to Game Boy games based on the system name or forced to your preference" , options = ["Automatic", "Classic", "Pocket", "Light", "None"], values = ["AUTO", "LCDGBC", "LCDGBP", "LCDGBL" ,"NONE"], selection = 0, picsel = ["gb"+AF.prefs.imgext,"gbclassic"+AF.prefs.imgext,"gbpocket"+AF.prefs.imgext,"gblight"+AF.prefs.imgext,"gbnone"+AF.prefs.imgext],pic = "gb"+AF.prefs.imgext},
{v = 10.3, varname = "crtrecolor", glyph = 0xe90c, initvar = function(val,prf){prf.CRTRECOLOR <- val}, title = "MSX crt color correction", help = "Apply a palette correction to MSX media that was captured with MSX2 palette" , options = ["Yes", "No"], values = [true,false], selection = 1},
])
menucounter ++
AF.prefs.l0.push({ label = "BACKGROUND", glyph = 0xe90c, description = "Chose the layout background theme in main page and in History page, or select custom backgrounds"})
AF.prefs.l1.push([
{v = 7.2, varname = "colortheme", glyph = 0xe90c, initvar = function(val,prf){prf.COLORTHEME <- val}, title = "Overlay color", help = "Setup theme luminosity overlay, Basic is slightly muted, Dark is darker, Light has a white overlay and dark text, Pop keeps the colors unaltered" , options = ["Basic", "Dark", "Light", "Pop"], values =["basic", "dark", "light", "pop"], selection = 3, picsel = ["overlaybasic"+AF.prefs.imgext,"overlaydark"+AF.prefs.imgext,"overlaylight"+AF.prefs.imgext,"overlaypop"+AF.prefs.imgext], pic = "overlay"+AF.prefs.imgext},
{v = 8.9, varname = "overcustom", glyph = 0xe930, initvar = function(val,prf){prf.OVERCUSTOM <- val}, title = "Custom overlay", help = "Insert custom PNG to be overlayed over everything", options = "", values = "pics/", selection = AF.req.filereqs},
{v = 8.4, varname = "bgcustom", glyph = 0xe930, initvar = function(val,prf){prf.BGCUSTOM <- val}, title = "Custom main BG image", help = "Insert custom background art path (use grey.png for blank background, vignette.png for vignette overlay)", options = "", values = "pics/", selection = AF.req.filereqs,pic="bgcustom"+AF.prefs.imgext},
{v = 8.4, varname = "bgcustomstretch", glyph = 0xea57, initvar = function(val,prf){prf.BGCUSTOMSTRETCH <- val}, title = "Format of main BG image", help = "Select if the custom background must be cropped to fill the screen or stretched", options = ["Crop","Stretch"], values = [false,true], selection = 1,pic="bgcustom"+AF.prefs.imgext},
{v = 0.0, varname = "", glyph = -1, title = "History BG", selection = AF.req.liner},
{v = 8.4, varname = "bgcustomhistory", glyph = 0xe930, initvar = function(val,prf){prf.BGCUSTOMHISTORY <- val}, title = "Custom history BG image", help = "Insert custom background art path for history page (leave blank if the same as main background)", options = "", values ="pics/", selection = AF.req.filereqs,pic="bgcustomhistory"+AF.prefs.imgext},
{v = 8.4, varname = "bgcustomhistorystretch", glyph = 0xea57, initvar = function(val,prf){prf.BGCUSTOMHISTORYSTRETCH <- val}, title = "Format of history BG image", help = "Select if the custom background must be cropped to fill the screen or stretched", options = ["Crop","Stretch"], values = [false,true], selection = 1,pic="bgcustomhistory"+AF.prefs.imgext},
{v = 0.0, varname = "", glyph = -1, title = "BG Snaps", selection = AF.req.liner},
{v = 7.2, varname = "layersnap", glyph = 0xe90d, initvar = function(val,prf){prf.LAYERSNAP <- val}, title = "Background snap", help = "Add a faded game snapshot to the background" , options = ["Yes","No"], values = [true,false], selection = 1, picsel = ["bgsnapyes"+AF.prefs.imgext,"bgsnapno"+AF.prefs.imgext],pic="bgsnap"+AF.prefs.imgext},
{v = 7.2, varname = "layervideo", glyph = 0xe913, initvar = function(val,prf){prf.LAYERVIDEO <- val}, title = "Animate BG snap", help = "Animate video on background" , options = ["Yes","No"], values = [true,false], selection = 1},
{v = 7.2, varname = "layervidelay", glyph = 0xe913, initvar = function(val,prf){prf.LAYERVIDELAY <- val}, title = "Delay BG animation", help = "Don't load immediately the background video animation" , options = ["Yes","No"], values = [true,false], selection = 1},
{v = 0.0, varname = "", glyph = -1, title = "Per Display", selection = AF.req.liner},
{v = 7.5, varname = "bgperdisplay", glyph = 0xe912, initvar = function(val,prf){prf.BGPERDISPLAY <- val}, title = "Per Display background", help = "You can have a different background for each display, just put your pictures in menu-art/bgmain and menu-art/bghistory folders named as the display" , options = ["Yes","No"], values = [true,false], selection = 1},
])
menucounter ++
AF.prefs.l0.push({ label = "LOGO", glyph = 0xe916, description = "Customize the splash logo at the start of Arcadeflow"})
AF.prefs.l1.push([
{v = 7.2, varname = "splashon", glyph = 0xe916, initvar = function(val,prf){prf.SPLASHON <- val}, title = "Enable splash logo", help = "Enable or disable the AF start logo" , options = ["Yes","No"], values = [true,false], selection = 0,picsel = ["logoyes"+AF.prefs.imgext,"logono"+AF.prefs.imgext], pic = "logoyes"+AF.prefs.imgext},
{v = 7.2, varname = "splashlogofile", glyph = 0xe930, initvar = function(val,prf){prf.SPLASHLOGOFILE <- val}, title = "Custom splash logo", help = "Insert the path to a custom AF splash logo (or keep blank for default logo)", options = "", values ="", selection = AF.req.filereqs,pic = "logocustom"+AF.prefs.imgext},
])
menucounter ++
AF.prefs.l0.push({ label = "COLOR CYCLE", glyph = 0xe982, description = "Enable and edit color cycling animation of tile highlight border"})
AF.prefs.l1.push([
{v = 10.7, varname = "huecycle", glyph = 0xe982, initvar = function(val,prf){prf.HUECYCLE <- val}, title = "Enable color cycle", help = "Enable/disable color cycling of the tile higlight border", options = ["Yes", "No"], values = [true, false], selection = 1},
{v = 0.0, varname = "", glyph = -1, title = "Cycle Options", selection = AF.req.liner},
{v = 10.7, varname = "hcspeed", glyph = 0xe9a6, initvar = function(val,prf){prf.HCSPEED <- val}, title = "Cycle speed", help = "Select the speed of color cycle" options = ["Slow", "Medium", "Fast"], values = [2, 5, 8], selection = 1},
{v = 10.7, varname = "hccolor", glyph = 0xe90c, initvar = function(val,prf){prf.HCCOLOR <- val}, title = "Cycle color", help = "Select a color intensity preset for the cycle" , options = ["Standard","Popping", "Light"], values = ["0.7_0.7","1.0_0.5","1.0_0.9"], selection = 0},
{v = 10.7, varname = "hcpingpong", glyph = 0xea2d, initvar = function(val,prf){prf.HCPINGPONG <- val}, title = "Ping Pong effect", help = "Enable this if you want the cycle to revert once finished instead of restarting" , options = ["Yes","No"], values = [true,false], selection = 1},
{v = 12.8, varname = "hchuestart", glyph = 0xe994, initvar = function(val,prf){prf.HCHUESTART <- val}, title = "Start hue", help = "Define the start value of the hue cycle (0 - 359)", options = "", values = "", selection = AF.req.huevalue},
{v = 12.8, varname = "hchuestop", glyph = 0xe994, initvar = function(val,prf){prf.HCHUESTOP <- val}, title = "Stop hue", help = "Define the stop value of the hue cycle (0 - 359)", options = "", values = "", selection = -8},
])
menucounter ++
AF.prefs.l0.push({ label = "AUDIO", glyph = 0xea27, description = "Configure layout sounds and audio options for videos"})
AF.prefs.l1.push([
{v = 7.2, varname = "themeaudio", glyph = 0xea27, initvar = function(val,prf){prf.THEMEAUDIO <- val}, title = "Enable theme sounds", help = "Enable audio sounds when browsing and moving around the theme" options = ["Yes","No"], values = [true,false], selection = 0},
{v = 7.2, varname = "audiovidsnaps", glyph = 0xea27, initvar = function(val,prf){prf.AUDIOVIDSNAPS <- val}, title = "Audio in videos (thumbs)", help = "Select wether you want to play audio in videos on thumbs" , options = ["Yes","No"], values = [true,false], selection = 1},
{v = 7.2, varname = "audiovidhistory", glyph = 0xea27, initvar = function(val,prf){prf.AUDIOVIDHISTORY <- val}, title = "Audio in videos (history)", help = "Select wether you want to play audio in videos on history detail page" , options = ["Yes","No"], values = [true,false], selection = 1},
{v = 7.2, varname = "backgroundtune", glyph = 0xe911, initvar = function(val,prf){prf.BACKGROUNDTUNE <- val}, title = "Layout background music", help = "Chose a background music file to play while using Arcadeflow" , options = "", values ="", selection = AF.req.filereqs},
{v = 10.2, varname = "randomtune", glyph = 0xe911, initvar = function(val,prf){prf.RANDOMTUNE <- val}, title = "Randomize background music", help = "If this is enabled, Arcadeflow will play a random mp3 from the folder of the selected background music" , options = ["Yes","No"], values = [true,false], selection = 1},
{v = 7.2, varname = "nobgonattract", glyph = 0xe911, initvar = function(val,prf){prf.NOBGONATTRACT <- val}, title = "Stop bg music in attract mode", help = "Stops playing the layout background music during attract mode" , options = ["Yes","No"], values =[true,false] selection = 0},
])
menucounter++
AF.prefs.l0.push({label = "", glyph = -1, description = ""})
AF.prefs.l1.push([])
menucounter ++
AF.prefs.l0.push({label = "BUTTONS", glyph = 0xea54, description = "Define custom control buttons for different features of Arcadeflow"})
AF.prefs.l1.push([
{v = 7.2, varname = "overmenubutton", glyph = 0xea54, initvar = function(val,prf){prf.OVERMENUBUTTON <- val}, title = "Context menu button", help = "Chose the button to open the game context menu" , options = ["None","Select", "Custom 1", "Custom 2", "Custom 3", "Custom 4", "Custom 5", "Custom 6"], values=["none","select", "custom1", "custom2", "custom3", "custom4", "custom5", "custom6"], selection = 1,pic = "contextmenu"+AF.prefs.imgext},
{v = 7.2, varname = "utilitymenubutton", glyph = 0xea54, initvar = function(val,prf){prf.UTILITYMENUBUTTON <- val}, title = "Utility menu button", help = "Chose the button to open the utility menu" , options = ["None", "Up", "Custom 1", "Custom 2", "Custom 3", "Custom 4", "Custom 5", "Custom 6"], values =["none", "up", "custom1", "custom2", "custom3", "custom4", "custom5", "custom6"], selection = 1,pic = "utilitymenu"+AF.prefs.imgext},
{v = 7.2, varname = "historybutton", glyph = 0xea54, initvar = function(val,prf){prf.HISTORYBUTTON <- val}, title = "History page button", help = "Chose the button to open the history or overview page" , options = ["None", "Select", "Custom 1", "Custom 2", "Custom 3", "Custom 4", "Custom 5", "Custom 6"], values =["none", "select", "custom1", "custom2", "custom3", "custom4", "custom5", "custom6"], selection = 0,pic = "bgcustomhistory"+AF.prefs.imgext},
{v = 7.2, varname = "switchmodebutton", glyph = 0xea54, initvar = function(val,prf){prf.SWITCHMODEBUTTON <- val}, title = "Thumbnail mode button", help = "Chose the button to use to switch from snapshot mode to box art mode" , options = ["None", "Custom 1", "Custom 2", "Custom 3", "Custom 4", "Custom 5", "Custom 6"], values=["none", "custom1", "custom2", "custom3", "custom4", "custom5", "custom6"], selection = 3,pic = "boxarton"+AF.prefs.imgext},
{v = 0.0, varname = "", glyph = -1, title = "Search and Filters", selection = AF.req.liner},
{v = 7.5, varname = "searchbutton", glyph = 0xea54, initvar = function(val,prf){prf.SEARCHBUTTON <- val}, title = "Search menu button", help = "Chose the button to use to directly open the search menu instead of using the utility menu" , options = ["None", "Custom 1", "Custom 2", "Custom 3", "Custom 4", "Custom 5", "Custom 6"], values=["none", "custom1", "custom2", "custom3", "custom4", "custom5", "custom6"], selection = 0,pic = "inputscreenkeys"+AF.prefs.imgext},
{v = 7.6, varname = "categorybutton", glyph = 0xea54, initvar = function(val,prf){prf.CATEGORYBUTTON <- val}, title = "Category menu button", help = "Chose the button to use to open the list of game categories" , options = ["None", "Custom 1", "Custom 2", "Custom 3", "Custom 4", "Custom 5", "Custom 6"], values=["none", "custom1", "custom2", "custom3", "custom4", "custom5", "custom6"], selection = 0},
{v = 7.6, varname = "multifilterbutton", glyph = 0xea54, initvar = function(val,prf){prf.MULTIFILTERBUTTON <- val}, title = "Multifilter menu button", help = "Chose the button to use to open the menu for dynamic filtering of romlist" , options = ["None", "Custom 1", "Custom 2", "Custom 3", "Custom 4", "Custom 5", "Custom 6"], values=["none", "custom1", "custom2", "custom3", "custom4", "custom5", "custom6"], selection = 0},
{v = 14.2, varname = "favbutton", glyph = 0xea54, initvar = function(val,prf){prf.FAVBUTTON <- val}, title = "Show favorites button", help = "Chose the button to use to toggle favorite filtering" , options = ["None", "Custom 1", "Custom 2", "Custom 3", "Custom 4", "Custom 5", "Custom 6"], values=["none", "custom1", "custom2", "custom3", "custom4", "custom5", "custom6"], selection = 0},
{v = 0.0, varname = "", glyph = -1, title = "Sound", selection = AF.req.liner},
{v = 12.5, varname = "volumebutton", glyph = 0xea54, initvar = function(val,prf){prf.VOLUMEBUTTON <- val}, title = "Volume button", help = "Chose the button to use to change system volume" , options = ["None", "Custom 1", "Custom 2", "Custom 3", "Custom 4", "Custom 5", "Custom 6"], values=["none", "custom1", "custom2", "custom3", "custom4", "custom5", "custom6"], selection = 0},
{v = 0.0, varname = "", glyph = -1, title = "ROM Management", selection = AF.req.liner},
{v = 9.8, varname = "deletebutton", glyph = 0xea54, initvar = function(val,prf){prf.DELETEBUTTON <- val}, title = "Delete ROM button", help = "Chose the button to use to delete the current rom from the disk. Deleted roms are moved to a -deleted- folder" , options = ["None", "Custom 1", "Custom 2", "Custom 3", "Custom 4", "Custom 5", "Custom 6"], values=["none", "custom1", "custom2", "custom3", "custom4", "custom5", "custom6"], selection = 0},
])
menucounter ++
sorter.rawset("um", menucounter)
AF.prefs.l0.push({label = "UTILITY MENU", glyph = 0xe9bd, description = "Customize the utility menu entries that you want to see in the menu"})
AF.prefs.l1.push([
{v = 14.6, varname = "umvector", glyph = 0xe9bd, initvar = function(val,prf){prf.UMVECTOR <- val}, title = "Customize Utility Menu", help = "Sort and select Utility Menu entries: Left/Right to move items up and down, Select to enable/disable item" , options = function(){return(umtablenames(umtable))}, values = sortstring(20), selection = AF.req.menusort},
{v = 14.6, varname = "umvectorreset", glyph = 0xe965, initvar = function(val,prf){prf.UMVECTORRESET <- val}, title = "Reset Utility Menu", help = "Reset sorting and selection of Utility Menu entries" , options = "", values = function(){AF.prefs.l1[sorter.um][0].values = sortstring(20)}, selection = AF.req.executef},
])
menucounter ++
AF.prefs.l0.push({ label = "DISPLAYS MENU PAGE", glyph = 0xe912, description = "Arcadeflow has its own Displays Menu page that can be configured here"})
AF.prefs.l1.push([
{v = 8.7, varname = "dmpenabled", glyph = 0xe912, initvar = function(val,prf){prf.DMPENABLED <- val}, title = "Enable Arcadeflow Displays Menu page", help = "If you disable Arcadeflow menu page you can use other layouts as displays menu" , options = ["Yes", "No"], values= [true,false],selection = 0},
{v = 9.0, varname = "olddisplaychange", glyph = 0xe912, initvar = function(val,prf){prf.OLDDISPLAYCHANGE <- val}, title = "Enable Fast Displays Change", help = "Disable fast display change if you want to use other layouts for different displays" , options = ["Yes", "No"], values= [false,true],selection = 0},
{v = 0.0, varname = "", glyph = -1, title = "Look and Feel", selection = AF.req.liner},
{v = 7.2, varname = "dmpgeneratelogo", glyph = 0xe90d, initvar = function(val,prf){prf.DMPGENERATELOGO <- val}, title = "Generate display logo", help = "Generate displays name related artwork for displays list" , options = ["Yes","No"], values = [true,false], selection = 0,picsel=["dmplistlogoyes"+AF.prefs.imgext,"dmplistlogono"+AF.prefs.imgext], pic = "dmplistlogo"+AF.prefs.imgext},
{v = 8.9, varname = "dmpsort", glyph = 0xeaf1, initvar = function(val,prf){prf.DMPSORT <- val}, title = "Sort displays menu", help = "Show displays in the menu in your favourite order" , options = ["No sort", "By display name", "By system year", "By system brand then name", "By system brand then year"], values= ["false","display","year","brandname","brandyear"],selection = 3},
{v = 9.4, varname = "dmpseparators", glyph = 0xeaf5, initvar = function(val,prf){prf.DMPSEPARATORS <- val}, title = "Show group separators", help = "When sorting by brand show separators in the menu for each brand" , options = ["Yes", "No"], values= [true,false],selection = 0},
{v = 12.3, varname = "dmpimages", glyph = 0xea77, initvar = function(val,prf){prf.DMPIMAGES <- val}, title = "Displays menu layout", help = "Chose the style to use when entering displays menu, a simple list or a list plus system artwork taken from the menu-art folder" , options = ["List", "List with artwork", "list with walls"], values= [null,"ARTWORK","WALLS"],selection = 2, picsel = ["dmplistartno"+AF.prefs.imgext,"dmplistartyes"+AF.prefs.imgext],pic = "dmplistartyes"+AF.prefs.imgext},
{v = 9.8, varname = "dmart", glyph = 0xe90d, initvar = function(val,prf){prf.DMART <- val}, title = "Artwork Source", help = "Chose where the displays menu artwork comes from: Arcadeflow own system library or Attract Mode menu-art folder" , options = ["Arcadeflow only", "menu-art only", "Arcadeflow first", "menu-art first"], values= ["AF_ONLY","MA_ONLY","AF_MA","MA_AF"],selection = 0},
{v = 12.3, varname = "dmcategoryart", glyph = 0xe90d, initvar = function(val,prf){prf.DMCATEGORYART <- val}, title = "Enable category artwork", help = "You can separately enable/disable artwork for categories like console, computer, pinball etc." , options = ["Yes", "No"], values= [true,false],selection = 0},
{v = 7.3, varname = "dmpgrouped", glyph = 0xea78, initvar = function(val,prf){prf.DMPGROUPED <- val}, title = "Categorized Displays Menu", help = "Displays menu will be grouped by system categories: Arcades, Computer, Handhelds, Consoles, Pinballs and Others for collections" , options = ["Yes", "No"], values= [true,false],selection = 0, picsel = ["dmpgroupedyes"+AF.prefs.imgext,"dmpgroupedno"+AF.prefs.imgext],pic = "dmpgroupedyes"+AF.prefs.imgext},
{v = 7.4, varname = "dmpexitaf", glyph = 0xea7c, initvar = function(val,prf){prf.DMPEXITAF <- val}, title = "Add Exit Arcadeflow to menu", help = "Add an entry to exit Arcadeflow from the displays menu page" , options = ["Yes", "No"], values= [true,false],selection = 1},
{v = 0.0, varname = "", glyph = -1, title = "Behavior", selection = AF.req.liner},
{v = 7.4, varname = "dmpatstart", glyph = 0xea7a, initvar = function(val,prf){prf.DMPATSTART <- val}, title = "Open the Displays Menu at startup", help = "Show Displays Menu immediately after launching Arcadeflow, this works better than setting it in the general options of Attract Mode" , options = ["Yes", "No"], values= [true,false],selection = 1},
{v = 7.4, varname = "dmpoutexitaf", glyph = 0xea7c, initvar = function(val,prf){prf.DMPOUTEXITAF <- val}, title = "Exit AF when leaving Menu", help = "The esc button from Displays Menu triggers the exit from Arcadeflow" , options = ["Yes", "No"], values= [true,false],selection = 1},
{v = 7.4, varname = "dmpifexitaf", glyph = 0xea7a, initvar = function(val,prf){prf.DMPIFEXITAF <- val}, title = "Enter Menu when leaving display", help = "The esc button from Arcadeflow brings the displays menu instead of exiting Arcadeflow" , options = ["Yes", "No"], values= [true,false],selection = 1},
])
menucounter ++
AF.prefs.l0.push({ label = "HISTORY PAGE", glyph = 0xe923, description = "Configure the History page where larger thumbnail and game history data are shown"})
AF.prefs.l1.push([
{v = 0.0, varname = "", glyph = -1, title = "Video Effects", selection = AF.req.liner},
{v = 8.8, varname = "crtgeometry", glyph = 0xe95b, initvar = function(val,prf){prf.CRTGEOMETRY <- val}, title = "CRT deformation", help = "Enable CRT deformation for CRT snaps" options = ["Yes", "No"], values =[true,false], selection = 0},
{v = 7.2, varname = "scanlinemode", glyph = 0xe95b, initvar = function(val,prf){prf.SCANLINEMODE <- val}, title = "Scanline effect", help = "Select scanline effect: Scanlines = default scanlines, Aperture = aperture mask, Half Resolution = reduced scanline resolution to avoid moiree, None = no scanline" options = ["Scanlines", "Half Resolution", "Aperture", "None"], values =["scanlines", "halfres", "aperture", "none"], selection = 2, picsel = ["slscanline"+AF.prefs.imgext,"slhalfres"+AF.prefs.imgext,"slaperture"+AF.prefs.imgext,"slnone"+AF.prefs.imgext],pic = "sl"+AF.prefs.imgext},
{v = 7.2, varname = "lcdmode", glyph = 0xe959, initvar = function(val,prf){prf.LCDMODE <- val}, title = "LCD effect", help = "Select LCD effect for handheld games: Matrix = see dot matrix, Half Resolution = see matrix at half resolution, None = no effect", options = ["Matrix", "Half Resolution", "None"], values = ["matrix", "halfres", "none"], selection = 1, picsel = ["lcdmatrix"+AF.prefs.imgext, "lcdhalfres"+AF.prefs.imgext, "lcdnone"+AF.prefs.imgext],pic = "lcd"+AF.prefs.imgext},
{v = 0.0, varname = "", glyph = -1, title = "Layout", selection = AF.req.liner},
{v = 8.3, varname = "historysize", glyph = 0xe923, initvar = function(val,prf){prf.HISTORYSIZE <- val}, title = "Text panel size", help = "Select the size of the history panel at the expense of snapshot area", options = ["Small", "Default", "Large", "Max snap"], values = [0.45,0.65,0.75,-1.0], selection = 1},
{v = 7.2, varname = "historypanel", glyph = 0xe923, initvar = function(val,prf){prf.HISTORYPANEL <- val}, title = "Text panel style", help = "Select the look of the history text panel", options = ["White panel", "Background"], values = [true,false], selection = 0, picsel = ["histpanelyes"+AF.prefs.imgext,"histpanelno"+AF.prefs.imgext],pic="histpanelyes"+AF.prefs.imgext},
{v = 7.2, varname = "darkpanel", glyph = 0xe923, initvar = function(val,prf){prf.DARKPANEL <- val}, title = "Game panel style", help = "Select the look of the history game panel", options = ["Dark", "Standard", "None"], values = [true,false,null], selection = 1,picsel=["histpaneldark"+AF.prefs.imgext,"histpaneldefault"+AF.prefs.imgext,"histpanelnone"+AF.prefs.imgext],pic = "histpaneldefault"+AF.prefs.imgext},
{v = 8.2, varname = "histmininame", glyph = 0xe923, initvar = function(val,prf){prf.HISTMININAME <- val}, title = "Detailed game data", help = "Show extra data after the game name before the history text", options = ["Yes", "No"], values = [false,true], selection = 0},
{v = 14.5, varname = "controloverlay", glyph = 0xe923, initvar = function(val,prf){prf.CONTROLOVERLAY <- val}, title = "Control panel overlay", help = "Show controller and buttons overlay on history page", options = ["Always", "Never","Arcade only"], values = ["always","never","arcade"], selection = 0},
])
menucounter ++
AF.prefs.l0.push({ label = "ATTRACT MODE", glyph = 0xe9a5, description = "Arcadeflow has its own attract mode screensaver that kicks in after some inactivity. Configure all the options here"})
AF.prefs.l1.push([
{v = 7.2, varname = "amenable", glyph = 0xe9a5, initvar = function(val,prf){prf.AMENABLE <- val}, title = "Enable attract mode", help = "Enable or disable attract mode at layout startup" , options = ["From start", "Inactivity only", "Disabled"], values =["From start", "Inactivity only", "Disabled"], selection = 1,pic = "attractmode"+AF.prefs.imgext},
{v = 0.0, varname = "", glyph = -1, title = "Look & Feel", selection = AF.req.liner},
{v = 7.2, varname = "amtimer", glyph = 0xe94e, initvar = function(val,prf){prf.AMTIMER <- val}, title = "Attract mode timer (s)", help = "Inactivity timer before attract mode is enabled", options = "", values ="120", selection = AF.req.keyboard},
{v = 7.2, varname = "amchangetimer", glyph = 0xe94e, initvar = function(val,prf){prf.AMCHANGETIMER <- val}, title = "Game change time (s)", help = "Time interval between each game change", options = "", values = "10", selection = AF.req.keyboard},
{v = 9.1, varname = "amshowlogo", glyph = 0xea6d, initvar = function(val,prf){prf.AMSHOWLOGO <- val}, title = "Attract logo", help = "Show Arcadeflow logo during attract mode", options = ["Yes","No"], values = [true,false], selection = 0},
{v = 7.2, varname = "ammessage", glyph = 0xea6d, initvar = function(val,prf){prf.AMMESSAGE <- val}, title = "Attract message", help = "Text to show during attract mode", options = "", values = " - PRESS ANY KEY - ", selection = AF.req.keyboard,pic = "attractmode"+AF.prefs.imgext},
{v = 0.0, varname = "", glyph = -1, title = "Sound", selection = AF.req.liner},
{v = 7.2, varname = "amtune", glyph = 0xe911, initvar = function(val,prf){prf.AMTUNE <- val}, title = "Background music", help = "Path to a music file to play in background", options = "", values ="", selection = AF.req.filereqs},
{v = 7.2, varname = "amsound", glyph = 0xea27, initvar = function(val,prf){prf.AMSOUND <- val}, title = "Enable game sound", help = "Enable game sounds during attract mode" , options = ["Yes","No"], values = [true,false], selection = 0},
])
menucounter ++
AF.prefs.l0.push({ label = "PERFORMANCE & FX", glyph = 0xe9a6, description = "Turn on or off special effects that might impact on Arcadeflow performance"})
AF.prefs.l1.push([
{v = 14.2, varname = "adaptspeed", glyph = 0xe994, initvar = function(val,prf){prf.ADAPTSPEED <- val}, title = "Adjust performance", help = "Tries to adapt speed to system performance. Enable for faster scroll, disable for smoother but slower scroll" , options = ["Yes","No"], values = [true,false], selection = 1},
{v = 7.2, varname = "customsize", glyph = 0xe994, initvar = function(val,prf){prf.CUSTOMSIZE <- val}, title = "Resolution W x H", help = "Define a custom resolution for your layout independent of screen resolution. Format is WIDTHxHEIGHT, leave blank for default resolution", options = "", values = "", selection = AF.req.keyboard, pic = "customresyes"+AF.prefs.imgext},
{v = 9.8, varname = "rpi", glyph = 0xe994, initvar = function(val,prf){prf.RPI <- val}, title = "Raspberry Pi fix", help = "This applies to systems that gives weird results when getting back from a game, reloading the layout as needed" , options = ["Yes","No"], values = [true,false], selection = 1},
{v = 0.0, varname = "", glyph = -1, title = "Overscan", selection = AF.req.liner},
{v = 12.8, varname = "overscanw", glyph = 0xe994, initvar = function(val,prf){prf.OVERSCANW <- val}, title = "Width %", help = "For screens with overscan, define which percentage of the screen will be filled with actual content", options = [0,100,100], values = 100, selection = AF.req.slideint},
{v = 12.8, varname = "overscanh", glyph = 0xe994, initvar = function(val,prf){prf.OVERSCANH <- val}, title = "Height %", help = "For screens with overscan, define which percentage of the screen will be filled with actual content", options = [0,100,100], values = 100, selection = AF.req.slideint},
{v = 12.8, varname = "overscanx", glyph = 0xe994, initvar = function(val,prf){prf.OVERSCANX <- val}, title = "Shift X %", help = "For screens with overscan, screen will be shifted by the percentage", options = [-100,100,0], values = 0, selection = AF.req.slideint},
{v = 12.8, varname = "overscany", glyph = 0xe994, initvar = function(val,prf){prf.OVERSCANY <- val}, title = "Shift Y %", help = "For screens with overscan, screen will be shifted by the percentage", options = [-100,100,0], values = 0, selection = AF.req.slideint},
{v = 0.0, varname = "", glyph = -1, title = "Effects", selection = AF.req.liner},
{v = 7.2, varname = "lowspecmode", glyph = 0xe994, initvar = function(val,prf){prf.LOWSPECMODE <- val}, title = "Low Spec mode", help = "Reduce most visual effects to boost speed on lower spec systems" , options = ["Yes","No"], values = [true,false], selection = 1, picsel=["lslowspec"+AF.prefs.imgext,"lsdefault"+AF.prefs.imgext], pic = "lslowspec1"+AF.prefs.imgext},
{v = 7.2, varname = "datashadowsmooth", glyph = 0xe994, initvar = function(val,prf){prf.DATASHADOWSMOOTH <- val}, title = "Smooth shadow", help = "Enable smooth shadow under game title and data in the GUI" , options = ["Yes","No"], values = [true,false], selection = 0, picsel=["lsdefault"+AF.prefs.imgext,"lsnodrop"+AF.prefs.imgext], pic = "lsdrop"+AF.prefs.imgext},
{v = 7.2, varname = "snapglow", glyph = 0xe994, initvar = function(val,prf){prf.SNAPGLOW <- val}, title = "Glow effect", help = "Add a glowing halo around the selected game thumbnail" , options = ["Yes","No"], values = [true,false], selection = 0, picsel=["lsdefault"+AF.prefs.imgext,"lsnoglow"+AF.prefs.imgext],pic = "lsglow"+AF.prefs.imgext},
{v = 7.2, varname = "snapgradient", glyph = 0xe994, initvar = function(val,prf){prf.SNAPGRADIENT <- val}, title = "Thumb gradient", help = "Blurs the artwork behind the game logo so it's more readable" , options = ["Yes","No"], values = [true,false], selection = 0, picsel=["lsdefault"+AF.prefs.imgext,"lsgradient"+AF.prefs.imgext],pic = "lsgradient1"+AF.prefs.imgext},
])
menucounter ++
AF.prefs.l0.push({ label = "MULTIPLE MONITOR", glyph = 0xeaf8, description = "Configure the appearence of a second monitor"})
AF.prefs.l1.push([
{v = 0.0, varname = "", glyph = -1, title = "Video Effects", selection = AF.req.liner},
{v = 13.7, varname = "multimon", glyph = 0xeaf8, initvar = function(val,prf){prf.MULTIMON <- val}, title = "Enable multiple monitor", help = "Enable Arcadeflow multiple monitor suport", options = ["Yes", "No"], values =[true,false], selection = 1},
{v = 13.7, varname = "monitornumber", glyph = 0xeaf9, initvar = function(val,prf){prf.MONITORNUMBER <- val}, title = "Monitor identifier", help = "Select the identification number for the external monitor", options = ["Monitor 1", "Monitor 2","Monitor 3"], values = [1,2,3], selection = 0},
{v = 13.7, varname = "monitoraspect", glyph = 0xea57, initvar = function(val,prf){prf.MONITORASPECT <- val}, title = "Correct aspect ratio", help = "Select if the image on the second monitor should be stretched or not", options = ["Yes","No"], values =[true,false], selection = 0}
{v = 13.7, varname = "monitormedia1", glyph = 0xe915, initvar = function(val,prf){prf.MONITORMEDIA1 <- val}, title = "Main media source", help = "Select the artwork source to be used on secondary monitor", options = ["marquee","logo"], values =["marquee","wheel"], selection = 0}
{v = 13.7, varname = "monitormedia2", glyph = 0xe915, initvar = function(val,prf){prf.MONITORMEDIA2 <- val}, title = "Alternate media source", help = "Select the artwork source to be used on secondary monitor in case first one is not present", options = ["marquee","logo"], values =["marquee","wheel"], selection = 1}
])
menucounter++
AF.prefs.l0.push({label = "", glyph = -1, description = ""})
AF.prefs.l1.push([])
menucounter ++
sorter.rawset("scrape", menucounter)