20#ifndef HEADER_SPINNER_HPP
21#define HEADER_SPINNER_HPP
27 namespace video {
class ITexture; }
30#include "guiengine/widget.hpp"
31#include "utils/leak_check.hpp"
32#include "utils/ptr_vector.hpp"
56 std::function<void(
SpinnerWidget* spinner)> m_value_updated_callback;
59 int m_value, m_min, m_max;
62 int m_spinner_widget_player_id;
63 bool m_use_background_color;
97 const std::string& originator,
101 virtual EventPropagation
rightPressed(
const int playerID);
104 virtual EventPropagation
leftPressed(
const int playerID);
123 virtual void move(
const int x,
const int y,
const int w,
const int h);
125 void addLabel(irr::core::stringw label);
129 void setUseBackgroundColor() {m_use_background_color=
true; }
130 bool getUseBackgroundColor() {
return m_use_background_color; }
131 void setSpinnerWidgetPlayerID(
int playerID) {m_spinner_widget_player_id=playerID;}
132 int getSpinnerWidgetPlayerID() {
return m_spinner_widget_player_id; }
133 void unsetUseBackgroundColor() {m_use_background_color=
false; }
135 void activateSelectedButton();
136 void setSelectedButton(
bool right)
154 bool isButtonSelected(
bool right)
163 void setListener(ISpinnerConfirmListener* listener) { m_listener = listener; }
185 void setValue(irr::core::stringw new_value);
270 virtual void setActive(
bool active =
true);
274 const core::stringw& getCustomText()
const {
return m_custom_text; }
277 void setRange(
float min,
float max,
float step);
278 void setRange(
int min,
int max) { setRange(min, max, 1.0); }
280 void onPressed(
int x,
int y);
281 void doValueUpdatedCallback()
283 if (m_value_updated_callback)
284 m_value_updated_callback(
this);
286 void setValueUpdatedCallback(
287 std::function<
void(SpinnerWidget* spinner)> callback)
289 m_value_updated_callback = callback;
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33