Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CGUIColor Struct Reference

Same as the CColor class, but this one can also parse colors predefined in the GUI page (such as "yellow"). More...

#include <CGUIColor.h>

Inheritance diagram for CGUIColor:
Collaboration diagram for CGUIColor:

Public Member Functions

 NONCOPYABLE (CGUIColor)
 
 MOVABLE (CGUIColor)
 
 CGUIColor ()
 
 CGUIColor (float r, float g, float b, float a)
 
bool ParseString (const CGUI &pGUI, const CStr8 &value, int defaultAlpha=255)
 Load color depending on current GUI page. More...
 
bool ParseString (const CStr8 &value, int defaultAlpha=255)=delete
 Ensure that all users check for predefined colors. More...
 
- Public Member Functions inherited from CColor
 CColor ()
 
 CColor (float cr, float cg, float cb, float ca)
 
 operator bool () const
 Returns whether this has been set to a valid color. More...
 
bool ParseString (const CStr8 &value, int defaultAlpha=255)
 Try to parse Value as a color. More...
 
bool operator== (const CColor &color) const
 
bool operator!= (const CColor &color) const
 
PS::span< const float > AsFloatArray () const
 
SColor4ub AsSColor4ub () const
 

Additional Inherited Members

- Public Attributes inherited from CColor
float r
 
float g
 
float b
 
float a
 

Detailed Description

Same as the CColor class, but this one can also parse colors predefined in the GUI page (such as "yellow").

Constructor & Destructor Documentation

◆ CGUIColor() [1/2]

CGUIColor::CGUIColor ( )
inline

◆ CGUIColor() [2/2]

CGUIColor::CGUIColor ( float  r,
float  g,
float  b,
float  a 
)
inline

Member Function Documentation

◆ MOVABLE()

CGUIColor::MOVABLE ( CGUIColor  )

◆ NONCOPYABLE()

CGUIColor::NONCOPYABLE ( CGUIColor  )

◆ ParseString() [1/2]

bool CGUIColor::ParseString ( const CGUI pGUI,
const CStr8 &  value,
int  defaultAlpha = 255 
)

Load color depending on current GUI page.

◆ ParseString() [2/2]

bool CGUIColor::ParseString ( const CStr8 &  value,
int  defaultAlpha = 255 
)
delete

Ensure that all users check for predefined colors.


The documentation for this struct was generated from the following file: