![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Renderer for the grid of peoplemon in a storage box. More...
#include <StorageGrid.hpp>
Public Member Functions | |
StorageGrid (bl::engine::Engine &engine) | |
Initializes the grid to be empty. More... | |
void | activate (bl::ecs::Entity background) |
Sets the parent of the grid rectangle to the background. More... | |
void | deactivate () |
Removes the content from the scene and releases entities. More... | |
void | update (const std::vector< core::pplmn::StoredPeoplemon > &box) |
Updates the set of peoplemon to render. More... | |
void | notifyOffset (float offset) |
Applies the given offset to the grid position. Used for sliding in and out. More... | |
Static Public Attributes | |
static constexpr glm::vec2 | BoxPosition = {293.f, 158.f} |
static constexpr glm::vec2 | BoxSize = {784.f - BoxPosition.x, 581.f - BoxPosition.y} |
Renderer for the grid of peoplemon in a storage box.
Definition at line 20 of file StorageGrid.hpp.
game::menu::StorageGrid::StorageGrid | ( | bl::engine::Engine & | engine | ) |
Initializes the grid to be empty.
engine | The game engine instance |
Definition at line 11 of file StorageGrid.cpp.
void game::menu::StorageGrid::activate | ( | bl::ecs::Entity | background | ) |
Sets the parent of the grid rectangle to the background.
background | The background entity |
Definition at line 19 of file StorageGrid.cpp.
void game::menu::StorageGrid::deactivate | ( | ) |
Removes the content from the scene and releases entities.
Definition at line 21 of file StorageGrid.cpp.
void game::menu::StorageGrid::notifyOffset | ( | float | offset | ) |
Applies the given offset to the grid position. Used for sliding in and out.
offset | The offset in overlay units to apply to the x coordinate |
Definition at line 26 of file StorageGrid.cpp.
void game::menu::StorageGrid::update | ( | const std::vector< core::pplmn::StoredPeoplemon > & | box | ) |
Updates the set of peoplemon to render.
box | The set of stored peoplemon to render |
Definition at line 30 of file StorageGrid.cpp.
|
staticconstexpr |
Definition at line 22 of file StorageGrid.hpp.
|
staticconstexpr |
Definition at line 23 of file StorageGrid.hpp.