Peoplemon  0.1.0
Peoplemon 3 game source documentation
PeoplemonInfo.hpp
Go to the documentation of this file.
1 #ifndef GAME_STATES_PEOPLEMONINFO_HPP
2 #define GAME_STATES_PEOPLEMONINFO_HPP
3 
4 #include <BLIB/Graphics.hpp>
5 #include <BLIB/Interfaces/Menu.hpp>
6 #include <BLIB/Resources.hpp>
7 #include <Game/States/State.hpp>
8 
9 namespace game
10 {
11 namespace state
12 {
19 : public State
20 , public bl::input::Listener {
21 public:
29  static bl::engine::State::Ptr create(core::system::Systems& systems,
30  const core::pplmn::OwnedPeoplemon& ppl);
31 
35  virtual ~PeoplemonInfo() = default;
36 
40  virtual const char* name() const override;
41 
47  virtual void activate(bl::engine::Engine& engine) override;
48 
54  virtual void deactivate(bl::engine::Engine& engine) override;
55 
62  virtual void update(bl::engine::Engine& engine, float dt, float) override;
63 
64 private:
65  enum ActivePage { Basics, Moves };
66 
67  ActivePage activePage;
68  float inputDebounce;
69  float flashDelay;
70 
71  bl::rc::res::TextureRef bgndTxtr;
72  bl::gfx::Sprite background;
73 
74  bl::rc::res::TextureRef leftTxtr;
75  bl::gfx::Sprite leftArrow;
76  bl::rc::res::TextureRef rightTxtr;
77  bl::gfx::Sprite rightArrow;
78  bl::gfx::Text pageLabel;
79 
80  bl::rc::res::TextureRef thumbTxtr;
81  bl::gfx::Sprite thumbnail;
82  bl::gfx::Text nameLabel;
83  bl::gfx::Text idLabel;
84  bl::gfx::Text levelLabel;
85  bl::gfx::Text itemLabel;
86  bl::gfx::Text curXpLabel;
87  bl::gfx::Text nextXpLabel;
88  bl::gfx::Text ailLabel;
89 
90  bl::rc::res::TextureRef basicsTxtr;
91  bl::gfx::Sprite basicsBox;
92  bl::gfx::Text speciesLabel;
93  bl::gfx::Text typeLabel;
94  bl::gfx::Text hpLabel;
95  bl::gfx::Text atkLabel;
96  bl::gfx::Text defLabel;
97  bl::gfx::Text spdLabel;
98  bl::gfx::Text spAtkLabel;
99  bl::gfx::Text spDefLabel;
100  bl::gfx::Text descLabel;
101  bl::gfx::Text abilityLabel;
102  bl::gfx::Text abilityDescLabel;
103 
104  bl::menu::Menu moveMenu;
105  bl::rc::res::TextureRef moveTxtr;
106  bl::gfx::Sprite moveBox;
107  bl::gfx::Text movePwrLabel;
108  bl::gfx::Text moveAccLabel;
109  bl::gfx::Text moveTypeLabel;
110  bl::gfx::Text moveDescLabel;
111 
113  virtual bool observe(const bl::input::Actor&, unsigned int activatedControl,
114  bl::input::DispatchType, bool eventTriggered) override;
115  void highlightMove(core::pplmn::MoveId move);
116  void setPage(ActivePage page);
117 };
118 
119 } // namespace state
120 } // namespace game
121 
122 #endif
MoveId
The id of a move.
Definition: MoveId.hpp:16
Parent namespace for all functionality unique to the game.
Represents an instance of a peoplemon. Can be a wild peoplemon, trainer, or player peoplemon....
Owns all primary systems and a reference to the engine.
Definition: Systems.hpp:47
Menu for displaying information about a specific peoplemon the player owns.
virtual void activate(bl::engine::Engine &engine) override
Activates the state.
virtual const char * name() const override
Returns "Peopledex".
virtual ~PeoplemonInfo()=default
Destroy the Peoplemon Info object.
virtual void update(bl::engine::Engine &engine, float dt, float) override
Updates the state and menus and whatnot.
static bl::engine::State::Ptr create(core::system::Systems &systems, const core::pplmn::OwnedPeoplemon &ppl)
Create a new PeoplemonInfo engine state.
virtual void deactivate(bl::engine::Engine &engine) override
Deactivates the state.
Parent to all game states. Provides some commonly required data like core game systems.
Definition: State.hpp:29
core::system::Systems & systems
Definition: State.hpp:66