Skip to main content

UiTextBoundsUpdateSystem.ixx File

System for updating UI text element bounds. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine

Main engine module aggregating core infrastructure and game systems. More...

namespacemodules

Domain-specific components and systems. More...

namespaceui

User interface components and systems for game entities. More...

namespacewidgets

UI widget components and systems. More...

namespacesystems

UI widget processing systems. More...

Classes Index

classUiTextBoundsUpdateSystem

System for updating UI text element bounds. More...

Description

System for updating UI text element bounds.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file UiTextBoundsUpdateSystem.ixx
3 * @brief System for updating UI text element bounds.
4 */
5module;
6
7
8
9export module helios.engine.modules.ui.widgets.systems.UiTextBoundsUpdateSystem;
10
11import helios.engine.modules.ui.widgets.components.UiTextComponent;
12
13import helios.engine.runtime.world.GameWorld;
14import helios.engine.runtime.world.UpdateContext;
15
16import helios.engine.mechanics.lifecycle.components.Active;
17
18import helios.engine.modules.rendering.model.components.ModelAabbComponent;
19
20import helios.engine.common.tags.SystemRole;
21
23
24
25 /**
26 * @brief System for updating UI text element bounds.
27 *
28 * Monitors UiTextComponent for resize requests and updates the associated
29 * ModelAabbComponent with the new text bounds from the underlying TextRenderable.
30 */
32
33 public:
34
35
37
38
39 /**
40 * @brief Updates AABB bounds for text components that need resizing.
41 *
42 * @param updateContext The current frame's update context.
43 */
45
46 for (auto [entity, txt, mac, active] : updateContext.view<
50 >().whereEnabled()) {
51
52 if (txt->needsResize()) {
53 auto aabb = txt->renderable()->localAABB();
54 mac->setAabb(aabb);
55 txt->resizeComplete();
56 }
57 }
58 }
59
60 };
61
62}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.