From 39405cbb25b5376660dfb0852f2aa1cf1e337888 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 22 Jun 2007 17:51:17 +0000 Subject: Changed default buttons of MessageDialogs and mass add dialog to accept 'return' as hotkey for the default button, instead of 'enter' (resp. even 'nothing' on some systems) svn-id: r27611 --- gui/message.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui/message.cpp') diff --git a/gui/message.cpp b/gui/message.cpp index 114d4f38c5..a2de81d1e3 100644 --- a/gui/message.cpp +++ b/gui/message.cpp @@ -96,7 +96,7 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB } if (defaultButton) - addButton(this, okButtonPos, _h - buttonHeight - 8, defaultButton, kOkCmd, '\n'); // Confirm dialog + addButton(this, okButtonPos, _h - buttonHeight - 8, defaultButton, kOkCmd, '\r'); // Confirm dialog if (altButton) addButton(this, cancelButtonPos, _h - buttonHeight - 8, altButton, kCancelCmd, '\27'); // Cancel dialog -- cgit v1.2.3 From d21b8c43d05b99ac5ad6b340fabbe2a52b49e533 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 22 Jun 2007 21:38:34 +0000 Subject: Converted some more code to make use of Common::KEYCODE_ / Common::ASCII_ svn-id: r27628 --- gui/message.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gui/message.cpp') diff --git a/gui/message.cpp b/gui/message.cpp index a2de81d1e3..01e30c26a3 100644 --- a/gui/message.cpp +++ b/gui/message.cpp @@ -96,10 +96,10 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB } if (defaultButton) - addButton(this, okButtonPos, _h - buttonHeight - 8, defaultButton, kOkCmd, '\r'); // Confirm dialog + addButton(this, okButtonPos, _h - buttonHeight - 8, defaultButton, kOkCmd, Common::ASCII_RETURN); // Confirm dialog if (altButton) - addButton(this, cancelButtonPos, _h - buttonHeight - 8, altButton, kCancelCmd, '\27'); // Cancel dialog + addButton(this, cancelButtonPos, _h - buttonHeight - 8, altButton, kCancelCmd, Common::ASCII_ESCAPE); // Cancel dialog } void MessageDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { -- cgit v1.2.3 From 8cfb778bfae1adb575a9e835a7b5211eb8595095 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 22 Jun 2007 21:58:32 +0000 Subject: Adding two missing #includes to fix compilation. *sigh* I am really bad at double checking my commits tonight. Sorry, folks svn-id: r27630 --- gui/message.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'gui/message.cpp') diff --git a/gui/message.cpp b/gui/message.cpp index 01e30c26a3..958d8e3dc8 100644 --- a/gui/message.cpp +++ b/gui/message.cpp @@ -23,6 +23,7 @@ */ #include "common/stdafx.h" +#include "common/events.h" #include "common/str.h" #include "common/system.h" #include "gui/message.h" -- cgit v1.2.3