SUPERNOVA: Adds indicator for key presses

This commit is contained in:
Joseph-Eugene Winzer 2017-08-04 10:48:47 +02:00 committed by Thierry Crozat
parent 0fdb3d8d10
commit 30e138dcfa
3 changed files with 5 additions and 1 deletions

View File

@ -295,6 +295,7 @@ void GameManager::resetInputState() {
_processInput = false;
_mouseClicked = false;
_key = 0;
_keyPressed = false;
_mouseClickType = Common::EVENT_MOUSEMOVE;
processInput();
@ -543,7 +544,7 @@ void GameManager::mouseInput2() {
while (true) {
_vm->updateEvents();
// TODO: handle key input (e.g. alt+x, F-keys?)
if (_mouseClicked || _key) {
if (_mouseClicked || _keyPressed) {
break;
}
g_system->updateScreen();

View File

@ -106,6 +106,7 @@ public:
uint16 _key;
Common::EventType _mouseClickType;
bool _mouseClicked;
bool _keyPressed;
int _mouseX;
int _mouseY;
int _mouseField;

View File

@ -175,6 +175,7 @@ void SupernovaEngine::updateEvents() {
_gm->_currentRoom->animation();
_gm->_mouseClicked = false;
_gm->_keyPressed = false;
while (g_system->getEventManager()->pollEvent(_event)) {
switch (_event.type) {
case Common::EVENT_QUIT:
@ -183,6 +184,7 @@ void SupernovaEngine::updateEvents() {
break;
case Common::EVENT_KEYDOWN:
_gm->_keyPressed = true;
if (_event.kbd.keycode == Common::KEYCODE_d &&
(_event.kbd.flags & Common::KBD_CTRL)) {
_console->attach();