From b8db17f63a79d8f79ddde6405fabbc9919f51678 Mon Sep 17 00:00:00 2001 From: Ketmar Dark Date: Sun, 17 Apr 2016 07:54:07 +0300 Subject: [PATCH] "yes/no" menu now accepts space as "y" --- src/game/g_menu.pas | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas index a3bf1ef..015c1e2 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -39,9 +39,10 @@ type TYNCallback = procedure (yes:Boolean); procedure YNKeyDownProc (win: TGUIWindow; Key: Byte); begin if win.UserData = nil then exit; - //writeln('YNEX; key=', Key, '; ', (Key = ord('y'))); - if Key = ord('y') then TYNCallback(win.UserData)(true) - else if Key = ord('n') then TYNCallback(win.UserData)(false); + case Key of + IK_Y, IK_SPACE: TYNCallback(win.UserData)(true); + IK_N: TYNCallback(win.UserData)(false); + end; end; function CreateYNMenu (Name, Text: String; MaxLen: Word; FontID: DWORD; ActionProc: TYNCallback): TGUIWindow; -- 2.29.2