1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-21 05:29:11 +00:00

(svn r2675) - Fix: pressing enter on a load-window resulted in saving the game (Luca)

This commit is contained in:
Darkvater
2005-07-22 09:16:34 +00:00
parent aa29ee6eda
commit 290bb2fda6

View File

@@ -1315,10 +1315,14 @@ static void SaveLoadDlgWndProc(Window *w, WindowEvent *e)
HandleEditBox(w, 9); HandleEditBox(w, 9);
break; break;
case WE_KEYPRESS: case WE_KEYPRESS:
switch (HandleEditBoxKey(w, 9, e)) { if (e->keypress.keycode == WKC_ESC) {
case 1: DeleteWindow(w);
HandleButtonClick(w, 11); return;
break; }
if (_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO) {
if (HandleEditBoxKey(w, 9, e) == 1) /* Press Enter */
HandleButtonClick(w, 11);
} }
break; break;
case WE_TIMEOUT: case WE_TIMEOUT: