![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Combobox for selecting moves. More...
#include <MoveSelector.hpp>
Public Types | |
using | Ptr = std::shared_ptr< MoveSelector > |
Pointer to this component. More... | |
using | ChangeCb = std::function< void(core::pplmn::MoveId)> |
Called when a move is selected. More... | |
Public Member Functions | |
core::pplmn::MoveId | currentMove () const |
Returns the currently selected move. More... | |
void | setCurrentMove (core::pplmn::MoveId move) |
Set the currently selected move. More... | |
void | notifyPeoplemon (core::pplmn::Id ppl, unsigned int level) |
Notifies the selector of the peoplemon being selected for. More... | |
void | selectRandom () |
Selects a random move. More... | |
void | refresh () |
Refreshes the list of moves. More... | |
Static Public Member Functions | |
static Ptr | create (bool enableFilter, const ChangeCb &changeCb={}) |
Create a new MoveSelector. More... | |
Combobox for selecting moves.
Definition at line 18 of file MoveSelector.hpp.
using editor::component::MoveSelector::ChangeCb = std::function<void(core::pplmn::MoveId)> |
Called when a move is selected.
Definition at line 24 of file MoveSelector.hpp.
using editor::component::MoveSelector::Ptr = std::shared_ptr<MoveSelector> |
Pointer to this component.
Definition at line 21 of file MoveSelector.hpp.
|
static |
Create a new MoveSelector.
enableFilter | True to add radio buttons to filter on peoplemon, false to show all |
changeCb | Called when a move is selected |
Definition at line 12 of file MoveSelector.cpp.
core::pplmn::MoveId editor::component::MoveSelector::currentMove | ( | ) | const |
Returns the currently selected move.
Definition at line 46 of file MoveSelector.cpp.
void editor::component::MoveSelector::notifyPeoplemon | ( | core::pplmn::Id | ppl, |
unsigned int | level | ||
) |
Notifies the selector of the peoplemon being selected for.
ppl | The peoplemon to select for |
level | The level of the peoplemon |
Definition at line 55 of file MoveSelector.cpp.
void editor::component::MoveSelector::refresh | ( | ) |
Refreshes the list of moves.
Definition at line 61 of file MoveSelector.cpp.
void editor::component::MoveSelector::selectRandom | ( | ) |
Selects a random move.
Definition at line 105 of file MoveSelector.cpp.
void editor::component::MoveSelector::setCurrentMove | ( | core::pplmn::MoveId | move | ) |
Set the currently selected move.
move | The move to select |
Definition at line 51 of file MoveSelector.cpp.