TGUI
0.7.8
|
Public Member Functions | |
KnobRenderer (Knob *knob) | |
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 | setImageRotation (float rotation) |
Changes the default rotation of the foreground image. More... | |
void | setBackgroundColor (const Color &color) |
Changes the color of the background. More... | |
void | setThumbColor (const Color &color) |
Changes the color of the thumb which you can move around the circle. More... | |
void | setBorderColor (const Color &color) |
Changes the color of the borders that are optionally drawn around the knob. More... | |
void | setBackgroundTexture (const Texture &texture) |
Change the background image of the knob. More... | |
void | setForegroundTexture (const Texture &texture) |
Change the foreground image of the knob. 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.
knob | The knob 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::KnobRenderer::setBackgroundColor | ( | const Color & | color | ) |
Changes the color of the background.
color | New background color |
Note that this color is ignored when a background and foreground image were set.
void tgui::KnobRenderer::setBackgroundTexture | ( | const Texture & | texture | ) |
Change the background image of the knob.
texture | The new background texture |
When this image and the foreground image are set, the background and thumb color properties will be ignored. Pass an empty string to unset the image.
void tgui::KnobRenderer::setBorderColor | ( | const Color & | color | ) |
Changes the color of the borders that are optionally drawn around the knob.
color | New border color |
Note that the borders are ignored when a background and foreground image were set.
void tgui::KnobRenderer::setForegroundTexture | ( | const Texture & | texture | ) |
Change the foreground image of the knob.
texture | The new foreground texture |
The foreground image is the part that is rotated around the center when the value changes.
When this image and the background image are set, the background and thumb color properties will be ignored. Pass an empty string to unset the image.
void tgui::KnobRenderer::setImageRotation | ( | float | rotation | ) |
Changes the default rotation of the foreground image.
This property defines in which direction is the foreground image pointing. The rotation is in degrees, starts from the right side and increases when going counter-clockwise.
rotation | Default rotation of the foreground image, which is a value between 0 and 360. |
|
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::KnobRenderer::setThumbColor | ( | const Color & | color | ) |
Changes the color of the thumb which you can move around the circle.
color | New thumb color |
Note that this is ignored when a background and foreground image were set.