diff options
author | Ľubomír Remák | 2018-10-28 13:08:41 +0100 |
---|---|---|
committer | Ľubomír Remák | 2018-10-28 13:08:41 +0100 |
commit | d5568906739da23154cacd17aca93802901a9baf (patch) | |
tree | 56e9a8060f2c513aade94d18078c1d572c25a31b /engines/mutationofjb/gamescreen.h | |
parent | 0cf567de28fbdc0ee3c4aedf2c6da94c5b8ca129 (diff) | |
download | scummvm-rg350-d5568906739da23154cacd17aca93802901a9baf.tar.gz scummvm-rg350-d5568906739da23154cacd17aca93802901a9baf.tar.bz2 scummvm-rg350-d5568906739da23154cacd17aca93802901a9baf.zip |
MUTATIONOFJB: Add support for combining items.
Introduce game screen and game widget.
Add status bar to show currently hovered and picked items.
Load hardcoded strings from game executable.
Diffstat (limited to 'engines/mutationofjb/gamescreen.h')
-rw-r--r-- | engines/mutationofjb/gamescreen.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/engines/mutationofjb/gamescreen.h b/engines/mutationofjb/gamescreen.h index bc70580eda..686a504364 100644 --- a/engines/mutationofjb/gamescreen.h +++ b/engines/mutationofjb/gamescreen.h @@ -24,9 +24,11 @@ #define MUTATIONOFJB_GUI_H #include "mutationofjb/inventory.h" +#include "mutationofjb/script.h" +#include "mutationofjb/guiscreen.h" #include "mutationofjb/widgets/buttonwidget.h" #include "mutationofjb/widgets/inventorywidget.h" -#include "mutationofjb/guiscreen.h" +#include "mutationofjb/widgets/gamewidget.h" #include "common/array.h" #include "common/hashmap.h" @@ -48,8 +50,10 @@ class Game; class Widget; class InventoryWidget; class ConversationWidget; +class LabelWidget; +class GameWidget; -class GameScreen : public GuiScreen, public InventoryObserver, public ButtonWidgetCallback, public InventoryWidgetCallback { +class GameScreen : public GuiScreen, public InventoryObserver, public ButtonWidgetCallback, public InventoryWidgetCallback, public GameWidgetCallback { public: friend class InventoryAnimationDecoderCallback; friend class HudAnimationDecoderCallback; @@ -59,24 +63,40 @@ public: bool init(); + virtual void handleEvent(const Common::Event &event) override; + 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; + virtual void onGameDoorClicked(GameWidget *, const Door *door) override; + virtual void onGameStaticClicked(GameWidget *, const Static *stat) override; + virtual void onGameEntityHovered(GameWidget *, const Common::String &entity) override; ConversationWidget &getConversationWidget(); + void showConversationWidget(bool show); + void refreshAfterSceneChanged(); + private: bool loadInventoryGfx(); bool loadHudGfx(); void drawInventoryItem(const Common::String &item, int pos); void drawInventory(); + void updateStatusBarText(const Common::String &entity, bool inventory); + Common::Array<Graphics::Surface> _inventorySurfaces; Common::Array<Graphics::Surface> _hudSurfaces; + Common::Array<ButtonWidget *> _buttons; InventoryWidget *_inventoryWidget; ConversationWidget *_conversationWidget; + LabelWidget *_statusBarWidget; + GameWidget *_gameWidget; + + ActionInfo::Action _currentAction; + Common::String _currentPickedItem; }; } |