Background | Widget, displays a solid color area. It can be used as a background in sub-widgets or windows.
Specifying a nullptr value as a window is prohibited.
Example (using widget as background for window):
Window window(nullptr, "Bg test", { {250,100}, {980,620}, WindowFlags::AutoInvokeRender});
Background bg(&window, {{0,0}, {0,0}, ResizePolicy::AutoFill});
| class |
Image | Widget that displays an image that uses a loaded texture. Example:
Window window(nullptr, "Image test", { {250,100}, {980,620}, WindowFlags::AutoInvokeRender});
Texture texture("path.png");
Image image(&window, {{500, 250}, {0, 0}, ImageFlags::DetectSize}, ImageTheme(), &texture);
| class |
Text | Widget that allows to display text on the screen.
Window window(nullptr, "Text test", { {250,100}, {980,620}, WindowFlags::AutoInvokeRender});
Font font("fontname.ttf");
font.LoadFontSize(12)
Text text(&window, {{500, 250}, {0, 0}, Anchor::Left|Anchor::Bottom}, {12, Color{255,0,0,255}, &font}, L"My Text");
| class |