From d92909203b56d9b3fa6c4989bdeb83dbed5b94d5 Mon Sep 17 00:00:00 2001 From: Stephen Kennedy Date: Mon, 18 Aug 2008 10:07:11 +0000 Subject: - proper init of virtual keyboard now implemented (involved added EventManager::init() which is called after screen has been initialised) - changed HardwareKey / Action id field to an array of 4 chars instead of int32. Means that the keymap key/value pairs in config file are more readable. svn-id: r33986 --- backends/vkeybd/virtual-keyboard.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'backends/vkeybd/virtual-keyboard.cpp') diff --git a/backends/vkeybd/virtual-keyboard.cpp b/backends/vkeybd/virtual-keyboard.cpp index 3a66c75091..fbf26b80b5 100644 --- a/backends/vkeybd/virtual-keyboard.cpp +++ b/backends/vkeybd/virtual-keyboard.cpp @@ -44,7 +44,6 @@ VirtualKeyboard::VirtualKeyboard() : _currentMode(0) { _kbdGUI = new VirtualKeyboardGUI(this); _submitKeys = _loaded = false; - printf("\t\"%c\",\n",255); } VirtualKeyboard::~VirtualKeyboard() { @@ -75,6 +74,9 @@ void VirtualKeyboard::reset() { } bool VirtualKeyboard::loadKeyboardPack(Common::String packName) { + + _kbdGUI->initSize(_system->getOverlayWidth(), _system->getOverlayHeight()); + FilesystemNode *vkDir = 0; if (ConfMan.hasKey("vkeybdpath")) { vkDir = new FilesystemNode(ConfMan.get("vkeybdpath")); @@ -138,7 +140,7 @@ bool VirtualKeyboard::checkModeResolutions() { _parser->setParseMode(kParseCheckResolutions); _loaded = _parser->parse(); - _kbdGUI->initMode(_currentMode); + if (_currentMode) _kbdGUI->initMode(_currentMode); return _loaded; } @@ -215,7 +217,7 @@ void VirtualKeyboard::handleMouseUp(int16 x, int16 y) { void VirtualKeyboard::show() { if (_loaded) _kbdGUI->checkScreenChanged(); if (!_loaded) { - warning("Virtual keyboard not loaded!"); + warning("Virtual keyboard not loaded"); return; } -- cgit v1.2.3