X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_gui.pas;h=07a03c19081dcbf21589dd8569ec03946c26b5c2;hb=e4aa606d7d71d9836908fab23aae7e99728b11ee;hp=9b44f6f8a7b8a4e572c1e4b31216598c57b4ec6d;hpb=4de34c0c003869d8f125768be330702020f3c514;p=d2df-sdl.git diff --git a/src/game/g_gui.pas b/src/game/g_gui.pas index 9b44f6f..07a03c1 100644 --- a/src/game/g_gui.pas +++ b/src/game/g_gui.pas @@ -535,6 +535,7 @@ type var g_GUIWindows: array of TGUIWindow; g_ActiveWindow: TGUIWindow = nil; + g_GUIGrabInput: Boolean = False; procedure g_GUI_Init(); function g_GUI_AddWindow(Window: TGUIWindow): TGUIWindow; @@ -2335,7 +2336,8 @@ begin end; end; - g_Touch_ShowKeyboard(FWindow.FActiveControl = Self); + g_GUIGrabInput := (@FOnEnterEvent = nil) and (FWindow.FActiveControl = Self); + g_Touch_ShowKeyboard(g_GUIGrabInput) end; procedure TGUIEdit.SetText(Text: string); @@ -2469,6 +2471,8 @@ begin end; end; end; + + g_GUIGrabInput := FIsQuery end; { TGUIKeyRead2 } @@ -2637,6 +2641,8 @@ begin end; end; end; + + g_GUIGrabInput := FIsQuery end; @@ -3145,7 +3151,7 @@ end; procedure TGUIFileListBox.OnMessage(var Msg: TMessage); var - a: Integer; + a, b: Integer; begin if not FEnabled then Exit; @@ -3242,7 +3248,9 @@ begin end; WM_CHAR: - for a := 0 to High(FItems) do + for b := FIndex + 1 to High(FItems) + FIndex do + begin + a := b mod Length(FItems); if ( (Length(FItems[a]) > 0) and (LowerCase(FItems[a][1]) = LowerCase(Chr(wParam))) ) or ( (Length(FItems[a]) > 1) and @@ -3255,6 +3263,7 @@ begin FOnChangeEvent(Self); Break; end; + end; end; end;