Skip to main content

Score2UiTextUpdateSystem Class

System for binding score values to UI text components. More...

Declaration

class helios::engine::modules::ui::binding::systems::Score2UiTextUpdateSystem { ... }

Public Member Typedefs Index

usingEngineRoleTag = helios::engine::common::tags::SystemRole

Public Member Functions Index

voidupdate (helios::engine::runtime::world::UpdateContext &updateContext) noexcept

Updates text components with current score values. More...

Description

System for binding score values to UI text components.

Queries entities with ScoreObserverComponent, NumberFormatterComponent, and UiTextComponent. When the score observer signals an update, the formatted total score is propagated to the text component for display.

See Also

ScoreObserverComponent

See Also

NumberFormatterComponent

Definition at line 41 of file Score2UiTextUpdateSystem.ixx.

Public Member Typedefs

EngineRoleTag

using helios::engine::modules::ui::binding::systems::Score2UiTextUpdateSystem::EngineRoleTag = helios::engine::common::tags::SystemRole

Public Member Functions

update()

void helios::engine::modules::ui::binding::systems::Score2UiTextUpdateSystem::update (helios::engine::runtime::world::UpdateContext & updateContext)
inline noexcept

Updates text components with current score values.

Parameters
updateContext

The current frame's update context.

Definition at line 52 of file Score2UiTextUpdateSystem.ixx.

53
54 for (auto [entity, soc, nfc, txt, active] : updateContext.view<
59 >().whereEnabled()) {
60
61 if (!soc->hasUpdate()) {
62 continue;
63 }
64
65 txt->setText(nfc->format<double>(soc->totalScore()));
66 }
67 }

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.