1 #ifndef GAME_STATES_FLYMAP_HPP
2 #define GAME_STATES_FLYMAP_HPP
4 #include <BLIB/Graphics.hpp>
5 #include <BLIB/Interfaces/Menu.hpp>
6 #include <BLIB/Resources.hpp>
9 #include <SFML/Graphics.hpp>
22 ,
public bl::input::Listener {
41 virtual const char*
name()
const override;
48 virtual void activate(bl::engine::Engine& engine)
override;
55 virtual void deactivate(bl::engine::Engine& engine)
override;
63 virtual void update(bl::engine::Engine& engine,
float dt,
float)
override;
68 bl::rc::res::TextureRef mapTxtr;
69 bl::rc::res::TextureRef townTxtr;
70 bl::rc::res::TextureRef cursorTxtr;
71 bl::rc::res::TextureRef playerTxtr;
73 bl::gfx::BatchedSprites towns;
74 bl::gfx::Sprite player;
75 bl::gfx::Sprite cursor;
77 bl::rc::res::TextureRef panelTxtr;
78 bl::gfx::Sprite panel;
79 bl::gfx::Text townName;
80 bl::gfx::Text townDesc;
82 bl::menu::Menu townMenu;
84 unsigned int selected;
88 void hoverTown(
unsigned int i);
89 void selectTown(
unsigned int i);
90 void onFlyChoice(
const std::string& choice,
const core::map::Town& town);
94 virtual bool observe(
const bl::input::Actor&,
unsigned int activatedControl,
95 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.
Represents a town, route, or region within a map. Maps may have many towns. Individual tiles are asso...
Owns all primary systems and a reference to the engine.
Engine state for the fly map.
virtual ~FlyMap()=default
Destroy the FlyMap state.
virtual void update(bl::engine::Engine &engine, float dt, float) override
Updates the state and menus and whatnot.
virtual void deactivate(bl::engine::Engine &engine) override
Deactivates the state.
virtual const char * name() const override
Returns "FlyMap".
virtual void activate(bl::engine::Engine &engine) override
Activates the state.
static bl::engine::State::Ptr create(core::system::Systems &systems, bool &unpause)
Creates the fly map state.
Parent to all game states. Provides some commonly required data like core game systems.
core::system::Systems & systems