struct GUIStyleSheetRules

Inherits: IReflectable

Style rule for a particular state of a GUI element (e.g. normal, hover, focused, disabled, etc.).

Public

Constructors

GUIStyleSheetRules

GUIStyleSheetRules()

Methods

Override

void Override(const GUIStyleSheetRules &other)

Overrides all the properties of this style with the set properties from style.

IsPropertySet

bool IsPropertySet(GUIStyleSheetPropertyType property) const

Returns true if that property has been assigned.

If false the property is using the default value.

staticGetRttiStatic

static RTTIType *GetRttiStatic()

GetRtti

RTTIType *GetRtti() const override

Returns an interface you can use to access class' Run Time Type Information.

Fields

PseudoClass

String PseudoClass

Pseudo-class the rule is applied to, if any.

Margins

RectOffset Margins

Empty space around the GUI element outside of the border.

In logical pixel units.

Padding

RectOffset Padding

Empty space within the GUI element inside the border.

In logical pixel units.

Size

Size2UI Size

Size of the GUI element contents in logical pixel units.

Total size of the GUI element will be determined by content size, padding, border width and margins.

MinimumSize

Size2UI MinimumSize

If non-zero, GUI element size will expand to fill the available area, respecting the minimum and (optionally) maximum size.

In logical pixel units.

MaximumSize

Size2UI MaximumSize

If non-zero, GUI element size will expand to fill the available area, respecting the maximum and (optionally) minimum size.

In logical pixel units.

BackgroundColor

Color BackgroundColor

Color of the GUI element background.

Color

Color of the GUI element contents (usually text or icon).

Opacity

float Opacity

Opacity of the GUI element.

This value will affect all aspects of the GUI element (border, background and contents). In range [0, 1].

BackgroundImage

HSpriteImage BackgroundImage

Image to render as the background.

Visibility

Determines if the element should be displayed or not.

BorderLeft

Style information for the left border.

BorderRight

Style information for the right border.

BorderTop

Style information for the top border.

BorderBottom

Style information for the bottom border.

BorderTopLeftRadius

u32 BorderTopLeftRadius

Radius of the top left border corner, if rounded corners are desired.

In logical pixel units.

BorderTopRightRadius

u32 BorderTopRightRadius

Radius of the top right border corner, if rounded corners are desired.

In logical pixel units.

BorderBottomLeftRadius

u32 BorderBottomLeftRadius

Radius of the bottom left border corner, if rounded corners are desired.

In logical pixel units.

BorderBottomRightRadius

u32 BorderBottomRightRadius

Radius of the bottom right border corner, if rounded corners are desired.

In logical pixel units.

Font

HFont Font

Font family to render the text contents of the GUI element with.

FontSize

float FontSize

Font size to render the text contents of the GUI element with, in logical point units.

HorizontalTextAlignment

GUIHorizontalTextAlignment HorizontalTextAlignment

Determines horizontal alignment of text within the GUI element.

VerticalTextAlignment

GUIVerticalTextAlignment VerticalTextAlignment

Determines vertical alignment of text within the GUI element.

WordWrap

Determines if text wraps when it doesn't fit in a single line.

OverridenProperties

TBitfield<InlineContainerAllocator<kPropertyDWordCount>> OverridenProperties

Bit for each property that is different than the default will be set.

Used for determining which properties to override from parent rule.