[Scummvm-git-logs] scummvm master -> 345520b8cb22b43a278520b84abca3da4b6349ee
sev-
sev at scummvm.org
Sat Mar 28 11:34:04 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
345520b8cb GUI: improve predictive dialog in agi
Commit: 345520b8cb22b43a278520b84abca3da4b6349ee
https://github.com/scummvm/scummvm/commit/345520b8cb22b43a278520b84abca3da4b6349ee
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-03-28T12:34:00+01:00
Commit Message:
GUI: improve predictive dialog in agi
Changed paths:
gui/predictivedialog.cpp
gui/predictivedialog.h
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp
index 17c473073c..73abd5a2c1 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -145,6 +145,8 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
_curPressedButton = kNoAct;
_needRefresh = true;
+ _isPressed = false;
+
}
PredictiveDialog::~PredictiveDialog() {
@@ -196,9 +198,16 @@ void PredictiveDialog::handleKeyUp(Common::KeyState state) {
_button[_curPressedButton]->setUnpressedState();
processButton(_curPressedButton);
}
+
+ _isPressed = false;
}
void PredictiveDialog::handleKeyDown(Common::KeyState state) {
+ if (_isPressed) {
+ return;
+ }
+
+ _isPressed = true;
_curPressedButton = kNoAct;
_needRefresh = false;
diff --git a/gui/predictivedialog.h b/gui/predictivedialog.h
index 1fdc845be7..cec702f760 100644
--- a/gui/predictivedialog.h
+++ b/gui/predictivedialog.h
@@ -143,6 +143,8 @@ private:
bool _navigationWithKeys;
bool _needRefresh;
+ bool _isPressed;
+
private:
EditTextWidget *_editText;
ButtonWidget *_button[kButtonCount];
More information about the Scummvm-git-logs
mailing list