diff --git a/src/game/g_console.pas b/src/game/g_console.pas
index 514c69e0ee27a53cd303a83c2e534e9ba4c2ae9f..7937a19954768c0cb7029f5cfceaa91fd7296c2e 100644 (file)
--- a/src/game/g_console.pas
+++ b/src/game/g_console.pas
implementation
uses
implementation
uses
- {$IFNDEF HEADLESS}
- g_gui, g_menu, g_touch,
+ {$IFDEF ENABLE_MENU}
+ g_gui, g_menu,
{$ENDIF}
{$ENDIF}
- g_textures, e_input, g_game, g_gfx, g_player, g_items,
+ {$IFDEF ENABLE_TOUCH}
+ g_system,
+ {$ENDIF}
+ {$IFDEF ENABLE_GFX}
+ g_gfx,
+ {$ENDIF}
+ g_textures, e_input, g_game, g_player, g_items,
SysUtils, g_basic, g_options, Math, e_res,
g_language, g_net, g_netmsg, e_log, conbuf, g_weapons,
Keyboard;
SysUtils, g_basic, g_options, Math, e_res,
g_language, g_net, g_netmsg, e_log, conbuf, g_weapons,
Keyboard;
rep: Boolean;
down, up: SSArray;
end;
rep: Boolean;
down, up: SSArray;
end;
+
menu_toggled: BOOLEAN; (* hack for menu controls *)
ConsoleStdIn: Boolean;
menu_toggled: BOOLEAN; (* hack for menu controls *)
ConsoleStdIn: Boolean;
gChatShow := False;
gConsoleShow := not gConsoleShow;
InputReady := False;
gChatShow := False;
gConsoleShow := not gConsoleShow;
InputReady := False;
- {$IFNDEF HEADLESS}
- g_Touch_ShowKeyboard(gConsoleShow or gChatShow);
+ {$IFDEF ENABLE_TOUCH}
+ sys_ShowKeyboard(gConsoleShow or gChatShow);
{$ENDIF}
end;
{$ENDIF}
end;
InputReady := False;
Line := '';
CPos := 1;
InputReady := False;
Line := '';
CPos := 1;
- {$IFNDEF HEADLESS}
- g_Touch_ShowKeyboard(gConsoleShow or gChatShow);
+ {$IFDEF ENABLE_TOUCH}
+ sys_ShowKeyboard(gConsoleShow or gChatShow);
{$ENDIF}
end;
{$ENDIF}
end;
'unbindall':
for i := 0 to e_MaxInputKeys - 1 do
g_Console_BindKey(i, '');
'unbindall':
for i := 0 to e_MaxInputKeys - 1 do
g_Console_BindKey(i, '');
-{$IFNDEF HEADLESS}
+{$IFDEF ENABLE_TOUCH}
'showkeyboard':
'showkeyboard':
- g_Touch_ShowKeyboard(True);
+ sys_ShowKeyboard(True);
'hidekeyboard':
'hidekeyboard':
- g_Touch_ShowKeyboard(False);
+ sys_ShowKeyboard(False);
{$ENDIF}
'togglemenu':
begin
{$ENDIF}
'togglemenu':
begin
else if gChatShow then
g_Console_Chat_Switch
else
else if gChatShow then
g_Console_Chat_Switch
else
+ begin
KeyPress(VK_ESCAPE);
KeyPress(VK_ESCAPE);
+ end;
menu_toggled := True
end;
'toggleconsole':
menu_toggled := True
end;
'toggleconsole':
var grab, active: Boolean;
begin
Result := False;
var grab, active: Boolean;
begin
Result := False;
- {$IFDEF HEADLESS}
+ {$IFDEF DISABLE_MENU}
grab := False;
active := False;
{$ELSE}
grab := False;
active := False;
{$ELSE}
procedure g_Console_ProcessBindRepeat (key: Integer);
var i: Integer; active: Boolean;
begin
procedure g_Console_ProcessBindRepeat (key: Integer);
var i: Integer; active: Boolean;
begin
- {$IFDEF HEADLESS}
+ {$IFDEF DISABLE_MENU}
active := False;
{$ELSE}
active := g_ActiveWindow <> nil;
active := False;
{$ELSE}
active := g_ActiveWindow <> nil;
WriteLn(f, 'sv_public ', IfThen(NetUseMaster, 1, 0));
// game settings
WriteLn(f, 'sv_public ', IfThen(NetUseMaster, 1, 0));
// game settings
- WriteLn(f, 'g_max_particles ', g_GFX_GetMax());
+ {$IFDEF ENABLE_GFX}
+ WriteLn(f, 'g_max_particles ', g_GFX_GetMax());
+ {$ENDIF}
WriteLn(f, 'g_max_shells ', g_Shells_GetMax());
WriteLn(f, 'g_max_gibs ', g_Gibs_GetMax());
WriteLn(f, 'g_max_corpses ', g_Corpses_GetMax());
WriteLn(f, 'g_max_shells ', g_Shells_GetMax());
WriteLn(f, 'g_max_gibs ', g_Gibs_GetMax());
WriteLn(f, 'g_max_corpses ', g_Corpses_GetMax());