aboutsummaryrefslogtreecommitdiff
path: root/engines/mutationofjb/widgets/widget.cpp
diff options
context:
space:
mode:
authorĽubomír Remák2018-04-11 21:15:01 +0200
committerEugene Sandulenko2018-08-25 23:12:01 +0200
commitc25ed8957228cfd580216383c3391ccc7e512bb5 (patch)
treefff52e7d5e588719ced3b164b6ea48c9779236af /engines/mutationofjb/widgets/widget.cpp
parent9af3d8a2381fe7c7440330a9aa338f51cd734990 (diff)
downloadscummvm-rg350-c25ed8957228cfd580216383c3391ccc7e512bb5.tar.gz
scummvm-rg350-c25ed8957228cfd580216383c3391ccc7e512bb5.tar.bz2
scummvm-rg350-c25ed8957228cfd580216383c3391ccc7e512bb5.zip
MUTATIONOFJB: Refactor inventory UI into separate widget, add button widgets.
Diffstat (limited to 'engines/mutationofjb/widgets/widget.cpp')
-rw-r--r--engines/mutationofjb/widgets/widget.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/engines/mutationofjb/widgets/widget.cpp b/engines/mutationofjb/widgets/widget.cpp
new file mode 100644
index 0000000000..fea7f6fbe0
--- /dev/null
+++ b/engines/mutationofjb/widgets/widget.cpp
@@ -0,0 +1,50 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "mutationofjb/widgets/widget.h"
+
+namespace MutationOfJB {
+
+int Widget::getId() const {
+ return _id;
+}
+
+void Widget::setId(int id) {
+ _id = id;
+}
+
+void Widget::markDirty() {
+ _dirty = true;
+}
+
+bool Widget::isDirty() const {
+ return _dirty;
+}
+
+void Widget::update(Graphics::ManagedSurface &surface) {
+ if (_dirty) {
+ _draw(surface);
+ _dirty = false;
+ }
+}
+
+}