diff options
author | Stephen Kennedy | 2008-08-15 19:41:34 +0000 |
---|---|---|
committer | Stephen Kennedy | 2008-08-15 19:41:34 +0000 |
commit | 93780d51cabca187a6dc5f7c406635ce06cf799b (patch) | |
tree | 0389f3a3c057ce1f54bbdcf9168e2182cf1fd027 /backends | |
parent | 6ef83243029b1dc61746f736f9af24f3ea8c90f1 (diff) | |
download | scummvm-rg350-93780d51cabca187a6dc5f7c406635ce06cf799b.tar.gz scummvm-rg350-93780d51cabca187a6dc5f7c406635ce06cf799b.tar.bz2 scummvm-rg350-93780d51cabca187a6dc5f7c406635ce06cf799b.zip |
Added clear event to virtual keyboard
svn-id: r33913
Diffstat (limited to 'backends')
-rw-r--r-- | backends/vkeybd/virtual-keyboard-parser.cpp | 7 | ||||
-rw-r--r-- | backends/vkeybd/virtual-keyboard.cpp | 4 | ||||
-rw-r--r-- | backends/vkeybd/virtual-keyboard.h | 6 |
3 files changed, 7 insertions, 10 deletions
diff --git a/backends/vkeybd/virtual-keyboard-parser.cpp b/backends/vkeybd/virtual-keyboard-parser.cpp index b35dac277f..971b0c2bd7 100644 --- a/backends/vkeybd/virtual-keyboard-parser.cpp +++ b/backends/vkeybd/virtual-keyboard-parser.cpp @@ -270,19 +270,16 @@ bool VirtualKeyboardParser::parserCallback_Event() { evt->data = str; } else if (type == "submit") { evt->type = VirtualKeyboard::kEventSubmit; - evt->data = 0; } else if (type == "cancel") { evt->type = VirtualKeyboard::kEventCancel; - evt->data = 0; + } else if (type == "clear") { + evt->type = VirtualKeyboard::kEventClear; } else if (type == "delete") { evt->type = VirtualKeyboard::kEventDelete; - evt->data = 0; } else if (type == "move_left") { evt->type = VirtualKeyboard::kEventMoveLeft; - evt->data = 0; } else if (type == "move_right") { evt->type = VirtualKeyboard::kEventMoveRight; - evt->data = 0; } else { delete evt; return parserError("Event type '%s' not known", type.c_str()); diff --git a/backends/vkeybd/virtual-keyboard.cpp b/backends/vkeybd/virtual-keyboard.cpp index f0c565acc3..6c901faf03 100644 --- a/backends/vkeybd/virtual-keyboard.cpp +++ b/backends/vkeybd/virtual-keyboard.cpp @@ -154,6 +154,9 @@ void VirtualKeyboard::processAreaClick(const Common::String& area) { case kEventCancel: close(false); break; + case kEventClear: + _keyQueue.clear(); + break; case kEventDelete: _keyQueue.deleteKey(); break; @@ -343,6 +346,7 @@ void VirtualKeyboard::KeyPressQueue::clear() { _keysStr.clear(); _strPos = 0; _flags = 0; + _strChanged = true; } bool VirtualKeyboard::KeyPressQueue::empty() diff --git a/backends/vkeybd/virtual-keyboard.h b/backends/vkeybd/virtual-keyboard.h index b7034270e8..f5e9a76642 100644 --- a/backends/vkeybd/virtual-keyboard.h +++ b/backends/vkeybd/virtual-keyboard.h @@ -49,6 +49,7 @@ protected: kEventSwitchMode, kEventSubmit, kEventCancel, + kEventClear, kEventDelete, kEventMoveLeft, kEventMoveRight @@ -161,11 +162,6 @@ public: void close(bool submit); /** - * Hides the keyboard, submiting any key presses to the event manager - */ - void submit(); - - /** * Returns true if the keyboard is currently being shown */ bool isDisplaying(); |