Related Classes
- SLayoutComponent
- ULayoutComponent
- UTouchInputComponent
- ULayoutComponentLogic
- UComponentDecorator
SUMMARY #
It’s the component that takes care of user interaction and visual appearance. It integrates variables and functions to define and modify its behavior in relation to inputs. You can also easily access the classes that define its logic and appearance.
PROPERTIES #
Recenter on Touch
Value Type : Boolean
Default : True
If enabled, the component is re-centered when the user touches it. The maximum offset from origin is based on the interaction size.
Interaction Shape
Value Type : EInteractionType
Default : EInteractionType::Square
Define the shape of the hit box of component.
- Square : Use square as shape for hit testing. Can be a rectangle.
- Circle : Use circle as shape for hit testing. Use the longest side of the component to define the radius of the circle.
- Alpha : [EXPERIMENTAL] Use alpha of texture used in decorator. Warning! All decorator layer shoud be collapsed into one render target. This is a slow operation, use with caution! Enable bOptimizeRendering in decorator settings for better performance.
Interaction Size
Value Type : float
Default : 100
Global size of hit box (percentage of component size). By default, hit box has a size that match component size. If you want, you can adjust the size of hit box by increasing or decreasing this percentage.
For example, if the component size is 150su (Slate Unit):
- 100% = 150su.
- 150% = 225su.
- 50% = 75su
Consume Input
Value Type : boolean
Default : True
Enable or not the consume input. Used to decide which component receives the input if more than one hit box is affected (under pointer’s location).
- If enabled, only components with a higher priority can receive inputs.
- If disabled, all components under this component will receive input.
Priority
Value Type : int32
Default : 0
Used to decide which component receives the input if more than one hit box is affected. A high priority allows this component to receive inputs in the event of a conflict with another component.
Logic Class
Value Type : TSubclassOf<ULayoutComponentLogic>
Default : null
Select the class that will determine how user input will be processed.
FUNCTIONS #
Get Decorator

Return Type : ULayoutComponentDecorator*
Return the decorator class used by this component.
Get Logic

Return Type : ULayoutComponentLogic*
Return the the logic instance used by this component.
Get Interaction Size

Return Type : float
Return the interaction size of component.
Get Input Priority

Return Type : int32
Return the input priority value of this component.
Is Consume Input

Return Type : boolean
Return true if this component consume input.
Get Group

Return Type : UGroupInputComponent*
Return group input component. Can return nullptr if this component is not in a group.
Set Decorator

Input Type : ULayoutComponentDecorator*
Output Type : boolean
Set the new decorator used by this component.
- New Decorator : Layout Component Decorator class
- Return : True if successfully set the new decorator
Set Logic

Input Type : TSubclassOf<ULayoutComponentLogic>
Output Type : boolean
Set the new logic class used by this component
- New Logic Class : Layout Component Logic class
- Return : True if successfully set the new logic
Set Interaction Size

Input Type : float
Set the new interaction size of the component
- Value : new value in percent
Set Input Priority

Input Type : int32
Set the new priority value of this component.
- New Priority : new priority value
Set Consume Input

Input Type : boolean
Enable or not the consume input.
- New Consume Input : If enabled, block other component that is under finger’s touch location with lower priority.
Enable Input

Input Type : boolean
Enable input. This component will now receive input.
Disable Input

Input Type : boolean
Disable input. This component will not receive any input.
Is Input Enabled

Input Type : boolean
Return true if input is enabled.
