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
|
/*
Options for controlling appearance and behaviour of HUD and UI.
*/
// =====[ EVENTS ]=====
void OnOptionsMenuReady_Options()
{
RegisterOptions();
}
void OnOptionChanged_Options(int client, HUDOption option, any newValue)
{
PrintOptionChangeMessage(client, option, newValue);
}
// =====[ PRIVATE ]=====
static void RegisterOptions()
{
for (HUDOption option; option < HUDOPTION_COUNT; option++)
{
GOKZ_RegisterOption(gC_HUDOptionNames[option], gC_HUDOptionDescriptions[option],
OptionType_Int, gI_HUDOptionDefaults[option], 0, gI_HUDOptionCounts[option] - 1);
}
}
static void PrintOptionChangeMessage(int client, HUDOption option, any newValue)
{
// NOTE: Not all options have a message for when they are changed.
switch (option)
{
case HUDOption_TPMenu:
{
switch (newValue)
{
case TPMenu_Disabled:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Teleport Menu - Disable");
}
case TPMenu_Simple:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Teleport Menu - Enable (Simple)");
}
case TPMenu_Advanced:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Teleport Menu - Enable (Advanced)");
}
}
}
case HUDOption_InfoPanel:
{
switch (newValue)
{
case InfoPanel_Disabled:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Info Panel - Disable");
}
case InfoPanel_Enabled:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Info Panel - Enable");
}
}
}
case HUDOption_TimerStyle:
{
switch (newValue)
{
case TimerStyle_Standard:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Timer Style - Standard");
}
case TimerStyle_Precise:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Timer Style - Precise");
}
}
}
case HUDOption_TimerType:
{
switch (newValue)
{
case TimerType_Disabled:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Timer Type - Disabled");
}
case TimerType_Enabled:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Timer Type - Enabled");
}
}
}
case HUDOption_ShowWeapon:
{
switch (newValue)
{
case ShowWeapon_Disabled:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Show Weapon - Disable");
}
case ShowWeapon_Enabled:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Show Weapon - Enable");
}
}
}
case HUDOption_ShowControls:
{
switch (newValue)
{
case ReplayControls_Disabled:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Show Controls - Disable");
}
case ReplayControls_Enabled:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Show Controls - Enable");
}
}
}
case HUDOption_DeadstrafeColor:
{
switch (newValue)
{
case DeadstrafeColor_Disabled:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Dead Strafe - Disable");
}
case DeadstrafeColor_Enabled:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Dead Strafe - Enable");
}
}
}
case HUDOption_ShowSpectators:
{
switch (newValue)
{
case ShowSpecs_Disabled:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Show Spectators - Disable");
}
case ShowSpecs_Number:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Show Spectators - Number");
}
case ShowSpecs_Full:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Show Spectators - Full");
}
}
}
case HUDOption_SpecListPosition:
{
switch (newValue)
{
case SpecListPosition_InfoPanel:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Spectator List Position - Info Panel");
}
case SpecListPosition_TPMenu:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Spectator List Position - TP Menu");
}
}
}
case HUDOption_DynamicMenu:
{
switch (newValue)
{
case DynamicMenu_Legacy:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Dynamic Menu - Legacy");
}
case DynamicMenu_Disabled:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Dynamic Menu - Disable");
}
case DynamicMenu_Enabled:
{
GOKZ_PrintToChat(client, true, "%t", "Option - Dynamic Menu - Enable");
}
}
}
}
}
|