TGUI  1.2.0
Loading...
Searching...
No Matches
tgui::ButtonRenderer Class Reference
Inheritance diagram for tgui::ButtonRenderer:
tgui::WidgetRenderer

Public Member Functions

void setBorders (const Borders &borders)
 Changes the size of the borders.
 
TGUI_NODISCARD Borders getBorders () const
 Returns the size of the borders.
 
void setTextColor (Color color)
 Changes the color of the text.
 
TGUI_NODISCARD Color getTextColor () const
 Returns the text color.
 
void setTextColorDown (Color color)
 Changes the color of the text in the down state (mouse on button and left mouse button being held down)
 
TGUI_NODISCARD Color getTextColorDown () const
 Returns the text color in the down state (mouse on button and left mouse button being held down)
 
void setTextColorHover (Color color)
 Changes the color of the text in the hover state (mouse on button, but not pressed)
 
TGUI_NODISCARD Color getTextColorHover () const
 Returns the text color in the hover state (mouse on button, but not pressed)
 
void setTextColorDownHover (Color color)
 Changes the text color when in both down and hover state (mouse on button while button pressed)
 
TGUI_NODISCARD Color getTextColorDownHover () const
 Returns the text color when in both down and hover state (mouse on button while button pressed)
 
void setTextColorDisabled (Color color)
 Changes the color of the text that is used when the button is disabled.
 
TGUI_NODISCARD Color getTextColorDisabled () const
 Returns the text color that is used when the button is disabled.
 
void setTextColorDownDisabled (Color color)
 Changes the color of the text that is used when the button is disabled while in pressed state.
 
TGUI_NODISCARD Color getTextColorDownDisabled () const
 Returns the text color that is used when the button is disabled while in pressed state.
 
void setTextColorFocused (Color color)
 Changes the color of the text that is used when the button is focused.
 
TGUI_NODISCARD Color getTextColorFocused () const
 Returns the text color that is used when the button is focused.
 
void setTextColorDownFocused (Color color)
 Changes the color of the text that is used when the button is focused while in pressed state.
 
TGUI_NODISCARD Color getTextColorDownFocused () const
 Returns the text color that is used when the button is focused while in pressed state.
 
void setBackgroundColor (Color color)
 Changes the color of the background.
 
TGUI_NODISCARD Color getBackgroundColor () const
 Returns the background color.
 
void setBackgroundColorDown (Color color)
 Changes the color of the background in the down state (mouse on button and left mouse button being held down)
 
TGUI_NODISCARD Color getBackgroundColorDown () const
 Returns the background color in the down state (mouse on button and left mouse button being held down)
 
void setBackgroundColorHover (Color color)
 Changes the color of the background in the hover state (mouse on button, but not pressed)
 
TGUI_NODISCARD Color getBackgroundColorHover () const
 Returns the background color in the hover state (mouse on button, but not pressed)
 
void setBackgroundColorDownHover (Color color)
 Changes the color of the background when in both down and hover state (mouse on button while button pressed)
 
TGUI_NODISCARD Color getBackgroundColorDownHover () const
 Returns the background color when in both down and hover state (mouse on button while button pressed)
 
void setBackgroundColorDisabled (Color color)
 Changes the color of the background that is used when the button is disabled.
 
TGUI_NODISCARD Color getBackgroundColorDisabled () const
 Returns the background color that is used when the button is disabled.
 
void setBackgroundColorDownDisabled (Color color)
 Changes the color of the background that is used when the button is disabled while in pressed state.
 
TGUI_NODISCARD Color getBackgroundColorDownDisabled () const
 Returns the background color that is used when the button is disabled while in pressed state.
 
void setBackgroundColorFocused (Color color)
 Changes the color of the background that is used when the button is focused.
 
TGUI_NODISCARD Color getBackgroundColorFocused () const
 Returns the background color that is used when the button is focused.
 
void setBackgroundColorDownFocused (Color color)
 Changes the color of the background used when the button is focused while in pressed state.
 
TGUI_NODISCARD Color getBackgroundColorDownFocused () const
 Returns the background color that is used when the button is focused while in pressed state.
 
