1 #ifndef GAME_STATES_BAGMENU_HPP
2 #define GAME_STATES_BAGMENU_HPP
4 #include <BLIB/Graphics.hpp>
5 #include <BLIB/Interfaces/Menu.hpp>
6 #include <BLIB/Resources.hpp>
24 ,
public bl::input::Listener {
41 int* chosenPeoplemon =
nullptr,
bool* unpause =
nullptr);
51 virtual const char*
name()
const override;
56 virtual void activate(bl::engine::Engine&)
override;
61 virtual void deactivate(bl::engine::Engine&)
override;
68 virtual void update(bl::engine::Engine&,
float dt,
float)
override;
71 enum struct MenuState {
76 ChoosingItemPeoplemon,
89 bl::menu::Menu* activeMenu;
90 bl::menu::Menu* slideOut;
92 bl::rc::res::TextureRef bgndTxtr;
93 bl::gfx::Sprite background;
96 bl::menu::Menu actionMenu;
97 bl::menu::Menu regularMenu;
98 bl::menu::Menu ballMenu;
99 bl::menu::Menu keyMenu;
100 bl::menu::Menu tmMenu;
101 bl::menu::Menu* menuTabs[4];
102 bl::gfx::Text pocketLabel;
104 bl::gfx::Text description;
107 int selectedPeoplemon;
110 int* chosenPeoplemon,
bool* unpause);
115 void beginSlide(
bool left);
116 void removeAndUpdateItem(
int qty);
121 void doDrop(
int qty);
125 void keyItemConfirmUse(
const std::string& choice);
128 virtual bool observe(
const bl::input::Actor&,
unsigned int activatedControl,
129 bl::input::DispatchType,
bool eventTriggered)
override;
bl::menu::TriggerDriver< Control::MoveUp, Control::MoveRight, Control::MoveDown, Control::MoveLeft, Control::Interact > MenuDriver
Helper typedef for Peoplemon specific menu driving.
Id
Represents an item in its simplist form.
Parent namespace for all functionality unique to the game.
Context
Represents how the menu should be opened.
Owns all primary systems and a reference to the engine.
Represents a button for a quantity of items in the bag.
State for displaying the player's inventory and selecting items.
virtual ~BagMenu()=default
Destroy the Bag Menu object.
static bl::engine::State::Ptr create(core::system::Systems &systems, Context ctx, core::item::Id *result=nullptr, int outNow=-1, int *chosenPeoplemon=nullptr, bool *unpause=nullptr)
Creates a new BagMenu.
virtual void activate(bl::engine::Engine &) override
Populates the menu with the player's inventory.
virtual const char * name() const override
Returns "BagMenu".
core::event::OpenBagMenu::Context Context
Represents how the menu was opened and affects how it may be used.
virtual void update(bl::engine::Engine &, float dt, float) override
Updates the menu.
virtual void deactivate(bl::engine::Engine &) override
Unsubscribes from event and input buses.
Parent to all game states. Provides some commonly required data like core game systems.
core::system::Systems & systems