Skip to main content

UiStyleComponent Class

Stores color styles for different UI widget states. More...

Declaration

class helios::engine::modules::ui::widgets::components::UiStyleComponent { ... }

Public Member Functions Index

boolisEnabled () const noexcept

Returns the enabled state. More...

voidenable () noexcept

Enables this component. More...

voiddisable () noexcept

Disables this component. More...

voidsetNormalScale (const float scale) noexcept

Sets the scale for normal state. More...

voidsetSelectedScale (const float scale) noexcept

Sets the scale for selected state. More...

voidsetNormalColor (const helios::math::vec4f color) noexcept

Sets the color for normal state. More...

const helios::math::vec4fnormalColor () const noexcept

Returns the normal state color. More...

voidsetSelectedColor (const helios::math::vec4f color) noexcept

Sets the color for selected state. More...

const helios::math::vec4fselectedColor () const noexcept

Returns the selected state color. More...

voidsetDisabledColor (const helios::math::vec4f color) noexcept

Sets the color for disabled state. More...

const helios::math::vec4fdisabledColor () const noexcept

Returns the disabled state color. More...

floatselectedScale () const noexcept

Returns the selected state scale. More...

floatnormalScale () const noexcept

Returns the normal state scale. More...

Private Member Attributes Index

boolisEnabled_ = true
helios::math::vec4fnormalColor_ {1.0f, 1.0f, 1.0f, 1.0f}
helios::math::vec4fselectedColor_ {0.8f, 0.8f, 1.0f, 1.0f}
helios::math::vec4fdisabledColor_ {0.5f, 0.5f, 0.5f, 1.0f}
floatnormalScale_ = 1.0f
floatselectedScale_ = 1.0f

Description

Stores color styles for different UI widget states.

Defines colors for normal, selected, and disabled states of UI elements.

Definition at line 18 of file UiStyleComponent.ixx.

Public Member Functions

disable()

void helios::engine::modules::ui::widgets::components::UiStyleComponent::disable ()
inline noexcept

Disables this component.

Definition at line 48 of file UiStyleComponent.ixx.

48 void disable() noexcept {
49 isEnabled_ = false;
50 }

disabledColor()

const helios::math::vec4f helios::engine::modules::ui::widgets::components::UiStyleComponent::disabledColor ()
inline nodiscard noexcept

Returns the disabled state color.

Definition at line 114 of file UiStyleComponent.ixx.

114 [[nodiscard]] const helios::math::vec4f disabledColor() const noexcept {
115 return disabledColor_;
116 }

enable()

void helios::engine::modules::ui::widgets::components::UiStyleComponent::enable ()
inline noexcept

Enables this component.

Definition at line 41 of file UiStyleComponent.ixx.

41 void enable() noexcept {
42 isEnabled_ = true;
43 }

isEnabled()

bool helios::engine::modules::ui::widgets::components::UiStyleComponent::isEnabled ()
inline nodiscard noexcept

Returns the enabled state.

Definition at line 34 of file UiStyleComponent.ixx.

34 [[nodiscard]] bool isEnabled() const noexcept {
35 return isEnabled_;
36 }

normalColor()

const helios::math::vec4f helios::engine::modules::ui::widgets::components::UiStyleComponent::normalColor ()
inline nodiscard noexcept

Returns the normal state color.

Definition at line 82 of file UiStyleComponent.ixx.

82 [[nodiscard]] const helios::math::vec4f normalColor() const noexcept {
83 return normalColor_;
84 }

normalScale()

float helios::engine::modules::ui::widgets::components::UiStyleComponent::normalScale ()
inline nodiscard noexcept

Returns the normal state scale.

Definition at line 128 of file UiStyleComponent.ixx.

128 [[nodiscard]] float normalScale() const noexcept {
129 return normalScale_;
130 }

selectedColor()

const helios::math::vec4f helios::engine::modules::ui::widgets::components::UiStyleComponent::selectedColor ()
inline nodiscard noexcept

Returns the selected state color.

Definition at line 98 of file UiStyleComponent.ixx.

98 [[nodiscard]] const helios::math::vec4f selectedColor() const noexcept {
99 return selectedColor_;
100 }

selectedScale()

float helios::engine::modules::ui::widgets::components::UiStyleComponent::selectedScale ()
inline nodiscard noexcept

Returns the selected state scale.

Definition at line 121 of file UiStyleComponent.ixx.

121 [[nodiscard]] float selectedScale() const noexcept {
122 return selectedScale_;
123 }

setDisabledColor()

void helios::engine::modules::ui::widgets::components::UiStyleComponent::setDisabledColor (const helios::math::vec4f color)
inline noexcept

Sets the color for disabled state.

Parameters
color

The RGBA color.

Definition at line 107 of file UiStyleComponent.ixx.

107 void setDisabledColor(const helios::math::vec4f color) noexcept {
108 disabledColor_ = color;
109 }

setNormalColor()

void helios::engine::modules::ui::widgets::components::UiStyleComponent::setNormalColor (const helios::math::vec4f color)
inline noexcept

Sets the color for normal state.

Parameters
color

The RGBA color.

Definition at line 75 of file UiStyleComponent.ixx.

75 void setNormalColor(const helios::math::vec4f color) noexcept {
76 normalColor_ = color;
77 }

setNormalScale()

void helios::engine::modules::ui::widgets::components::UiStyleComponent::setNormalScale (const float scale)
inline noexcept

Sets the scale for normal state.

Parameters
scale

The scale factor.

Definition at line 57 of file UiStyleComponent.ixx.

57 void setNormalScale(const float scale) noexcept {
58 normalScale_ = scale;
59 }

setSelectedColor()

void helios::engine::modules::ui::widgets::components::UiStyleComponent::setSelectedColor (const helios::math::vec4f color)
inline noexcept

Sets the color for selected state.

Parameters
color

The RGBA color.

Definition at line 91 of file UiStyleComponent.ixx.

91 void setSelectedColor(const helios::math::vec4f color) noexcept {
92 selectedColor_ = color;
93 }

setSelectedScale()

void helios::engine::modules::ui::widgets::components::UiStyleComponent::setSelectedScale (const float scale)
inline noexcept

Sets the scale for selected state.

Parameters
scale

The scale factor.

Definition at line 66 of file UiStyleComponent.ixx.

66 void setSelectedScale(const float scale) noexcept {
67 selectedScale_ = scale;
68 }

Private Member Attributes

disabledColor_

helios::math::vec4f helios::engine::modules::ui::widgets::components::UiStyleComponent::disabledColor_ {0.5f, 0.5f, 0.5f, 1.0f}

Definition at line 24 of file UiStyleComponent.ixx.

24 helios::math::vec4f disabledColor_{0.5f, 0.5f, 0.5f, 1.0f};

isEnabled_

bool helios::engine::modules::ui::widgets::components::UiStyleComponent::isEnabled_ = true

Definition at line 20 of file UiStyleComponent.ixx.

20 bool isEnabled_ = true;

normalColor_

helios::math::vec4f helios::engine::modules::ui::widgets::components::UiStyleComponent::normalColor_ {1.0f, 1.0f, 1.0f, 1.0f}

Definition at line 22 of file UiStyleComponent.ixx.

22 helios::math::vec4f normalColor_{1.0f, 1.0f, 1.0f, 1.0f};

normalScale_

float helios::engine::modules::ui::widgets::components::UiStyleComponent::normalScale_ = 1.0f

Definition at line 26 of file UiStyleComponent.ixx.

26 float normalScale_ = 1.0f;

selectedColor_

helios::math::vec4f helios::engine::modules::ui::widgets::components::UiStyleComponent::selectedColor_ {0.8f, 0.8f, 1.0f, 1.0f}

Definition at line 23 of file UiStyleComponent.ixx.

23 helios::math::vec4f selectedColor_{0.8f, 0.8f, 1.0f, 1.0f};

selectedScale_

float helios::engine::modules::ui::widgets::components::UiStyleComponent::selectedScale_ = 1.0f

Definition at line 27 of file UiStyleComponent.ixx.

27 float selectedScale_ = 1.0f;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.