diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index bdf925b1ea2d897d51f141164006f9b91a16a950..678c0a00dc05bbb094fbb02b01c04ca6bd8cb1f6 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
KeyNextWeapon2 := TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_NEXT_WEAPON])).Key;
KeyPrevWeapon2 := TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_PREV_WEAPON])).Key;
KeyOpen2 := TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_USE])).Key;
+ KeyStrafe2 := TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_STRAFE])).Key;
+ end;
+
+ menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsP1MenuWeapons').GetControl('mOptionsControlsP1MenuWeapons'));
+ with menu, gGameControls.P1Control do
+ begin
+ for i := 0 to 9 do
+ KeyWeapon[i] := TGUIKeyRead(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key;
end;
menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsP2Menu').GetControl('mOptionsControlsP2Menu'));
KeyNextWeapon2 := TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_NEXT_WEAPON])).Key;
KeyPrevWeapon2 := TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_PREV_WEAPON])).Key;
KeyOpen2 := TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_USE])).Key;
+ KeyStrafe2 := TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_STRAFE])).Key;
+ end;
+
+ menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsP2MenuWeapons').GetControl('mOptionsControlsP2MenuWeapons'));
+ with menu, gGameControls.P2Control do
+ begin
+ for i := 0 to 9 do
+ KeyWeapon[i] := TGUIKeyRead(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key;
end;
if e_JoysticksAvailable > 0 then
TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_NEXT_WEAPON])).Key := KeyNextWeapon2;
TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_PREV_WEAPON])).Key := KeyPrevWeapon2;
TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_USE])).Key := KeyOpen2;
+ TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_STRAFE])).Key := KeyStrafe2;
end;
menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsP2Menu').GetControl('mOptionsControlsP2Menu'));
TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_NEXT_WEAPON])).Key := KeyNextWeapon2;
TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_PREV_WEAPON])).Key := KeyPrevWeapon2;
TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_USE])).Key := KeyOpen2;
+ TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_STRAFE])).Key := KeyStrafe2;
end;
if e_JoysticksAvailable > 0 then
AddKeyRead(_lc[I_MENU_CONTROL_CHAT]).Name := _lc[I_MENU_CONTROL_CHAT];
AddKeyRead(_lc[I_MENU_CONTROL_TEAMCHAT]).Name := _lc[I_MENU_CONTROL_TEAMCHAT];
AddSpace();
- AddButton(nil, _lc[I_MENU_PLAYER_1], 'OptionsControlsP1Menu');
+ AddButton(nil, _lc[I_MENU_PLAYER_1_KBD], 'OptionsControlsP1Menu');
AddButton(nil, _lc[I_MENU_PLAYER_1_ALT], 'OptionsControlsP1MenuAlt');
- AddButton(nil, _lc[I_MENU_PLAYER_2], 'OptionsControlsP2Menu');
+ AddButton(nil, _lc[I_MENU_PLAYER_1_WEAPONS], 'OptionsControlsP1MenuWeapons');
+ AddButton(nil, _lc[I_MENU_PLAYER_2_KBD], 'OptionsControlsP2Menu');
AddButton(nil, _lc[I_MENU_PLAYER_2_ALT], 'OptionsControlsP2MenuAlt');
+ AddButton(nil, _lc[I_MENU_PLAYER_2_WEAPONS], 'OptionsControlsP2MenuWeapons');
AddSpace();
if e_JoysticksAvailable <> 0 then
AddButton(nil, _lc[I_MENU_CONTROL_JOYSTICKS], 'OptionsControlsJoystickMenu');
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('OptionsControlsP1Menu');
- with TGUIMenu(Menu.AddChild(TGUIMenu.Create(gMenuFont, gMenuSmallFont, _lc[I_MENU_PLAYER_1]))) do
+ with TGUIMenu(Menu.AddChild(TGUIMenu.Create(gMenuFont, gMenuSmallFont, _lc[I_MENU_PLAYER_1_KBD]))) do
begin
Name := 'mOptionsControlsP1Menu';
AddKeyRead(_lc[I_MENU_CONTROL_LEFT]).Name := _lc[I_MENU_CONTROL_LEFT];
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('OptionsControlsP1MenuAlt');
- with TGUIMenu(Menu.AddChild(TGUIMenu.Create(gMenuFont, gMenuSmallFont, _lc[I_MENU_PLAYER_1]))) do
+ with TGUIMenu(Menu.AddChild(TGUIMenu.Create(gMenuFont, gMenuSmallFont, _lc[I_MENU_PLAYER_1_ALT]))) do
begin
Name := 'mOptionsControlsP1MenuAlt';
AddKeyRead(_lc[I_MENU_CONTROL_LEFT]).Name := _lc[I_MENU_CONTROL_LEFT];
AddKeyRead(_lc[I_MENU_CONTROL_USE]).Name := _lc[I_MENU_CONTROL_USE];
AddKeyRead(_lc[I_MENU_CONTROL_NEXT_WEAPON]).Name := _lc[I_MENU_CONTROL_NEXT_WEAPON];
AddKeyRead(_lc[I_MENU_CONTROL_PREV_WEAPON]).Name := _lc[I_MENU_CONTROL_PREV_WEAPON];
+ AddKeyRead(_lc[I_MENU_CONTROL_STRAFE]).Name := _lc[I_MENU_CONTROL_STRAFE];
end;
Menu.DefControl := 'mOptionsControlsP1MenuAlt';
g_GUI_AddWindow(Menu);
+ Menu := TGUIWindow.Create('OptionsControlsP1MenuWeapons');
+ with TGUIMenu(Menu.AddChild(TGUIMenu.Create(gMenuFont, gMenuSmallFont, _lc[I_MENU_PLAYER_1_WEAPONS]))) do
+ begin
+ Name := 'mOptionsControlsP1MenuWeapons';
+ for i := 0 to 9 do
+ AddKeyRead(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)]).Name :=
+ _lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)];
+ end;
+ Menu.DefControl := 'mOptionsControlsP1MenuWeapons';
+ g_GUI_AddWindow(Menu);
+
Menu := TGUIWindow.Create('OptionsControlsP2Menu');
- with TGUIMenu(Menu.AddChild(TGUIMenu.Create(gMenuFont, gMenuSmallFont, _lc[I_MENU_PLAYER_2]))) do
+ with TGUIMenu(Menu.AddChild(TGUIMenu.Create(gMenuFont, gMenuSmallFont, _lc[I_MENU_PLAYER_2_KBD]))) do
begin
Name := 'mOptionsControlsP2Menu';
AddKeyRead(_lc[I_MENU_CONTROL_LEFT]).Name := _lc[I_MENU_CONTROL_LEFT];
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('OptionsControlsP2MenuAlt');
- with TGUIMenu(Menu.AddChild(TGUIMenu.Create(gMenuFont, gMenuSmallFont, _lc[I_MENU_PLAYER_2]))) do
+ with TGUIMenu(Menu.AddChild(TGUIMenu.Create(gMenuFont, gMenuSmallFont, _lc[I_MENU_PLAYER_2_ALT]))) do
begin
Name := 'mOptionsControlsP2MenuAlt';
AddKeyRead(_lc[I_MENU_CONTROL_LEFT]).Name := _lc[I_MENU_CONTROL_LEFT];
AddKeyRead(_lc[I_MENU_CONTROL_USE]).Name := _lc[I_MENU_CONTROL_USE];
AddKeyRead(_lc[I_MENU_CONTROL_NEXT_WEAPON]).Name := _lc[I_MENU_CONTROL_NEXT_WEAPON];
AddKeyRead(_lc[I_MENU_CONTROL_PREV_WEAPON]).Name := _lc[I_MENU_CONTROL_PREV_WEAPON];
+ AddKeyRead(_lc[I_MENU_CONTROL_STRAFE]).Name := _lc[I_MENU_CONTROL_STRAFE];
end;
Menu.DefControl := 'mOptionsControlsP2MenuAlt';
g_GUI_AddWindow(Menu);
+
+ Menu := TGUIWindow.Create('OptionsControlsP2MenuWeapons');
+ with TGUIMenu(Menu.AddChild(TGUIMenu.Create(gMenuFont, gMenuSmallFont, _lc[I_MENU_PLAYER_2_WEAPONS]))) do
+ begin
+ Name := 'mOptionsControlsP2MenuWeapons';
+ for i := 0 to 9 do
+ AddKeyRead(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)]).Name :=
+ _lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)];
+ end;
+ Menu.DefControl := 'mOptionsControlsP2MenuWeapons';
+ g_GUI_AddWindow(Menu);
+
Menu := TGUIWindow.Create('OptionsControlsJoystickMenu');
with TGUIMenu(Menu.AddChild(TGUIMenu.Create(gMenuFont, gMenuSmallFont, _lc[I_MENU_CONTROL_JOYSTICKS]))) do
begin