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

Detailed Description

UI resources shared by all the built-in vector styles.

+ Inheritance diagram for StyleResource:

Public Types

enum  Style { FLAT, RAISED, LOWERED }
 

Public Member Functions

 StyleResource (const std::string &resource)
 Custom color value. More...
 
- Public Member Functions inherited from UIResource
 UIResource (const std::string &res)
 Constructor. More...
 
virtual ~UIResource () = default
 
const std::string & getResource () const
 Returns the resource description string. More...
 

Public Attributes

Style style {RAISED}
 
float width {0}
 Current style appearance. More...
 
float height {0}
 Requested width. More...
 
bool customColor {false}
 Requested height. More...
 
float4 color {0.0f}
 Whether a custom color is used. More...
 

Member Enumeration Documentation

enum Style

Style appearance options.

Enum ValuesDocumentation
FLAT 
RAISED 

Flat appearance.

LOWERED 

Raised (3D border, elevated container) appearance.

Lowered (3D border, outlined container) appearance

Constructor & Destructor Documentation

StyleResource ( const std::string &  resource)
explicit

Custom color value.

Constructor.

Parameters
resourceResource description string made of ;-separated "key=value" pairs, in any order. Supported keys:
  • width=<float>
  • height=<float>
  • style=FLAT|RAISED|LOWERED
  • color=<r>,<g>,, (comma-separated floats) Example: "style=RAISED;width=100;color=1,0,0,1".

Member Data Documentation

float4 color {0.0f}

Whether a custom color is used.

bool customColor {false}

Requested height.

float height {0}

Requested width.

Style style {RAISED}
float width {0}

Current style appearance.