![]()  | 
  
    Gamedev Framework (gf)
    0.8.0
    
   A C++14 framework for 2D games 
   | 
 
A text within a representative shape widget. More...
#include <gf/Widgets.h>

Public Member Functions | |
| TextShapeWidget (Text &text, Shape &shape) | |
| Construct a text button widget.  More... | |
| virtual void | render (RenderTarget &target, const RenderStates &states) override | 
| Render the widget on the target.  More... | |
| virtual bool | contains (Vector2f coords) override | 
| Check if the widget contains the coordinates.  More... | |
| void | setBackgroundOutlineThickness (float thickness) | 
| Set the thickness of the outline.  More... | |
| void | setDisabledBackgroundColor (const Color4f &color) | 
| Set the background's color of the button when disabled.  More... | |
| void | setDisabledBackgroundOutlineColor (const Color4f &color) | 
| Set the outline's color of the button when disabled.  More... | |
| void | setDefaultBackgroundColor (const Color4f &color) | 
| Set the background's color of the button when it's in a normal state.  More... | |
| void | setDefaultBackgroundOutlineColor (const Color4f &color) | 
| Set the outline's color of the button when it's in a normal state.  More... | |
| void | setSelectedBackgroundColor (const Color4f &color) | 
| Set the background's color of the button when selected.  More... | |
| void | setSelectedBackgroundOutlineColor (const Color4f &color) | 
| Set the outline's color of the button when selected.  More... | |
  Public Member Functions inherited from gf::TextWidget | |
| TextWidget (Text &text) | |
| Constructor.  More... | |
| void | setTextOutlineThickness (float thickness) | 
| Set the thickness of the outline.  More... | |
| void | setDisabledTextColor (const Color4f &color) | 
| Set the text's color of the button when disabled.  More... | |
| void | setDisabledTextOutlineColor (const Color4f &color) | 
| Set the outline's color of the button when disabled.  More... | |
| void | setDefaultTextColor (const Color4f &color) | 
| Set the text's color of the button when it's in a normal state.  More... | |
| void | setDefaultTextOutlineColor (const Color4f &color) | 
| Set the outline's color of the button when it's in a normal state.  More... | |
| void | setSelectedTextColor (const Color4f &color) | 
| Set the text's color of the button when selected.  More... | |
| void | setSelectedTextOutlineColor (const Color4f &color) | 
| Set the outline's color of the button when selected.  More... | |
  Public Member Functions inherited from gf::Widget | |
| Widget () | |
| Constructor.  More... | |
| virtual | ~Widget () | 
| Destructor.  More... | |
| void | setDisabled () | 
| Disable the widget.  More... | |
| bool | isDisabled () const noexcept | 
| Check if the widget is disabled.  More... | |
| void | setDefault () | 
| Set the widget to it's default state.  More... | |
| bool | isDefault () const noexcept | 
| Check if the widget is in default state.  More... | |
| void | setSelected () | 
| Select the widget.  More... | |
| bool | isSelected () const | 
| Check if the widget is selected.  More... | |
| void | setState (WidgetState state) | 
| Set the state of the widget directly.  More... | |
| WidgetState | getState () const noexcept | 
| Get the state of the widget.  More... | |
| void | setCallback (std::function< void()> callback) | 
| Set the callback of the widget.  More... | |
| void | triggerCallback () | 
| Execute the callback function.  More... | |
Additional Inherited Members | |
  Protected Member Functions inherited from gf::TextWidget | |
| Text & | getText () | 
  Protected Member Functions inherited from gf::Widget | |
| virtual void | triggered () | 
| Function called when the callback is triggered.  More... | |
Construct a text button widget.
| text | The text to bind to the text button. | 
| shape | The shape for the background of the button | 
      
  | 
  overridevirtual | 
Check if the widget contains the coordinates.
| coords | The coordinates to check | 
Reimplemented from gf::TextWidget.
      
  | 
  overridevirtual | 
Render the widget on the target.
| target | The render target | 
| states | The render states to use for drawing | 
Reimplemented from gf::TextWidget.
| void gf::TextShapeWidget::setBackgroundOutlineThickness | ( | float | thickness | ) | 
Set the thickness of the outline.
| thickness | The new value of the outline thickness. | 
| void gf::TextShapeWidget::setDefaultBackgroundColor | ( | const Color4f & | color | ) | 
Set the background's color of the button when it's in a normal state.
| color | The new color to apply | 
| void gf::TextShapeWidget::setDefaultBackgroundOutlineColor | ( | const Color4f & | color | ) | 
Set the outline's color of the button when it's in a normal state.
| color | The new color to apply | 
| void gf::TextShapeWidget::setDisabledBackgroundColor | ( | const Color4f & | color | ) | 
Set the background's color of the button when disabled.
| color | The new color to apply | 
| void gf::TextShapeWidget::setDisabledBackgroundOutlineColor | ( | const Color4f & | color | ) | 
Set the outline's color of the button when disabled.
| color | The new color to apply | 
| void gf::TextShapeWidget::setSelectedBackgroundColor | ( | const Color4f & | color | ) | 
Set the background's color of the button when selected.
| color | The new color to apply | 
| void gf::TextShapeWidget::setSelectedBackgroundOutlineColor | ( | const Color4f & | color | ) | 
Set the outline's color of the button when selected.
| color | The new color to apply | 
 1.8.13