![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Helper class to render a number selector. More...
#include <QtyEntry.hpp>
Public Member Functions | |
QtyEntry (bl::engine::Engine &engine) | |
Construct a new quantity entry helper. More... | |
void | setPosition (const sf::Vector2f &position) |
Sets the position of the selector. More... | |
sf::Vector2f | getSize () const |
Returns the size of the entry in pixels. More... | |
void | configure (int minQty, int maxQty, int qty) |
Configures the entry with the given parameters and adds to the overlay. More... | |
int | curQty () const |
Returns the currently selected qty. More... | |
void | up (int q, bool ignoreDebounce) |
Increments the qty up. More... | |
void | down (int q, bool ignoreDebounce) |
Decrements the qty down. More... | |
void | hide () |
Removes the quantity entry from the overlay. More... | |
Helper class to render a number selector.
Definition at line 18 of file QtyEntry.hpp.
core::system::hud::QtyEntry::QtyEntry | ( | bl::engine::Engine & | engine | ) |
Construct a new quantity entry helper.
engine | The game engine instance |
Definition at line 16 of file QtyEntry.cpp.
void core::system::hud::QtyEntry::configure | ( | int | minQty, |
int | maxQty, | ||
int | qty | ||
) |
Configures the entry with the given parameters and adds to the overlay.
minQty | The minimum number to allow entering |
maxQty | The maximum number to allow entering |
qty | The number to start with |
Definition at line 69 of file QtyEntry.cpp.
int core::system::hud::QtyEntry::curQty | ( | ) | const |
Returns the currently selected qty.
Definition at line 103 of file QtyEntry.cpp.
void core::system::hud::QtyEntry::down | ( | int | q, |
bool | ignoreDebounce | ||
) |
Decrements the qty down.
q | The amount to go down by |
ignoreDebounce | True to always modify, false to rate limit |
Definition at line 112 of file QtyEntry.cpp.
sf::Vector2f core::system::hud::QtyEntry::getSize | ( | ) | const |
Returns the size of the entry in pixels.
Definition at line 67 of file QtyEntry.cpp.
void core::system::hud::QtyEntry::hide | ( | ) |
Removes the quantity entry from the overlay.
Definition at line 53 of file QtyEntry.cpp.
void core::system::hud::QtyEntry::setPosition | ( | const sf::Vector2f & | position | ) |
Sets the position of the selector.
position | The position to set |
Definition at line 60 of file QtyEntry.cpp.
void core::system::hud::QtyEntry::up | ( | int | q, |
bool | ignoreDebounce | ||
) |
Increments the qty up.
q | The amount to go up by |
ignoreDebounce | True to always modify, false to rate limit |
Definition at line 105 of file QtyEntry.cpp.