diff options
author | Ľubomír Remák | 2018-04-14 23:04:20 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-25 23:12:01 +0200 |
commit | 61c106b3307ee2f8aaa579dbc5d7c8f8e62ae41a (patch) | |
tree | 90eddbbbc6be77b6e45fb52135c88cab40648ab1 /engines/mutationofjb/widgets/widget.cpp | |
parent | 5290d9a74b2f704675cf5ae69bcf892b5afd274f (diff) | |
download | scummvm-rg350-61c106b3307ee2f8aaa579dbc5d7c8f8e62ae41a.tar.gz scummvm-rg350-61c106b3307ee2f8aaa579dbc5d7c8f8e62ae41a.tar.bz2 scummvm-rg350-61c106b3307ee2f8aaa579dbc5d7c8f8e62ae41a.zip |
MUTATIONOFJB: Add font support and conversation widget.
Diffstat (limited to 'engines/mutationofjb/widgets/widget.cpp')
-rw-r--r-- | engines/mutationofjb/widgets/widget.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/mutationofjb/widgets/widget.cpp b/engines/mutationofjb/widgets/widget.cpp index fea7f6fbe0..5503f625cd 100644 --- a/engines/mutationofjb/widgets/widget.cpp +++ b/engines/mutationofjb/widgets/widget.cpp @@ -32,6 +32,17 @@ void Widget::setId(int id) { _id = id; } +bool Widget::isVisible() const { + return _visible; +} + +void Widget::setVisible(bool visible) { + if (!_visible && visible) { + markDirty(); + } + _visible = visible; +} + void Widget::markDirty() { _dirty = true; } @@ -42,7 +53,9 @@ bool Widget::isDirty() const { void Widget::update(Graphics::ManagedSurface &surface) { if (_dirty) { - _draw(surface); + if (_visible) { + _draw(surface); + } _dirty = false; } } |