1 #ifndef GAME_STATES_MAINMENU_HPP
2 #define GAME_STATES_MAINMENU_HPP
4 #include <BLIB/Graphics.hpp>
5 #include <BLIB/Interfaces/Menu.hpp>
6 #include <BLIB/Resources.hpp>
22 ,
public bl::input::Listener {
37 virtual const char*
name()
const override;
43 virtual void activate(bl::engine::Engine& engine)
override;
49 virtual void deactivate(bl::engine::Engine& engine)
override;
55 virtual void update(bl::engine::Engine&,
float dt,
float)
override;
58 bl::rc::res::TextureRef backgroundTxtr;
59 bl::gfx::Sprite background;
63 bl::menu::TextItem::Ptr newGame;
64 bl::menu::TextItem::Ptr loadGame;
65 bl::menu::TextItem::Ptr settings;
66 bl::menu::TextItem::Ptr quit;
69 bl::gfx::Rectangle hintBox;
74 virtual bool observe(
const bl::input::Actor&,
unsigned int activatedControl,
75 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.
Parent namespace for all functionality unique to the game.
Owns all primary systems and a reference to the engine.
Provides the main menu as an engine state.
virtual void deactivate(bl::engine::Engine &engine) override
Unsubscribes the menu to the engine event bus.
virtual void update(bl::engine::Engine &, float dt, float) override
Does nothing.
virtual ~MainMenu()=default
Cleans up all resources.
virtual const char * name() const override
Returns "MainMenu";.
static bl::engine::State::Ptr create(core::system::Systems &systems)
Creates a new MainMenu state.
virtual void activate(bl::engine::Engine &engine) override
Subscribes the menu to the engine event bus.
Parent to all game states. Provides some commonly required data like core game systems.
core::system::Systems & systems