28 #ifndef _TGUI_SLIDER2D_INCLUDED_
29 #define _TGUI_SLIDER2D_INCLUDED_
83 virtual bool load(
const std::string pathname);
93 virtual void setSize(
float width,
float height);
99 virtual Vector2u
getSize()
const;
122 virtual void setMinimum(
const Vector2f minimum);
131 virtual void setMaximum(
const Vector2f maximum);
139 virtual void setValue(
const Vector2f value);
176 virtual bool mouseOnObject(
float x,
float y);
177 virtual void leftMousePressed(
float x,
float y);
178 virtual void leftMouseReleased(
float x,
float y);
179 virtual void mouseMoved(
float x,
float y);
180 virtual void objectFocused();
181 virtual void mouseNoLongerDown();
191 virtual void draw(sf::RenderTarget& target, sf::RenderStates states)
const;
215 sf::Texture* m_TextureThumbNormal;
216 sf::Texture* m_TextureThumbHover;
217 sf::Texture* m_TextureTrackNormal;
218 sf::Texture* m_TextureTrackHover;
220 sf::Sprite m_SpriteThumbNormal;
221 sf::Sprite m_SpriteThumbHover;
222 sf::Sprite m_SpriteTrackNormal;
223 sf::Sprite m_SpriteTrackHover;
226 std::string m_LoadedPathname;
234 #endif //_TGUI_SLIDER2D_INCLUDED_
virtual void setMinimum(const Vector2f minimum)
Sets a minimum value.
virtual std::string getLoadedPathname() const
Returns the pathname that was used to load the slider.
Slider2D()
Default constructor.
virtual Vector2f getScaledSize() const
Returns the size of the slider, after the scaling transformation.
Slider2D & operator=(const Slider2D &right)
Overload of assignment operator.
The parent struct for every object.
Definition: Objects.hpp:36
virtual bool load(const std::string pathname)
Loads the slider images.
virtual Vector2f getMaximum() const
Returns the maximum value.
virtual Vector2f getMinimum() const
Returns the minimum value.
bool returnToCenter
Definition: Slider2D.hpp:199
Definition: Slider2D.hpp:37
virtual void centerThumb()
Places the thumb back in the center.
bool fixedThumbSize
Definition: Slider2D.hpp:203
virtual ~Slider2D()
Destructor.
virtual void setMaximum(const Vector2f maximum)
Sets a maximum value.
virtual Vector2u getSize() const
Returns the size of the slider, unaffected by scaling.
virtual void setValue(const Vector2f value)
Changes the current value.
virtual Vector2f getValue() const
Returns the current value.
virtual void setSize(float width, float height)
Changes the size of the slider.