aboutsummaryrefslogtreecommitdiff
path: root/engines/mutationofjb/gamescreen.h
diff options
context:
space:
mode:
authorĽubomír Remák2018-09-06 19:38:16 +0200
committerĽubomír Remák2018-09-06 19:38:16 +0200
commitc36fb36afba47f52c1f81f1df61eb31838134cd2 (patch)
treea87bc4e4c7a70542da8b54e1cb4e86373ec199f8 /engines/mutationofjb/gamescreen.h
parentf10816d9ed0b74b478799a96f26ee8f3f42f9ee2 (diff)
downloadscummvm-rg350-c36fb36afba47f52c1f81f1df61eb31838134cd2.tar.gz
scummvm-rg350-c36fb36afba47f52c1f81f1df61eb31838134cd2.tar.bz2
scummvm-rg350-c36fb36afba47f52c1f81f1df61eb31838134cd2.zip
MUTATIONOFJB: Add support for 'look' action on inventory items.
Diffstat (limited to 'engines/mutationofjb/gamescreen.h')
-rw-r--r--engines/mutationofjb/gamescreen.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/engines/mutationofjb/gamescreen.h b/engines/mutationofjb/gamescreen.h
new file mode 100644
index 0000000000..bc70580eda
--- /dev/null
+++ b/engines/mutationofjb/gamescreen.h
@@ -0,0 +1,84 @@
+/* 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.
+ *
+ */
+
+#ifndef MUTATIONOFJB_GUI_H
+#define MUTATIONOFJB_GUI_H
+
+#include "mutationofjb/inventory.h"
+#include "mutationofjb/widgets/buttonwidget.h"
+#include "mutationofjb/widgets/inventorywidget.h"
+#include "mutationofjb/guiscreen.h"
+
+#include "common/array.h"
+#include "common/hashmap.h"
+#include "common/hash-str.h"
+
+#include "graphics/surface.h"
+
+namespace Common {
+struct Event;
+}
+
+namespace Graphics {
+class Screen;
+}
+
+namespace MutationOfJB {
+
+class Game;
+class Widget;
+class InventoryWidget;
+class ConversationWidget;
+
+class GameScreen : public GuiScreen, public InventoryObserver, public ButtonWidgetCallback, public InventoryWidgetCallback {
+public:
+ friend class InventoryAnimationDecoderCallback;
+ friend class HudAnimationDecoderCallback;
+
+ GameScreen(Game &game, Graphics::Screen *screen);
+ ~GameScreen();
+
+ bool init();
+
+ virtual void onInventoryChanged() override;
+ virtual void onButtonClicked(ButtonWidget *) override;
+ virtual void onInventoryItemHovered(InventoryWidget *widget, int posInWidget) override;
+ virtual void onInventoryItemClicked(InventoryWidget *widget, int posInWidget) override;
+
+ ConversationWidget &getConversationWidget();
+
+private:
+ bool loadInventoryGfx();
+ bool loadHudGfx();
+ void drawInventoryItem(const Common::String &item, int pos);
+ void drawInventory();
+
+ Common::Array<Graphics::Surface> _inventorySurfaces;
+ Common::Array<Graphics::Surface> _hudSurfaces;
+
+ InventoryWidget *_inventoryWidget;
+ ConversationWidget *_conversationWidget;
+};
+
+}
+
+#endif