aboutsummaryrefslogtreecommitdiff
path: root/engines/wage/dialog.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2016-01-19 18:41:35 +0100
committerEugene Sandulenko2016-02-14 17:12:48 +0100
commit750e44219f246c404b44170001287b1ffb64ec89 (patch)
treeaf6de776d05454c58f6c72f7692c202f4aed0927 /engines/wage/dialog.cpp
parent876036230246418aa86711d33f485f5c83e769c4 (diff)
downloadscummvm-rg350-750e44219f246c404b44170001287b1ffb64ec89.tar.gz
scummvm-rg350-750e44219f246c404b44170001287b1ffb64ec89.tar.bz2
scummvm-rg350-750e44219f246c404b44170001287b1ffb64ec89.zip
WAGE: Dialog loop
Diffstat (limited to 'engines/wage/dialog.cpp')
-rw-r--r--engines/wage/dialog.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/engines/wage/dialog.cpp b/engines/wage/dialog.cpp
index eb29f80cff..abd4d1b1c4 100644
--- a/engines/wage/dialog.cpp
+++ b/engines/wage/dialog.cpp
@@ -46,6 +46,7 @@
*/
#include "common/system.h"
+#include "common/events.h"
#include "wage/wage.h"
#include "wage/design.h"
@@ -132,4 +133,27 @@ void Dialog::drawOutline(Common::Rect &bounds, int *spec, int speclen) {
1, kColorBlack, _gui->_patterns, kPatternSolid);
}
+void Dialog::run() {
+ bool shouldQuit = false;
+
+ paint();
+
+ while (!shouldQuit) {
+ Common::Event event;
+
+ while (_gui->_engine->_eventMan->pollEvent(event)) {
+ switch (event.type) {
+ case Common::EVENT_QUIT:
+ shouldQuit = true;
+ break;
+ default:
+ break;
+ }
+ }
+
+ g_system->updateScreen();
+ g_system->delayMillis(50);
+ }
+}
+
} // End of namespace Wage