TGUI
0.7.8
|
Public Member Functions | |
SliderRenderer (Slider *slider) | |
Constructor. More... | |
virtual void | setProperty (std::string property, const std::string &value) override |
Change a property of the renderer. More... | |
virtual void | setProperty (std::string property, ObjectConverter &&value) override |
Change a property of the renderer. More... | |
virtual ObjectConverter | getProperty (std::string property) const override |
Retrieve the value of a certain property. More... | |
virtual std::map< std::string, ObjectConverter > | getPropertyValuePairs () const override |
Get a map with all properties and their values. More... | |
void | setTrackColor (const Color &color) |
Changes the color of the track. More... | |
void | setTrackColorNormal (const Color &color) |
Changes the color of the track in the normal state (mouse not on slider). More... | |
void | setTrackColorHover (const Color &color) |
Changes the color of the track in hover state (mouse on slider). More... | |
void | setThumbColor (const Color &color) |
Changes the color of the thumb. More... | |
void | setThumbColorNormal (const Color &color) |
Changes the color of the thumb in the normal state (mouse not on slider). More... | |
void | setThumbColorHover (const Color &color) |
Changes the color of the thumb in hover state (mouse on slider). More... | |
void | setBorderColor (const Color &color) |
Changes the color of the borders. More... | |
void | setTrackTexture (const Texture &texture) |
Change the image of the track that is displayed when the mouse is not on top of the slider. More... | |
void | setTrackHoverTexture (const Texture &texture) |
Change the image of the track that is displayed when the mouse is on top of the slider. More... | |
void | setThumbTexture (const Texture &texture) |
Change the image of the thumb that is displayed when the mouse is not on top of the slider. More... | |
void | setThumbHoverTexture (const Texture &texture) |
Change the image of the thumb that is displayed when the mouse is on top of the slider. More... | |
Public Member Functions inherited from tgui::WidgetRenderer | |
virtual | ~WidgetRenderer () |
Virtual destructor. | |
Public Member Functions inherited from tgui::WidgetBorders | |
virtual void | setBorders (const Borders &borders) |
Changes the size of the borders. More... | |
void | setBorders (float leftBorder, float topBorder, float rightBorder, float bottomBorder) |
Changes the size of the borders. More... | |
void | setBorders (float width, float height) |
Changes the size of the borders. More... | |
virtual Borders | getBorders () const |
Returns the size of the borders as a tgui::Borders. More... | |
|
inline |
Constructor.
slider | The slider that is connected to the renderer |
|
overridevirtual |
Retrieve the value of a certain property.
property | The property that you would like to retrieve |
Reimplemented from tgui::WidgetRenderer.
|
overridevirtual |
Get a map with all properties and their values.
Reimplemented from tgui::WidgetRenderer.
void tgui::SliderRenderer::setBorderColor | ( | const Color & | color | ) |
Changes the color of the borders.
color | New border color |
|
overridevirtual |
Change a property of the renderer.
property | The property that you would like to change |
value | The new serialized value that you like to assign to the property |
Exception | when deserialization fails or when the widget does not have this property. |
Reimplemented from tgui::WidgetRenderer.
|
overridevirtual |
Change a property of the renderer.
property | The property that you would like to change |
value | The new value that you like to assign to the property. The ObjectConverter is implicitly constructed from the possible value types. |
Exception | for unknown properties or when value was of a wrong type. |
Reimplemented from tgui::WidgetRenderer.
void tgui::SliderRenderer::setThumbColor | ( | const Color & | color | ) |
Changes the color of the thumb.
color | New thumb color |
This color will overwrite the color for both the normal and hover state.
Note that this color is ignored when a track and thumb image have been set.
void tgui::SliderRenderer::setThumbColorHover | ( | const Color & | color | ) |
Changes the color of the thumb in hover state (mouse on slider).
color | New thumb color |
Note that this color is ignored when a track and thumb image have been set.
void tgui::SliderRenderer::setThumbColorNormal | ( | const Color & | color | ) |
Changes the color of the thumb in the normal state (mouse not on slider).
color | New thumb color |
Note that this color is ignored when a track and thumb image have been set.
void tgui::SliderRenderer::setThumbHoverTexture | ( | const Texture & | texture | ) |
Change the image of the thumb that is displayed when the mouse is on top of the slider.
texture | The new hover thumb texture |
The hover texture is ignored if no normal texture was set. Pass an empty texture to unset the image.
void tgui::SliderRenderer::setThumbTexture | ( | const Texture & | texture | ) |
Change the image of the thumb that is displayed when the mouse is not on top of the slider.
texture | The new thumb texture |
When this image and the track image are set, then the track and thumb color property will be ignored. Pass an empty string to unset the image.
void tgui::SliderRenderer::setTrackColor | ( | const Color & | color | ) |
Changes the color of the track.
color | New track color |
This color will overwrite the color for both the normal and hover state.
Note that this color is ignored when a track and thumb image have been set.
void tgui::SliderRenderer::setTrackColorHover | ( | const Color & | color | ) |
Changes the color of the track in hover state (mouse on slider).
color | New track color |
Note that this color is ignored when a track and thumb image have been set.
void tgui::SliderRenderer::setTrackColorNormal | ( | const Color & | color | ) |
Changes the color of the track in the normal state (mouse not on slider).
color | New track color |
Note that this color is ignored when a track and thumb image have been set.
void tgui::SliderRenderer::setTrackHoverTexture | ( | const Texture & | texture | ) |
Change the image of the track that is displayed when the mouse is on top of the slider.
texture | The new hover track texture |
The hover texture is ignored if no normal texture was set. Pass an empty texture to unset the image.
void tgui::SliderRenderer::setTrackTexture | ( | const Texture & | texture | ) |
Change the image of the track that is displayed when the mouse is not on top of the slider.
texture | The new track texture |
When this image and the thumb image are set, then the track and thumb color property will be ignored. Pass an empty string to unset the image.