![]() |
Touch Interface Designer 2025.2
Create touch interface with a visual editor and manage all mobile inputs like gestures
|
#include <LayoutModifier.h>


Public Member Functions | |
| ULayoutModifier () | |
| virtual void | SynchronizeProperties () override |
| virtual void | ReleaseSlateResources (bool bReleaseChildren) override |
| BlueprintCallable void | SetPreviewEnabled (const bool bEnabled) |
| BlueprintCallable bool | IsPreviewEnabled () const |
| BlueprintCallable void | SetPositioningWithTouchEnabled (const bool bEnablePositioning) const |
| BlueprintCallable void | SetResizingWithTouchEnabled (const bool bEnableResizing) const |
| BlueprintCallable bool | Edit (UTouchInterfaceLayout *Layout) |
| BlueprintCallable bool | EditSave (UTouchInterfaceLayout *LayoutReference, const int32 UserIndex, const int32 ConfigIndex, UTouchInterfaceLayout *&OutEditedLayout) |
| BlueprintCallable bool | SaveLayout (const int32 UserIndex, const int32 ConfigIndex) const |
| BlueprintCallable bool | GetSavedLayoutData (const int32 UserIndex, const int32 ConfigIndex, FLayoutSaveData &Configuration) |
| BlueprintCallable void | ResetToDefault (UTouchInterfaceLayout *LayoutReference, const int32 UserIndex, const int32 ConfigIndex, const bool bSaveToDisk) |
| BlueprintPure TArray< FName > | GetListOfComponent (const int32 UserIndex, const int32 ConfigIndex) const |
| BlueprintPure FName | GetSelectedComponentName () const |
| BlueprintCallable void | ClearSelection () |
| BlueprintPure void | GetTouchInterfaceOpacity (float &InactiveOpacity, float &ActiveOpacity) |
| BlueprintCallable void | SetTouchInterfaceOpacity (const float InactiveOpacity, const float ActiveOpacity) |
| BlueprintPure FVector2D | GetComponentLocation (const FName InputName) |
| BlueprintPure FVector2D | GetComponentDesignLocation (const FName ComponentName) |
| BlueprintCallable void | SetComponentLocation (const FName InputName, const FVector2D NewOffset) |
| BlueprintCallable FVector4f | GetComponentMaxOffset (const FName ComponentName) |
| BlueprintPure FVector2D | GetComponentSize (const FName InputName) |
| BlueprintPure FVector2D | GetComponentDesignSize (const FName ComponentName) |
| BlueprintCallable void | SetComponentSize (const FName InputName, FVector2D NewSize) |
| BlueprintCallable FVector2D | GetComponentMaxSize (const FName ComponentName) |
| BlueprintCallable UTouchInterfaceLayout * | GetLayoutAssetFromSave (int32 UserIndex, int32 ConfigIndex) |
| BlueprintCallable void | SetPositioningPreviewEnabled (const bool bEnable) const |
| BlueprintCallable void | SetDesignLocationPreviewEnabled (const bool bEnable) const |
Public Attributes | |
| Category ="Layout Modifier" | |
| BlueprintCallable | |
| BlueprintReadWrite | |
| EditAnywhere uint8 | bUseTouchForPositioning:1 |
| EditAnywhere uint8 | bUseTouchForSizing:1 |
| BlueprintReadOnly | |
| EditAnywhere | |
| meta | |
| EditAnywhere uint8 | bDrawPositioningBrush:1 |
| EditAnywhere uint8 | bDrawDesignCenter:1 |
| BlueprintAssignable FOnComponentEditedEvent | OnComponentSelected |
| BlueprintAssignable FOnComponentEditedEvent | OnComponentLocationEdited |
| BlueprintAssignable FOnComponentEditedEvent | OnComponentSizeEdited |
Protected Member Functions | |
| virtual TSharedRef< SWidget > | RebuildWidget () override |
Protected Attributes | |
| TSharedPtr< STouchInterfaceLayoutPreviewer > | LayoutModifierWidget |
Allows player to modify touch interface layout (position and size of layout components)
| ULayoutModifier::ULayoutModifier | ( | ) |
| void ULayoutModifier::ClearSelection | ( | ) |
| bool ULayoutModifier::Edit | ( | UTouchInterfaceLayout * | Layout | ) |
| bool ULayoutModifier::EditSave | ( | UTouchInterfaceLayout * | LayoutReference, |
| const int32 | UserIndex, | ||
| const int32 | ConfigIndex, | ||
| UTouchInterfaceLayout *& | OutEditedLayout ) |
| FVector2D ULayoutModifier::GetComponentDesignLocation | ( | const FName | ComponentName | ) |
| FVector2D ULayoutModifier::GetComponentDesignSize | ( | const FName | ComponentName | ) |
| FVector2D ULayoutModifier::GetComponentLocation | ( | const FName | InputName | ) |
| FVector4f ULayoutModifier::GetComponentMaxOffset | ( | const FName | ComponentName | ) |
| FVector2D ULayoutModifier::GetComponentMaxSize | ( | const FName | ComponentName | ) |
| FVector2D ULayoutModifier::GetComponentSize | ( | const FName | InputName | ) |
| UTouchInterfaceLayout * ULayoutModifier::GetLayoutAssetFromSave | ( | int32 | UserIndex, |
| int32 | ConfigIndex ) |
| TArray< FName > ULayoutModifier::GetListOfComponent | ( | const int32 | UserIndex, |
| const int32 | ConfigIndex ) const |
| bool ULayoutModifier::GetSavedLayoutData | ( | const int32 | UserIndex, |
| const int32 | ConfigIndex, | ||
| FLayoutSaveData & | Configuration ) |
| FName ULayoutModifier::GetSelectedComponentName | ( | ) | const |
| void ULayoutModifier::GetTouchInterfaceOpacity | ( | float & | InactiveOpacity, |
| float & | ActiveOpacity ) |
| bool ULayoutModifier::IsPreviewEnabled | ( | ) | const |
|
overrideprotectedvirtual |
|
overridevirtual |
| void ULayoutModifier::ResetToDefault | ( | UTouchInterfaceLayout * | LayoutReference, |
| const int32 | UserIndex, | ||
| const int32 | ConfigIndex, | ||
| const bool | bSaveToDisk ) |
| bool ULayoutModifier::SaveLayout | ( | const int32 | UserIndex, |
| const int32 | ConfigIndex ) const |
| void ULayoutModifier::SetComponentLocation | ( | const FName | InputName, |
| const FVector2D | NewOffset ) |
| void ULayoutModifier::SetComponentSize | ( | const FName | InputName, |
| FVector2D | NewSize ) |
| void ULayoutModifier::SetDesignLocationPreviewEnabled | ( | const bool | bEnable | ) | const |
| void ULayoutModifier::SetPositioningPreviewEnabled | ( | const bool | bEnable | ) | const |
| void ULayoutModifier::SetPositioningWithTouchEnabled | ( | const bool | bEnablePositioning | ) | const |
| void ULayoutModifier::SetPreviewEnabled | ( | const bool | bEnabled | ) |
| void ULayoutModifier::SetResizingWithTouchEnabled | ( | const bool | bEnableResizing | ) | const |
| void ULayoutModifier::SetTouchInterfaceOpacity | ( | const float | InactiveOpacity, |
| const float | ActiveOpacity ) |
|
overridevirtual |
| EditAnywhere uint8 ULayoutModifier::bDrawDesignCenter |
| EditAnywhere uint8 ULayoutModifier::bDrawPositioningBrush |
| ULayoutModifier::BlueprintCallable |
| ULayoutModifier::BlueprintReadOnly |
| ULayoutModifier::BlueprintReadWrite |
| EditAnywhere uint8 ULayoutModifier::bUseTouchForPositioning |
| EditAnywhere uint8 ULayoutModifier::bUseTouchForSizing |
| ULayoutModifier::Category ="Layout Modifier" |
Manually enable or disable preview. Preview is automatically activated by calling Edit or Edit Save.
Edit layout Do not check if any modification exist in save file To be able to edit already modified layout, see Edit Save
Edit layout with modification saved in save file
| LayoutReference | LayoutReference is asset in disk (Drawer in editor). This asset is only modified in layout editor. It is only used as reference to get unmodified data |
| UserIndex | Index used to identify user |
| ConfigIndex | Index used to identify saved data of layout |
| OutEditedLayout | Layout that is currently edited. Copy of Layout Reference |
Save modifications of edited layout in storage Create new save file if it doesn't exist
Get current selected virtual input name. Return None if nothing is selected
Return location of component (edited by layout modifier) If child, return local location If you want original location of component, see 'Get Component Design Location'
Return size of component (edited by layout modifier) If you want original size of component, see 'Get Component Design Size'
Whether or not, positioning brush should be drawn bDrawPositioningBrush should be enabled With mouse or touch, draw automatically Call this function for specific use case like using slider
Whether or not, design location (original location) of component should be drawn bDrawDesignLocation should be enabled With mouse or touch, draw automatically Call this function for specific use case like using slider
Allow user to touch virtual input widget to positioning Otherwise, it's up to you to set offset position of virtual input, with a slider for example Call Set Virtual Input Offset
Allow user to use pinch gesture for sizing Otherwise, it's up to you to set size scale of virtual input, with a slider for example Call Set Virtual Input Size Scale
| ULayoutModifier::EditAnywhere |
|
protected |
| ULayoutModifier::meta |
| BlueprintAssignable FOnComponentEditedEvent ULayoutModifier::OnComponentLocationEdited |
| BlueprintAssignable FOnComponentEditedEvent ULayoutModifier::OnComponentSelected |
| BlueprintAssignable FOnComponentEditedEvent ULayoutModifier::OnComponentSizeEdited |