diff options
Diffstat (limited to 'gui/predictivedialog.cpp')
-rw-r--r-- | gui/predictivedialog.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp index 9557da1206..933667186e 100644 --- a/gui/predictivedialog.cpp +++ b/gui/predictivedialog.cpp @@ -142,6 +142,9 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") { _numMemory = 0; _navigationWithKeys = false; + + _curPressedButton = kNoAct; + _needRefresh = true; } PredictiveDialog::~PredictiveDialog() { @@ -190,7 +193,7 @@ void PredictiveDialog::saveUserDictToFile() { void PredictiveDialog::handleKeyUp(Common::KeyState state) { if (_curPressedButton != kNoAct && !_needRefresh) { - _button[_curPressedButton]->startAnimatePressedState(); + _button[_curPressedButton]->setUnpressedState(); processButton(_curPressedButton); } } @@ -352,7 +355,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 +607,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 *)); |