1 #ifndef CORE_BATTLES_VIEW_STATBOXES_HPP
2 #define CORE_BATTLES_VIEW_STATBOXES_HPP
4 #include <BLIB/Graphics.hpp>
5 #include <BLIB/Render/Scenes/CodeScene.hpp>
6 #include <BLIB/Resources.hpp>
35 void init(bl::rc::scene::CodeScene* scene);
56 void sync(
bool fromSwitch =
false);
75 void render(bl::rc::scene::CodeScene::RenderContext& ctx);
78 enum struct State { Hidden, Sliding, Showing };
80 bl::engine::Engine& engine;
87 bl::rc::res::TextureRef opBoxTxtr;
88 bl::rc::res::TextureRef lpBoxTxtr;
89 bl::gfx::Sprite opBox;
90 bl::gfx::Sprite lpBox;
92 bl::gfx::Rectangle opHpBar;
95 bl::gfx::Text opLevel;
96 bl::gfx::Sprite opAil;
98 bl::gfx::Rectangle lpHpBar;
100 bl::gfx::Rectangle lpXpBar;
102 bl::gfx::Text lpName;
104 bl::gfx::Text lpLevel;
105 bl::gfx::Sprite lpAil;
Ailment
Represents an ailment that a Peoplemon can have.
Core classes and functionality for both the editor and game.
Renders both the player and opponent stat boxes.
StatBoxes(bl::engine::Engine &engine)
Construct a new Stat Boxes component.
void sync(bool fromSwitch=false)
Updates the UI to reflect the current peoplemon state.
void init(bl::rc::scene::CodeScene *scene)
Creates entities and adds them to the scene.
void update(float dt)
Updates bar sizes if they need to change.
void setOpponent(pplmn::BattlePeoplemon *ppl)
Sets the opponent's peoplemon. Syncs right away.
void setPlayer(pplmn::BattlePeoplemon *ppl)
Sets the player's peoplemon. Syncs right away.
bool synced() const
Returns true if the view is in sync, false if an animation is in progress.
void render(bl::rc::scene::CodeScene::RenderContext &ctx)
Renders the boxes.
Represents a Peoplemon in battle. Stores some extra state that only exists in battle....