Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Member Functions | Static Public Attributes | List of all members
game::menu::StorageGrid Class Reference

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}
 

Detailed Description

Renderer for the grid of peoplemon in a storage box.

Definition at line 20 of file StorageGrid.hpp.

Constructor & Destructor Documentation

◆ StorageGrid()

game::menu::StorageGrid::StorageGrid ( bl::engine::Engine &  engine)

Initializes the grid to be empty.

Parameters
engineThe game engine instance

Definition at line 11 of file StorageGrid.cpp.

Member Function Documentation

◆ activate()

void game::menu::StorageGrid::activate ( bl::ecs::Entity  background)

Sets the parent of the grid rectangle to the background.

Parameters
backgroundThe background entity

Definition at line 19 of file StorageGrid.cpp.

◆ deactivate()

void game::menu::StorageGrid::deactivate ( )

Removes the content from the scene and releases entities.

Definition at line 21 of file StorageGrid.cpp.

◆ notifyOffset()

void game::menu::StorageGrid::notifyOffset ( float  offset)

Applies the given offset to the grid position. Used for sliding in and out.

Parameters
offsetThe offset in overlay units to apply to the x coordinate

Definition at line 26 of file StorageGrid.cpp.

◆ update()

void game::menu::StorageGrid::update ( const std::vector< core::pplmn::StoredPeoplemon > &  box)

Updates the set of peoplemon to render.

Parameters
boxThe set of stored peoplemon to render

Definition at line 30 of file StorageGrid.cpp.

Member Data Documentation

◆ BoxPosition

constexpr glm::vec2 game::menu::StorageGrid::BoxPosition = {293.f, 158.f}
staticconstexpr

Definition at line 22 of file StorageGrid.hpp.

◆ BoxSize

constexpr glm::vec2 game::menu::StorageGrid::BoxSize = {784.f - BoxPosition.x, 581.f - BoxPosition.y}
staticconstexpr

Definition at line 23 of file StorageGrid.hpp.


The documentation for this class was generated from the following files: