diff options
-rw-r--r-- | gui/widgets/editable.cpp | 5 | ||||
-rw-r--r-- | gui/widgets/edittext.cpp | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp index af3e5e9b9a..2d929113b1 100644 --- a/gui/widgets/editable.cpp +++ b/gui/widgets/editable.cpp @@ -79,7 +79,7 @@ bool EditableWidget::tryInsertChar(byte c, int pos) { void EditableWidget::handleTickle() { uint32 time = g_system->getMillis(); - if (_caretTime < time) { + if (_caretTime < time && isEnabled()) { _caretTime = time + kCaretBlinkTime; drawCaret(_caretVisible); } @@ -90,6 +90,9 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) { bool dirty = false; bool forcecaret = false; + if (!isEnabled()) + return false; + // First remove caret if (_caretVisible) drawCaret(true); diff --git a/gui/widgets/edittext.cpp b/gui/widgets/edittext.cpp index 550b1bd153..1481bebae3 100644 --- a/gui/widgets/edittext.cpp +++ b/gui/widgets/edittext.cpp @@ -62,6 +62,9 @@ void EditTextWidget::reflowLayout() { void EditTextWidget::handleMouseDown(int x, int y, int button, int clickCount) { + if (!isEnabled()) + return; + // First remove caret if (_caretVisible) drawCaret(true); |