diff options
author | Eugene Sandulenko | 2007-10-28 12:02:09 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2007-10-28 12:02:09 +0000 |
commit | 4073e7f8f8b3a9af6e302c062362c5004ba8bcba (patch) | |
tree | 2b2c754827cb2506142565d64f4173a694e9d534 | |
parent | 48f7c47013697000ff514a7ee38a6a7039170b77 (diff) | |
download | scummvm-rg350-4073e7f8f8b3a9af6e302c062362c5004ba8bcba.tar.gz scummvm-rg350-4073e7f8f8b3a9af6e302c062362c5004ba8bcba.tar.bz2 scummvm-rg350-4073e7f8f8b3a9af6e302c062362c5004ba8bcba.zip |
Proper implementation of ".enabled" theme widget property.
svn-id: r29282
-rw-r--r-- | gui/widget.cpp | 6 | ||||
-rw-r--r-- | gui/widget.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gui/widget.cpp b/gui/widget.cpp index ebac5d6baf..62d8f8eef5 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -133,6 +133,12 @@ Widget *Widget::findWidgetInChain(Widget *w, const char *name) { } return 0; } +bool Widget::isEnabled() const { + if (g_gui.evaluator()->getVar(_name + ".enabled") == 0) { + return false; + } + return _flags & WIDGET_ENABLED; +} bool Widget::isVisible() const { if (g_gui.evaluator()->getVar(_name + ".visible") == 0) diff --git a/gui/widget.h b/gui/widget.h index c19059d32c..1381bbfb4b 100644 --- a/gui/widget.h +++ b/gui/widget.h @@ -148,7 +148,7 @@ public: int getHints() const { return _hints; } void setEnabled(bool e) { if (e) setFlags(WIDGET_ENABLED); else clearFlags(WIDGET_ENABLED); } - bool isEnabled() const { return _flags & WIDGET_ENABLED; } + bool isEnabled() const; bool isVisible() const; protected: |