![]() |
Gamedev Framework (gf)
0.2.0
A C++11 framework for 2D games
|
A renderer for a user interface. More...
#include <gf/UI.h>

Public Member Functions | |
| virtual | ~UIRenderer () |
| Virtual destructor. More... | |
| virtual void | drawRect (RenderTarget &target, const RectF &rect, float corner, UIFlags flags) const =0 |
| Draw a rectangle. More... | |
| virtual void | drawText (RenderTarget &target, const std::string &text, unsigned size, Vector2f pos, float width, Alignment alignment, UIFlags flags) const =0 |
| Draw a text. More... | |
| virtual void | drawIcon (RenderTarget &target, Vector2f pos, UIIcon icon, UIFlags flags) const =0 |
| Draw an icon. More... | |
A renderer for a user interface.
The renderer is responsible for displaying the elements of the widgets. An element is a rectangle, a text or an icon. The flags indicate the status of the element that can be represented by a color.
|
virtual |
Virtual destructor.
|
pure virtual |
Draw an icon.
| target | The target to draw on |
| pos | The position of the icon (center) |
| icon | The icon to draw |
| flags | The status of the widget |
Implemented in gf::DefaultUIRenderer.
|
pure virtual |
Draw a rectangle.
| target | The target to draw on |
| rect | The coordinates of the rectangle to draw |
| corner | The corner size (or no corner if 0) |
| flags | The status of the widget |
Implemented in gf::DefaultUIRenderer.
|
pure virtual |
Draw a text.
| target | The target to draw on |
| text | The text to draw |
| size | The character size of the text |
| pos | The position of the text (top-left corner) |
| width | The availabe width for the text |
| alignment | The alignment of the text |
| flags | The status of the widget |
Implemented in gf::DefaultUIRenderer.
1.8.8