diff options
Diffstat (limited to 'engines/mutationofjb/widgets/widget.h')
-rw-r--r-- | engines/mutationofjb/widgets/widget.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/engines/mutationofjb/widgets/widget.h b/engines/mutationofjb/widgets/widget.h index 86c912a555..108d86c92f 100644 --- a/engines/mutationofjb/widgets/widget.h +++ b/engines/mutationofjb/widgets/widget.h @@ -40,7 +40,12 @@ class GuiScreen; class Widget { public: - Widget(GuiScreen &gui, const Common::Rect &area) : _gui(gui), _area(area), _id(0), _visible(true), _dirty(true) {} + enum { + DIRTY_NONE = 0, + DIRTY_ALL = 0xFFFFFFFF + }; + + Widget(GuiScreen &gui, const Common::Rect &area) : _gui(gui), _area(area), _id(0), _visible(true), _enabled(true), _dirtyBits(DIRTY_NONE) {} virtual ~Widget() {} int getId() const; @@ -49,8 +54,14 @@ public: bool isVisible() const; void setVisible(bool visible); + bool isEnabled() const; + void setEnabled(bool enabled); + + Common::Rect getArea() const; + void setArea(const Common::Rect &area); + bool isDirty() const; - void markDirty(); + void markDirty(uint32 dirtyBits = DIRTY_ALL); void update(Graphics::ManagedSurface &); virtual void handleEvent(const Common::Event &) {} @@ -61,7 +72,8 @@ protected: Common::Rect _area; int _id; bool _visible; - bool _dirty; + bool _enabled; + uint32 _dirtyBits; }; } |