From: fgsfds Date: Fri, 12 Apr 2019 13:15:41 +0000 (+0300) Subject: file listboxes now have advanced hotkey technology X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=82e244af6046f36a1d4e7b281f64a8e9cf796119;p=d2df-sdl.git file listboxes now have advanced hotkey technology --- diff --git a/src/game/g_gui.pas b/src/game/g_gui.pas index 9b44f6f..42c2c6b 100644 --- a/src/game/g_gui.pas +++ b/src/game/g_gui.pas @@ -3145,7 +3145,7 @@ end; procedure TGUIFileListBox.OnMessage(var Msg: TMessage); var - a: Integer; + a, b: Integer; begin if not FEnabled then Exit; @@ -3242,7 +3242,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 +3257,7 @@ begin FOnChangeEvent(Self); Break; end; + end; end; end;