void setBorderColor (Color color)
 Changes the color of the borders.
 
TGUI_NODISCARD Color getBorderColor () const
 Returns the color of the borders.
 
void setBorderColorDown (Color color)
 Changes the color of the borders in the down state (mouse on button and left mouse button being held down)
 
TGUI_NODISCARD Color getBorderColorDown () const
 Returns the color of the borders in the down state (mouse on button and left mouse button being held down)
 
void setBorderColorHover (Color color)
 Changes the color of the borders in the hover state (mouse on button, but not pressed)
 
TGUI_NODISCARD Color getBorderColorHover () const
 Returns the color of the borders in the hover state (mouse on button, but not pressed)
 
void setBorderColorDownHover (Color color)
 Changes the color of the borders when in both down and hover state (mouse on button while button pressed)
 
TGUI_NODISCARD Color getBorderColorDownHover () const
 Returns the color of the borders when in both down and hover state (mouse on button while button pressed)
 
void setBorderColorDisabled (Color color)
 Changes the color of the borders that is used when the button is disabled.
 
TGUI_NODISCARD Color getBorderColorDisabled () const
 Returns the color of the borders that is used when the button is disabled.
 
void setBorderColorDownDisabled (Color color)
 Changes the color of the borders that is used when the button is disabled while in pressed state.
 
TGUI_NODISCARD Color getBorderColorDownDisabled () const
 Returns the color of the borders that is used when the button is disabled while in pressed state.
 
void setBorderColorFocused (Color color)
 Changes the color of the borders that is used when the button is focused.
 
TGUI_NODISCARD Color getBorderColorFocused () const
 Returns the color of the borders that is used when the button is focused.
 
void setBorderColorDownFocused (Color color)
 Changes the color of the borders that is used when the button is focused while in pressed state.
 
TGUI_NODISCARD Color getBorderColorDownFocused () const
 Returns the color of the borders that is used when the button is focused while in pressed state.
 
void setTexture (const Texture &texture)
 Change the image that is displayed.
 
TGUI_NODISCARD const TexturegetTexture () const
 Returns the image that is displayed.
 
void setTextureDown (const Texture &texture)
 Changes the image that is displayed when the mouse is held down on top of the button.
 
TGUI_NODISCARD const TexturegetTextureDown () const
 Returns the image that is displayed when the mouse is held down on top of the button.
 
void setTextureHover (const Texture &texture)
 Changes the image that is displayed when the mouse is located on top of the button.
 
TGUI_NODISCARD const TexturegetTextureHover () const
 Returns the image that is displayed when the mouse is located on top of the button.
 
void setTextureDownHover (const Texture &texture)
 Changes the image that is displayed when in both down and hover state (mouse on button while button pressed)
 
TGUI_NODISCARD const TexturegetTextureDownHover () const
 Returns the image that is displayed when in both down and hover state (mouse on button while button pressed)
 
void setTextureDisabled (const Texture &texture)
 Changes the image that is displayed when the button is disabled.
 
TGUI_NODISCARD const TexturegetTextureDisabled () const
 Returns the image that is displayed when the button is disabled.
 
void setTextureDownDisabled (const Texture &texture)
 Changes the image that is displayed when the button is disabled while in pressed state.
 
TGUI_NODISCARD const TexturegetTextureDownDisabled () const
 Returns the image that is displayed when the button is disabled while in pressed state.
 
void setTextureFocused (const Texture &texture)
 Change the image that is drawn on top of the button image when the button is focused.
 
TGUI_NODISCARD const TexturegetTextureFocused () const
 Returns the image that is drawn on top of the button image when the button is focused.
 
void setTextureDownFocused (const Texture &texture)
 Change the image that is drawn on top of the button image when the button is focused while in pressed state.
 
TGUI_NODISCARD const TexturegetTextureDownFocused () const
 Returns the image that is drawn on top of the button image when the button is focused while in pressed state.
 
void setTextStyle (TextStyles style)
 Changes the text style.
 
TGUI_NODISCARD TextStyles getTextStyle () const
 Returns text style.
 
void setTextStyleDown (TextStyles style)
 Changes the text style in the down state (mouse on button and left mouse button being held down)
 
