diff options
Diffstat (limited to 'gui/widget.h')
-rw-r--r-- | gui/widget.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gui/widget.h b/gui/widget.h index 3a544da61d..066252b0ec 100644 --- a/gui/widget.h +++ b/gui/widget.h @@ -108,7 +108,9 @@ public: void clearFlags(int flags) { _flags &= ~flags; } int getFlags() const { return _flags; } - bool isVisible() const { return !(_flags & WIDGET_INVISIBLE); } + void setEnabled(bool e) { if (e) setFlags(WIDGET_ENABLED); else clearFlags(WIDGET_ENABLED); } + bool isEnabled() const { return _flags & WIDGET_ENABLED; } + bool isVisible() const { return !(_flags & WIDGET_INVISIBLE); } protected: virtual void drawWidget(bool hilite) {} |