forked from Marshallx/Launch-Base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmOptions.frm
1276 lines (1260 loc) · 58.2 KB
/
frmOptions.frm
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
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmOptions
BorderStyle = 1 'Fixed Single
Caption = "Launch Base: Options"
ClientHeight = 5520
ClientLeft = 45
ClientTop = 330
ClientWidth = 3375
Icon = "frmOptions.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5520
ScaleWidth = 3375
StartUpPosition = 2 'CenterScreen
Begin VB.CheckBox cboxAdvancedMode
Caption = "Advanced Mode"
Height = 255
Left = 120
TabIndex = 25
ToolTipText = "Grants access to advanced options which should only be amended by advanced users."
Top = 120
Width = 3135
End
Begin VB.CommandButton cmdCancelOptions
Caption = "Cancel"
Height = 375
Left = 1800
TabIndex = 1
Top = 5040
Width = 1335
End
Begin VB.CommandButton cmdOKOptions
Caption = "OK"
Height = 375
Left = 240
TabIndex = 0
Top = 5040
Width = 1335
End
Begin VB.Frame frameUpdateOptions
Height = 3975
Left = 240
TabIndex = 27
Top = 840
Width = 2895
Begin VB.CheckBox cboxAutoUpdate
Caption = "Automatic Mod Update Check"
Height = 255
Left = 120
TabIndex = 29
ToolTipText = "Controls whether or not Launch Base should check for updates to a mod before activating it, or to Launch Base itself on startup."
Top = 120
Width = 2625
End
Begin VB.CheckBox cboxFullDownloads
Caption = "Only Download Full Installers"
Height = 255
Left = 120
TabIndex = 28
ToolTipText = "When checking for updates to download, only download full installers. Update-only installers are ignored."
Top = 360
Width = 2625
End
Begin VB.Label Label1
Caption = "Ares' Update Options can be accessed via the Ares menu on the main Launch Base window."
Height = 615
Left = 120
TabIndex = 54
Top = 840
Width = 2655
End
End
Begin VB.Frame frameLoggingOptions
Height = 3975
Left = 240
TabIndex = 30
Top = 840
Width = 2895
Begin VB.CheckBox cboxCaptureAresDebug
Caption = "Capture Ares Debug Files"
Height = 255
Left = 120
TabIndex = 53
ToolTipText = "Tells Launch Base to move any log files generated by Ares into it's own Logs directory."
Top = 3360
Width = 2655
End
Begin VB.CheckBox cboxLogExcept
Caption = "Capture except.txt"
Height = 255
Left = 120
TabIndex = 46
ToolTipText = $"frmOptions.frx":0E42
Top = 2640
Width = 2655
End
Begin VB.CheckBox cboxInitLog
Caption = "Initialise Log on Startup"
Height = 255
Left = 120
TabIndex = 45
ToolTipText = "Erase the existing log file so you start with a blank log file each time Launch Base starts."
Top = 600
Width = 2655
End
Begin VB.CheckBox cboxLogFile
Caption = "Write Log File"
Height = 255
Left = 120
TabIndex = 44
ToolTipText = "Generate a log file (LaunchBase.log) of all the operations that Launch Base performs."
Top = 360
Width = 2655
End
Begin VB.CheckBox cboxLiveLog
Caption = "Enable LiveLog"
Height = 255
Left = 120
TabIndex = 43
ToolTipText = "Gives you access to the LiveLog window from the Tools menu."
Top = 840
Width = 2655
End
Begin VB.CheckBox cboxLogExceptDesc
Caption = "Prompt For except.txt Description"
Height = 255
Left = 120
TabIndex = 42
ToolTipText = "Prompts you to enter a brief description for any Internal Errors encountered in-game. This is added to the except.txt filename."
Top = 2880
Width = 2655
End
Begin VB.CheckBox cboxLogAres
Caption = "Enable Ares Logging (debug.log)"
Height = 255
Left = 120
TabIndex = 41
ToolTipText = "Tells Ares whether or not to generate a debug log file."
Top = 3120
Width = 2655
End
Begin MSComctlLib.Slider sliderLogLevel
Height = 255
Left = 120
TabIndex = 47
ToolTipText = "Specifies how much information will be recorded in the log file."
Top = 1440
Width = 2655
_ExtentX = 4683
_ExtentY = 450
_Version = 393216
LargeChange = 1
Max = 2
TextPosition = 1
End
Begin MSComctlLib.Slider sliderMaxLogSize
Height = 255
Left = 120
TabIndex = 48
ToolTipText = "The Log file will be truncated to this maximum size when Launch Base closes."
Top = 2040
Width = 2655
_ExtentX = 4683
_ExtentY = 450
_Version = 393216
LargeChange = 128
SmallChange = 16
Max = 16384
TickStyle = 3
TextPosition = 1
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "Game Debug Logs"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 52
Top = 2400
Width = 2655
End
Begin VB.Label Label2
Caption = "Max Log Size:"
Height = 255
Left = 120
TabIndex = 51
ToolTipText = "The Log file will be truncated to this maximum size when Launch Base closes."
Top = 1800
Width = 1455
End
Begin VB.Label Label12
Caption = "Log Level:"
Height = 255
Left = 120
TabIndex = 50
ToolTipText = "Specifies how much information will be recorded in the log file."
Top = 1200
Width = 1455
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "Launch Base Log"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 49
Top = 120
Width = 2655
End
Begin VB.Label Label5
Caption = "(LaunchBase.log)"
BeginProperty Font
Name = "Arial"
Size = 6.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 1680
TabIndex = 34
Top = 150
Width = 1140
End
Begin VB.Label lblLogLevel
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Height = 255
Left = 960
TabIndex = 32
ToolTipText = "Specifies how much information will be recorded in the log file."
Top = 1200
Width = 1815
End
Begin VB.Label lblMaxLogSize
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Height = 255
Left = 960
TabIndex = 31
ToolTipText = "The Log file will be truncated to this maximum size when Launch Base closes."
Top = 1800
Width = 1815
End
End
Begin MSComctlLib.TabStrip tabOptions
Height = 4455
Left = 120
TabIndex = 2
Top = 480
Width = 3135
_ExtentX = 5530
_ExtentY = 7858
_Version = 393216
BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628}
NumTabs = 1
BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628}
ImageVarType = 2
EndProperty
EndProperty
End
Begin VB.Frame frameProgramOptions
Height = 3975
Left = 240
TabIndex = 3
Top = 840
Width = 2895
Begin VB.CheckBox cboxLooseFileMode
Caption = "Loose File Mode"
Height = 255
Left = 120
TabIndex = 35
ToolTipText = "Mod files will be copied to the Red Alert 2 directory loose, instead of in MIX files (where possible)."
Top = 1560
Width = 2655
End
Begin VB.CommandButton cmdAssociateIPB
Caption = "Associate with IPB Videos"
Height = 375
Left = 0
TabIndex = 33
ToolTipText = "Clicking this button will associate IPB files with Launch Base. This action cannot be undone."
Top = 3600
Width = 2895
End
Begin VB.CheckBox cboxVerifyPlugins
Caption = "Verify Plugin Security Keys"
Height = 255
Left = 120
TabIndex = 26
ToolTipText = "Verify Plugin security keys before activating them, to make sure they are legitimate community-approved plugins."
Top = 600
Width = 2655
End
Begin VB.CheckBox cboxPersistentMod
Caption = "Persistent Mods*"
Height = 255
Left = 120
TabIndex = 15
ToolTipText = "See the Help Topics for information about this option. Only turn it on if you don't run any non-Launch Base mods."
Top = 1080
Width = 2655
End
Begin VB.CheckBox cboxRecompile
Caption = "Recompile Mods"
Height = 255
Left = 120
TabIndex = 14
ToolTipText = $"frmOptions.frx":0EDC
Top = 1320
Width = 2655
End
Begin VB.CheckBox cboxUseCheckSums
Caption = "Verify Mod Files"
Height = 255
Left = 120
TabIndex = 13
ToolTipText = "Record and compare file checksums to make sure that mod files are not tampered with outside of Launch Base."
Top = 120
Width = 2655
End
Begin VB.CheckBox cboxCheckModYPLFiles
Caption = "Check Mod YPL Files"
Height = 255
Left = 120
TabIndex = 12
ToolTipText = "Check to see if a mod has any custom playlists available for use with the YR Playlist Manager before launching the mod."
Top = 2040
Width = 2655
End
Begin VB.CheckBox cboxShowRA2
Caption = "Show RA2 Mods"
Height = 255
Left = 120
TabIndex = 11
ToolTipText = "Check this box to include Red Alert 2 mods in the Mods list."
Top = 2280
Width = 2655
End
Begin VB.CheckBox cboxShowYR
Caption = "Show YR Mods"
Height = 255
Left = 120
TabIndex = 10
ToolTipText = "Check this box to include Yuri's Revenge mods in the Mods list."
Top = 2520
Width = 2655
End
Begin VB.CheckBox cboxPersistentPlugin
Caption = "Persistent Plugins*"
Height = 255
Left = 120
TabIndex = 9
ToolTipText = "See the Help Topics for information about this option. Only turn it on if you don't run any non-Launch Base plugins."
Top = 840
Width = 2655
End
Begin VB.CheckBox cboxAutoTX
Caption = "Auto. Terrain Expansion"
Height = 255
Left = 120
TabIndex = 8
ToolTipText = "Automatically activate the Terrain Expansion for mods that allow it."
Top = 1800
Width = 2655
End
Begin VB.CheckBox cboxModSound1
Caption = "Mod Display Sounds"
Height = 255
Left = 120
TabIndex = 7
ToolTipText = "If a mod includes the appropriate sound, play it when viewing that mod's details."
Top = 2760
Width = 2655
End
Begin VB.CheckBox cboxModSound2
Caption = "Mod Launch Sounds"
Height = 255
Left = 120
TabIndex = 6
ToolTipText = "If a mod includes the appropriate sound, play it when launching that mod."
Top = 3000
Width = 2655
End
Begin VB.CheckBox cboxGameChecksums
Caption = "Verify Executables"
Height = 255
Left = 120
TabIndex = 5
ToolTipText = "Verify file checksums of the game executables to make sure a third-party patch has not been installed."
Top = 360
Width = 2655
End
Begin VB.CheckBox cboxLBSounds
Caption = "Launch Base Sounds"
Height = 255
Left = 120
TabIndex = 4
ToolTipText = "Whether or not any Launch Base program sound effects should be played."
Top = 3240
Width = 2655
End
End
Begin VB.Frame frameGameOptions
Height = 3975
Left = 240
TabIndex = 16
Top = 840
Width = 2895
Begin VB.Frame frameRA2MD
Caption = "RA2MD.ini"
Height = 1335
Left = 0
TabIndex = 36
Top = 2640
Width = 2895
Begin VB.CheckBox cboxAllowVRAMSidebar
Caption = "Allow VRAM Sidebar"
Height = 255
Left = 120
TabIndex = 39
ToolTipText = "Advanced video controls. See Help Topics for details."
Top = 720
Width = 2655
End
Begin VB.CheckBox cboxVideoBackBuffer
Caption = "Video Back Buffer"
Height = 255
Left = 120
TabIndex = 37
ToolTipText = "Advanced video controls. See Help Topics for details."
Top = 240
Width = 2655
End
Begin VB.Label Label7
Alignment = 1 'Right Justify
Caption = "RA2 default = no, recommended = no"
BeginProperty Font
Name = "Arial"
Size = 6.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 40
Top = 960
Width = 2655
End
Begin VB.Label Label6
Alignment = 1 'Right Justify
Caption = "RA2 default = yes, recommended = no"
BeginProperty Font
Name = "Arial"
Size = 6.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 38
Top = 480
Width = 2655
End
End
Begin VB.CheckBox cboxRecord
Caption = "Record Game Video"
Height = 255
Left = 120
TabIndex = 23
ToolTipText = $"frmOptions.frx":0F6E
Top = 120
Width = 2655
End
Begin VB.CheckBox cboxPlay
Caption = "Play Game Video"
Height = 255
Left = 120
TabIndex = 22
ToolTipText = "Play a previously recorded scripted video. You can cancel the video and take control of the game by pressing Escape."
Top = 360
Width = 2655
End
Begin VB.CheckBox cboxSkipLogo
Caption = "Skip EA Logo Video"
Height = 255
Left = 120
TabIndex = 21
ToolTipText = "If the mod you are launching does not provide it's own replacement video, then the EA/Westwood logo video will be disabled."
Top = 1080
Width = 2655
End
Begin VB.CheckBox cboxSpeedControl
Caption = "Campaign Speed Control"
Height = 255
Left = 120
TabIndex = 20
ToolTipText = "Show the game speed control in campaign games."
Top = 600
Width = 2655
End
Begin VB.CheckBox cboxMPDebug
Caption = "Multiplayer Debug Mode"
Height = 255
Left = 120
TabIndex = 19
ToolTipText = "Provides debug information and can help to reduce slow-down in multiplayer games."
Top = 840
Width = 2655
End
Begin VB.TextBox txtCustomSwitches
Height = 525
Left = 120
MaxLength = 255
MultiLine = -1 'True
ScrollBars = 1 'Horizontal
TabIndex = 18
Top = 1920
Width = 2655
End
Begin VB.CheckBox cboxWindowed
Caption = "Windowed Mode"
Height = 255
Left = 120
TabIndex = 17
ToolTipText = $"frmOptions.frx":0FFB
Top = 1320
Width = 2655
End
Begin VB.Label lblCustomSwitches
Caption = "Command Line Switches:"
Height = 255
Left = 120
TabIndex = 24
Top = 1680
Width = 2655
End
End
End
Attribute VB_Name = "frmOptions"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim sAresIni As String
Private Sub cboxAutoUpdate_Click()
If cboxAutoUpdate.Value = 0 Then Call MsgBox("Please note that, by disabling Automatic Update Check, Launch Base will not automatically check for updates to Launch Base itself on startup - you should periodically run an update check or visit the Launch Base website to see if a newer version is available.", vbOKOnly + vbInformation, App.Title)
End Sub
Private Sub cboxLogExcept_Click()
If cboxLogExcept.Value = 1 Then
cboxLogExceptDesc.Enabled = True
Else
cboxLogExceptDesc.Enabled = False
End If
End Sub
Private Sub cboxPersistentMod_Click()
Dim mbResult As VbMsgBoxResult
If cboxPersistentMod.Tag <> "PREVENT_LOOP" Then
If OptPersistentModBad Then
mbResult = MsgBox("Launch Base has automatically disabled Persistent Mods." & vbCrLf & vbCrLf & "This is because some mod files were tampered with outside of Launch Base." & vbCrLf & vbCrLf & "You must NOT perform, or allow a third-party to perform, manual file operations on your" & vbCrLf & "Red Alert 2 directory that could affect a Launch Base mod or plugin." & vbCrLf & vbCrLf & "It is strongly recommended that you thoroughly re-read the Help Topics." & vbCrLf & vbCrLf & "Only re-enable Persistent Mods if you are absolutely sure that it is safe for you to do so." & vbCrLf & "Are you sure that you wish to re-enable Persistent Mods?", vbYesNo + vbQuestion + vbDefaultButton2, App.Title)
If mbResult = vbYes Then
cboxPersistentMod.ForeColor = &H80000012
OptPersistentModBad = False
Call WriteINIStr("Options", "PersistentModBad", "no", ProgramINI)
Else
cboxPersistentMod.Tag = "PREVENT_LOOP"
cboxPersistentMod.Value = 0
cboxPersistentMod.Tag = ""
End If
Else
If cboxPersistentMod.Value = 1 Then
Call MsgBox("Please make sure you have read the Help Topics thoroughly before enabling Persistent Mods.", vbOKOnly + vbInformation, App.Title)
End If
End If
End If
End Sub
Private Sub cboxAdvancedMode_Click()
Dim mbResult As VbMsgBoxResult
If cboxAdvancedMode.Tag <> "PREVENT_LOOP" Then
If cboxAdvancedMode.Value = 0 Then
If cboxAdvancedMode.Tag <> "NO_WARNING" Then
mbResult = MsgBox("Disabling Advanced Mode will hide certain options from you and reset those options to default values." & vbCrLf & vbCrLf & "Are you sure you wish to disable Advanced Mode?", vbYesNo + vbQuestion + vbDefaultButton2, App.Title)
Else
mbResult = vbYes
End If
If mbResult = vbYes Then
cboxUseCheckSums.Visible = False
cboxGameChecksums.Visible = False
cboxVerifyPlugins.Visible = False
cboxPersistentPlugin.Visible = False
cboxPersistentMod.Visible = False
cboxRecompile.Visible = False
cboxLooseFileMode.Visible = False
cboxLiveLog.Visible = False
lblCustomSwitches.Visible = False
txtCustomSwitches.Visible = False
frameRA2MD.Visible = False
Else
cboxAdvancedMode.Tag = "PREVENT_LOOP"
cboxAdvancedMode.Value = 1
cboxAdvancedMode.Tag = ""
End If
Else
If cboxAdvancedMode.Tag <> "NO_WARNING" Then
mbResult = MsgBox("Enabling Advanced Mode will give you access to additional options that you can configure. These options are for advanced users only." & vbCrLf & vbCrLf & "Are you sure you wish to enable Advanced Mode?", vbYesNo + vbQuestion + vbDefaultButton2, App.Title)
Else
mbResult = vbYes
End If
If mbResult = vbYes Then
cboxUseCheckSums.Visible = True
cboxGameChecksums.Visible = True
cboxVerifyPlugins.Visible = True
cboxPersistentPlugin.Visible = True
cboxPersistentMod.Visible = True
cboxRecompile.Visible = True
cboxLooseFileMode.Visible = True
cboxLiveLog.Visible = True
lblCustomSwitches.Visible = True
txtCustomSwitches.Visible = True
frameRA2MD.Visible = True
Else
cboxAdvancedMode.Tag = "PREVENT_LOOP"
cboxAdvancedMode.Value = 0
cboxAdvancedMode.Tag = ""
End If
End If
End If
End Sub
Private Sub cboxPersistentPlugin_Click()
Dim mbResult As VbMsgBoxResult
If cboxPersistentPlugin.Tag <> "PREVENT_LOOP" Then
If OptPersistentPluginBad Then
mbResult = MsgBox("Launch Base has automatically disabled Persistent Plugins." & vbCrLf & vbCrLf & "This is because some plugin files were tampered with outside of Launch Base." & vbCrLf & vbCrLf & "You must NOT perform, or allow a third-party to perform, manual file operations on your" & vbCrLf & "Red Alert 2 directory that could affect a Launch Base mod or plugin." & vbCrLf & vbCrLf & "It is strongly recommended that you thoroughly re-read the Help Topics." & vbCrLf & vbCrLf & "Only re-enable Persistent Plugins if you are absolutely sure that it is safe for you to do so." & vbCrLf & "Are you sure that you wish to re-enable Persistent Plugins?", vbYesNo + vbQuestion + vbDefaultButton2, App.Title)
If mbResult = vbYes Then
cboxPersistentPlugin.ForeColor = &H80000012
OptPersistentPluginBad = False
Call WriteINIStr("Options", "PersistentPluginBad", "no", ProgramINI)
Else
cboxPersistentPlugin.Tag = "PREVENT_LOOP"
cboxPersistentPlugin.Value = 0
cboxPersistentPlugin.Tag = ""
End If
Else
If cboxPersistentPlugin.Value = 1 Then
Call MsgBox("Please make sure you have read the Help Topics thoroughly before enabling Persistent Plugins.", vbOKOnly + vbInformation, App.Title)
End If
End If
End If
If cboxPersistentPlugin.Value = 0 Then
cboxPersistentMod.Value = 0
cboxPersistentMod.Enabled = False
Else
cboxPersistentMod.Enabled = True
End If
End Sub
Private Sub cboxShowRA2_Click()
If cboxShowRA2.Value = 0 And cboxShowYR.Value = 0 Then cboxShowYR.Value = 1
End Sub
Private Sub cboxShowYR_Click()
If cboxShowRA2.Value = 0 And cboxShowYR.Value = 0 Then cboxShowRA2.Value = 1
End Sub
Private Sub cboxUseCheckSums_Click()
Dim mbResult As VbMsgBoxResult
If cboxUseCheckSums.Tag <> "PREVENT_LOOP" Then
cboxUseCheckSums.Tag = "PREVENT_LOOP"
If cboxUseCheckSums.Value = 0 Then
mbResult = MsgBox("This option is enabled for your protection!" & vbCrLf & "Are you sure you wish to disable Validate Checksums?", vbYesNo + vbQuestion + vbDefaultButton2, App.Title)
If mbResult = vbNo Then cboxUseCheckSums.Value = 1
End If
cboxUseCheckSums.Tag = ""
End If
End Sub
Private Sub cmdAssociateIPB_Click()
Call AssociateFileType("ipb", "LBIPBVideo", "RA2/YR Scripted Video", GetShortFileName(JoinPath(EXEDIR, ChangeFileType(App.EXEName, "exe"))), GetShortFileName(JoinPath(RESDIR, "ipb_icon.ico")), 1)
Call frmMain.WriteLogEntry("Program Options: IPB files associated with Launch Base by user.", LogLevel1)
Call MsgBox("IPB files are now associated with Launch Base.", vbOKOnly + vbInformation, App.Title)
End Sub
Private Sub cmdCancelOptions_Click()
Unload Me
End Sub
Private Sub cmdOKOptions_Click()
Dim MyDouble As Double
Dim mbResult As VbMsgBoxResult
Dim bFillModLists As Boolean
bFillModLists = False
'LogFile must be first so changes to other options can be logged
'LOGGING OPTIONS
If OptLogFile <> IntegerToBoolean(cboxLogFile.Value) Then
Call WriteINIStr("Options", "LogFile", IntegerToYesNo(cboxLogFile.Value), ProgramINI)
Select Case cboxLogFile.Value
Case 0
Call frmMain.WriteLogEntry("Logging Options: 'Write Log File' disabled by user.")
OptLogFile = False
Case 1
OptLogFile = True
Call frmMain.WriteLogEntry("")
Call frmMain.WriteLogEntry("Logging Options: 'Write Log File' enabled by user.")
End Select
End If
'LogLevel next for same reason as above
If OptLogLevel <> sliderLogLevel.Value Then
Call WriteINIStr("Options", "LogLevel", CStr(sliderLogLevel.Value), ProgramINI)
OptLogLevel = sliderLogLevel.Value
Select Case sliderLogLevel.Value
Case 0: Call frmMain.WriteLogEntry("Logging Options: 'Log Level' set to Lite by user.")
Case 1: Call frmMain.WriteLogEntry("Logging Options: 'Log Level' set to Normal by user.")
Case 2: Call frmMain.WriteLogEntry("Logging Options: 'Log Level' set to Verbose by user.")
End Select
End If
'Advanced Mode next because other options may be overridden by it
If OptAdvancedMode <> IntegerToBoolean(cboxAdvancedMode.Value) Then
Call WriteINIStr("Options", "AdvancedMode", IntegerToYesNo(cboxAdvancedMode.Value), ProgramINI)
Select Case cboxAdvancedMode.Value
Case 0
OptAdvancedMode = False
Call frmMain.WriteLogEntry("Program Options: 'Advanced Mode' disabled by user.", LogLevel1)
cboxUseCheckSums.Value = 1
cboxGameChecksums.Value = 1
cboxVerifyPlugins.Value = 1
cboxPersistentPlugin.Value = 0
cboxPersistentMod.Value = 0
cboxRecompile.Value = 1
cboxLooseFileMode.Value = 0
cboxLiveLog.Value = 0
cboxVideoBackBuffer.Value = 0
cboxAllowVRAMSidebar.Value = 0
OptAutoAresUpdate = True
OptAresBranch = ""
txtCustomSwitches.Text = ""
frmMain.menu_ares.Visible = False
frmMain.menu_aresini.Visible = False
frmMain.menu_aresoptions.Visible = False
frmMain.menu_fileman.Visible = False
ReDim SafeFiles(0)
Case 1
OptAdvancedMode = True
frmMain.menu_ares.Visible = True
frmMain.menu_aresini.Visible = True
frmMain.menu_aresoptions.Visible = True
frmMain.menu_fileman.Visible = True
Call frmMain.WriteLogEntry("Program Options: 'Advanced Mode' enabled by user.", LogLevel1)
End Select
End If
If OptInitLog <> IntegerToBoolean(cboxInitLog.Value) Then
Call WriteINIStr("Options", "InitLog", IntegerToYesNo(cboxInitLog.Value), ProgramINI)
Select Case cboxInitLog.Value
Case 0
OptInitLog = False
Call frmMain.WriteLogEntry("Logging Options: 'Initialise Log' disabled by user.")
Case 1
OptInitLog = True
Call frmMain.WriteLogEntry("Logging Options: 'Initialise Log' enabled by user.")
End Select
End If
If OptLiveLog <> IntegerToBoolean(cboxLiveLog.Value) Then
Call WriteINIStr("LiveLog", "LiveLog", IntegerToYesNo(cboxLiveLog.Value), ProgramINI)
Select Case cboxLiveLog.Value
Case 0
OptLiveLog = False
Call frmMain.WriteLogEntry("Logging Options: 'LiveLog' disabled by " & IIf(Not OptAdvancedMode, "Launch Base", "user") & ".")
Case 1
OptLiveLog = True
Call frmMain.WriteLogEntry("Logging Options: 'LiveLog' enabled by user.")
End Select
frmMain.menu_livelog.Visible = OptLiveLog
End If
MyDouble = 1024
MyDouble = MyDouble * sliderMaxLogSize.Value
If OptMaxLogSize <> MyDouble Then
Call WriteINIStr("Options", "MaxLogSize", CStr(MyDouble), ProgramINI)
OptMaxLogSize = MyDouble
If MyDouble <> 0 Then
Call frmMain.WriteLogEntry("Logging Options: 'Max Log Size' set to " & DataSize(MyDouble) & " by user.")
Else
Call frmMain.WriteLogEntry("Logging Options: 'Max Log Size' set to Unlimited by user.")
End If
End If
If OptLogExcept <> IntegerToBoolean(cboxLogExcept.Value) Then
OptLogExcept = cboxLogExcept.Value
Call WriteINIStr("Options", "LogCapture", IntegerToYesNo(OptLogExcept), ProgramINI)
Select Case OptLogExcept
Case 0: Call frmMain.WriteLogEntry("Logging Options: 'Capture except.txt' disabled by user.", LogLevel1)
Case 1: Call frmMain.WriteLogEntry("Logging Options: 'Capture except.txt' enabled by user.", LogLevel1)
End Select
End If
If OptLogExceptDesc <> IntegerToBoolean(cboxLogExceptDesc.Value) Then
OptLogExceptDesc = cboxLogExceptDesc.Value
Call WriteINIStr("Options", "LogIEDesc", IntegerToYesNo(OptLogExceptDesc), ProgramINI)
Select Case OptLogExceptDesc
Case 0: Call frmMain.WriteLogEntry("Logging Options: 'Prompt for IE Description' disabled by user.", LogLevel1)
Case 1: Call frmMain.WriteLogEntry("Logging Options: 'Prompt for IE Description' enabled by user.", LogLevel1)
End Select
End If
If OptLogAres <> IntegerToBoolean(cboxLogAres.Value) Then
OptLogAres = cboxLogAres.Value
Call WriteINIStr("Options", "RockPatchLogging", IntegerToYesNo(OptLogAres), ProgramINI)
Select Case OptLogAres
Case 0: Call frmMain.WriteLogEntry("Logging Options: 'Ares Logging' disabled by user.", LogLevel1)
Case 1: Call frmMain.WriteLogEntry("Logging Options: 'Ares Logging' enabled by user.", LogLevel1)
End Select
End If
If OptCaptureAresDebug <> IntegerToBoolean(cboxCaptureAresDebug.Value) Then
OptCaptureAresDebug = cboxCaptureAresDebug.Value
Call WriteINIStr("Options", "CaptureAresDebug", IntegerToYesNo(OptCaptureAresDebug), ProgramINI)
Select Case OptCaptureAresDebug
Case 0: Call frmMain.WriteLogEntry("Logging Options: 'Capture Ares Debug Files' disabled by user.", LogLevel1)
Case 1: Call frmMain.WriteLogEntry("Logging Options: 'Capture Ares Debug Files' enabled by user.", LogLevel1)
End Select
End If
'PROGRAM OPTIONS
If OptUseCheckSums <> IntegerToBoolean(cboxUseCheckSums.Value) Then
Call WriteINIStr("Options", "UseCheckSums", IntegerToYesNo(cboxUseCheckSums.Value), ProgramINI)
Select Case cboxUseCheckSums.Value
Case 0
OptUseCheckSums = False
Call frmMain.WriteLogEntry("Program Options: 'Verify Mod Files' disabled by user.", LogLevel1)
Case 1
OptUseCheckSums = True
Call frmMain.WriteLogEntry("Program Options: 'Verify Mod Files' enabled by " & IIf(Not OptAdvancedMode, "Launch Base", "user") & ".", LogLevel1)
End Select
End If
If OptGameChecksums <> IntegerToBoolean(cboxGameChecksums.Value) Then
Call WriteINIStr("Options", "GameCheckSums", IntegerToYesNo(cboxGameChecksums.Value), ProgramINI)
Select Case cboxGameChecksums.Value
Case 0
OptGameChecksums = False
Call frmMain.WriteLogEntry("Program Options: 'Verify Executables' disabled by user.", LogLevel1)
Case 1
OptGameChecksums = True
Call frmMain.WriteLogEntry("Program Options: 'Verify Executables' enabled by " & IIf(Not OptAdvancedMode, "Launch Base", "user") & ".", LogLevel1)
End Select
End If
If OptVerifyPlugins <> IntegerToBoolean(cboxVerifyPlugins.Value) Then
Call WriteINIStr("Options", "VerifyPlugins", IntegerToYesNo(cboxVerifyPlugins.Value), ProgramINI)
Select Case cboxVerifyPlugins.Value
Case 0
OptVerifyPlugins = False
Call frmMain.WriteLogEntry("Program Options: 'Verify Plugin Security Keys' disabled by user.", LogLevel1)
Case 1
OptVerifyPlugins = True
Call frmMain.WriteLogEntry("Program Options: 'Verify Plugin Security Keys' enabled by " & IIf(Not OptAdvancedMode, "Launch Base", "user") & ".", LogLevel1)
End Select
End If
If OptPersistentPlugin <> IntegerToBoolean(cboxPersistentPlugin.Value) Then
Call WriteINIStr("Options", "PersistentPlugin", IntegerToYesNo(cboxPersistentPlugin.Value), ProgramINI)
Select Case cboxPersistentPlugin.Value
Case 0
OptPersistentPlugin = False
Call frmMain.WriteLogEntry("Program Options: 'Persistent Plugins' disabled by " & IIf(Not OptAdvancedMode, "Launch Base", "user") & ".", LogLevel1)
Call frmMain.DeactivateMod
Case 1
OptPersistentPlugin = True
Call frmMain.WriteLogEntry("Program Options: 'Persistent Plugins' enabled by user.", LogLevel1)
End Select
End If
If OptPersistentMod <> IntegerToBoolean(cboxPersistentMod.Value) Then
Call WriteINIStr("Options", "PersistentMod", IntegerToYesNo(cboxPersistentMod.Value), ProgramINI)
Select Case cboxPersistentMod.Value
Case 0
OptPersistentMod = False
Call frmMain.WriteLogEntry("Program Options: 'Persistent Mods' disabled by " & IIf(Not OptAdvancedMode, "Launch Base", "user") & ".", LogLevel1)
Call frmMain.DeactivateMod
Case 1
OptPersistentMod = True
Call frmMain.WriteLogEntry("Program Options: 'Persistent Mods' enabled by user.", LogLevel1)
End Select
End If
If OptRecompile <> IntegerToBoolean(cboxRecompile.Value) Then
Call WriteINIStr("Options", "Recompile", IntegerToYesNo(cboxRecompile.Value), ProgramINI)
Select Case cboxRecompile.Value
Case 0
OptRecompile = False
Call frmMain.WriteLogEntry("Program Options: 'Recompile Mods' disabled by user.", LogLevel1)
Case 1
OptRecompile = True
Call frmMain.WriteLogEntry("Program Options: 'Recompile Mods' enabled by " & IIf(Not OptAdvancedMode, "Launch Base", "user") & ".", LogLevel1)
End Select
End If
If OptLooseFileMode <> IntegerToBoolean(cboxLooseFileMode.Value) Then
Call WriteINIStr("Options", "LooseFileMode", IntegerToYesNo(cboxLooseFileMode.Value), ProgramINI)
Select Case cboxRecompile.Value
Case 0
OptLooseFileMode = False
Call frmMain.WriteLogEntry("Program Options: 'Loose File Mode' disabled by " & IIf(Not OptAdvancedMode, "Launch Base", "user") & ".", LogLevel1)
Case 1
OptLooseFileMode = True
Call frmMain.WriteLogEntry("Program Options: 'Loose File Mode' enabled by user.", LogLevel1)
End Select
End If
If OptAutoTX <> IntegerToBoolean(cboxAutoTX.Value) Then
Call WriteINIStr("Options", "AutoTX", IntegerToYesNo(cboxAutoTX.Value), ProgramINI)
Select Case cboxAutoTX.Value
Case 0
OptAutoTX = False
Call frmMain.WriteLogEntry("Program Options: 'Automatic Terrain Expansion' disabled by user.", LogLevel1)
Case 1
OptAutoTX = True
Call frmMain.WriteLogEntry("Program Options: 'Automatic Terrain Expansion' enabled by user.", LogLevel1)
End Select
If frmMain.lstMods(TypeMod).ListIndex <> -1 Then Call frmMain.DisplayModDetails(Val(frmMain.lstMods(0).ItemData(frmMain.lstMods(0).ListIndex)), TypeMod, False)
If frmMain.lstMods(TypeFA2Mod).ListIndex <> -1 Then Call frmMain.DisplayModDetails(Val(frmMain.lstMods(0).ItemData(frmMain.lstMods(0).ListIndex)), TypeFA2Mod, False)
Call frmMain.ScrollBanners(0)
End If
If OptCheckModYPLFiles <> IntegerToBoolean(cboxCheckModYPLFiles.Value) Then
Call WriteINIStr("Options", "CheckModYPLFiles", IntegerToYesNo(cboxCheckModYPLFiles.Value), ProgramINI)
Select Case cboxCheckModYPLFiles.Value
Case 0
OptCheckModYPLFiles = False
Call frmMain.WriteLogEntry("Program Options: 'Check Mod <.ypl> Files' disabled by user.", LogLevel1)
Case 1
OptCheckModYPLFiles = True
Call frmMain.WriteLogEntry("Program Options: 'Check Mod <.ypl> Files' enabled by user.", LogLevel1)
End Select
End If
If OptShowRA2 <> IntegerToBoolean(cboxShowRA2.Value) Then
Call WriteINIStr("Options", "ShowRA2", IntegerToYesNo(cboxShowRA2.Value), ProgramINI)
Select Case cboxShowRA2.Value
Case 0
OptShowRA2 = False
Call frmMain.WriteLogEntry("Program Options: 'Show RA2 Mods' disabled by user.", LogLevel1)
Case 1
Call frmMain.WriteLogEntry("Program Options: 'Show RA2 Mods' enabled by user.", LogLevel1)
OptShowRA2 = True
End Select
bFillModLists = True
End If
If OptShowYR <> IntegerToBoolean(cboxShowYR.Value) Then
Call WriteINIStr("Options", "ShowYR", IntegerToYesNo(cboxShowYR.Value), ProgramINI)
Select Case cboxShowYR.Value
Case 0
OptShowYR = False
Call frmMain.WriteLogEntry("Program Options: 'Show YR Mods' disabled by user.", LogLevel1)
Case 1
Call frmMain.WriteLogEntry("Program Options: 'Show YR Mods' enabled by user.", LogLevel1)
OptShowYR = True
End Select
bFillModLists = True
End If
If OptModSound1 <> IntegerToBoolean(cboxModSound1.Value) Then
Call WriteINIStr("Options", "EnableModSound1", IntegerToYesNo(cboxModSound1.Value), ProgramINI)
Select Case cboxModSound1.Value
Case 0
OptModSound1 = False
Call frmMain.WriteLogEntry("Program Options: 'Mod Display Sounds' disabled by user.", LogLevel1)
Case 1
OptModSound1 = True
Call frmMain.WriteLogEntry("Program Options: 'Mod Display Sounds' enabled by user.", LogLevel1)
End Select
End If
If OptModSound2 <> IntegerToBoolean(cboxModSound2.Value) Then
Call WriteINIStr("Options", "EnableModSound2", IntegerToYesNo(cboxModSound2.Value), ProgramINI)
Select Case cboxModSound2.Value
Case 0
OptModSound2 = False
Call frmMain.WriteLogEntry("Program Options: 'Mod Launch Sounds' disabled by user.", LogLevel1)
Case 1
OptModSound2 = True
Call frmMain.WriteLogEntry("Program Options: 'Mod Launch Sounds' enabled by user.", LogLevel1)
End Select
End If
If OptLBSounds <> IntegerToBoolean(cboxLBSounds.Value) Then
Call WriteINIStr("Options", "EnableLBSounds", IntegerToYesNo(cboxLBSounds.Value), ProgramINI)