Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
game::menu::PeopledexRow Class Reference

Item row for peoplemon in the peopledex. More...

#include <PeopledexRow.hpp>

+ Inheritance diagram for game::menu::PeopledexRow:

Public Types

using Ptr = std::shared_ptr< PeopledexRow >
 Pointer to the row item. More...
 

Public Member Functions

virtual ~PeopledexRow ()=default
 Destroy the Peopledex Row object. More...
 
virtual glm::vec2 getSize () const override
 Returns the size that the row takes up. More...
 

Static Public Member Functions

static Ptr create (core::pplmn::Id ppl, const core::player::Peopledex &dex)
 Create a new peopledex row. More...
 

Protected Member Functions

virtual void doCreate (bl::engine::Engine &engine) override
 Called at least once when the item is added to a menu. Should create required graphics primitives and return the transform to use. More...
 
virtual void doSceneAdd (bl::rc::Scene *overlay) override
 Called when the item should be added to the overlay. More...
 
virtual void doSceneRemove () override
 Called when the item should be removed from the overlay. More...
 
virtual bl::ecs::Entity getEntity () const override
 Returns the entity (or top level entity) of the item. More...
 
virtual void draw (bl::rc::scene::CodeScene::RenderContext &ctx) override
 Renders the item. More...
 

Detailed Description

Item row for peoplemon in the peopledex.

Definition at line 18 of file PeopledexRow.hpp.

Member Typedef Documentation

◆ Ptr

using game::menu::PeopledexRow::Ptr = std::shared_ptr<PeopledexRow>

Pointer to the row item.

Definition at line 21 of file PeopledexRow.hpp.

Constructor & Destructor Documentation

◆ ~PeopledexRow()

virtual game::menu::PeopledexRow::~PeopledexRow ( )
virtualdefault

Destroy the Peopledex Row object.

Member Function Documentation

◆ create()

PeopledexRow::Ptr game::menu::PeopledexRow::create ( core::pplmn::Id  ppl,
const core::player::Peopledex dex 
)
static

Create a new peopledex row.

Parameters
pplThe peoplemon to put in the peopledex
dexThe Peopledex
Returns
Ptr The new row

Definition at line 20 of file PeopledexRow.cpp.

◆ doCreate()

void game::menu::PeopledexRow::doCreate ( bl::engine::Engine &  engine)
overrideprotectedvirtual

Called at least once when the item is added to a menu. Should create required graphics primitives and return the transform to use.

Parameters
engineThe game engine instance

Definition at line 33 of file PeopledexRow.cpp.

◆ doSceneAdd()

void game::menu::PeopledexRow::doSceneAdd ( bl::rc::Scene *  overlay)
overrideprotectedvirtual

Called when the item should be added to the overlay.

Parameters
overlayThe overlay to add to

Definition at line 75 of file PeopledexRow.cpp.

◆ doSceneRemove()

void game::menu::PeopledexRow::doSceneRemove ( )
overrideprotectedvirtual

Called when the item should be removed from the overlay.

Definition at line 84 of file PeopledexRow.cpp.

◆ draw()

void game::menu::PeopledexRow::draw ( bl::rc::scene::CodeScene::RenderContext &  ctx)
overrideprotectedvirtual

Renders the item.

Parameters
ctxThe render context

Definition at line 92 of file PeopledexRow.cpp.

◆ getEntity()

bl::ecs::Entity game::menu::PeopledexRow::getEntity ( ) const
overrideprotectedvirtual

Returns the entity (or top level entity) of the item.

Definition at line 86 of file PeopledexRow.cpp.

◆ getSize()

glm::vec2 game::menu::PeopledexRow::getSize ( ) const
overridevirtual

Returns the size that the row takes up.

Definition at line 31 of file PeopledexRow.cpp.


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