Lysa UI  0.0
Lysa UI —UI components for the Lysa Engine
StyleClassic Class Reference

Detailed Description

Classic vector style UI with 3D look.

+ Inheritance diagram for StyleClassic:

Public Member Functions

 ~StyleClassic () override = default
 
void draw (const Widget &widget, UIResource &resources, Vector2DRenderer &renderer, bool before) const override
 
void addResource (Widget &widget, const std::string &resources) override
 
void resize (Widget &widget, Rect &rect, UIResource &resources) override
 
- Public Member Functions inherited from Style
 Style ()
 
virtual ~Style () = default
 
virtual void setOption (const std::string &name, const std::string &value)
 
std::string getOption (const std::string &name) const
 
std::shared_ptr< Font > getFont () const
 

Additional Inherited Members

- Static Public Member Functions inherited from Style
static std::shared_ptr< Style > create (const std::string &name="vector")
 
- Protected Member Functions inherited from Style
virtual void init ()
 
- Protected Attributes inherited from Style
std::shared_ptr< Font > font
 

Constructor & Destructor Documentation

~StyleClassic ( )
overridedefault

Member Function Documentation

void addResource ( Widget widget,
const std::string &  resources 
)
overridevirtual

Create a resource from a resources description string.

Parameters
widgetWidget to associate resources with.
resourcesString describing the resources.

Implements lysa::ui::Style::addResource()

void draw ( const Widget widget,
UIResource resources,
Vector2DRenderer &  render,
bool  when 
) const
overridevirtual

Draws a widget.

Parameters
widgetWidget to draw.
resourcesResources used for drawing this widget.
renderThe 2D renderer.
whenTrue = before drawing children, False = after.

Implements lysa::ui::Style::draw()

void resize ( Widget widget,
Rect &  rect,
UIResource resources 
)
overridevirtual

Adjusts a widget size to style specific constraints.

Parameters
widgetThe widget being resized.
rectThe rectangle to adjust.
resourcesThe widget's UI resources.

Implements lysa::ui::Style::resize()