aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMarcus Comstedt2005-10-15 15:46:12 +0000
committerMarcus Comstedt2005-10-15 15:46:12 +0000
commitee1553995291e645b846aec1b301a7130527c2a2 (patch)
treecef289969b1b16a3286fc152d52779943bfa832c /gui
parent1ee05972af8dd0d14bb6eedb713ce9b6adf5a1c4 (diff)
downloadscummvm-rg350-ee1553995291e645b846aec1b301a7130527c2a2.tar.gz
scummvm-rg350-ee1553995291e645b846aec1b301a7130527c2a2.tar.bz2
scummvm-rg350-ee1553995291e645b846aec1b301a7130527c2a2.zip
Try do display the virtual keyboard only when a string input widget has focus.
svn-id: r19102
Diffstat (limited to 'gui')
-rw-r--r--gui/ListWidget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp
index bb785e8212..801df816c3 100644
--- a/gui/ListWidget.cpp
+++ b/gui/ListWidget.cpp
@@ -19,6 +19,7 @@
*/
#include "common/stdafx.h"
+#include "common/system.h"
#include "gui/ListWidget.h"
#include "gui/ScrollBarWidget.h"
#include "gui/dialog.h"
@@ -85,6 +86,7 @@ void ListWidget::setList(const StringList &list) {
_currentPos = 0;
_selectedItem = -1;
_editMode = false;
+ g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
scrollBarRecalc();
}
@@ -278,6 +280,7 @@ bool ListWidget::handleKeyUp(uint16 ascii, int keycode, int modifiers) {
void ListWidget::lostFocusWidget() {
// If we loose focus, we simply forget the user changes
_editMode = false;
+ g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
drawCaret(true);
draw();
}
@@ -381,6 +384,7 @@ void ListWidget::startEditMode() {
_editMode = true;
setEditString(_list[_selectedItem]);
draw();
+ g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
}
}
@@ -390,6 +394,7 @@ void ListWidget::endEditMode() {
// send a message that editing finished with a return/enter key press
_editMode = false;
_list[_selectedItem] = _editString;
+ g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
sendCommand(kListItemActivatedCmd, _selectedItem);
}
@@ -399,6 +404,7 @@ void ListWidget::abortEditMode() {
_editMode = false;
//drawCaret(true);
//draw();
+ g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
}
} // End of namespace GUI