mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
use the virtual keyboard facilities if available, when needed
svn-id: r29882
This commit is contained in:
parent
4a3dedfe7e
commit
e861cf567d
@ -956,6 +956,7 @@ void Game::handleBootParam(int value) {
|
||||
}
|
||||
|
||||
bool Game::getYN() {
|
||||
OSystem &system = *g_system;
|
||||
Mouse &mouse = Mouse::getReference();
|
||||
Events &events = Events::getReference();
|
||||
Screen &screen = Screen::getReference();
|
||||
@ -967,7 +968,12 @@ bool Game::getYN() {
|
||||
else if ((l == DE_DEU) || (l == NL_NLD)) y = Common::KEYCODE_j;
|
||||
else if ((l == ES_ESP) || (l == IT_ITA)) y = Common::KEYCODE_s;
|
||||
|
||||
mouse.cursorOff();
|
||||
bool vKbdFlag = g_system->hasFeature(OSystem::kFeatureVirtualKeyboard);
|
||||
if (!vKbdFlag)
|
||||
mouse.cursorOff();
|
||||
else
|
||||
g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
|
||||
|
||||
Surface *s = Surface::newDialog(190, res.stringList().getString(S_CONFIRM_YN));
|
||||
s->centerOnScreen();
|
||||
delete s;
|
||||
@ -999,7 +1005,10 @@ bool Game::getYN() {
|
||||
} while (!events.quitFlag && !breakFlag);
|
||||
|
||||
screen.update();
|
||||
mouse.cursorOn();
|
||||
if (!vKbdFlag)
|
||||
mouse.cursorOn();
|
||||
else
|
||||
g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -424,6 +424,9 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool
|
||||
bool vKbdFlag = g_system->hasFeature(OSystem::kFeatureVirtualKeyboard);
|
||||
if (!vKbdFlag)
|
||||
mouse.cursorOff();
|
||||
else
|
||||
g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
|
||||
|
||||
|
||||
// Insert a cursor character at the end of the string
|
||||
newLine.insertChar('_', newLine.size());
|
||||
@ -489,6 +492,8 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool
|
||||
|
||||
if (!vKbdFlag)
|
||||
mouse.cursorOn();
|
||||
else
|
||||
g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user