TGUI_NODISCARD TextStyles getTextStyleDown () const
 Returns text style in the down state (mouse on button and left mouse button being held down)
 
void setTextStyleHover (TextStyles style)
 Changes the text style in the hover state (mouse on button, but not pressed)
 
TGUI_NODISCARD TextStyles getTextStyleHover () const
 Returns text style in the hover state (mouse on button, but not pressed)
 
void setTextStyleDownHover (TextStyles style)
 Changes the text style when in both down and hover state (mouse on button while button pressed)
 
TGUI_NODISCARD TextStyles getTextStyleDownHover () const
 Returns text style when in both down and hover state (mouse on button while button pressed)
 
void setTextStyleDisabled (TextStyles style)
 Changes the text style that is used when the button is disabled.
 
TGUI_NODISCARD TextStyles getTextStyleDisabled () const
 Returns text style used when the button is disabled.
 
void setTextStyleDownDisabled (TextStyles style)
 Changes the text style that is used when the button is disabled while in pressed state.
 
TGUI_NODISCARD TextStyles getTextStyleDownDisabled () const
 Returns text style used when the button is disabled while in pressed state.
 
void setTextStyleFocused (TextStyles style)
 Changes the text style that is used when the button is focused.
 
TGUI_NODISCARD TextStyles getTextStyleFocused () const
 Returns text style used when the button is focused.
 
void setTextStyleDownFocused (TextStyles style)
 Changes the text style that is used when the button is focused while in pressed state.
 
TGUI_NODISCARD TextStyles getTextStyleDownFocused () const
 Returns text style used when the button is focused while in pressed state.
 
void setTextOutlineColor (Color outlineColor)
 Changes the outline color of the text (used when TextOutlineThickness > 0)
 
TGUI_NODISCARD Color getTextOutlineColor () const
 Returns the outline color of the text (used when TextOutlineThickness > 0)
 
void setTextOutlineThickness (float outlineThickness)
 Changes the thickness of the text outline (0 by default, which means there is no outline).
 
TGUI_NODISCARD float getTextOutlineThickness () const
 Returns the thickness of the text outline.
 
void setRoundedBorderRadius (float radius)
 Changes the radius for the rounded corners if you want to draw a rounded rectangle as background.
 
TGUI_NODISCARD float getRoundedBorderRadius () const
 Returns the radius for the rounded corners if you want to draw a rounded rectangle as background.
 
 WidgetRenderer ()=default
 Default constructor.
 
 WidgetRenderer (const WidgetRenderer &)
 Copy constructor.
 
 WidgetRenderer (WidgetRenderer &&)=default
 Default move constructor.
 
 WidgetRenderer (const std::shared_ptr< RendererData > &data)
 Construct the renderer from renderer data.
 
- Public Member Functions inherited from tgui::WidgetRenderer
 WidgetRenderer ()=default
 Default constructor.
 
 WidgetRenderer (const WidgetRenderer &)
 Copy constructor.
 
 WidgetRenderer (WidgetRenderer &&)=default
 Default move constructor.
 
WidgetRendereroperator= (const WidgetRenderer &)
 Copy assignment operator.
 
WidgetRendereroperator= (WidgetRenderer &&)=default
 Default move assignment operator.
 
 WidgetRenderer (const std::shared_ptr< RendererData > &data)
 Construct the renderer from renderer data.
 
virtual ~WidgetRenderer ()=default
 Virtual destructor.
 
void setOpacity (float opacity)
 Changes the opacity of the widget.
 
TGUI_NODISCARD float getOpacity () const
 Returns the opacity of the widget.
 
void setOpacityDisabled (float opacity)
 Changes the opacity of the widget when it is disabled.
 
TGUI_NODISCARD float getOpacityDisabled () const
 Returns the opacity of the widget when it is disabled.
 
void setFont (const Font &font)
 Changes the font used for the text in the widget.
 
TGUI_NODISCARD Font getFont () const
 Returns the font associated with the widget (if any)
 
void setTextSize (unsigned int size)
 Changes the text size of the widget that is specified by the renderer.
 
TGUI_NODISCARD unsigned int getTextSize () const
 Returns text size of the widget that is specified by the renderer.
 
