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

Parses and applies a resource description string to a widget.

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

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

void draw ( const Widget widget,
UIResource resources,
Vector2DRenderer &  renderer,
bool  before 
) const
overridevirtual

Draws a widget using the classic 3D look.

Parameters
widgetWidget to draw.
resourcesResources used for drawing.
rendererThe 2D renderer.
beforeTrue when called before drawing children, false after.

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

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

Adjusts widget size to classic style constraints (borders, padding, etc.).

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

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