aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBorja Lorente2016-06-12 23:23:10 +0200
committerBorja Lorente2016-08-14 18:23:37 +0200
commitd43523010b71b24dd29dafae3f965695e9d920d7 (patch)
tree26283bda3e83fbbcaf089fbc249112563a00af55
parent5368aa979bca198c9337410cd5908c151052f2b6 (diff)
downloadscummvm-rg350-d43523010b71b24dd29dafae3f965695e9d920d7.tar.gz
scummvm-rg350-d43523010b71b24dd29dafae3f965695e9d920d7.tar.bz2
scummvm-rg350-d43523010b71b24dd29dafae3f965695e9d920d7.zip
MACVENTURE: Add callbacks for all windows
-rw-r--r--engines/macventure/gui.cpp37
-rw-r--r--engines/macventure/gui.h7
2 files changed, 39 insertions, 5 deletions
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp
index 7b6c7e3486..3a19d6c2fd 100644
--- a/engines/macventure/gui.cpp
+++ b/engines/macventure/gui.cpp
@@ -429,6 +429,7 @@ void Gui::drawCommandsWindow() {
bool controlsWindowCallback(Graphics::WindowClick click, Common::Event &event, void *gui) {
Gui *g = (Gui*)gui;
+
return g->processCommandEvents(click, event);
}
@@ -436,29 +437,31 @@ bool controlsWindowCallback(Graphics::WindowClick click, Common::Event &event, v
bool mainGameWindowCallback(Graphics::WindowClick click, Common::Event &event, void *gui) {
Gui *g = (Gui*)gui;
- return true;
+ return g->processMainGameEvents(click, event);
}
bool outConsoleWindowCallback(Graphics::WindowClick click, Common::Event &event, void *gui) {
- return true;
+ Gui *g = (Gui*)gui;
+
+ return g->processOutConsoleEvents(click, event);
}
bool selfWindowCallback(Graphics::WindowClick click, Common::Event &event, void *gui) {
Gui *g = (Gui*)gui;
- return true;
+ return g->processSelfEvents(click, event);
}
bool exitsWindowCallback(Graphics::WindowClick click, Common::Event &event, void *gui) {
Gui *g = (Gui*)gui;
- return true;
+ return g->processExitsEvents(click, event);
}
bool diplomaWindowCallback(Graphics::WindowClick click, Common::Event &event, void *gui) {
Gui *g = (Gui*)gui;
- return true;
+ return g->processDiplomaEvents(click, event);
}
bool inventoryWindowCallback(Graphics::WindowClick click, Common::Event &event, void *gui) {
@@ -544,6 +547,30 @@ bool Gui::processCommandEvents(WindowClick click, Common::Event &event) {
return false;
}
+bool MacVenture::Gui::processMainGameEvents(WindowClick click, Common::Event & event) {
+ debug(6, "Processing event in Main Game Window");
+ return getWindowData(kMainGameWindow).visible;
+}
+bool MacVenture::Gui::processOutConsoleEvents(WindowClick click, Common::Event & event) {
+ debug(6, "Processing event in Out Console Window");
+ return getWindowData(kOutConsoleWindow).visible;
+}
+
+bool MacVenture::Gui::processSelfEvents(WindowClick click, Common::Event & event) {
+ debug(6, "Processing event in Self Window");
+ return getWindowData(kSelfWindow).visible;
+}
+
+bool MacVenture::Gui::processExitsEvents(WindowClick click, Common::Event & event) {
+ debug(6, "Processing event in Exits Window");
+ return getWindowData(kExitsWindow).visible;
+}
+
+bool MacVenture::Gui::processDiplomaEvents(WindowClick click, Common::Event & event) {
+ debug(6, "Processing event in Diploma Window");
+ return getWindowData(kDiplomaWindow).visible;
+}
+
/* Ugly switches */
uint16 Gui::borderThickness(MVWindowType type) {
diff --git a/engines/macventure/gui.h b/engines/macventure/gui.h
index 7ffe199344..a1c31eeb76 100644
--- a/engines/macventure/gui.h
+++ b/engines/macventure/gui.h
@@ -123,7 +123,14 @@ public:
void draw();
bool processEvent(Common::Event &event);
void handleMenuAction(MenuAction action);
+
+ // Event processors
bool processCommandEvents(WindowClick click, Common::Event &event);
+ bool processMainGameEvents(WindowClick click, Common::Event &event);
+ bool processOutConsoleEvents(WindowClick click, Common::Event &event);
+ bool processSelfEvents(WindowClick click, Common::Event &event);
+ bool processExitsEvents(WindowClick click, Common::Event &event);
+ bool processDiplomaEvents(WindowClick click, Common::Event &event);
const WindowData& getWindowData(WindowReference reference);