X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_menu.pas;h=015c1e2556f31c61b0905dc464af6633e45ee029;hb=b8db17f63a79d8f79ddde6405fabbc9919f51678;hp=a3bf1ef5937613de1b959c5e5ac8cc1614b52ba2;hpb=385ab1e1ecb587ed8dfd1425381cd6f1c185e804;p=d2df-sdl.git 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;