1 #ifndef CORE_SYSTEMS_HUD_QTYENTRY_HPP
2 #define CORE_SYSTEMS_HUD_QTYENTRY_HPP
4 #include <BLIB/Graphics.hpp>
25 QtyEntry(bl::engine::Engine& engine);
47 void configure(
int minQty,
int maxQty,
int qty);
62 void up(
int q,
bool ignoreDebounce);
71 void down(
int q,
bool ignoreDebounce);
79 bl::engine::Engine& engine;
80 bl::rc::Overlay* currentOverlay;
81 sf::Vector2f position;
82 bl::gfx::Rectangle background;
84 bl::gfx::Triangle upArrow;
85 bl::gfx::Triangle downArrow;
94 bool rateLimit(
bool ignore);
Core classes and functionality for both the editor and game.
Helper class to render a number selector.
void configure(int minQty, int maxQty, int qty)
Configures the entry with the given parameters and adds to the overlay.
void setPosition(const sf::Vector2f &position)
Sets the position of the selector.
void up(int q, bool ignoreDebounce)
Increments the qty up.
void down(int q, bool ignoreDebounce)
Decrements the qty down.
sf::Vector2f getSize() const
Returns the size of the entry in pixels.
void hide()
Removes the quantity entry from the overlay.
int curQty() const
Returns the currently selected qty.
QtyEntry(bl::engine::Engine &engine)
Construct a new quantity entry helper.