GUI: Remove 'sticky button' feature

This feature made pressed buttons wait a few moments before returning to
an unpressed state. It was half-implemented, and caused several visual
bugs. Fixes #7083.
This commit is contained in:
Ori Avtalion 2016-04-13 15:02:33 +03:00
parent 5e49800901
commit e30a94e6ff
4 changed files with 5 additions and 46 deletions

View file

@ -190,7 +190,7 @@ void PredictiveDialog::saveUserDictToFile() {
void PredictiveDialog::handleKeyUp(Common::KeyState state) {
if (_curPressedButton != kNoAct && !_needRefresh) {
_button[_curPressedButton]->startAnimatePressedState();
_button[_curPressedButton]->setUnpressedState();
processButton(_curPressedButton);
}
}
@ -352,7 +352,7 @@ void PredictiveDialog::handleKeyDown(Common::KeyState state) {
}
if (_lastButton != _curPressedButton)
_button[_lastButton]->stopAnimatePressedState();
_button[_lastButton]->setUnpressedState();
if (_curPressedButton != kNoAct && !_needRefresh)
_button[_curPressedButton]->setPressedState();
@ -604,18 +604,6 @@ void PredictiveDialog::processButton(ButtonId button) {
}
}
void PredictiveDialog::handleTickle() {
if (_lastTime) {
if ((_curTime - _lastTime) > kRepeatDelay) {
_lastTime = 0;
}
}
if (getTickleWidget()) {
getTickleWidget()->handleTickle();
}
}
void PredictiveDialog::mergeDicts() {
_unitedDict.dictLineCount = _predictiveDict.dictLineCount + _userDict.dictLineCount;
_unitedDict.dictLine = (char **)calloc(_unitedDict.dictLineCount, sizeof(char *));