void setTransparentTexture (bool ignoreTransparentParts)
 Sets whether mouse events should be ignored on transparent parts of the texture of the widget in normal state.
 
TGUI_NODISCARD bool getTransparentTexture () const
 Returns whether mouse events should be ignored on transparent parts of the texture of the widget.
 
void setProperty (const String &property, ObjectConverter &&value)
 Changes a property of the renderer.
 
TGUI_NODISCARD ObjectConverter getProperty (const String &property) const
 Retrieves the value of a certain property.
 
TGUI_NODISCARD const std::map< String, ObjectConverter > & getPropertyValuePairs () const
 Gets a map with all properties and their values.
 
void subscribe (Widget *widget)
 Subscribes a callback function to changes in the renderer.
 
void unsubscribe (Widget *widget)
 Subscribes a callback function to changes in the renderer.
 
void setData (const std::shared_ptr< RendererData > &data)
 
TGUI_NODISCARD std::shared_ptr< RendererDatagetData () const
 Returns the renderer data.
 
TGUI_NODISCARD std::shared_ptr< RendererDataclone () const
 Gets a clone of the renderer data.
 

Additional Inherited Members

- Protected Attributes inherited from tgui::WidgetRenderer
std::shared_ptr< RendererDatam_data = RendererData::create()
 

Member Function Documentation

◆ getBackgroundColor()

TGUI_NODISCARD Color tgui::ButtonRenderer::getBackgroundColor ( ) const

Returns the background color.

Returns
background color

◆ getBackgroundColorDisabled()

TGUI_NODISCARD Color tgui::ButtonRenderer::getBackgroundColorDisabled ( ) const

Returns the background color that is used when the button is disabled.

Returns
background color

◆ getBackgroundColorDown()

TGUI_NODISCARD Color tgui::ButtonRenderer::getBackgroundColorDown ( ) const

Returns the background color in the down state (mouse on button and left mouse button being held down)

Returns
background color

◆ getBackgroundColorDownDisabled()

TGUI_NODISCARD Color tgui::ButtonRenderer::getBackgroundColorDownDisabled ( ) const

Returns the background color that is used when the button is disabled while in pressed state.

Returns
background color

◆ getBackgroundColorDownFocused()

TGUI_NODISCARD Color tgui::ButtonRenderer::getBackgroundColorDownFocused ( ) const

Returns the background color that is used when the button is focused while in pressed state.

Returns
background color

◆ getBackgroundColorDownHover()

TGUI_NODISCARD Color tgui::ButtonRenderer::getBackgroundColorDownHover ( ) const

Returns the background color when in both down and hover state (mouse on button while button pressed)

Returns
background color

◆ getBackgroundColorFocused()

TGUI_NODISCARD Color tgui::ButtonRenderer::getBackgroundColorFocused ( ) const

Returns the background color that is used when the button is focused.

Returns
background color

◆ getBackgroundColorHover()

TGUI_NODISCARD Color tgui::ButtonRenderer::getBackgroundColorHover ( ) const

Returns the background color in the hover state (mouse on button, but not pressed)

Returns
background color

◆ getBorderColor()

TGUI_NODISCARD Color tgui::ButtonRenderer::getBorderColor ( ) const

Returns the color of the borders.

Returns
Border color

◆ getBorderColorDisabled()

TGUI_NODISCARD Color tgui::ButtonRenderer::getBorderColorDisabled ( ) const

Returns the color of the borders that is used when the button is disabled.

Returns
Border color

◆ getBorderColorDown()

TGUI_NODISCARD Color tgui::ButtonRenderer::getBorderColorDown ( ) const

Returns the color of the borders in the down state (mouse on button and left mouse button being held down)

Returns
Border color

◆ getBorderColorDownDisabled()

TGUI_NODISCARD Color tgui::ButtonRenderer::getBorderColorDownDisabled ( ) const

Returns the color of the borders that is used when the button is disabled while in pressed state.

Returns
Border color

◆ getBorderColorDownFocused()

TGUI_NODISCARD Color tgui::ButtonRenderer::getBorderColorDownFocused ( ) const

