summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bccf523)
raw | patch | inline | side by side (parent: bccf523)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 31 Jul 2019 18:30:48 +0000 (21:30 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 31 Jul 2019 18:30:48 +0000 (21:30 +0300) |
src/game/g_console.pas | patch | blob | history | |
src/game/g_main.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 edf484f1dd8177dc59170710d0c48c6f4efeffb7..2105faf013636025b9175cf27828dcc645462115 100644 (file)
--- a/src/game/g_console.pas
+++ b/src/game/g_console.pas
down, up: SSArray;
end;
menu_toggled: BOOLEAN; (* hack for menu controls *)
- gSkipFirstChar: Boolean; (* hack for console/chat input *)
procedure g_Console_Switch;
menu_toggled := True
end;
'toggleconsole':
- begin
- g_Console_Switch;
- gSkipFirstChar := g_Console_Interactive();
- end;
+ g_Console_Switch;
'togglechat':
- begin
- if not gConsoleShow and (g_ActiveWindow = nil) then
- g_Console_Chat_Switch;
- gSkipFirstChar := not g_Console_Interactive()
- end;
+ if not gConsoleShow and (g_ActiveWindow = nil) then
+ g_Console_Chat_Switch;
'toggleteamchat':
if gGameSettings.GameMode in [GM_TDM, GM_CTF] then
- begin
if not gConsoleShow and (g_ActiveWindow = nil) then
g_Console_Chat_Switch(True);
- gSkipFirstChar := not g_Console_Interactive()
- end;
end
end;
procedure g_Console_Char(C: AnsiChar);
begin
- if not gSkipFirstChar then
- begin
- Insert(C, Line, CPos);
- CPos := CPos + 1;
- end;
- gSkipFirstChar := False
+ Insert(C, Line, CPos);
+ CPos := CPos + 1;
end;
IK_0, IK_1, IK_2, IK_3, IK_4, IK_5, IK_6, IK_7, IK_8, IK_9, IK_MINUS, IK_EQUALS:
(* see TEXTINPUT event *)
else
- if not gSkipFirstChar then
+ if gConsoleShow and not Cons_Shown and g_Console_MatchBind(K, 'toggleconsole') then
+ g_Console_Switch;
+ if g_Console_MatchBind(K, 'togglemenu') then
begin
- if gConsoleShow and g_Console_MatchBind(K, 'toggleconsole') then
- g_Console_Switch;
-
- if g_Console_MatchBind(K, 'togglemenu') then
- begin
- menu_toggled := True;
- if gChatShow then
- g_Console_Chat_Switch
- else if gConsoleShow then
- g_Console_Switch
- end
+ menu_toggled := True;
+ if gChatShow then
+ g_Console_Chat_Switch
+ else if gConsoleShow and not Cons_Shown then
+ g_Console_Switch
end
end
end;
diff --git a/src/game/g_main.pas b/src/game/g_main.pas
index 86c5f843a0cdc5c7db7aeb8e79573d6e3a48496d..b5595832e9573dd1fd2242dbbf32af4085fce7ff 100644 (file)
--- a/src/game/g_main.pas
+++ b/src/game/g_main.pas
e_WriteLog(gLanguage, TMsgType.Notify);
g_Language_Set(gLanguage);
-{$IFNDEF HEADLESS}
-{$IFNDEF ANDROID}
- SDL_StartTextInput();
-{$ENDIF}
-{$ENDIF}
-
{$IF not DEFINED(HEADLESS) and DEFINED(ENABLE_HOLMES)}
flexloaded := true;
if not fuiAddWad('flexui.wad') then
SDLMain();
{$WARNINGS ON}
-{$IFNDEF HEADLESS}
- SDL_StopTextInput();
-{$ENDIF}
-
e_WriteLog('Releasing SDL', TMsgType.Notify);
SDL_Quit();
end;
diff --git a/src/game/g_touch.pas b/src/game/g_touch.pas
index 7cdc3282c1dd25057ed91b4ef4a251c4c3f6f7a9..9eed28e26ae525151e0cc56e4cc665cad8b5a08f 100644 (file)
--- a/src/game/g_touch.pas
+++ b/src/game/g_touch.pas
procedure g_Touch_Init;
begin
{$IFNDEF HEADLESS}
+ g_Touch_ShowKeyboard(FALSE);
g_touch_enabled := SDL_GetNumTouchDevices() > 0
{$ENDIF}
end;
procedure g_Touch_ShowKeyboard(yes: Boolean);
begin
{$IFNDEF HEADLESS}
- if not g_touch_enabled then
- Exit;
-
if yes then
SDL_StartTextInput
else