Changeset View
Changeset View
Standalone View
Standalone View
source/gui/CGUIColor.h
Show All 22 Lines | |||||
class CGUI; | class CGUI; | ||||
/** | /** | ||||
* Same as the CColor class, but this one can also parse colors predefined in the GUI page (such as "yellow"). | * Same as the CColor class, but this one can also parse colors predefined in the GUI page (such as "yellow"). | ||||
*/ | */ | ||||
struct CGUIColor : CColor | struct CGUIColor : CColor | ||||
{ | { | ||||
// Take advantage of compiler warnings if unintentionally copying this | |||||
NONCOPYABLE(CGUIColor); | |||||
// Defines move semantics so that the structs using the class can use it. | |||||
MOVABLE(CGUIColor); | |||||
CGUIColor() : CColor() {} | CGUIColor() : CColor() {} | ||||
CGUIColor(float r, float g, float b, float a) : CColor(r, g, b, a) {} | CGUIColor(float r, float g, float b, float a) : CColor(r, g, b, a) {} | ||||
/** | /** | ||||
* Returns this color if it has been set, otherwise the given fallback color. | * Returns this color if it has been set, otherwise the given fallback color. | ||||
*/ | */ | ||||
const CGUIColor& operator||(const CGUIColor& fallback) const | const CGUIColor& operator||(const CGUIColor& fallback) const | ||||
Show All 17 Lines |
Wildfire Games · Phabricator