Returns the color of the borders that is used when the button is focused while in pressed state.

Returns
Border color

◆ getBorderColorDownHover()

TGUI_NODISCARD Color tgui::ButtonRenderer::getBorderColorDownHover ( ) const

Returns the color of the borders when in both down and hover state (mouse on button while button pressed)

Returns
Border color

◆ getBorderColorFocused()

TGUI_NODISCARD Color tgui::ButtonRenderer::getBorderColorFocused ( ) const

Returns the color of the borders that is used when the button is focused.

Returns
Border color

◆ getBorderColorHover()

TGUI_NODISCARD Color tgui::ButtonRenderer::getBorderColorHover ( ) const

Returns the color of the borders in the hover state (mouse on button, but not pressed)

Returns
Border color

◆ getBorders()

TGUI_NODISCARD Borders tgui::ButtonRenderer::getBorders ( ) const

Returns the size of the borders.

Returns
border size

◆ getRoundedBorderRadius()

TGUI_NODISCARD float tgui::ButtonRenderer::getRoundedBorderRadius ( ) const

Returns the radius for the rounded corners if you want to draw a rounded rectangle as background.

Returns
Radius of the corners

◆ getTextColor()

TGUI_NODISCARD Color tgui::ButtonRenderer::getTextColor ( ) const

Returns the text color.

Returns
text color

◆ getTextColorDisabled()

TGUI_NODISCARD Color tgui::ButtonRenderer::getTextColorDisabled ( ) const

Returns the text color that is used when the button is disabled.

Returns
text color

◆ getTextColorDown()

TGUI_NODISCARD Color tgui::ButtonRenderer::getTextColorDown ( ) const

Returns the text color in the down state (mouse on button and left mouse button being held down)

Returns
text color

◆ getTextColorDownDisabled()

TGUI_NODISCARD Color tgui::ButtonRenderer::getTextColorDownDisabled ( ) const

Returns the text color that is used when the button is disabled while in pressed state.

Returns
text color

◆ getTextColorDownFocused()

TGUI_NODISCARD Color tgui::ButtonRenderer::getTextColorDownFocused ( ) const

Returns the text color that is used when the button is focused while in pressed state.

Returns
text color

◆ getTextColorDownHover()

TGUI_NODISCARD Color tgui::ButtonRenderer::getTextColorDownHover ( ) const

Returns the text color when in both down and hover state (mouse on button while button pressed)

Returns
text color

◆ getTextColorFocused()

TGUI_NODISCARD Color tgui::ButtonRenderer::getTextColorFocused ( ) const

Returns the text color that is used when the button is focused.

Returns
text color

◆ getTextColorHover()

TGUI_NODISCARD Color tgui::ButtonRenderer::getTextColorHover ( ) const

Returns the text color in the hover state (mouse on button, but not pressed)

Returns
text color

◆ getTextOutlineColor()

TGUI_NODISCARD Color tgui::ButtonRenderer::getTextOutlineColor ( ) const

Returns the outline color of the text (used when TextOutlineThickness > 0)

Returns
Text outline color

◆ getTextOutlineThickness()

TGUI_NODISCARD float tgui::ButtonRenderer::getTextOutlineThickness ( ) const

Returns the thickness of the text outline.

Returns
Text outline thickness

◆ getTextStyle()

TGUI_NODISCARD TextStyles tgui::ButtonRenderer::getTextStyle ( ) const

Returns text style.

Returns
Style of the text

◆ getTextStyleDisabled()

TGUI_NODISCARD TextStyles tgui::ButtonRenderer::getTextStyleDisabled ( ) const

Returns text style used when the button is disabled.

Returns
Style of the text

◆ getTextStyleDown()

TGUI_NODISCARD TextStyles tgui::ButtonRenderer::getTextStyleDown ( ) const

Returns text style in the down state (mouse on button and left mouse button being held down)

Returns
Style of the text

◆ getTextStyleDownDisabled()

TGUI_NODISCARD TextStyles tgui::ButtonRenderer::getTextStyleDownDisabled ( ) const

Returns text style used when the button is disabled while in pressed state.

Returns
Style of the text

◆ getTextStyleDownFocused()

TGUI_NODISCARD TextStyles tgui::ButtonRenderer::getTextStyleDownFocused ( ) const

Returns text style used when the button is focused while in pressed state.

Returns
Style of the text

◆ getTextStyleDownHover()

TGUI_NODISCARD TextStyles tgui::ButtonRenderer::getTextStyleDownHover ( ) const

Returns text style when in both down and hover state (mouse on button while button pressed)

Returns
Style of the text

◆ getTextStyleFocused()

TGUI_NODISCARD TextStyles tgui::ButtonRenderer::getTextStyleFocused ( ) const

Returns text style used when the button is focused.

Returns
Style of the text

◆ getTextStyleHover()

TGUI_NODISCARD TextStyles tgui::ButtonRenderer::getTextStyleHover ( ) const

Returns text style in the hover state (mouse on button, but not pressed)

Returns
Style of the text

◆ getTexture()

TGUI_NODISCARD const Texture & tgui::ButtonRenderer::getTexture ( ) const

Returns the image that is displayed.

Returns
texture of the button

◆ getTextureDisabled()

TGUI_NODISCARD const Texture & tgui::ButtonRenderer::getTextureDisabled ( ) const

Returns the image that is displayed when the button is disabled.

Returns
disabled texture

◆ getTextureDown()

TGUI_NODISCARD const Texture & tgui::ButtonRenderer::getTextureDown ( ) const

Returns the image that is displayed when the mouse is held down on top of the button.

Returns
down texture

◆ getTextureDownDisabled()

TGUI_NODISCARD const Texture & tgui::ButtonRenderer::getTextureDownDisabled ( ) const

Returns the image that is displayed when the button is disabled while in pressed state.

Returns
disabled texture

◆ getTextureDownFocused()

TGUI_NODISCARD const Texture & tgui::ButtonRenderer::getTextureDownFocused ( ) const

Returns the image that is drawn on top of the button image when the button is focused while in pressed state.

Returns
focused texture

◆ getTextureDownHover()

TGUI_NODISCARD const Texture & tgui::ButtonRenderer::getTextureDownHover ( ) const

Returns the image that is displayed when in both down and hover state (mouse on button while button pressed)

Returns
hover texture

◆ getTextureFocused()

TGUI_NODISCARD const Texture & tgui::ButtonRenderer::getTextureFocused ( ) const

Returns the image that is drawn on top of the button image when the button is focused.

Returns
focused texture

◆ getTextureHover()

TGUI_NODISCARD const Texture & tgui::ButtonRenderer::getTextureHover ( ) const

Returns the image that is displayed when the mouse is located on top of the button.

Returns
hover texture

◆ setBackgroundColor()

void tgui::ButtonRenderer::setBackgroundColor ( Color color)

Changes the color of the background.

Parameters
colorNew background color

Note that this color is ignored when you set an image as background.

◆ setBackgroundColorDisabled()

void tgui::ButtonRenderer::setBackgroundColorDisabled ( Color color)

Changes the color of the background that is used when the button is disabled.

Parameters
colorNew background color

Note that this color is ignored when you set an image as background.

◆ setBackgroundColorDown()

void tgui::ButtonRenderer::setBackgroundColorDown ( Color color)

Changes the color of the background in the down state (mouse on button and left mouse button being held down)

Parameters
colorNew background color

Note that this color is ignored when you set an image as background.

◆ setBackgroundColorDownDisabled()

void tgui::ButtonRenderer::setBackgroundColorDownDisabled ( Color color)

Changes the color of the background that is used when the button is disabled while in pressed state.

Parameters
colorNew background color

Note that this color is ignored when you set an image as background.

◆ setBackgroundColorDownFocused()

void tgui::ButtonRenderer::setBackgroundColorDownFocused ( Color color)

Changes the color of the background used when the button is focused while in pressed state.

Parameters
colorNew background color

Note that this color is ignored when you set an image as background.

◆ setBackgroundColorDownHover()

void tgui::ButtonRenderer::setBackgroundColorDownHover ( Color color)

Changes the color of the background when in both down and hover state (mouse on button while button pressed)

Parameters
colorNew background color

