diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index ba91ca3b28500d9f5a19ae442515c8bbe899eb1b..4d2da495216be1983b5f6e38ae4454fc3f7dc6a0 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation, version 3 of the License ONLY.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
gMenuSmallFont: DWORD;
PromptIP: string;
PromptPort: Word;
gMenuSmallFont: DWORD;
PromptIP: string;
PromptPort: Word;
+ TempScale: Integer = -1;
implementation
implementation
gShowMessages := TGUISwitch(menu.GetControl('swMessages')).ItemIndex = 0;
gRevertPlayers := TGUISwitch(menu.GetControl('swRevertPlayers')).ItemIndex = 0;
gChatBubble := TGUISwitch(menu.GetControl('swChatBubble')).ItemIndex;
gShowMessages := TGUISwitch(menu.GetControl('swMessages')).ItemIndex = 0;
gRevertPlayers := TGUISwitch(menu.GetControl('swRevertPlayers')).ItemIndex = 0;
gChatBubble := TGUISwitch(menu.GetControl('swChatBubble')).ItemIndex;
- gPlayerIndicator := TGUISwitch(menu.GetControl('swPlayerIndicator')).ItemIndex = 0;
- g_dbg_scale := TGUIScroll(menu.GetControl('scScaleFactor')).Value + 1;
+ gPlayerIndicator := TGUISwitch(menu.GetControl('swPlayerIndicator')).ItemIndex;
+ gPlayerIndicatorStyle := TGUISwitch(menu.GetControl('swPlayerIndicatorStyle')).ItemIndex;
+ if TGUIScroll(menu.GetControl('scScaleFactor')).Value <> TempScale then
+ begin
+ TempScale := TGUIScroll(menu.GetControl('scScaleFactor')).Value;
+ g_dbg_scale := TempScale + 1;
+ end;
menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsMenu').GetControl('mOptionsControlsMenu'));
menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsMenu').GetControl('mOptionsControlsMenu'));
ItemIndex := gChatBubble;
with TGUISwitch(menu.GetControl('swPlayerIndicator')) do
ItemIndex := gChatBubble;
with TGUISwitch(menu.GetControl('swPlayerIndicator')) do
- if gPlayerIndicator then ItemIndex := 0 else ItemIndex := 1;
+ ItemIndex := gPlayerIndicator;
+
+ with TGUISwitch(menu.GetControl('swPlayerIndicatorStyle')) do
+ ItemIndex := gPlayerIndicatorStyle;
- TGUIScroll(menu.GetControl('scScaleFactor')).Value := Round(g_dbg_scale - 1);
+ TempScale := Round(g_dbg_scale - 1);
+ TGUIScroll(menu.GetControl('scScaleFactor')).Value := TempScale;
menu := TGUIMenu(g_GUI_GetWindow('OptionsPlayersP1Menu').GetControl('mOptionsPlayersP1Menu'));
menu := TGUIMenu(g_GUI_GetWindow('OptionsPlayersP1Menu').GetControl('mOptionsPlayersP1Menu'));
begin
e_WriteLog('Loading menu data...', TMsgType.Notify);
begin
e_WriteLog('Loading menu data...', TMsgType.Notify);
+ g_Texture_CreateWADEx('MAINMENU_LOGO', GameWAD+':TEXTURES\MAINLOGO');
g_Texture_CreateWADEx('MAINMENU_MARKER1', GameWAD+':TEXTURES\MARKER1');
g_Texture_CreateWADEx('MAINMENU_MARKER2', GameWAD+':TEXTURES\MARKER2');
g_Texture_CreateWADEx('SCROLL_LEFT', GameWAD+':TEXTURES\SLEFT');
g_Texture_CreateWADEx('MAINMENU_MARKER1', GameWAD+':TEXTURES\MARKER1');
g_Texture_CreateWADEx('MAINMENU_MARKER2', GameWAD+':TEXTURES\MARKER2');
g_Texture_CreateWADEx('SCROLL_LEFT', GameWAD+':TEXTURES\SLEFT');
e_CharFont_Remove(gMenuFont);
e_CharFont_Remove(gMenuSmallFont);
e_CharFont_Remove(gMenuFont);
e_CharFont_Remove(gMenuSmallFont);
+ g_Texture_Delete('MAINMENU_LOGO');
g_Texture_Delete('MAINMENU_MARKER1');
g_Texture_Delete('MAINMENU_MARKER2');
g_Texture_Delete('SCROLL_LEFT');
g_Texture_Delete('MAINMENU_MARKER1');
g_Texture_Delete('MAINMENU_MARKER2');
g_Texture_Delete('SCROLL_LEFT');
menu: TGUIMenu;
begin
menu := TGUIMenu(g_GUI_GetWindow('OptionsGameMenu').GetControl('mOptionsGameMenu'));
menu: TGUIMenu;
begin
menu := TGUIMenu(g_GUI_GetWindow('OptionsGameMenu').GetControl('mOptionsGameMenu'));
- g_dbg_scale := TGUIScroll(menu.GetControl('scScaleFactor')).Value + 1;
+ if TGUIScroll(menu.GetControl('scScaleFactor')).Value <> TempScale then
+ begin
+ TempScale := TGUIScroll(menu.GetControl('scScaleFactor')).Value;
+ g_dbg_scale := TempScale + 1;
+ end;
end;
procedure ProcChangeTouchSettings(Sender: TGUIControl);
end;
procedure ProcChangeTouchSettings(Sender: TGUIControl);
begin
Menu := TGUIWindow.Create('FirstLanguageMenu');
begin
Menu := TGUIWindow.Create('FirstLanguageMenu');
- with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, ' '))) do
+ with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, '', ' '))) do
begin
Name := 'mmFirstLanguageMenu';
AddButton(@ProcSetFirstRussianLanguage, 'Ðóññêèé', '');
begin
Name := 'mmFirstLanguageMenu';
AddButton(@ProcSetFirstRussianLanguage, 'Ðóññêèé', '');
//list: SSArray;
begin
Menu := TGUIWindow.Create('MainMenu');
//list: SSArray;
begin
Menu := TGUIWindow.Create('MainMenu');
- with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, _lc[I_MENU_MAIN_MENU]))) do
+ with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, 'MAINMENU_LOGO', _lc[I_MENU_MAIN_MENU]))) do
begin
Name := 'mmMainMenu';
AddButton(nil, _lc[I_MENU_NEW_GAME], 'NewGameMenu');
begin
Name := 'mmMainMenu';
AddButton(nil, _lc[I_MENU_NEW_GAME], 'NewGameMenu');
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('NewGameMenu');
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('NewGameMenu');
- with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, _lc[I_MENU_NEW_GAME]))) do
+ with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, '', _lc[I_MENU_NEW_GAME]))) do
begin
Name := 'mmNewGameMenu';
AddButton(@ProcSingle1Player, _lc[I_MENU_1_PLAYER]);
begin
Name := 'mmNewGameMenu';
AddButton(@ProcSingle1Player, _lc[I_MENU_1_PLAYER]);
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('NetGameMenu');
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('NetGameMenu');
- with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, _lc[I_MENU_MULTIPLAYER]))) do
+ with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, '', _lc[I_MENU_MULTIPLAYER]))) do
begin
Name := 'mmNetGameMenu';
AddButton(@ProcRecallAddress, _lc[I_MENU_START_CLIENT], 'NetClientMenu');
begin
Name := 'mmNetGameMenu';
AddButton(@ProcRecallAddress, _lc[I_MENU_START_CLIENT], 'NetClientMenu');
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('OptionsMenu');
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('OptionsMenu');
- with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, _lc[I_MENU_OPTIONS]))) do
+ with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, '', _lc[I_MENU_OPTIONS]))) do
begin
Name := 'mmOptionsMenu';
AddButton(nil, _lc[I_MENU_VIDEO_OPTIONS], 'OptionsVideoMenu');
begin
Name := 'mmOptionsMenu';
AddButton(nil, _lc[I_MENU_VIDEO_OPTIONS], 'OptionsVideoMenu');
with AddSwitch(_lc[I_MENU_GAME_PLAYER_INDICATOR]) do
begin
Name := 'swPlayerIndicator';
with AddSwitch(_lc[I_MENU_GAME_PLAYER_INDICATOR]) do
begin
Name := 'swPlayerIndicator';
- AddItem(_lc[I_MENU_YES]);
- AddItem(_lc[I_MENU_NO]);
+ AddItem(_lc[I_MENU_GAME_INDICATOR_NONE]);
+ AddItem(_lc[I_MENU_GAME_INDICATOR_OWN]);
+ AddItem(_lc[I_MENU_GAME_INDICATOR_ALL]);
+ end;
+ with AddSwitch(_lc[I_MENU_GAME_INDICATOR_STYLE]) do
+ begin
+ Name := 'swPlayerIndicatorStyle';
+ AddItem(_lc[I_MENU_GAME_INDICATOR_ARROW]);
+ AddItem(_lc[I_MENU_GAME_INDICATOR_NAME]);
end;
with AddScroll(_lc[I_MENU_GAME_SCALE_FACTOR]) do
begin
end;
with AddScroll(_lc[I_MENU_GAME_SCALE_FACTOR]) do
begin
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('GameSingleMenu');
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('GameSingleMenu');
- with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, _lc[I_MENU_MAIN_MENU]))) do
+ with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, '', _lc[I_MENU_MAIN_MENU]))) do
begin
Name := 'mmGameSingleMenu';
AddButton(nil, _lc[I_MENU_LOAD_GAME], 'LoadMenu');
begin
Name := 'mmGameSingleMenu';
AddButton(nil, _lc[I_MENU_LOAD_GAME], 'LoadMenu');
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('GameCustomMenu');
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('GameCustomMenu');
- with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, _lc[I_MENU_MAIN_MENU]))) do
+ with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, '', _lc[I_MENU_MAIN_MENU]))) do
begin
Name := 'mmGameCustomMenu';
AddButton(nil, _lc[I_MENU_CHANGE_PLAYERS], 'TeamMenu');
begin
Name := 'mmGameCustomMenu';
AddButton(nil, _lc[I_MENU_CHANGE_PLAYERS], 'TeamMenu');
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('GameServerMenu');
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('GameServerMenu');
- with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, _lc[I_MENU_MAIN_MENU]))) do
+ with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, '', _lc[I_MENU_MAIN_MENU]))) do
begin
Name := 'mmGameServerMenu';
AddButton(nil, _lc[I_MENU_CHANGE_PLAYERS], 'TeamMenu');
begin
Name := 'mmGameServerMenu';
AddButton(nil, _lc[I_MENU_CHANGE_PLAYERS], 'TeamMenu');
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('GameClientMenu');
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('GameClientMenu');
- with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, _lc[I_MENU_MAIN_MENU]))) do
+ with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, '', _lc[I_MENU_MAIN_MENU]))) do
begin
Name := 'mmGameClientMenu';
AddButton(nil, _lc[I_MENU_CHANGE_PLAYERS], 'TeamMenu');
begin
Name := 'mmGameClientMenu';
AddButton(nil, _lc[I_MENU_CHANGE_PLAYERS], 'TeamMenu');
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('TeamMenu');
g_GUI_AddWindow(Menu);
Menu := TGUIWindow.Create('TeamMenu');
- with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, _lc[I_MENU_CHANGE_PLAYERS]))) do
+ with TGUIMainMenu(Menu.AddChild(TGUIMainMenu.Create(gMenuFont, '', _lc[I_MENU_CHANGE_PLAYERS]))) do
begin
Name := 'mmTeamMenu';
AddButton(@ProcJoinRed, _lc[I_MENU_JOIN_RED], '').Name := 'tmJoinRed';
begin
Name := 'mmTeamMenu';
AddButton(@ProcJoinRed, _lc[I_MENU_JOIN_RED], '').Name := 'tmJoinRed';