Smolgui
Immediate gui library based on SFML
Loading...
Searching...
No Matches
sgui::WidgetAspect Struct Reference

Store data required to fully customize how a widget is drawn. More...

#include <Aspect.h>

Public Member Functions

 WidgetAspect ()=default
 WidgetAspect (const Widget w, const Slices s=Slices::Default, const ItemState is=ItemState::None)
 Constructor for widgets with default texture name.
 WidgetAspect (const std::string &img, const Slices s=Slices::Default, const ItemState is=ItemState::None)
 Constructor for widgets with custom texture name.

Public Attributes

std::string image = ""
 To use custom widget texture, you should use Widget::Image and put the texture index here.
Widget widget = Widget::None
 Change default widget type.
Slices slices = Slices::Default
 Change default widget slicing.
ItemState state = ItemState::None
 To force a specific state.

Detailed Description

Store data required to fully customize how a widget is drawn.

Constructor & Destructor Documentation

◆ WidgetAspect() [1/3]

sgui::WidgetAspect::WidgetAspect ( )
default

◆ WidgetAspect() [2/3]

sgui::WidgetAspect::WidgetAspect ( const Widget w,
const Slices s = Slices::Default,
const ItemState is = ItemState::None )
inline

Constructor for widgets with default texture name.

◆ WidgetAspect() [3/3]

sgui::WidgetAspect::WidgetAspect ( const std::string & img,
const Slices s = Slices::Default,
const ItemState is = ItemState::None )
inline

Constructor for widgets with custom texture name.

Member Data Documentation

◆ image

std::string sgui::WidgetAspect::image = ""

To use custom widget texture, you should use Widget::Image and put the texture index here.

◆ slices

Slices sgui::WidgetAspect::slices = Slices::Default

Change default widget slicing.

◆ state

ItemState sgui::WidgetAspect::state = ItemState::None

To force a specific state.

◆ widget

Widget sgui::WidgetAspect::widget = Widget::None

Change default widget type.


The documentation for this struct was generated from the following file:
  • /github/workspace/src/sgui/Widgets/Aspect.h