summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d92a9e2)
raw | patch | inline | side by side (parent: d92a9e2)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 28 Apr 2019 15:56:10 +0000 (18:56 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 28 Apr 2019 15:56:10 +0000 (18:56 +0300) |
src/game/g_console.pas | patch | blob | history | |
src/game/g_touch.pas | patch | blob | history |
diff --git a/src/game/g_console.pas b/src/game/g_console.pas
index 21616113c92c9571a8a44e6e088c6203c81552c9..33bfcf7dafedefaef8e4b74a39c8d07e746f151d 100644 (file)
--- a/src/game/g_console.pas
+++ b/src/game/g_console.pas
'hidekeyboard':
g_Touch_ShowKeyboard(False);
'togglemenu':
+ if gConsoleShow then
+ begin
+ g_Console_Switch;
+ menu_toggled := True
+ end
+ else
begin
- // this is HACK
KeyPress(VK_ESCAPE);
menu_toggled := True
end;
if g_Console_MatchBind(K, 'togglemenu') then
begin
+ menu_toggled := True;
if gChatShow then
g_Console_Chat_Switch
else if gConsoleShow then
procedure g_Console_ProcessBind (key: Integer; down: Boolean);
var i: Integer;
begin
- if (not g_GUIGrabInput) and (not gChatShow) and (not gConsoleShow) and (key >= 0) and (key < e_MaxInputKeys) and ((gInputBinds[key].down <> nil) or (gInputBinds[key].up <> nil)) then
+ if (not g_GUIGrabInput) and (key >= 0) and (key < e_MaxInputKeys) and ((gInputBinds[key].down <> nil) or (gInputBinds[key].up <> nil)) then
begin
if down then
for i := 0 to High(gInputBinds[key].down) do
g_Console_BindKey(e_JoyButtonToKey(i, 10), 'togglemenu');
end;
- // HACK: VK_ESCAPE always used as togglemenu, so don't touch it!
- // VK_CONSOLE
+ g_Console_BindKey(VK_ESCAPE, 'togglemenu');
g_Console_BindKey(VK_LSTRAFE, '+moveleft; +strafe', '-moveleft; -strafe');
g_Console_BindKey(VK_RSTRAFE, '+moveright; +strafe', '-moveright; -strafe');
g_Console_BindKey(VK_LEFT, '+moveleft', '-moveleft');
diff --git a/src/game/g_touch.pas b/src/game/g_touch.pas
index 972c5422283f1c53f42d7ceb50097d7488661f14..7cdc3282c1dd25057ed91b4ef4a251c4c3f6f7a9 100644 (file)
--- a/src/game/g_touch.pas
+++ b/src/game/g_touch.pas
uses
SysUtils,
- e_log, e_graphics, e_input, g_options, g_game, g_main, g_gui, g_weapons, g_console;
+ e_log, e_graphics, e_input, g_options, g_game, g_main, g_gui, g_weapons, g_console, g_window;
var
angleFire: Boolean;
procedure KeyUp (finger, i: Integer);
begin
+ if g_dbg_input then
+ e_LogWritefln('Input Debug: g_touch.KeyUp, finger=%s, key=%s', [finger, i]);
+
keyFinger[i] := 0;
e_KeyUpDown(i, False);
g_Console_ProcessBind(i, False);
procedure KeyDown (finger, i: Integer);
begin
+ if g_dbg_input then
+ e_LogWritefln('Input Debug: g_touch.KeyDown, finger=%s, key=%s', [finger, i]);
+
keyFinger[i] := finger;
e_KeyUpDown(i, True);
g_Console_ProcessBind(i, True);