Skip to main content

UiTransformConfig.ixx File

Configuration for spatial transform components. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine

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

namespacebuilder

Fluent builder pattern for constructing GameObjects. More...

namespacegameObject

Factory and prototype classes for GameObject construction. More...

namespacebuilders

Domain-specific builders for configuring different aspects of GameObjects. More...

namespaceconfigs

Fine-grained configuration classes for component setup. More...

Classes Index

classUiTransformConfig

Fluent configuration for spatial transform setup. More...

Description

Configuration for spatial transform components.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file UiTransformConfig.ixx
3 * @brief Configuration for spatial transform components.
4 */
5module;
6
7export module helios.engine.builder.gameObject.builders.configs.UiTransformConfig;
8
9import helios.engine.ecs.GameObject;
10import helios.engine.common.types;
11
12import helios.engine.modules.ui;
13
14import helios.math;
15
16import helios.core;
17import helios.engine.core;
18
19import helios.engine.modules.spatial.transform.components.TranslationStateComponent;
20import helios.engine.modules.spatial.transform.components.ComposeTransformComponent;
21
23
24 /**
25 * @brief Fluent configuration for spatial transform setup.
26 *
27 * Automatically adds ComposeTransformComponent and provides
28 * methods for setting scale and translation.
29 */
31
32 /**
33 * @brief Non-owning pointer to the target GameObject.
34 */
36
37
38 public:
39
40 /**
41 * @brief Constructs a UiTransformConfig and adds ComposeTransformComponent.
42 *
43 * @param gameObject Target GameObject to configure.
44 */
49 }
50
51 /**
52 * @brief Sets the anchor point for UI positioning.
53 *
54 * @param anchor The anchor position (e.g., TopLeft, Center).
55 *
56 * @return Reference to this config for chaining.
57 */
60 ->setAnchor(anchor);
61 return *this;
62 }
63
64 /**
65 * @brief Sets the viewport for this UI element.
66 *
67 * @param viewportId The ID of the viewport to attach to.
68 *
69 * @return Reference to this config for chaining.
70 */
73 ->setViewportId(viewportId);
74 return *this;
75 }
76
77 /**
78 * @brief Sets the pivot point for transformations.
79 *
80 * @param anchor The pivot position.
81 *
82 * @return Reference to this config for chaining.
83 */
86 ->setPivot(anchor);
87 return *this;
88 }
89
90 /**
91 * @brief Sets the offsets for UI positioning.
92 *
93 * @param offsets The offsets as vec4f (top, right, bottom, left).
94 *
95 * @return Reference to this config for chaining.
96 */
99 ->setOffsets(offsets);
100 return *this;
101 }
102
103
104
105 };
106
107}
108

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.