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

Common types used across the LyShine UI system. More...

Classes

class  CanvasAsset
 
class  FontAsset
 
class  IRenderGraph
 
class  LyShineChildPass
 
class  LyShineFeatureProcessor
 
class  LyShineModule
 
class  LyShinePass
 Manages child passes at runtime that render to render targets. More...
 
class  LyShineRequests
 
class  LyShineSystemComponent
 
class  MaskRenderNode
 
class  PrimitiveListRenderNode
 
class  RenderGraph
 
class  RenderNode
 
class  RenderTargetRenderNode
 
class  RenderToTextureRequests
 Ebus to handle render target requests. More...
 
class  RttChildPass
 
struct  UCol
 
class  UiCanvasBuilderWorker
 
struct  UiPrimitive
 
struct  UiPrimitiveVertex
 

Typedefs

using LyShineRequestBus = AZ::EBus< LyShineRequests >
 
typedef AZStd::string NameType
 used for UI element names and canvas names, should be the same as the AZ::Entity name type
 
typedef AZStd::string PathnameType
 Used for pathnames for UI canvas and prefab files.
 
typedef unsigned int CanvasId
 
typedef unsigned int ElementId
 
typedef AZStd::string ActionName
 Used for UI action names.
 
typedef AZStd::string StringType
 Used for test strings in UI text elements.
 
typedef AZStd::vector< AZ::Entity * > EntityArray
 Used for passing lists of entities.
 
typedef AZStd::unordered_map< AZ::EntityId, AZ::EntityId > EntityIdMap
 
using UiIndice = AZ::u16
 
using UiPrimitiveList = AZStd::intrusive_slist< UiPrimitive, AZStd::slist_base_hook< UiPrimitive > >
 
using AZu32ComboBoxVec = AZStd::vector< AZStd::pair< AZ::u32, AZStd::string > >
 
using AttachmentImages = AZStd::vector< AZ::Data::Instance< AZ::RPI::AttachmentImage > >
 
using AttachmentImageAndDependentsPair = AZStd::pair< AZ::Data::Instance< AZ::RPI::AttachmentImage >, AttachmentImages >
 
using AttachmentImagesAndDependencies = AZStd::vector< AttachmentImageAndDependentsPair >
 
using RenderToTextureRequestBus = AZ::EBus< RenderToTextureRequests >
 

Enumerations

enum class  BlendMode {
  Normal , Add , Screen , Darken ,
  Lighten
}
 
enum  RenderNodeType { PrimitiveList , Mask , RenderTarget }
 
enum class  AlphaMaskType { None , ModulateAlpha , ModulateAlphaAndColor }
 

Functions

bool IsUiLayoutCellSizeSpecified (float size)
 
template<typename T >
bool ConvertSubElementFromAzStringToAssetRef (AZ::SerializeContext &context, AZ::SerializeContext::DataElementNode &classElement, const char *subElementName)
 
bool ConvertSubElementFromCharToUInt32 (AZ::SerializeContext &context, AZ::SerializeContext::DataElementNode &classElement, const char *subElementName)
 
template<typename T >
bool GetSubElementValue (AZ::SerializeContext::DataElementNode &classElement, const char *elementName, T &value)
 
ColorF MakeColorF (AZ::Vector3 color, float alpha)
 
AZ::Vector3 MakeColorVector3 (ColorF color)
 
AZ::Color MakeColorAZColor (ColorF color)
 
bool ConvertSubElementFromColorToColorPlusAlpha (AZ::SerializeContext &context, AZ::SerializeContext::DataElementNode &classElement, const char *colorElementName, const char *alphaElementName)
 
bool ConvertSubElementFromVector3ToAzColor (AZ::SerializeContext &context, AZ::SerializeContext::DataElementNode &classElement, const char *colorElementName)
 
bool ConvertSubElementFromColorFToAzColor (AZ::SerializeContext &context, AZ::SerializeContext::DataElementNode &classElement, const char *colorElementName)
 
