-
Notifications
You must be signed in to change notification settings - Fork 2
/
FSuperLemmixSetup.pas
116 lines (96 loc) · 2.76 KB
/
FSuperLemmixSetup.pas
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
unit FSuperLemmixSetup;
interface
uses
Math,
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, Vcl.ExtCtrls, Vcl.Imaging.pngimage,
SharedGlobals;
type
TFNLSetup = class(TForm)
SetupPages: TPageControl;
TabSheet1: TTabSheet;
lblWelcome: TLabel;
lblOptionsText1: TLabel;
lblOptionsText2: TLabel;
btnNext: TButton;
btnExit: TButton;
lblGraphics: TLabel;
cbGraphics: TComboBox;
lblUsername: TLabel;
ebUserName: TEdit;
lblGameplay: TLabel;
cbGameplay: TComboBox;
lblHotkeys: TLabel;
cbHotkeys: TComboBox;
Floater: TImage;
L1Art: TImage;
procedure FormCreate(Sender: TObject);
procedure btnOKClick(Sender: TObject);
procedure btnExitClick(Sender: TObject);
procedure lblWelcomeClick(Sender: TObject);
private
end;
implementation
uses
GameControl, LemmixHotkeys, LemCore;
{$R *.dfm}
{ Misc Functions }
procedure TFNLSetup.FormCreate(Sender: TObject);
begin
SetupPages.TabIndex := 0;
end;
procedure TFNLSetup.lblWelcomeClick(Sender: TObject);
begin
end;
{ Page Control }
procedure TFNLSetup.btnExitClick(Sender: TObject);
begin
GameParams.DisableSaveOptions := true;
Application.Terminate;
end;
procedure TFNLSetup.btnOKClick(Sender: TObject);
begin
// Set desired default settings
GameParams.UserName := ebUserName.Text;
case cbGraphics.ItemIndex of
1, 3: begin
GameParams.ShowMinimap := true;
GameParams.MinimapHighQuality := true;
GameParams.LinearResampleMenu := true;
//GameParams.LinearResampleGame := false;
end;
0, 2: begin
GameParams.ShowMinimap := true;
GameParams.MinimapHighQuality := false;
GameParams.LinearResampleMenu := false;
//GameParams.LinearResampleGame := false;
end;
end;
GameParams.HighResolution := cbGraphics.ItemIndex >= 2;
if GameParams.HighResolution then
GameParams.ZoomLevel := Max(GameParams.ZoomLevel div 2, 1);
// Bookmark - Put these back when all online features are back in
//GameParams.EnableOnline := cbOnline.ItemIndex >= 1;
//GameParams.CheckUpdates := cbOnline.ItemIndex >= 2;
case cbGameplay.ItemIndex of
0: begin
GameParams.ClassicMode := true;
GameParams.HideShadows := true;
GameParams.HideHelpers := true;
GameParams.HideSkillQ := true;
end;
1: begin
GameParams.ClassicMode := false;
GameParams.HideShadows := false;
GameParams.HideHelpers := false;
GameParams.HideSkillQ := false;
end;
end;
case cbHotkeys.ItemIndex of
0: GameParams.Hotkeys.SetDefaultsClassic;
1: GameParams.Hotkeys.SetDefaultsAdvanced;
2: GameParams.Hotkeys.SetDefaultsAlternative;
end;
Close;
end;
end.