Smolgui
Immediate gui library based on SFML
Loading...
Searching...
No Matches
Aspect.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
6
7namespace sgui
8{
9
14{
15 WidgetAspect () = default;
20 : widget (w), slices (s), state (is) {}
21
24 WidgetAspect (const std::string& img, const Slices s = Slices::Default, const ItemState is = ItemState::None)
25 : image (img), slices (s), state (is) {}
26 // data
27 std::string image = "";
31};
32
33} // namespace sgui
Definition Interpolation.h:16
Slices
Defines number of slices for stretchable widgets.
Definition Widgets.h:39
@ Default
Definition Widgets.h:43
ItemState
List gui elements states.
Definition ItemStates.h:11
@ None
Definition ItemStates.h:15
Widget
List widget textures available in gui.
Definition Widgets.h:11
@ None
Definition Widgets.h:32
Widget widget
Change default widget type.
Definition Aspect.h:28
Slices slices
Change default widget slicing.
Definition Aspect.h:29
WidgetAspect()=default
WidgetAspect(const Widget w, const Slices s=Slices::Default, const ItemState is=ItemState::None)
Constructor for widgets with default texture name.
Definition Aspect.h:19
WidgetAspect(const std::string &img, const Slices s=Slices::Default, const ItemState is=ItemState::None)
Constructor for widgets with custom texture name.
Definition Aspect.h:24
std::string image
To use custom widget texture, you should use Widget::Image and put the texture index here.
Definition Aspect.h:27
ItemState state
To force a specific state.
Definition Aspect.h:30