Note that this color is ignored when you set an image as background.

◆ setBackgroundColorFocused()

void tgui::ButtonRenderer::setBackgroundColorFocused ( Color color)

Changes the color of the background that is used when the button is focused.

Parameters
colorNew background color

Note that this color is ignored when you set an image as background.

◆ setBackgroundColorHover()

void tgui::ButtonRenderer::setBackgroundColorHover ( Color color)

Changes the color of the background in the hover state (mouse on button, but not pressed)

Parameters
colorNew background color

Note that this color is ignored when you set an image as background.

◆ setBorderColor()

void tgui::ButtonRenderer::setBorderColor ( Color color)

Changes the color of the borders.

Parameters
colorNew border color

◆ setBorderColorDisabled()

void tgui::ButtonRenderer::setBorderColorDisabled ( Color color)

Changes the color of the borders that is used when the button is disabled.

Parameters
colorNew border color

◆ setBorderColorDown()

void tgui::ButtonRenderer::setBorderColorDown ( Color color)

Changes the color of the borders in the down state (mouse on button and left mouse button being held down)

Parameters
colorNew border color

◆ setBorderColorDownDisabled()

void tgui::ButtonRenderer::setBorderColorDownDisabled ( Color color)

Changes the color of the borders that is used when the button is disabled while in pressed state.

Parameters
colorNew border color

◆ setBorderColorDownFocused()

void tgui::ButtonRenderer::setBorderColorDownFocused ( Color color)

Changes the color of the borders that is used when the button is focused while in pressed state.

Parameters
colorNew border color

◆ setBorderColorDownHover()

void tgui::ButtonRenderer::setBorderColorDownHover ( Color color)

Changes the color of the borders when in both down and hover state (mouse on button while button pressed)

Parameters
colorNew border color

◆ setBorderColorFocused()

void tgui::ButtonRenderer::setBorderColorFocused ( Color color)

Changes the color of the borders that is used when the button is focused.

Parameters
colorNew border color

◆ setBorderColorHover()

void tgui::ButtonRenderer::setBorderColorHover ( Color color)

Changes the color of the borders in the hover state (mouse on button, but not pressed)

Parameters
colorNew border color

◆ setBorders()

void tgui::ButtonRenderer::setBorders ( const Borders & borders)

Changes the size of the borders.

Parameters
bordersSize of the borders

◆ setRoundedBorderRadius()

void tgui::ButtonRenderer::setRoundedBorderRadius ( float radius)

Changes the radius for the rounded corners if you want to draw a rounded rectangle as background.

Parameters
radiusRadius of the corners
Warning
This property is ignored when textures are used as background

◆ setTextColor()

void tgui::ButtonRenderer::setTextColor ( Color color)

Changes the color of the text.

Parameters
colorNew text color

◆ setTextColorDisabled()

void tgui::ButtonRenderer::setTextColorDisabled ( Color color)

Changes the color of the text that is used when the button is disabled.

Parameters
colorNew text color

◆ setTextColorDown()

void tgui::ButtonRenderer::setTextColorDown ( Color color)

Changes the color of the text in the down state (mouse on button and left mouse button being held down)

Parameters
colorNew text color

◆ setTextColorDownDisabled()

void tgui::ButtonRenderer::setTextColorDownDisabled ( Color color)

Changes the color of the text that is used when the button is disabled while in pressed state.

Parameters
colorNew text color

◆ setTextColorDownFocused()

void tgui::ButtonRenderer::setTextColorDownFocused ( Color color)

Changes the color of the text that is used when the button is focused while in pressed state.

Parameters
colorNew text color

◆ setTextColorDownHover()

void tgui::ButtonRenderer::setTextColorDownHover ( Color color)

Changes the text color when in both down and hover state (mouse on button while button pressed)

Parameters
colorNew text color

◆ setTextColorFocused()

void tgui::ButtonRenderer::setTextColorFocused ( Color color)

Changes the color of the text that is used when the button is focused.

Parameters
colorNew text color

◆ setTextColorHover()

void tgui::ButtonRenderer::setTextColorHover ( Color color)

Changes the color of the text in the hover state (mouse on button, but not pressed)

