aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorNicolas Bacca2005-01-10 20:53:16 +0000
committerNicolas Bacca2005-01-10 20:53:16 +0000
commitbe6a9e647d96efe1ee73d38feb885abd51952d37 (patch)
tree03d41ae6834bca3a2635d200be9f8cb4df0627f5 /gui
parenta6d6ec4a7768ea5de4c8bc572ba4b3bda753a5a1 (diff)
downloadscummvm-rg350-be6a9e647d96efe1ee73d38feb885abd51952d37.tar.gz
scummvm-rg350-be6a9e647d96efe1ee73d38feb885abd51952d37.tar.bz2
scummvm-rg350-be6a9e647d96efe1ee73d38feb885abd51952d37.zip
Add keys mapping option to the main option dialog for WinCE - useful for Smartphones and non Scumm games
svn-id: r16524
Diffstat (limited to 'gui')
-rw-r--r--gui/options.cpp18
-rw-r--r--gui/options.h7
2 files changed, 25 insertions, 0 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index b3bd63f5c6..58afa3e37b 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -397,6 +397,11 @@ GlobalOptionsDialog::GlobalOptionsDialog(GameDetector &detector)
yoffset += 18;
#endif
+#ifdef _WIN32_WCE
+ new ButtonWidget(tab, 5, yoffset, kButtonWidth + 14, 16, "Keys", kChooseKeyMappingCmd, 0);
+ yoffset += 18;
+#endif
+
// TODO: joystick setting
@@ -409,10 +414,18 @@ GlobalOptionsDialog::GlobalOptionsDialog(GameDetector &detector)
// Create file browser dialog
_browser = new BrowserDialog("Select directory for savegames");
+
+#ifdef _WIN32_WCE
+ _keysDialog = new CEKeysDialog();
+#endif
}
GlobalOptionsDialog::~GlobalOptionsDialog() {
delete _browser;
+
+#ifdef _WIN32_WCE
+ delete _keysDialog;
+#endif
}
void GlobalOptionsDialog::open() {
@@ -469,6 +482,11 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
_extraPath->setLabel(dir.path());
}
break;
+#ifdef _WIN32_WCE
+ case kChooseKeyMappingCmd:
+ _keysDialog->runModal();
+ break;
+#endif
default:
OptionsDialog::handleCommand(sender, cmd, data);
}
diff --git a/gui/options.h b/gui/options.h
index c5a88b477d..5b2e34ccea 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -24,6 +24,10 @@
#include "gui/dialog.h"
#include "common/str.h"
+#ifdef _WIN32_WCE
+#include "backends/wince/CEKeysDialog.h"
+#endif
+
class GameDetector;
namespace GUI {
@@ -105,6 +109,9 @@ public:
protected:
BrowserDialog *_browser;
+#ifdef _WIN32_WCE
+ CEKeysDialog *_keysDialog;
+#endif
StaticTextWidget *_savePath;
StaticTextWidget *_extraPath;
};