Open 3D Engine LyShine Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
UiDynamicLayoutComponent Class Reference

This component supports dynamic creation of child elements. More...

#include <UiDynamicLayoutComponent.h>

Inherits AZ::Component, UiDynamicLayoutBus::Handler, UiInitializationBus::Handler, UiTransformChangeNotificationBus::Handler, and UiElementNotificationBus::Handler.

Public Member Functions

 AZ_COMPONENT (UiDynamicLayoutComponent, LyShine::UiDynamicLayoutComponentUuid, AZ::Component)
 
virtual void SetNumChildElements (int numChildren) override
 
void InGamePostActivate () override
 
void OnCanvasSpaceRectChanged (AZ::EntityId entityId, const UiTransformInterface::Rect &oldRect, const UiTransformInterface::Rect &newRect) override
 
void OnUiElementBeingDestroyed () override
 

Static Public Member Functions

static void GetProvidedServices (AZ::ComponentDescriptor::DependencyArrayType &provided)
 
static void GetIncompatibleServices (AZ::ComponentDescriptor::DependencyArrayType &incompatible)
 
static void GetRequiredServices (AZ::ComponentDescriptor::DependencyArrayType &required)
 
static void Reflect (AZ::ReflectContext *context)
 

Protected Member Functions

void Activate () override
 
void Deactivate () override
 
 AZ_DISABLE_COPY_MOVE (UiDynamicLayoutComponent)
 
void SetPrototypeElementActive (bool active)
 
void ResizeToFitChildElements ()
 Resize the parent to fit all cloned child elements.
 

Protected Attributes

AZ::EntityId m_prototypeElement
 The entity Id of the prototype element.
 
int m_numChildElementsToClone
 Number of child elements to clone on initialization.
 
AZ::Vector2 m_prototypeElementSize
 

Detailed Description

This component supports dynamic creation of child elements.

Member Data Documentation

◆ m_prototypeElementSize

AZ::Vector2 UiDynamicLayoutComponent::m_prototypeElementSize
protected

Stores the size of the prototype element before it is removed from the child list. Used to calculate the element size


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