diff options
author | Ľubomír Remák | 2018-10-28 13:08:41 +0100 |
---|---|---|
committer | Ľubomír Remák | 2018-10-28 13:08:41 +0100 |
commit | d5568906739da23154cacd17aca93802901a9baf (patch) | |
tree | 56e9a8060f2c513aade94d18078c1d572c25a31b /engines/mutationofjb/widgets/widget.cpp | |
parent | 0cf567de28fbdc0ee3c4aedf2c6da94c5b8ca129 (diff) | |
download | scummvm-rg350-d5568906739da23154cacd17aca93802901a9baf.tar.gz scummvm-rg350-d5568906739da23154cacd17aca93802901a9baf.tar.bz2 scummvm-rg350-d5568906739da23154cacd17aca93802901a9baf.zip |
MUTATIONOFJB: Add support for combining items.
Introduce game screen and game widget.
Add status bar to show currently hovered and picked items.
Load hardcoded strings from game executable.
Diffstat (limited to 'engines/mutationofjb/widgets/widget.cpp')
-rw-r--r-- | engines/mutationofjb/widgets/widget.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/engines/mutationofjb/widgets/widget.cpp b/engines/mutationofjb/widgets/widget.cpp index b0302110ea..1b09fe08c3 100644 --- a/engines/mutationofjb/widgets/widget.cpp +++ b/engines/mutationofjb/widgets/widget.cpp @@ -43,20 +43,36 @@ void Widget::setVisible(bool visible) { _visible = visible; } -void Widget::markDirty() { - _dirty = true; +bool Widget::isEnabled() const { + return _enabled; +} + +void Widget::setEnabled(bool enabled) { + _enabled = enabled; +} + +Common::Rect Widget::getArea() const { + return _area; +} + +void Widget::setArea(const Common::Rect &area) { + _area = area; +} + +void Widget::markDirty(uint32 dirtyBits) { + _dirtyBits = dirtyBits; } bool Widget::isDirty() const { - return _dirty; + return _dirtyBits != DIRTY_NONE; } void Widget::update(Graphics::ManagedSurface &surface) { - if (_dirty) { + if (isDirty()) { if (_visible) { draw(surface); } - _dirty = false; + _dirtyBits = DIRTY_NONE; } } |