Parameters
colorNew text color

◆ setTextOutlineColor()

void tgui::ButtonRenderer::setTextOutlineColor ( Color outlineColor)

Changes the outline color of the text (used when TextOutlineThickness > 0)

Parameters
outlineColorNew text outline color

◆ setTextOutlineThickness()

void tgui::ButtonRenderer::setTextOutlineThickness ( float outlineThickness)

Changes the thickness of the text outline (0 by default, which means there is no outline).

Parameters
outlineThicknessNew text outline thickness

◆ setTextStyle()

void tgui::ButtonRenderer::setTextStyle ( TextStyles style)

Changes the text style.

Parameters
styleNew text style

◆ setTextStyleDisabled()

void tgui::ButtonRenderer::setTextStyleDisabled ( TextStyles style)

Changes the text style that is used when the button is disabled.

Parameters
styleNew text style

◆ setTextStyleDown()

void tgui::ButtonRenderer::setTextStyleDown ( TextStyles style)

Changes the text style in the down state (mouse on button and left mouse button being held down)

Parameters
styleNew text style

◆ setTextStyleDownDisabled()

void tgui::ButtonRenderer::setTextStyleDownDisabled ( TextStyles style)

Changes the text style that is used when the button is disabled while in pressed state.

Parameters
styleNew text style

◆ setTextStyleDownFocused()

void tgui::ButtonRenderer::setTextStyleDownFocused ( TextStyles style)

Changes the text style that is used when the button is focused while in pressed state.

Parameters
styleNew text style

◆ setTextStyleDownHover()

void tgui::ButtonRenderer::setTextStyleDownHover ( TextStyles style)

Changes the text style when in both down and hover state (mouse on button while button pressed)

Parameters
styleNew text style

◆ setTextStyleFocused()

void tgui::ButtonRenderer::setTextStyleFocused ( TextStyles style)

Changes the text style that is used when the button is focused.

Parameters
styleNew text style

◆ setTextStyleHover()

void tgui::ButtonRenderer::setTextStyleHover ( TextStyles style)

Changes the text style in the hover state (mouse on button, but not pressed)

Parameters
styleNew text style

◆ setTexture()

void tgui::ButtonRenderer::setTexture ( const Texture & texture)

Change the image that is displayed.

Parameters
textureThe new texture

When this image is set, the background color property will be ignored.

◆ setTextureDisabled()

void tgui::ButtonRenderer::setTextureDisabled ( const Texture & texture)

Changes the image that is displayed when the button is disabled.

Parameters
textureThe new disabled texture

◆ setTextureDown()

void tgui::ButtonRenderer::setTextureDown ( const Texture & texture)

Changes the image that is displayed when the mouse is held down on top of the button.

Parameters
textureThe new down texture

◆ setTextureDownDisabled()

void tgui::ButtonRenderer::setTextureDownDisabled ( const Texture & texture)

Changes the image that is displayed when the button is disabled while in pressed state.

Parameters
textureThe new disabled texture

◆ setTextureDownFocused()

void tgui::ButtonRenderer::setTextureDownFocused ( const Texture & texture)

Change the image that is drawn on top of the button image when the button is focused while in pressed state.

Parameters
textureThe new focus texture

◆ setTextureDownHover()

void tgui::ButtonRenderer::setTextureDownHover ( const Texture & texture)

Changes the image that is displayed when in both down and hover state (mouse on button while button pressed)

Parameters
textureThe new hover texture

◆ setTextureFocused()

void tgui::ButtonRenderer::setTextureFocused ( const Texture & texture)

Change the image that is drawn on top of the button image when the button is focused.

Parameters
textureThe new focus texture

◆ setTextureHover()

void tgui::ButtonRenderer::setTextureHover ( const Texture & texture)

Changes the image that is displayed when the mouse is located on top of the button.

Parameters
textureThe new hover texture

◆ WidgetRenderer()

tgui::WidgetRenderer::WidgetRenderer ( const std::shared_ptr< RendererData > & data)
inline

Construct the renderer from renderer data.

Parameters
dataRenderer data to initialize the renderer with

The documentation for this class was generated from the following file: