struct GUIStyleSheetStateRulesets

Contains a set of rulesets for all states that are commonly changing on a GUI element (e.g. hover, focused, checked, active, etc.).

Public

Methods

GenerateHash

u64 GenerateHash() const

BuildStateRuleset

SPtr<const GUIStyleSheetRuleset> BuildStateRuleset(GUIElementStateFlags state, const GUIStyleSheetRules *inheritedRules = nullptr) const

Builds a ruleset matching the provided GUI element state flags.

Rulesets are cached internally, so future calls with the same parameters will just perform a lookup for an exiting ruleset.

state
State flags to build the ruleset for.
inheritedRules
Optional rules to inherit the initial set of values from.

Returns: Build ruleset, or one returned from the internal cache.

Fields

StyleSheets

TInlineArray<StyleSheetRulesetIndices, 4> StyleSheets

Operators

operator==

bool operator==(const GUIStyleSheetStateRulesets &other) const

Private

Fields

mCachedRulesets

TUnorderedMap<RulesetKey, SPtr<GUIStyleSheetRuleset>> mCachedRulesets