|
CeresEngine 0.2.0
A game development framework
|
Constants describing the state of a control. More...
#include <CeresEngine/UI/UIControl.hpp>
Public Member Functions | |
| constexpr | State ()=default |
| Creates a new default state object. | |
| constexpr | State (const UInt32 raw) |
| Initialize the State object with a raw representation of the state. | |
| constexpr State | operator+ (const State &other) const noexcept |
| constexpr State & | operator+= (const State &other) noexcept |
| constexpr State | operator- (const State &other) const noexcept |
| constexpr State & | operator-= (const State &other) noexcept |
| constexpr bool | contains (const State &member) const noexcept |
| Returns a Boolean value that indicates whether a given element is a member of the option set. | |
| constexpr bool | operator[] (const State &other) const noexcept |
| Returns a Boolean value that indicates whether a given element is a member of the option set. | |
| constexpr bool | operator== (const State &other) const noexcept |
| Compares two states if they are the same. | |
| constexpr bool | operator!= (const State &other) const noexcept |
| Compares two states if they are not the same. | |
| UIColor | operator() (const UIColor &baseColor) const noexcept |
Applies a color transformation to the given baseColor such as that the returned color represents the current state. | |
Public Attributes | |
| UInt32 | raw = 0 |
| The raw numeric value of the represented state. | |
Static Public Attributes | |
| static const State | Normal |
| The normal, or default state of a control—that is, enabled but neither selected nor highlighted. | |
| static const State | Highlighted |
| Highlighted state of a control. | |
| static const State | Disabled |
| Disabled state of a control. | |
| static const State | Selected |
| Selected state of a control. | |
| static const State | Focused |
| Focused state of a control. | |
Constants describing the state of a control.
A control can have more than one state at a time. Controls can be configured differently based on their state. For example, a UIButton object can be configured to display one texture when it is in its normal state and a different texture when it is highlighted.
|
constexprdefault |
Creates a new default state object.
Initialize the State object with a raw representation of the state.
|
inlineconstexprnoexcept |
Returns a Boolean value that indicates whether a given element is a member of the option set.
This example uses the contains() method to check whether the Focused state is set in the currentState instance:
| member | The element to look for in the option set. |
true if the option set contains member; otherwise, false.
|
inlineconstexprnoexcept |
Compares two states if they are not the same.
Applies a color transformation to the given baseColor such as that the returned color represents the current state.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Compares two states if they are the same.
|
inlineconstexprnoexcept |
Returns a Boolean value that indicates whether a given element is a member of the option set.
This example uses the contains() method to check whether the Focused state is set in the currentState instance:
| member | The element to look for in the option set. |
true if the option set contains member; otherwise, false. Disabled state of a control.
Set the value of this property to true to disable the control or false to enable it. An enabled control is capable of responding to user interactions, whereas a disabled control ignores input events and may draw itself differently.
Highlighted state of a control.
When the value of this property is true, the control draws a highlight; otherwise, the control does not draw a highlight. Controls automatically set and clear this state in response to appropriate input events. You can change the value of this property as needed to apply or remove a highlight programmatically.
The normal, or default state of a control—that is, enabled but neither selected nor highlighted.
| UInt32 CeresEngine::UIControl::State::raw = 0 |
The raw numeric value of the represented state.
Selected state of a control.
Set the value of this property to true to select it or false to deselect it. Most controls do not modify their appearance or behavior when selected, but some do.