TGUI
0.7.8
|
Public Member Functions | |
ProgressBarRenderer (ProgressBar *progressBar) | |
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 | setTextColor (const Color &color) |
Changes the color of the text that is optionally displayed on top of the progress bar. More... | |
void | setTextColorBack (const Color &color) |
Changes the color of the text that is optionally displayed on top of the progress bar. More... | |
void | setTextColorFront (const Color &color) |
Changes the color of the text that is optionally displayed on top of the progress bar. More... | |
void | setBackgroundColor (const Color &color) |
Changes the background color of the progress bar. More... | |
void | setForegroundColor (const Color &color) |
Changes the foreground color of the progress bar. More... | |
void | setBorderColor (const Color &color) |
Changes the border color. More... | |
void | setBackTexture (const Texture &texture) |
Change the background image of the progress bar. More... | |
void | setFrontTexture (const Texture &texture) |
Change the foreground image of the progress bar. 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.
progressBar | The progress bar 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::ProgressBarRenderer::setBackgroundColor | ( | const Color & | color | ) |
Changes the background color of the progress bar.
color | The new background color |
This is the color that you see in the part of the progress bar that is not filled.
Note that this color is ignored when you set an image as background.
void tgui::ProgressBarRenderer::setBackTexture | ( | const Texture & | texture | ) |
Change the background image of the progress bar.
texture | The new background texture |
When this image and the front image are set, the background and foreground color properties will be ignored. Pass an empty string to unset the image, in this case the color properties will be used again.
void tgui::ProgressBarRenderer::setBorderColor | ( | const Color & | color | ) |
Changes the border color.
color | The color that is used for the borders that are optionally drawn around the progress bar |
void tgui::ProgressBarRenderer::setForegroundColor | ( | const Color & | color | ) |
Changes the foreground color of the progress bar.
color | The new foreground color |
This is the color that is used to fill the progress bar and is drawn on top of the background color.
Note that this color is ignored when you set an image as foreground.
void tgui::ProgressBarRenderer::setFrontTexture | ( | const Texture & | texture | ) |
Change the foreground image of the progress bar.
texture | The new foreground texture |
When this image and the back image are set, the background and foreground color properties will be ignored. Pass an empty string to unset the image, in this case the color properties will be used again.
|
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::ProgressBarRenderer::setTextColor | ( | const Color & | color | ) |
Changes the color of the text that is optionally displayed on top of the progress bar.
color | The new text color |
This changes both the back and front text colors.
void tgui::ProgressBarRenderer::setTextColorBack | ( | const Color & | color | ) |
Changes the color of the text that is optionally displayed on top of the progress bar.
color | The new text color that is displayed on top of the background color/image. |
This color is displayed on top of the unfilled part. The front text color will be used on top of the filled part.
void tgui::ProgressBarRenderer::setTextColorFront | ( | const Color & | color | ) |
Changes the color of the text that is optionally displayed on top of the progress bar.
color | The new text color that is displayed on top of the foreground color/image. |
This color is displayed on top of the filled part. The back text color will be used on top of the unfilled part.