-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathui.iss
1599 lines (1359 loc) · 69.9 KB
/
ui.iss
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
[Code]
var
// Custom Pages
DataDirPage: TInputDirWizardPage;
PageInstallType: TWizardPage;
CallSign: TInputOptionWizardPage;
GameplayOptions: TWizardPage;
PageEnglishImprovements: TWizardPage;
PageSinglePlayer: TWizardPage;
StartupRes: TInputOptionWizardPage;
LogoRes: TInputOptionWizardPage;
SmallText: TInputOptionWizardPage;
PageWidescreenHud: TWizardPage;
PageDarkHUD: TWizardPage;
PagePlanetScape: TWizardPage;
PageGraphicsApi: TWizardPage;
PageEffects: TWizardPage;
PageDrawDistances: TWizardPage;
PageSkips: TWizardPage;
PageMiscOptions: TWizardPage;
# if !AllInOneInstall
DownloadPage: TDownloadWizardPage;
# endif
// Optional pages
DxWrapperPage: TWizardPage;
DxWrapperPage2: TWizardPage;
DgVoodooPage: TWizardPage;
DgVoodooPage2: TWizardPage;
VanillaPage: TWizardPage;
// Install types
ExpressInstall: TRadioButton;
CustomInstall: TRadioButton;
BasicInstall: TRadioButton;
descExpressInstall: TNewStaticText;
descCustomInstall: TNewStaticText;
descBasicInstall: TNewStaticText;
descInstallType: TNewStaticText;
// Pitch variations
PitchVariations: TCheckBox;
descPitchVariations: TNewStaticText;
// Regeneratable shields
RegeneratableShields: TCheckBox;
descRegeneratableShields: TNewStaticText;
// No Countermeasure activation on right-click
NoCountermeasureRightClick: TCheckBox;
descNoCountermeasureRightClick: TNewStaticText;
// Advanced audio options
AdvancedAudioOptions: TCheckBox;
descAdvancedAudioOptions: TNewStaticText;
// Localization
EnglishImprovements: TCheckBox;
descEnglishImprovements: TNewStaticText;
// Russian fonts
RussianFonts: TCheckBox;
descRussianFonts: TNewStaticText;
// Single Player mode
lblSinglePlayerMode: TLabel;
StoryMode: TComboBox;
descSinglePlayerMode: TNewStaticText;
// Level requirements
LevelRequirements: TCheckBox;
descLevelRequirements: TNewStaticText;
// New save folder
NewSaveFolder: TCheckBox;
descNewSaveFolder: TNewStaticText;
// Advanced Widescreen HUD
WidescreenHud: TCheckBox;
descWidescreenHud: TNewStaticText;
// Weapon Groups
WeaponGroups: TCheckBox;
descWeaponGroups: TNewStaticText;
// Dark HUD
DarkHud: TCheckBox;
descDarkHud: TNewStaticText;
// Custom Icons
VanillaIcons: TRadioButton;
AlternativeIcons: TRadioButton;
FlatIcons: TRadioButton;
descCustomIcons: TNewStaticText;
// Custom Nav Map
CustomNavMap: TCheckBox;
descCustomNavMap: TNewStaticText;
// Fix clipping with 16:9 resolution planetscapes
PlanetScape: TCheckBox;
descPlanetScape: TNewStaticText;
// Graphics API
DxWrapperGraphicsApi: TRadioButton;
DgVoodooGraphicsApi: TRadioButton;
VanillaGraphicsApi: TRadioButton;
LightingFixGraphicsApi: TRadioButton;
descDxWrapperGraphicsApi: TNewStaticText;
descDgVoodooGraphicsApi: TNewStaticText;
descVanillaGraphicsApi: TNewStaticText;
descLightingFixGraphicsApi: TNewStaticText;
descGraphicsApi: TNewStaticText;
// Vanilla
lblVanillaAf: TLabel;
lblVanillaAa: TLabel;
VanillaAf: TComboBox;
VanillaAa: TComboBox;
descVanillaAf: TNewStaticText;
descVanillaAa: TNewStaticText;
VanillaAfAndAaWarning: TNewStaticText;
// DxWrapper
lblDxWrapperAf: TLabel;
lblDxWrapperAa: TLabel;
DxWrapperAf: TComboBox;
DxWrapperAa: TComboBox;
descDxWrapperAf: TNewStaticText;
descDxWrapperAa: TNewStaticText;
// DxWrapper #2
DxWrapperReShade: TCheckBox;
DxWrapperSaturation: TCheckBox;
DxWrapperSharpening: TCheckBox;
DxWrapperHdr: TCheckBox;
DxWrapperBloom: TCheckBox;
descDxWrapperReShade: TNewStaticText;
descDxWrapperSaturation: TNewStaticText;
descDxWrapperSharpening: TNewStaticText;
descDxWrapperHdr: TNewStaticText;
descDxWrapperBloom: TNewStaticText;
// dgVoodoo
lblDgVoodooAf: TLabel;
lblDgVoodooAa: TLabel;
lblDgVoodooRefreshRate: TLabel;
lblDgVoodooRefreshRateHz: TLabel;
DgVoodooAf: TComboBox;
DgVoodooAa: TComboBox;
DgVoodooRefreshRate: TNewEdit;
descDgVoodooAf: TNewStaticText;
descDgVoodooAa: TNewStaticText;
descDgVoodooRefreshRate: TNewStaticText;
// dgVoodoo #2
DgVoodooReShade: TCheckBox;
DgVoodooSaturation: TCheckBox;
DgVoodooSharpening: TCheckBox;
DgVoodooHdr: TCheckBox;
DgVoodooBloom: TCheckBox;
descDgVoodooReShade: TNewStaticText;
descDgVoodooSaturation: TNewStaticText;
descDgVoodooSharpening: TNewStaticText;
descDgVoodooHdr: TNewStaticText;
descDgVoodooBloom: TNewStaticText;
// Add improved reflections
VanillaReflections: TRadioButton;
ShinyReflections: TRadioButton;
ShiniestReflections: TRadioButton;
descReflections: TNewStaticText;
// Add new missile and explosion effects
MissileEffects: TCheckBox;
ExplosionEffects: TCheckBox;
descMissileEffects: TNewStaticText;
// Add player ship engine trails
EngineTrails: TCheckBox;
descEngineTrails: TNewStaticText;
// Draw distances
lblGeneralDrawDistances: TLabel;
GeneralDrawDistances: TComboBox;
descGeneralDrawDistances: TNewStaticText;
lblEffectDrawDistances: TLabel;
EffectDrawDistances: TComboBox;
descEffectDrawDistances: TNewStaticText;
lblCharacterDrawDistances: TLabel;
CharacterDrawDistances: TComboBox;
descCharacterDrawDistances: TNewStaticText;
// Skip intros
SkipIntros: TCheckBox;
descSkipIntros: TNewStaticText;
// Skippable cutscenes
SkippableCutscenes: TCheckBox;
descSkippableCutscenes: TNewStaticText;
// Jump tunnel duration
JumpTunnel10Sec: TRadioButton;
JumpTunnel5Sec: TRadioButton;
JumpTunnel2Sec: TRadioButton;
JumpTunnelSkip: TRadioButton;
descJumpTunnelDuration: TNewStaticText;
// Single Player Command Console
SinglePlayer: TCheckBox;
descSinglePlayer: TNewStaticText;
// Apply best options
BestOptions: TCheckBox;
descBestOptions: TNewStaticText;
// Display mode
lblDisplayMode: TLabel;
DisplayMode: TComboBox;
descDisplayMode: TNewStaticText;
// Do not pause on alt tab
DoNotPauseOnAltTab: TCheckBox;
MusicInBackground: Boolean;
// Report on download progress
# if !AllInOneInstall
function OnDownloadProgress(const Url, FileName: String; const Progress, ProgressMax: Int64): Boolean;
begin
DownloadPage.SetText('Downloading mod',(IntToStr(Progress/1048576)) + ' MB / ' + DownloadSize + ' MB');
if Progress = ProgressMax then
Log(Format('Successfully downloaded file to {tmp}: %s', [FileName]));
Result := True;
end;
# endif
// Update progress of installer bar
procedure UpdateProgress(Position: Integer);
begin
WizardForm.ProgressGauge.Position :=
Position * WizardForm.ProgressGauge.Max div 100;
end;
// Handles key presses for an integer field
procedure DigitFieldKeyPress(Sender: TObject; var Key: Char);
begin
if not ((Key = #8) or { Tab key }
(Key = #3) or (Key = #22) or (Key = #24) or { Ctrl+C, Ctrl+V, Ctrl+X }
IsDigit(Key)) then
begin
Key := #0;
end;
end;
// Ensures the DxWrapper or dgVoodoo pages are skipped if they haven't been checked in the Graphics API menu
function PageHandler_ShouldSkipPage(Page: TWizardPage): Boolean;
begin
Result := False;
if (Page.Id = DxWrapperPage.Id) or (Page.Id = DxWrapperPage2.Id) then
Result := not DxWrapperGraphicsApi.Checked
else if (Page.Id = DgVoodooPage.Id) or (Page.Id = DgVoodooPage2.Id) then
Result := not DgVoodooGraphicsApi.Checked
else if (Page.Id = VanillaPage.Id) and HasLightingBug then
Result := not (VanillaGraphicsApi.Checked or LightingFixGraphicsApi.Checked)
else if (Page.Id = VanillaPage.Id) then
Result := not VanillaGraphicsApi.Checked;
end;
procedure DxWrapperReShadeCheckBoxClick(Sender: TObject);
begin
DxWrapperSaturation.Enabled := DxWrapperReShade.Checked;
DxWrapperSharpening.Enabled := DxWrapperReShade.Checked;
DxWrapperHdr.Enabled := DxWrapperReShade.Checked;
DxWrapperBloom.Enabled := DxWrapperReShade.Checked;
end;
procedure DgVoodooReShadeCheckBoxClick(Sender: TObject);
begin
DgVoodooSaturation.Enabled := DgVoodooReShade.Checked;
DgVoodooSharpening.Enabled := DgVoodooReShade.Checked;
DgVoodooHdr.Enabled := DgVoodooReShade.Checked;
DgVoodooBloom.Enabled := DgVoodooReShade.Checked;
end;
procedure InitializeUi();
var
dir : string;
// Strings that are used more than once
txtAa: String;
txtAaDesc: String;
txtAf: String;
txtAfDesc: String;
txtEnhancementsPage: String;
txtReShade: String;
txtReShadeDesc: String;
txtSaturation: String;
txtSaturationDesc: String;
txtSharpening: String;
txtSharpeningDesc: String;
txtHdr: String;
txtHdrDesc: String;
txtBloom: String;
txtBloomDesc: String;
txtAuto: String;
begin
txtAa := 'Anti-Aliasing';
txtAaDesc := 'Anti-Aliasing removes jagged edges in-game, effectively making them appear smoother at a performance cost. Disable this option if you''re running low-end hardware.';
txtAf := 'Anisotropic Filtering';
txtAfDesc := 'Anisotropic Filtering improves the quality of textures when viewing them from the side with minimal performance overhead.';
txtEnhancementsPage := 'Choose additional graphics enhancements.';
txtReShade := 'Enable ReShade';
txtReShadeDesc := 'This option enables ReShade, which allows for the use of various post-processing effects to improve the game''s appearance. If it''s been enabled, the configuration below can be adjusted at any time by pressing the ''Home'' key in-game.';
txtSaturation := 'Add increased saturation (recommended)';
txtSaturationDesc := 'Simply gives Freelancer a slightly more-saturated look.';
txtSharpening := 'Add adaptive sharpening (recommended)';
txtSharpeningDesc := 'Makes the game look slightly more crisp without oversharpening everything.';
txtHdr := 'Add Fake HDR (High Dynamic Range)';
txtHdrDesc := 'Makes darker areas a bit darker, and brighter areas a bit brighter.';
txtBloom := 'Add Bloom';
txtBloomDesc := 'Adds glow to brighter areas. May reduce detail.';
txtAuto := ' "Auto" will automatically use the highest option your graphics card supports.'
# if !AllInOneInstall
// Read download size
DownloadSize := IntToStr(StrToInt64(ExpandConstant('{#SizeZip}'))/1048576);
// Initialize DownloadPage
DownloadPage := CreateDownloadPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc), @OnDownloadProgress);
# endif
dir := 'C:\Program Files (x86)\Microsoft Games\Freelancer'
// Initialize DataDirPage and add content
DataDirPage := CreateInputDirPage(wpInfoBefore,
'Select Freelancer installation', 'Where is Freelancer installed?',
'Select the folder in which a fresh and completely unmodded copy of Freelancer is installed. This is usually "' + dir + '".' + #13#10 +
'The folder you select here will be copied without modification.',
False, '');
DataDirPage.Add('');
// If the Reg key exists, use its content to populate the folder location box. Use the default path if otherwise.
RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Microsoft Games\Freelancer\1.0', 'AppPath', dir)
DataDirPage.Values[0] := dir
PageInstallType := CreateCustomPage(
DataDirPage.ID,
'Installation type',
'Choose how you''d like to install {#MyModName}.'
);
descInstallType := TNewStaticText.Create(PageInstallType);
descInstallType.Parent := PageInstallType.Surface;
descInstallType.WordWrap := True;
descInstallType.Width := PageInstallType.SurfaceWidth;
descInstallType.Caption := 'The {#MyModName} installer offers custom options to improve the gameplay experience. The installation types below determine how these options should be applied during the installation process.';
ExpressInstall := TRadioButton.Create(PageInstallType);
ExpressInstall.Parent := PageInstallType.Surface;
ExpressInstall.Top := ScaleY(60);
ExpressInstall.Caption := 'Express install';
ExpressInstall.Width := PageInstallType.SurfaceWidth - ScaleX(8);
ExpressInstall.Checked := not WizardSilent;
descExpressInstall := TNewStaticText.Create(PageInstallType);
descExpressInstall.Parent := PageInstallType.Surface;
descExpressInstall.WordWrap := True;
descExpressInstall.Top := ExpressInstall.Top + ScaleY(20);
descExpressInstall.Width := PageInstallType.SurfaceWidth;
descExpressInstall.Caption := 'Install the mod with all recommended options automatically applied.';
CustomInstall := TRadioButton.Create(PageInstallType);
CustomInstall.Parent := PageInstallType.Surface;
CustomInstall.Top := descExpressInstall.Top + ScaleY(29);
CustomInstall.Caption := 'Custom install';
CustomInstall.Width := PageInstallType.SurfaceWidth - ScaleX(8);
CustomInstall.Checked := WizardSilent;
descCustomInstall := TNewStaticText.Create(PageInstallType);
descCustomInstall.Parent := PageInstallType.Surface;
descCustomInstall.WordWrap := True;
descCustomInstall.Top := CustomInstall.Top + ScaleY(20);
descCustomInstall.Width := PageInstallType.SurfaceWidth;
descCustomInstall.Caption := 'Install the mod but for every option manually select whether it should be applied. This may take some time as there are quite a few options to go through.';
BasicInstall := TRadioButton.Create(PageInstallType);
BasicInstall.Parent := PageInstallType.Surface;
BasicInstall.Top := descCustomInstall.Top + ScaleY(42);
BasicInstall.Caption := 'Basic install (not recommended)';
BasicInstall.Width := PageInstallType.SurfaceWidth - ScaleX(8);
descBasicInstall := TNewStaticText.Create(PageInstallType);
descBasicInstall.Parent := PageInstallType.Surface;
descBasicInstall.WordWrap := True;
descBasicInstall.Top := BasicInstall.Top + ScaleY(20);
descBasicInstall.Width := PageInstallType.SurfaceWidth;
descBasicInstall.Caption := 'Install the mod without applying any options. Doing this is not recommended because you may miss out on improvements to the gameplay experience.';
// Initialize CallSign page and add content
CallSign := CreateInputOptionPage(PageInstallType.ID,
'Single Player ID Code', 'Tired of being called Freelancer Alpha 1-1?',
'You know when each time an NPC talks to you in-game, they call you Freelancer Alpha 1-1? This mod gives you the ability to change that ID code in Single Player. Select any option you like and the NPCs will call you by that.',
True, False);
CallSign.Add('Freelancer Alpha 1-1 (Default)');
CallSign.Add('Navy Beta 2-5');
CallSign.Add('Bretonia Police Iota 3-4');
CallSign.Add('Military Epsilon 11-6');
CallSign.Add('Naval Forces Matsu 4-9');
CallSign.Add('IMG Red 18-6');
CallSign.Add('Kishiro Yanagi 7-3');
CallSign.Add('Outcasts Lambda 9-12');
CallSign.Add('Dragons Green 16-13');
CallSign.Add('Spa and Cruise Omega 8-0');
CallSign.Add('Daumann Zeta 11-17');
CallSign.Add('Bowex Delta 5-7');
CallSign.Add('Order Omicron 0-0');
CallSign.Add('LSF Gamma 6-9');
CallSign.Add('Hacker Kappa 4-20');
// Initialize PitchVariations page and add content
GameplayOptions := CreateCustomPage(CallSign.ID,
'Gameplay customization', 'The NPC voices and shields options only affect Single Player and self-hosted Multiplayer games.');
descPitchVariations := TNewStaticText.Create(GameplayOptions);
descPitchVariations.Parent := GameplayOptions.Surface;
descPitchVariations.WordWrap := True;
descPitchVariations.Top := ScaleY(20);
descPitchVariations.Width := GameplayOptions.SurfaceWidth;
descPitchVariations.Caption :=
'NPCs from a faction talking in space usually only have one or two different voices. This option adds more pitches to the NPC voices so there''s more variety.';
PitchVariations := TCheckBox.Create(GameplayOptions);
PitchVariations.Parent := GameplayOptions.Surface;
PitchVariations.Caption := 'Add more voices for the NPCs';
PitchVariations.Width := GameplayOptions.SurfaceWidth - ScaleX(8);
descRegeneratableShields := TNewStaticText.Create(GameplayOptions);
descRegeneratableShields.Parent := GameplayOptions.Surface;
descRegeneratableShields.WordWrap := True;
descRegeneratableShields.Top := descPitchVariations.Top + ScaleY(65);
descRegeneratableShields.Width := GameplayOptions.SurfaceWidth;
descRegeneratableShields.Caption := 'Generally NPC shields have a very low regeneration rate. As an extra challenge, this option makes it so that all NPCs use normal regeneratable shields.';
RegeneratableShields := TCheckBox.Create(GameplayOptions);
RegeneratableShields.Parent := GameplayOptions.Surface;
RegeneratableShields.Top := descPitchVariations.Top + ScaleY(45);
RegeneratableShields.Caption := 'Regeneratable NPC shields';
RegeneratableShields.Width := GameplayOptions.SurfaceWidth - ScaleX(8);
descNoCountermeasureRightClick := TNewStaticText.Create(GameplayOptions);
descNoCountermeasureRightClick.Parent := GameplayOptions.Surface;
descNoCountermeasureRightClick.WordWrap := True;
descNoCountermeasureRightClick.Top := descRegeneratableShields.Top + ScaleY(65);
descNoCountermeasureRightClick.Width := GameplayOptions.SurfaceWidth;
descNoCountermeasureRightClick.Caption := 'When a Countermeasure dropper is active, it automatically activates whenever a missile is fired at your ship. It will also activate together with your active weapons when right-clicking. To prevent unintentional activations, this option makes Countermeasure droppers not activate when right-clicking.';
NoCountermeasureRightClick := TCheckBox.Create(GameplayOptions);
NoCountermeasureRightClick.Parent := GameplayOptions.Surface;
NoCountermeasureRightClick.Top := descRegeneratableShields.Top + ScaleY(45);
NoCountermeasureRightClick.Caption := 'Prevent Countermeasure dropper activation on right-click';
NoCountermeasureRightClick.Width := GameplayOptions.SurfaceWidth - ScaleX(8);
descAdvancedAudioOptions := TNewStaticText.Create(GameplayOptions);
descAdvancedAudioOptions.Parent := GameplayOptions.Surface;
descAdvancedAudioOptions.WordWrap := True;
descAdvancedAudioOptions.Top := descNoCountermeasureRightClick.Top + ScaleY(90);
descAdvancedAudioOptions.Width := GameplayOptions.SurfaceWidth;
descAdvancedAudioOptions.Caption := 'Adds controls to the audio options for adjusting the interface and ambience volume.';
AdvancedAudioOptions := TCheckBox.Create(GameplayOptions);
AdvancedAudioOptions.Parent := GameplayOptions.Surface;
AdvancedAudioOptions.Top := descNoCountermeasureRightClick.Top + ScaleY(70);
AdvancedAudioOptions.Caption := 'Advanced audio options';
AdvancedAudioOptions.Width := GameplayOptions.SurfaceWidth - ScaleX(8);
// Initialize English Improvements page and add content
PageEnglishImprovements := CreateCustomPage(GameplayOptions.ID,
'Localization', 'Apply English improvements and other fixes.');
descEnglishImprovements := TNewStaticText.Create(PageEnglishImprovements);
descEnglishImprovements.Parent := PageEnglishImprovements.Surface;
descEnglishImprovements.WordWrap := True;
descEnglishImprovements.Top := ScaleY(20);
descEnglishImprovements.Width := PageEnglishImprovements.SurfaceWidth;
descEnglishImprovements.Caption :=
'This option fixes many typos, grammar mistakes, inconsistencies, and more, in the English Freelancer text and audio resources. It also adds a higher quality Freelancer intro (1440x960 instead of 720x480), which is only available in English.' + #13#10#13#10 +
'NOTE: This option will set all of Freelancer''s text, voice lines, and the intro to English. Disable this option if you''d like to play Freelancer in a different language like German, French, or Russian.'
+ #13#10#13#10 + 'NOTE 2: Some text resources will remain English if this option is disabled.';
EnglishImprovements := TCheckBox.Create(PageEnglishImprovements);
EnglishImprovements.Parent := PageEnglishImprovements.Surface;
EnglishImprovements.Caption := 'Apply English Freelancer improvements';
EnglishImprovements.Width := PageEnglishImprovements.SurfaceWidth - ScaleX(8);
descRussianFonts := TNewStaticText.Create(PageEnglishImprovements);
descRussianFonts.Parent := PageEnglishImprovements.Surface;
descRussianFonts.WordWrap := True;
descRussianFonts.Top := descEnglishImprovements.Top + ScaleY(180);
descRussianFonts.Width := PageEnglishImprovements.SurfaceWidth;
descRussianFonts.Caption := 'This option adds a Cyrillic version of the Agency FB font for Freelancer.' + #13#10 + 'It also adds support for typing Cyrillic characters in the chat. Users with a Russian Freelancer installation may want to enable this option.';
RussianFonts := TCheckBox.Create(PageEnglishImprovements);
RussianFonts.Parent := PageEnglishImprovements.Surface;
RussianFonts.Top := descEnglishImprovements.Top + ScaleY(160);
RussianFonts.Caption := 'Use Russian fonts + Rus Chat';
RussianFonts.Width := PageEnglishImprovements.SurfaceWidth - ScaleX(8);
// Initialize Single Player page and add content
PageSinglePlayer := CreateCustomPage(PageEnglishImprovements.ID,
'Single Player options', 'Choose how you''d like to play Single Player.');
StoryMode := TComboBox.Create(PageSinglePlayer);
StoryMode.Parent := PageSinglePlayer.Surface;
StoryMode.Style := csDropDownList;
StoryMode.Width := 200;
StoryMode.Items.Add('Story Mode (default)');
StoryMode.Items.Add('Open Single Player (Normal)');
StoryMode.Items.Add('Open Single Player (Pirate)');
lblSinglePlayerMode := TLabel.Create(PageSinglePlayer);
lblSinglePlayerMode.Parent := PageSinglePlayer.Surface;
lblSinglePlayerMode.Caption := 'Single Player mode';
lblSinglePlayerMode.Left := ScaleX(210);
descSinglePlayerMode := TNewStaticText.Create(PageSinglePlayer);
descSinglePlayerMode.Parent := PageSinglePlayer.Surface;
descSinglePlayerMode.WordWrap := True;
descSinglePlayerMode.Width := PageSinglePlayer.SurfaceWidth;
descSinglePlayerMode.Caption := 'This option allows you to choose the Single Player mode. Story Mode simply lets you play through the entire storyline, as usual. Both Open Single Player options skip the entire storyline and allow you to freely roam the universe right away. With OSP (Normal), you start in Manhattan with a basic loadout and a default reputation. The OSP (Pirate) option on the other hand, spawns you at Rochester with a similar loadout and an inverted reputation. NOTE: Both OSP options may cause existing storyline saves to not work correctly.';
descSinglePlayerMode.Top := ScaleY(25);
// Level requirements
LevelRequirements := TCheckBox.Create(PageSinglePlayer);
LevelRequirements.Parent := PageSinglePlayer.Surface;
LevelRequirements.Top := descSinglePlayerMode.Top + ScaleY(108);
LevelRequirements.Caption := 'Remove level requirements';
LevelRequirements.Width := PageSinglePlayer.SurfaceWidth - ScaleX(8);
descLevelRequirements := TNewStaticText.Create(PageSinglePlayer);
descLevelRequirements.Parent := PageSinglePlayer.Surface;
descLevelRequirements.WordWrap := True;
descLevelRequirements.Top := LevelRequirements.Top + ScaleY(20);
descLevelRequirements.Width := PageSinglePlayer.SurfaceWidth;
descLevelRequirements.Caption := 'This option removes the level requirements for ships and equipment in Single Player.';
// New save folder
descNewSaveFolder := TNewStaticText.Create(PageSinglePlayer);
descNewSaveFolder.Parent := PageSinglePlayer.Surface;
descNewSaveFolder.WordWrap := True;
descNewSaveFolder.Top := descLevelRequirements.Top + ScaleY(50);
descNewSaveFolder.Width := PageSinglePlayer.SurfaceWidth;
descNewSaveFolder.Caption := 'Normally, Freelancer save games are stored in "Documents/My Games/Freelancer". This option ensures save games will be stored in "Documents/My Games/{#MyCustomSaveFolderName}" instead, which may help avoid conflicts when having multiple mods installed simultaneously.';
NewSaveFolder := TCheckBox.Create(PageSinglePlayer);
NewSaveFolder.Parent := PageSinglePlayer.Surface;
NewSaveFolder.Top := descLevelRequirements.Top + ScaleY(30);
NewSaveFolder.Caption := 'Store save game files in a different folder';
NewSaveFolder.Width := PageSinglePlayer.SurfaceWidth - ScaleX(8);
// Initialize StartupRes page and add content
StartupRes := CreateInputOptionPage(PageSinglePlayer.ID,
'Startup Screen Resolution', 'Choose your native resolution.',
'By default, the "Freelancer" splash screen you see when you start the game has a resolution of 1280x960. This makes it appear stretched and a bit blurry on HD 16:9 resolutions. ' +
'We recommend setting this option to your monitor''s native resolution. ' +
'Please note that a higher resolution option may negatively impact the game''s start-up speed.',
True, False);
StartupRes.Add('Remove Startup Screen');
StartupRes.Add('720p 16:9 - 1280x720');
StartupRes.Add('960p 4:3 - 1280x960 (Vanilla)');
StartupRes.Add('1080p 4:3 - 1440x1080');
StartupRes.Add('1080p 16:9 - 1920x1080');
StartupRes.Add('1440p 4:3 - 1920x1440');
StartupRes.Add('1440p 16:9 - 2560x1440');
StartupRes.Add('4K 4:3 - 2880x2160');
StartupRes.Add('4K 16:9 - 3840x2160');
// Initialize LogoRes page and add content
LogoRes := CreateInputOptionPage(StartupRes.ID,
'Freelancer Logo Resolution', 'In the game''s main menu.',
'The main menu Freelancer logo has a resolution of 800x600 by default, which makes it look stretched and pixelated/blurry on HD widescreen monitors. ' +
'Setting this to a higher resolution with the correct aspect ratio makes the logo look nice and sharp and not stretched-out. Hence we recommend setting this option to your monitor''s native resolution. ' +
'Please note that a higher resolution option may negatively impact the game''s start-up speed.',
True, False);
LogoRes.Add('Remove Logo');
LogoRes.Add('600p 4:3 - 800x600 (Vanilla)');
LogoRes.Add('720p 4:3 - 960x720');
LogoRes.Add('720p 16:9 - 1280x720');
LogoRes.Add('1080p 4:3 - 1440x1080');
LogoRes.Add('1080p 16:9 - 1920x1080');
LogoRes.Add('1440p 4:3 - 1920x1440');
LogoRes.Add('1440p 16:9 - 2560x1440');
LogoRes.Add('4K 4:3 - 2880x2160');
LogoRes.Add('4K 16:9 - 3840x2160');
// Fix Small Text on 1440p/4K resolutions
SmallText := CreateInputOptionPage(LogoRes.ID,
'Fix small text on larger resolutions', 'Check to install.',
'Many high-resolution Freelancer players have reported missing HUD text and misaligned buttons in menus. In 4K, the nav map text is too small and there are many missing text elements in the HUD. For 1440p and some 16:10 screens, the only apparent issue is the small nav map text.' + #13#10 + #13#10 +
'Select the option corresponding to the resolution you''re going to play Freelancer in. If you play in 1920x1080 or lower, the "No" option is fine as the elements are configured correctly already.',
True, False);
SmallText.Add('No');
SmallText.Add('Yes, apply fix for 2560x1440 and 1920x1200 screens');
SmallText.Add('Yes, apply fix for 3840x2160 screens');
if IsWine then
SmallText.Add('Yes, apply fix for 3840x1600 screens');
// Initialize HUD page and add content
PageWidescreenHud := CreateCustomPage(
SmallText.ID,
'Advanced Widescreen HUD',
'Check to install.'
);
descWidescreenHud := TNewStaticText.Create(PageWidescreenHud);
descWidescreenHud.Parent := PageWidescreenHud.Surface;
descWidescreenHud.WordWrap := True;
descWidescreenHud.Top := ScaleY(20);
descWidescreenHud.Width := PageWidescreenHud.SurfaceWidth;
descWidescreenHud.Caption := 'This option adds two new useful widgets to your HUD. Next to your contact list, you will have a wireframe representation of your selected target. Next to your weapons list, you will have a wireframe of your own ship. Disable this option if you play in an aspect ratio narrower than 16:9.';
WidescreenHud := TCheckBox.Create(PageWidescreenHud);
WidescreenHud.Parent := PageWidescreenHud.Surface;
WidescreenHud.Caption := 'Enable Advanced Widescreen HUD';
WidescreenHud.Width := PageWidescreenHud.SurfaceWidth - ScaleX(8);
descWeaponGroups := TNewStaticText.Create(PageWidescreenHud);
descWeaponGroups.Parent := PageWidescreenHud.Surface;
descWeaponGroups.WordWrap := True;
descWeaponGroups.Top := descWidescreenHud.Top + ScaleY(105);
descWeaponGroups.Width := PageWidescreenHud.SurfaceWidth;
descWeaponGroups.Caption := 'This option adds buttons for selecting three different weapon groups in your ship info panel.';
WeaponGroups := TCheckBox.Create(PageWidescreenHud);
WeaponGroups.Parent := PageWidescreenHud.Surface;
WeaponGroups.Top := descWidescreenHud.Top + ScaleY(85);
WeaponGroups.Caption := 'Add Weapon Group buttons';
WeaponGroups.Width := PageWidescreenHud.SurfaceWidth - ScaleX(8);
// Initialize Dark HUD page and add content
PageDarkHud := CreateCustomPage(
PageWidescreenHud.ID,
'Custom HUD, Icons, and Nav Map',
'Check to install.'
);
descDarkHud := TNewStaticText.Create(PageDarkHud);
descDarkHud.Parent := PageDarkHud.Surface;
descDarkHud.WordWrap := True;
descDarkHud.Top := ScaleY(20);
descDarkHud.Width := PageDarkHud.SurfaceWidth;
descDarkHud.Caption := 'This option replaces the default Freelancer HUD with a more darker-themed HUD. If this option is disabled, you''ll get the HD default HUD instead.';
DarkHud := TCheckBox.Create(PageDarkHud);
DarkHud.Parent := PageDarkHud.Surface;
DarkHud.Caption := 'Enable Dark HUD';
DarkHud.Width := PageDarkHud.SurfaceWidth - ScaleX(8);
VanillaIcons := TRadioButton.Create(PageDarkHud);
VanillaIcons.Parent := PageDarkHud.Surface;
VanillaIcons.Top := descDarkHud.Top + ScaleY(45);
VanillaIcons.Caption := 'HD Vanilla Icons';
VanillaIcons.Width := PageDarkHud.SurfaceWidth - ScaleX(8);
AlternativeIcons := TRadioButton.Create(PageDarkHud);
AlternativeIcons.Parent := PageDarkHud.Surface;
AlternativeIcons.Top := VanillaIcons.Top + ScaleY(20);
AlternativeIcons.Caption := 'Custom Alternative Icons';
AlternativeIcons.Width := PageDarkHud.SurfaceWidth - ScaleX(8);
FlatIcons := TRadioButton.Create(PageDarkHud);
FlatIcons.Parent := PageDarkHud.Surface;
FlatIcons.Top := AlternativeIcons.Top + ScaleY(20);
FlatIcons.Caption := 'Custom Flat Icons';
FlatIcons.Width := PageDarkHud.SurfaceWidth - ScaleX(8);
descCustomIcons := TNewStaticText.Create(PageDarkHud);
descCustomIcons.Parent := PageDarkHud.Surface;
descCustomIcons.WordWrap := True;
descCustomIcons.Top := AlternativeIcons.Top + ScaleY(40);
descCustomIcons.Width := PageDarkHud.SurfaceWidth;
descCustomIcons.Caption := 'This option allows you to choose a set of icons for Freelancer. The HD Vanilla Icons option adds an HD version of the default Freelancer icons. The Custom Alternative Icons have a different look but a style similar to the vanilla icons. Lastly, the Custom Flat Icons option adds new icons that have a more flat and simple look.';
descCustomNavMap := TNewStaticText.Create(PageDarkHud);
descCustomNavMap.Parent := PageDarkHud.Surface;
descCustomNavMap.WordWrap := True;
descCustomNavMap.Top := FlatIcons.Top + ScaleY(112);
descCustomNavMap.Width := PageDarkHud.SurfaceWidth;
descCustomNavMap.Caption := 'Replaces the background of the in-game Nav Map with an alternative version. If this option is disabled, an HD version of the original Nav Map background will be used.';
CustomNavMap := TCheckBox.Create(PageDarkHud);
CustomNavMap.Parent := PageDarkHud.Surface;
CustomNavMap.Caption := 'Use Custom Nav Map background';
CustomNavMap.Top := FlatIcons.Top + ScaleY(92);
CustomNavMap.Width := PageDarkHud.SurfaceWidth - ScaleX(8);
// Fix clipping with 16:9 resolution planetscapes
PagePlanetScape := CreateCustomPage(
PageDarkHud.ID,
'Fix clipping with 16:9 resolution planetscapes',
'Check to install.'
);
descPlanetScape := TNewStaticText.Create(PagePlanetScape);
descPlanetScape.Parent := PagePlanetScape.Surface;
descPlanetScape.WordWrap := True;
descPlanetScape.Top := ScaleY(20);
descPlanetScape.Width := PagePlanetScape.SurfaceWidth;
descPlanetScape.Caption := 'Since Freelancer was never optimized for 16:9 resolutions, there are several inconsistencies with planetscapes that occur while viewing them in 16:9, such as clipping and geometry issues.' + #13#10 + #13#10 +
'This mod gives you the option of fixing this, as it adjusts the camera values in the planetscapes so the issues are no longer visible in 16:9 resolutions.' + #13#10 + #13#10 +
'Disable this option if you play in 4:3. Also please note that the planetscape views may look zoomed in when using this option with an ultrawide resolution.'
PlanetScape := TCheckBox.Create(PagePlanetScape);
PlanetScape.Parent := PagePlanetScape.Surface;
PlanetScape.Caption := 'Fix clipping with 16:9 resolution planetscapes';
PlanetScape.Width := PagePlanetScape.SurfaceWidth - ScaleX(8);
// Choose Graphics API
PageGraphicsApi := CreateCustomPage(
PagePlanetScape.ID,
'Graphics API',
'Choose the one that suits your needs.'
);
descGraphicsApi := TNewStaticText.Create(PageGraphicsApi);
descGraphicsApi.Parent := PageGraphicsApi.Surface;
descGraphicsApi.WordWrap := True;
descGraphicsApi.Width := PageGraphicsApi.SurfaceWidth;
descGraphicsApi.Caption := 'This page allows you to choose the graphics API. If you have no idea what this means, just go with the first or second option, since those offer the best graphics enhancements and fixes. If they cause issues for you, choose a different option.';
DgVoodooGraphicsApi := TRadioButton.Create(PageGraphicsApi);
DgVoodooGraphicsApi.Parent := PageGraphicsApi.Surface;
DgVoodooGraphicsApi.Top := ScaleY(50);
DgVoodooGraphicsApi.Caption := 'dgVoodoo (DirectX 11, recommended for NVIDIA and Intel GPUs)';
DgVoodooGraphicsApi.Width := PageGraphicsApi.SurfaceWidth - ScaleX(8);
descDgVoodooGraphicsApi := TNewStaticText.Create(PageGraphicsApi);
descDgVoodooGraphicsApi.Parent := PageGraphicsApi.Surface;
descDgVoodooGraphicsApi.WordWrap := True;
descDgVoodooGraphicsApi.Top := DgVoodooGraphicsApi.Top + ScaleY(15);
descDgVoodooGraphicsApi.Width := PageGraphicsApi.SurfaceWidth;
descDgVoodooGraphicsApi.Caption := 'Fixes the lighting, stuttering, and glass bugs on Windows 10 and 11. Supports native Anti-Aliasing, Anisotropic Filtering, and ReShade.';
// Refresh rate input is only required if the user has an AMD GPU
if GpuManufacturer = AMD then
descDgVoodooGraphicsApi.Caption := descDgVoodooGraphicsApi.Caption + ' Requires refresh rate input.';
DxWrapperGraphicsApi := TRadioButton.Create(PageGraphicsApi);
DxWrapperGraphicsApi.Parent := PageGraphicsApi.Surface;
DxWrapperGraphicsApi.Top := descDgVoodooGraphicsApi.Top + ScaleY(37);
DxWrapperGraphicsApi.Caption := 'DxWrapper + d3d8to9 (DirectX 9, recommended for all GPUs)';
DxWrapperGraphicsApi.Width := PageGraphicsApi.SurfaceWidth - ScaleX(8);
descDxWrapperGraphicsApi := TNewStaticText.Create(PageGraphicsApi);
descDxWrapperGraphicsApi.Parent := PageGraphicsApi.Surface;
descDxWrapperGraphicsApi.WordWrap := True;
descDxWrapperGraphicsApi.Top := DxWrapperGraphicsApi.Top + ScaleY(15);
descDxWrapperGraphicsApi.Width := PageGraphicsApi.SurfaceWidth;
descDxWrapperGraphicsApi.Caption := 'Fixes the lighting and stuttering bugs on Windows 10 and 11. Supports native Anti-Aliasing, Anisotropic Filtering, and ReShade.';
VanillaGraphicsApi := TRadioButton.Create(PageGraphicsApi);
VanillaGraphicsApi.Parent := PageGraphicsApi.Surface;
VanillaGraphicsApi.Top := descDxWrapperGraphicsApi.Top + ScaleY(37);
VanillaGraphicsApi.Caption := 'Vanilla Freelancer (DirectX 8)';
VanillaGraphicsApi.Width := PageGraphicsApi.SurfaceWidth - ScaleX(8);
descVanillaGraphicsApi := TNewStaticText.Create(PageGraphicsApi);
descVanillaGraphicsApi.Parent := PageGraphicsApi.Surface;
descVanillaGraphicsApi.WordWrap := True;
descVanillaGraphicsApi.Top := VanillaGraphicsApi.Top + ScaleY(15);
descVanillaGraphicsApi.Width := PageGraphicsApi.SurfaceWidth;
descVanillaGraphicsApi.Caption := 'Uses your PC''s default DirectX 8 API for Freelancer. You may experience compatibility issues when using it. Supports Anisotropic Filtering.';
// Only display the Lighting Bug Fix option if the current operating system could potentially suffer from it. If it won't, enabling this option may cause the game to not launch.
// On top of that, the Lighting Bug isn't present on such operating systems anyway (but the stuttering bug may be).
if HasLightingBug then
begin
LightingFixGraphicsApi := TRadioButton.Create(PageGraphicsApi);
LightingFixGraphicsApi.Parent := PageGraphicsApi.Surface;
LightingFixGraphicsApi.Top := descVanillaGraphicsApi.Top + ScaleY(37);
LightingFixGraphicsApi.Caption := 'Vanilla Freelancer + Lighting and Stuttering fix (DirectX 8)';
LightingFixGraphicsApi.Width := PageGraphicsApi.SurfaceWidth - ScaleX(8);
descLightingFixGraphicsApi := TNewStaticText.Create(PageGraphicsApi);
descLightingFixGraphicsApi.Parent := PageGraphicsApi.Surface;
descLightingFixGraphicsApi.WordWrap := True;
descLightingFixGraphicsApi.Top := LightingFixGraphicsApi.Top + ScaleY(15);
descLightingFixGraphicsApi.Width := PageGraphicsApi.SurfaceWidth;
descLightingFixGraphicsApi.Caption := 'The same as the Vanilla Freelancer option but also fixes the lighting and stuttering bugs. NOTE: This option only works on Windows 10 and 11!';
end;
// DxWrapper options
DxWrapperPage := CreateCustomPage(
PageGraphicsApi.ID,
'DxWrapper options',
txtEnhancementsPage
);
lblDxWrapperAa := TLabel.Create(DxWrapperPage);
lblDxWrapperAa.Parent := DxWrapperPage.Surface;
lblDxWrapperAa.Caption := txtAA;
DxWrapperAa := TComboBox.Create(DxWrapperPage);
DxWrapperAa.Parent := DxWrapperPage.Surface;
DxWrapperAa.Style := csDropDownList;
DxWrapperAa.Items.Add('Off');
DxWrapperAa.Items.Add('2x');
DxWrapperAa.Items.Add('4x');
DxWrapperAa.Items.Add('8x');
DxWrapperAa.Items.Add('Auto (recommended)');
DxWrapperAa.Top := ScaleY(20);
DxWrapperAa.Width := 155;
descDxWrapperAa := TNewStaticText.Create(DxWrapperPage);
descDxWrapperAa.Parent := DxWrapperPage.Surface;
descDxWrapperAa.WordWrap := True;
descDxWrapperAa.Width := DxWrapperPage.SurfaceWidth;
descDxWrapperAa.Caption := txtAaDesc + txtAuto;
descDxWrapperAa.Top := DxWrapperAa.Top + ScaleY(25);
lblDxWrapperAf := TLabel.Create(DxWrapperPage);
lblDxWrapperAf.Parent := DxWrapperPage.Surface;
lblDxWrapperAf.Caption := TxtAf;
lblDxWrapperAf.Top := descDxWrapperAa.Top + ScaleY(80);
DxWrapperAf := TComboBox.Create(DxWrapperPage);
DxWrapperAf.Parent := DxWrapperPage.Surface;
DxWrapperAf.Style := csDropDownList;
DxWrapperAf.Items.Add('Off');
DxWrapperAf.Items.Add('2x');
DxWrapperAf.Items.Add('4x');
DxWrapperAf.Items.Add('8x');
DxWrapperAf.Items.Add('16x');
DxWrapperAf.Items.Add('Auto (recommended)');
DxWrapperAf.Top := lblDxWrapperAf.Top + ScaleY(20);
DxWrapperAf.Width := 155;
descDxWrapperAf := TNewStaticText.Create(DxWrapperPage);
descDxWrapperAf.Parent := DxWrapperPage.Surface;
descDxWrapperAf.WordWrap := True;
descDxWrapperAf.Width := DxWrapperPage.SurfaceWidth;
descDxWrapperAf.Caption := txtAfDesc + txtAuto;
descDxWrapperAf.Top := DxWrapperAf.Top + ScaleY(25);
// dgVoodoo options
DgVoodooPage := CreateCustomPage(
DxWrapperPage.ID,
'dgVoodoo options',
txtEnhancementsPage
);
lblDgVoodooAa := TLabel.Create(DgVoodooPage);
lblDgVoodooAa.Parent := DgVoodooPage.Surface;
lblDgVoodooAa.Caption := txtAa;
DgVoodooAa := TComboBox.Create(DgVoodooPage);
DgVoodooAa.Parent := DgVoodooPage.Surface;
DgVoodooAa.Style := csDropDownList;
DgVoodooAa.Items.Add('Off');
DgVoodooAa.Items.Add('2x');
// High AA settings are not needed on high resolutions like 4K
if DesktopRes.Height >= 2160 then
begin
DgVoodooAa.Items.Add('4x (recommended)');
DgVoodooAa.Items.Add('8x');
end
else
begin
DgVoodooAa.Items.Add('4x');
DgVoodooAa.Items.Add('8x (recommended)');
end;
DgVoodooAa.Top := ScaleY(20);
DgVoodooAa.Width := 155;
descDgVoodooAa := TNewStaticText.Create(DgVoodooPage);
descDgVoodooAa.Parent := DgVoodooPage.Surface;
descDgVoodooAa.WordWrap := True;
descDgVoodooAa.Width := DgVoodooPage.SurfaceWidth;
descDgVoodooAa.Caption := txtAaDesc;
descDgVoodooAa.Top := DgVoodooAa.Top + ScaleY(25);
lblDgVoodooAf := TLabel.Create(DgVoodooPage);
lblDgVoodooAf.Parent := DgVoodooPage.Surface;
lblDgVoodooAf.Caption := txtAf;
lblDgVoodooAf.Top := descDgVoodooAa.Top + ScaleY(55);
DgVoodooAf := TComboBox.Create(DgVoodooPage);
DgVoodooAf.Parent := DgVoodooPage.Surface;
DgVoodooAf.Style := csDropDownList;
DgVoodooAf.Items.Add('Off');
DgVoodooAf.Items.Add('2x');
DgVoodooAf.Items.Add('4x');
DgVoodooAf.Items.Add('8x');
DgVoodooAf.Items.Add('16x (recommended)');
DgVoodooAf.Top := lblDgVoodooAf.Top + ScaleY(20);
DgVoodooAf.Width := 155;
descDgVoodooAf := TNewStaticText.Create(DgVoodooPage);
descDgVoodooAf.Parent := DgVoodooPage.Surface;
descDgVoodooAf.WordWrap := True;
descDgVoodooAf.Width := DgVoodooPage.SurfaceWidth;
descDgVoodooAf.Caption := txtAfDesc;
descDgVoodooAf.Top := DgVoodooAf.Top + ScaleY(25);
if GpuManufacturer = AMD then
begin
lblDgVoodooRefreshRate := TLabel.Create(DgVoodooPage);
lblDgVoodooRefreshRate.Parent := DgVoodooPage.Surface;
lblDgVoodooRefreshRate.Caption := 'Refresh Rate';
lblDgVoodooRefreshRate.Top := descDgVoodooAf.Top + ScaleY(45);
lblDgVoodooRefreshRateHz := TLabel.Create(DgVoodooPage);
lblDgVoodooRefreshRateHz.Parent := DgVoodooPage.Surface;
lblDgVoodooRefreshRateHz.Caption := 'Hz';
lblDgVoodooRefreshRateHz.Top := lblDgVoodooRefreshRate.Top + ScaleY(23);
lblDgVoodooRefreshRateHz.Left := ScaleX(125);
DgVoodooRefreshRate := TNewEdit.Create(DgVoodooPage);
DgVoodooRefreshRate.Parent := DgVoodooPage.Surface;;
DgVoodooRefreshRate.Top := lblDgVoodooRefreshRateHz.Top - ScaleY(3);
DgVoodooRefreshRate.OnKeyPress := @DigitFieldKeyPress;
descDgVoodooRefreshRate := TNewStaticText.Create(DgVoodooPage);
descDgVoodooRefreshRate.Parent := DgVoodooPage.Surface;
descDgVoodooRefreshRate.WordWrap := True;
descDgVoodooRefreshRate.Width := DgVoodooPage.SurfaceWidth;
descDgVoodooRefreshRate.Caption := 'Enter your monitor''s refresh rate here. Freelancer will run at this refresh rate.';
descDgVoodooRefreshRate.Top := DgVoodooRefreshRate.Top + ScaleY(25);
end;
// DxWrapper options #2
DxWrapperPage2 := CreateCustomPage(
DgVoodooPage.ID,
'DxWrapper options #2',
txtEnhancementsPage
);
descDxWrapperReShade := TNewStaticText.Create(DxWrapperPage2);
descDxWrapperReShade.Parent := DxWrapperPage2.Surface;
descDxWrapperReShade.WordWrap := True;
descDxWrapperReShade.Top := ScaleY(20);
descDxWrapperReShade.Width := DxWrapperPage2.SurfaceWidth;
descDxWrapperReShade.Caption := txtReShadeDesc;
DxWrapperReShade := TCheckBox.Create(DxWrapperPage2);
DxWrapperReShade.Parent := DxWrapperPage2.Surface;
DxWrapperReShade.Caption := txtReShade;
DxWrapperReShade.Width := DxWrapperPage2.SurfaceWidth - ScaleX(8);
descDxWrapperSaturation := TNewStaticText.Create(DxWrapperPage2);
descDxWrapperSaturation.Parent := DxWrapperPage2.Surface;
descDxWrapperSaturation.WordWrap := True;
descDxWrapperSaturation.Top := descDxWrapperReShade.Top + ScaleY(78);
descDxWrapperSaturation.Width := DxWrapperPage2.SurfaceWidth;
descDxWrapperSaturation.Caption := txtSaturationDesc
DxWrapperSaturation := TCheckBox.Create(DxWrapperPage2);
DxWrapperSaturation.Parent := DxWrapperPage2.Surface;
DxWrapperSaturation.Top := descDxWrapperReShade.Top + ScaleY(58);
DxWrapperSaturation.Caption := txtSaturation;
DxWrapperSaturation.Width := DxWrapperPage2.SurfaceWidth - ScaleX(8);
descDxWrapperSharpening := TNewStaticText.Create(DxWrapperPage2);
descDxWrapperSharpening.Parent := DxWrapperPage2.Surface;
descDxWrapperSharpening.WordWrap := True;
descDxWrapperSharpening.Top := descDxWrapperSaturation.Top + ScaleY(48);
descDxWrapperSharpening.Width := DxWrapperPage2.SurfaceWidth;
descDxWrapperSharpening.Caption := txtSharpeningDesc
DxWrapperSharpening := TCheckBox.Create(DxWrapperPage2);
DxWrapperSharpening.Parent := DxWrapperPage2.Surface;
DxWrapperSharpening.Top := descDxWrapperSaturation.Top + ScaleY(28);
DxWrapperSharpening.Caption := txtSharpening;
DxWrapperSharpening.Width := DxWrapperPage2.SurfaceWidth - ScaleX(8);
descDxWrapperHdr := TNewStaticText.Create(DxWrapperPage2);
descDxWrapperHdr.Parent := DxWrapperPage2.Surface;
descDxWrapperHdr.WordWrap := True;
descDxWrapperHdr.Top := descDxWrapperSharpening.Top + ScaleY(48);
descDxWrapperHdr.Width := DxWrapperPage2.SurfaceWidth;
descDxWrapperHdr.Caption := txtHdrDesc
DxWrapperHdr := TCheckBox.Create(DxWrapperPage2);
DxWrapperHdr.Parent := DxWrapperPage2.Surface;
DxWrapperHdr.Top := descDxWrapperSharpening.Top + ScaleY(28);
DxWrapperHdr.Caption := txtHdr;
DxWrapperHdr.Width := DxWrapperPage2.SurfaceWidth - ScaleX(8);
descDxWrapperBloom := TNewStaticText.Create(DxWrapperPage2);
descDxWrapperBloom.Parent := DxWrapperPage2.Surface;
descDxWrapperBloom.WordWrap := True;
descDxWrapperBloom.Top := descDxWrapperHdr.Top + ScaleY(48);