bool RemoveRenderTargetAsString (AZ::SerializeContext &context, AZ::SerializeContext::DataElementNode &classElement, const char *renderTargetStringElementName)
 
bool ConvertSubElementFromVec2ToVector2 (AZ::SerializeContext &context, AZ::SerializeContext::DataElementNode &classElement, const char *vec2ElementName)
 
bool MoveElement (AZ::SerializeContext &context, AZ::SerializeContext::DataElementNode &srcElement, AZ::SerializeContext::DataElementNode &dstElement, const char *srcSubElementName, const char *dstSubElementName)
 
bool RemoveLeadingForwardSlashesFromAssetPath (AZ::SerializeContext &context, AZ::SerializeContext::DataElementNode &classElement, const char *simpleAssetRefSubElementName)
 
AZ::SerializeContext::DataElementNode * FindComponentNode (AZ::SerializeContext::DataElementNode &entityNode, const AZ::Uuid &uuid)
 
bool CreateEntityIdNode (AZ::SerializeContext &context, AZ::SerializeContext::DataElementNode &entityNode)
 
bool CreateComponentBaseClassNode (AZ::SerializeContext &context, AZ::SerializeContext::DataElementNode &componentNode)
 
AZu32ComboBoxVec GetEnumSpriteIndexList (AZ::EntityId entityId, AZ::u32 indexMin, AZ::u32 indexMax, const char *errorMessage="")
 Returns a string enumeration list for the given min/max value ranges.
 
int GetUtf8StringLength (const AZStd::string &utf8String)
 Returns the number of UTF8 characters in a string.
 
int GetMultiByteCharSize (const uint32_t multiByteChar)
 Returns the number of bytes of the size of the given multi-byte char.
 
int GetByteLengthOfUtf8Chars (const char *utf8String, int numUtf8Chars)
 

Variables

constexpr AZ::TypeId UiButtonComponentUuid { "{7329DFE8-0F3C-4629-B395-78B2CF646B96}" }
 
constexpr AZ::TypeId UiCanvasComponentUuid { "{50B8CF6C-B19A-4D86-AFE9-96EFB820D422}" }
 
constexpr AZ::TypeId UiCheckboxComponentUuid { "{68D62281-B360-4426-AACA-E8BDE8BFEB3A}" }
 
constexpr AZ::TypeId UiDraggableComponentUuid { "{C96B1EEF-033A-479B-829B-ED3555D0F33A}" }
 
constexpr AZ::TypeId UiDropTargetComponentUuid { "{E4B8ACE0-FCE7-42D8-9836-942F910168B4}" }
 
constexpr AZ::TypeId UiDropdownComponentUuid { "{BFC4D5A3-2F7C-4079-B19C-C2A06E93F343}" }
 
constexpr AZ::TypeId UiDropdownOptionComponentUuid { "{554E16E4-CBA1-4E57-B326-9731AA963BAA}" }
 
constexpr AZ::TypeId UiDynamicLayoutComponentUuid { "{690BEC14-3642-4247-BD96-FE414CCB7DE7}" }
 
constexpr AZ::TypeId UiDynamicScrollBoxComponentUuid { "{6982C200-4D32-43CC-A7F6-F54FA50FCFF5}" }
 
constexpr AZ::TypeId UiElementComponentUuid { "{4A97D63E-CE7A-45B6-AAE4-102DB4334688}" }
 
constexpr AZ::TypeId UiFaderComponentUuid { "{CD01FF77-2249-4ED8-BFFB-33A66A47E17C}" }
 
constexpr AZ::TypeId UiFlipbookAnimationComponentUuid { "{AACCFFA1-B694-4F8B-A289-391A56404E0C}" }
 
constexpr AZ::TypeId UiImageComponentUuid { "{BDBEFD23-DBB4-4726-A32D-4FEAC24E51F6}" }
 
constexpr AZ::TypeId UiImageSequenceComponentUuid { "{BFAC7909-3A56-4980-AF7C-261A99D6371B}" }
 
constexpr AZ::TypeId UiLayoutColumnComponentUuid { "{4BC2E786-360B-4426-8D9C-9B254C5EA21F}" }
 
constexpr AZ::TypeId UiLayoutCellComponentUuid { "{A0568E58-4382-47F8-8B88-77C64B99AC80}" }
 
constexpr AZ::TypeId UiLayoutFitterComponentUuid { "{96C55390-9D03-4C47-BB0D-17D3BD5219E3}" }
 
constexpr AZ::TypeId UiLayoutGridComponentUuid { "{ADDA3AE5-B9AB-44B7-A462-8B89B398A837}" }
 
constexpr AZ::TypeId UiLayoutRowComponentUuid { "{7B2820C4-7FC7-4F02-B777-6727EB4BAC13}" }
 
constexpr AZ::TypeId UiMarkupButtonComponentUuid { "{D7EB1706-75E8-4C94-A266-61913F42431B}" }
 
constexpr AZ::TypeId UiMaskComponentUuid { "{2279AA38-271D-4D4F-A472-E42B984088AC}" }
 
constexpr AZ::TypeId UiParticleEmitterComponentUuid { "{E8B1288C-CB49-4CAD-B366-AF1B40C47E74}" }
 
constexpr AZ::TypeId UiRadioButtonComponentUuid { "{773A0F4B-F9F9-4B82-9951-BBD73A737DE4}" }
 
constexpr AZ::TypeId UiRadioButtonGroupComponentUuid { "{F89D5EF2-37C4-4CA7-9AA2-23DC3867EC9D}" }
 
constexpr AZ::TypeId UiScrollBarComponentUuid { "{6B283F90-3519-47DA-A1DD-65A79CE119CF}" }
 
constexpr AZ::TypeId UiScrollBoxComponentUuid { "{2F539588-AEAB-4341-A6A6-AF645D129693}" }
 
constexpr AZ::TypeId UiSliderComponentUuid { "{2913D76B-36A0-45E0-A104-33C668EB612D}" }
 
constexpr AZ::TypeId UiTextComponentUuid { "{5B3FB2A7-5DC4-4033-A970-001CEC85B6C4}" }
 
constexpr AZ::TypeId UiTextInputComponentUuid { "{2CB3872B-D2B4-4DDB-B39A-97492310AE11}" }
 
constexpr AZ::TypeId UiTooltipComponentUuid { "{493EBF89-C299-4722-829D-4DFAB926795B}" }
 
constexpr AZ::TypeId UiTooltipDisplayComponentUuid { "{18CEE6A7-3CBC-4638-9F4D-87E8D53DDF1A}" }
 
constexpr AZ::TypeId UiTransform2dComponentUuid { "{2751A5A5-3291-4A4D-9FC0-9CB0EB8D1DE6}" }
 
constexpr AZ::TypeId lyShineSystemComponentUuid { "{B0C78B8D-1E5B-47D7-95D0-EC69C0513804}" }
 
const float UiLayoutCellUnspecifiedSize = -1.0f
 

Detailed Description

Common types used across the LyShine UI system.

Common types used across the LyShine UI layout cell system.

Typedef Documentation

◆ CanvasId

typedef unsigned int LyShine::CanvasId

USed for our 32-bit id's for canvases and elements. Only used so FlowGraph can reference these things These should go away once FlowGraph can used AZ::EntityIds

Enumeration Type Documentation

◆ BlendMode

enum class LyShine::BlendMode
strong
Enumerator
Normal 

interpolate from dest color to source color according to source alpha

Add 

source color * source alpha is added to dest color (Linear Dodge)

Screen 

as close as we can get to Photoshop Screen

Darken 

like Photoshop darken

Lighten 

like Photoshop lighten

Function Documentation

◆ GetUtf8StringLength()

int LyShine::GetUtf8StringLength ( const AZStd::string &  utf8String)
inline

Returns the number of UTF8 characters in a string.

AZStd::string::length() counts individual bytes in the string buffer whereas this function will consider multi-byte chars as one element/ character in the string.