Represents a button for a quantity of items in the bag.
More...
#include <BagItemButton.hpp>
|
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...
|
|
Represents a button for a quantity of items in the bag.
Definition at line 23 of file BagItemButton.hpp.
◆ Ptr
◆ ~BagItemButton()
virtual game::menu::BagItemButton::~BagItemButton |
( |
| ) |
|
|
virtualdefault |
Destroy the Bag Item Button object.
◆ create()
Creates a new item button.
- Parameters
-
item | The item to populate with |
- Returns
- Ptr The created item
Definition at line 11 of file BagItemButton.cpp.
◆ doCreate()
void game::menu::BagItemButton::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
-
engine | The game engine instance |
Definition at line 54 of file BagItemButton.cpp.
◆ doSceneAdd()
void game::menu::BagItemButton::doSceneAdd |
( |
bl::rc::Scene * |
overlay | ) |
|
|
overrideprotectedvirtual |
Called when the item should be added to the overlay.
- Parameters
-
overlay | The overlay to add to |
Definition at line 70 of file BagItemButton.cpp.
◆ doSceneRemove()
void game::menu::BagItemButton::doSceneRemove |
( |
| ) |
|
|
overrideprotectedvirtual |
Called when the item should be removed from the overlay.
Definition at line 76 of file BagItemButton.cpp.
◆ draw()
void game::menu::BagItemButton::draw |
( |
bl::rc::scene::CodeScene::RenderContext & |
ctx | ) |
|
|
overrideprotectedvirtual |
◆ getEntity()
bl::ecs::Entity game::menu::BagItemButton::getEntity |
( |
| ) |
const |
|
overrideprotectedvirtual |
Returns the entity (or top level entity) of the item.
Definition at line 78 of file BagItemButton.cpp.
◆ getItem()
◆ getSize()
glm::vec2 game::menu::BagItemButton::getSize |
( |
| ) |
const |
|
overridevirtual |
◆ update()
The documentation for this class was generated from the following files: