aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Bacca2004-01-17 23:40:36 +0000
committerNicolas Bacca2004-01-17 23:40:36 +0000
commit76298a9cec9d8c3eba02afee32b22c2a67861a2b (patch)
tree9370fa41d401b7d50a6d049ed3947a9f6efce5d3
parenta2c0980aab5d3495ab7089f2d71501177aa452d4 (diff)
downloadscummvm-rg350-76298a9cec9d8c3eba02afee32b22c2a67861a2b.tar.gz
scummvm-rg350-76298a9cec9d8c3eba02afee32b22c2a67861a2b.tar.bz2
scummvm-rg350-76298a9cec9d8c3eba02afee32b22c2a67861a2b.zip
Implements TOGGLE_VIRTUAL_KEYBOARD
svn-id: r12459
-rw-r--r--common/debugger.cpp16
-rw-r--r--scumm/dialogs.cpp14
-rw-r--r--simon/items.cpp45
-rw-r--r--sky/control.cpp21
4 files changed, 37 insertions, 59 deletions
diff --git a/common/debugger.cpp b/common/debugger.cpp
index 254296103b..03fd28688d 100644
--- a/common/debugger.cpp
+++ b/common/debugger.cpp
@@ -26,10 +26,6 @@
#include "gui/console.h"
#endif
-#ifdef _WIN32_WCE
-extern void force_keyboard(bool);
-#endif
-
namespace Common {
template <class T>
@@ -71,9 +67,9 @@ int Debugger<T>::DebugPrintf(const char *format, ...) {
template <class T>
void Debugger<T>::attach(const char *entry) {
-#ifdef _WIN32_WCE
- force_keyboard(true);
-#endif
+ OSystem::Property prop;
+ prop.show_keyboard = true;
+ g_system->property(OSystem::PROP_TOGGLE_VIRTUAL_KEYBOARD, &prop);
if (entry) {
_errStr = strdup(entry);
@@ -86,9 +82,9 @@ void Debugger<T>::attach(const char *entry) {
template <class T>
void Debugger<T>::detach() {
-#ifdef _WIN32_WCE
- force_keyboard(false);
-#endif
+ OSystem::Property prop;
+ prop.show_keyboard = false;
+ g_system->property(OSystem::PROP_TOGGLE_VIRTUAL_KEYBOARD, &prop);
_detach_now = false;
_isAttached = false;
diff --git a/scumm/dialogs.cpp b/scumm/dialogs.cpp
index bfbc5ef578..b06f14cdb3 100644
--- a/scumm/dialogs.cpp
+++ b/scumm/dialogs.cpp
@@ -42,7 +42,6 @@
#ifdef _WIN32_WCE
#include "gapi_keys.h"
extern bool _get_key_mapping;
-extern void force_keyboard(bool);
extern void save_key_mapping();
extern void load_key_mapping();
#endif
@@ -325,9 +324,9 @@ MainMenuDialog::~MainMenuDialog() {
}
void MainMenuDialog::open() {
-#ifdef _WIN32_WCE
- force_keyboard(true);
-#endif
+ OSystem::Property prop;
+ prop.show_keyboard = true;
+ g_system->property(OSystem::PROP_TOGGLE_VIRTUAL_KEYBOARD, &prop);
ScummDialog::open();
}
@@ -364,11 +363,12 @@ void MainMenuDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
}
void MainMenuDialog::close() {
+ OSystem::Property prop;
+
ScummDialog::close();
-#ifdef _WIN32_WCE
- force_keyboard(false);
-#endif
+ prop.show_keyboard = false;
+ g_system->property(OSystem::PROP_TOGGLE_VIRTUAL_KEYBOARD, &prop);
}
void MainMenuDialog::save() {
diff --git a/simon/items.cpp b/simon/items.cpp
index 1916b84e22..e3ed750e24 100644
--- a/simon/items.cpp
+++ b/simon/items.cpp
@@ -26,12 +26,6 @@
#include "simon/simon.h"
#include "simon/intern.h"
-#ifdef _WIN32_WCE
-
-extern void force_keyboard(bool);
-
-#endif
-
namespace Simon {
int SimonEngine::runScript() {
@@ -737,28 +731,22 @@ int SimonEngine::runScript() {
break;
case 132:{ /* save game */
-#ifdef _WIN32_WCE
- force_keyboard(true);
-#endif
-
+ OSystem::Property prop;
+ prop.show_keyboard = true;
+ _system->property(OSystem::PROP_TOGGLE_VIRTUAL_KEYBOARD, &prop);
o_save_game();
-
-#ifdef _WIN32_WCE
- force_keyboard(false);
-#endif
+ prop.show_keyboard = false;
+ _system->property(OSystem::PROP_TOGGLE_VIRTUAL_KEYBOARD, &prop);
}
break;
case 133:{ /* load game */
-#ifdef _WIN32_WCE
- force_keyboard(true);
-#endif
-
+ OSystem::Property prop;
+ prop.show_keyboard = true;
+ _system->property(OSystem::PROP_TOGGLE_VIRTUAL_KEYBOARD, &prop);
o_load_game();
-
-#ifdef _WIN32_WCE
- force_keyboard(false);
-#endif
+ prop.show_keyboard = false;
+ _system->property(OSystem::PROP_TOGGLE_VIRTUAL_KEYBOARD, &prop);
}
break;
@@ -769,15 +757,12 @@ int SimonEngine::runScript() {
break;
case 135:{ /* quit if user presses y */
-#ifdef _WIN32_WCE
- force_keyboard(true);
-#endif
-
+ OSystem::Property prop;
+ prop.show_keyboard = true;
+ _system->property(OSystem::PROP_TOGGLE_VIRTUAL_KEYBOARD, &prop);
o_quit_if_user_presses_y();
-
-#ifdef _WIN32_WCE
- force_keyboard(false);
-#endif
+ prop.show_keyboard = false;
+ _system->property(OSystem::PROP_TOGGLE_VIRTUAL_KEYBOARD, &prop);
}
break;
diff --git a/sky/control.cpp b/sky/control.cpp
index c5a3635248..942c19a649 100644
--- a/sky/control.cpp
+++ b/sky/control.cpp
@@ -35,10 +35,6 @@
#include "sky/struc.h"
#include "sky/text.h"
-#ifdef _WIN32_WCE
-extern void force_keyboard(bool);
-#endif
-
namespace Sky {
@@ -807,11 +803,11 @@ uint16 Control::saveRestorePanel(bool allowSave) {
uint16 cnt;
uint8 lookListLen;
if (allowSave) {
+ OSystem::Property prop;
lookList = _savePanLookList;
lookListLen = 6;
-#ifdef _WIN32_WCE
- force_keyboard(true);
-#endif
+ prop.show_keyboard = true;
+ _system->property(OSystem::PROP_TOGGLE_VIRTUAL_KEYBOARD, &prop);
} else {
lookList = _restorePanLookList;
if (autoSaveExists())
@@ -918,11 +914,12 @@ uint16 Control::saveRestorePanel(bool allowSave) {
free(saveGameTexts);
-#ifdef _WIN32_WCE
- if (allowSave)
- force_keyboard(false);
-#endif
-
+ if (allowSave) {
+ OSystem::Property prop;
+ prop.show_keyboard = false;
+ _system->property(OSystem::PROP_TOGGLE_VIRTUAL_KEYBOARD, &prop);
+ }
+
return clickRes;
}