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


Public Member Functions | |
| SLATE_BEGIN_ARGS (SVirtualControl) | |
| SVirtualControl () | |
| void | Construct (const FArguments &InArgs) |
| virtual | ~SVirtualControl () override |
| virtual bool | OnPress (const FGeometry &MyGeometry, const FPointerEvent &Event) |
| virtual void | OnMove (const FGeometry &MyGeometry, const FPointerEvent &Event) |
| virtual void | OnRelease (const FGeometry &MyGeometry, const FPointerEvent &Event) |
| virtual void | OnTick (const FGeometry &MyGeometry, const float InScaleFactor, const double InCurrentTime, const float InDeltaTime, const bool InForceUpdate, const bool OrientToLandscape) |
| virtual int32 | OnPaint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const override |
| virtual FVector2D | ComputeDesiredSize (float LayoutScaleMultiplier) const override |
| virtual bool | SupportsKeyboardFocus () const override |
| void | SetCanvasSlot (SConstraintCanvas::FSlot *NewSlot) |
| virtual void | RefreshPosition () |
| virtual void | DrawLayer (const FVisualLayer &InLayer, const FVector2D InSize, const FVector2D InBrushSize, float Angle, const FVector2D InOffset, const FGeometry &AllottedGeometry, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle) const |
| virtual bool | IsInside (const FVector2D FingerPosition) |
| EControlType | GetControlType () const |
| FName | GetControlName () const |
| FVirtualControl | GetData () const |
| FVirtualControl & | GetDataRef () |
| TArray< UVirtualInputEvent * > | GetVirtualInputEventInstances () |
| void | AddNewLayer (const FVisualLayer &VisualLayer) |
| void | InsertNewLayer (const FVisualLayer &VisualLayer, const int32 Index) |
| void | RemoveLayer (const FName LayerName) |
| void | RemoveLayerByIndex (const int32 LayerIndex) |
| UMaterialInstanceDynamic * | GetLayerDynamicMaterialInstance (const FName LayerName, UObject *InOuter) |
| bool | ApplyModification () |
| bool | ContainPointerIndex (int32 PointerIndex) |
| UEnhancedInputLocalPlayerSubsystem * | GetEnhancedInputSubsystem () |
| void | HandleOnOrientationChanged (const bool bOrientToLandscape) |
| void | Reset () |
| void | ResetChild (const FVector2D ParentPosition) |
| virtual void | FlushPressedKey () |
| bool | AddChild (TSharedPtr< SVirtualControl > Other) |
| void | PreDestroy () |
| bool | RemoveChild (TSharedPtr< SVirtualControl > ChildToRemove) |
| bool | IsParent () const |
| bool | IsChild () const |
| const TArray< TSharedPtr< SVirtualControl > > & | GetLinkedVirtualControls () |
| void | InjectInput (const UInputAction *Action, FInputActionValue RawValue) |
| void | StopInjectingInput (const UInputAction *Action) |
| void | SetEnableInput (const bool Enabled) |
| ULocalPlayer * | GetLocalPlayer () const |
Protected Member Functions | |
| const UTouchInterfaceSettings * | GetSettings () |
| void | AlignBoxIntoScreen (FVector2D &Position, const FVector2D &Size, const FVector2D &ScreenSize) |
| void | ResolveRelativePosition (FVector2D &Position, const FVector2D RelativeTo) |
| virtual void | CalculateCorrectedValues (const FVector2D &Center, const FVector2D Offset, const FGeometry &AllottedGeometry, const float InScaleFactor) |
| virtual void | Recenter (const FVector2D DesiredPosition) |
| virtual void | RefreshChild (const FGeometry &MyGeometry, const FVector2D ParentCenter, const float InScaleFactor) |
| virtual void | RecenterChild (const FVector2D ParentPosition) |
| void | SetLocalPosition (const FVector2D NewPosition, const bool IsNormalized) |
| bool | MultitouchDetected () const |
Protected Attributes | |
| TSharedPtr< SDeprecatedTouchInterface > | ParentWidget |
| TArray< int32 > | CapturePointerIndex |
| FVirtualControl | VirtualControl |
| UVirtualInput * | VirtualInput |
| SConstraintCanvas::FSlot * | CanvasSlot |
| TAttribute< float > | TouchInterfaceOpacity |
| TAttribute< float > | ScaleFactor |
| TAttribute< bool > | DrawDebug |
| uint8 | bIsPressed:1 |
| uint8 | bBlockInput:1 |
| uint8 | bRefreshPosition:1 |
| uint8 | bAutoPositioning:1 |
| uint8 | bUseLandscapePosition:1 |
| uint8 | bSupportMultitouch:1 |
| FVector2D | AbsoluteCenter |
| FVector2D | CorrectedCenter |
| FVector2D | CorrectedVisualSize |
| FVector2D | CorrectedInteractionSize |
| FVector2D | ParentOffset |
| FVector2D | CorrectedOffset |
| float | CorrectedInteractionRadiusSize |
| float | CircleHitMaxLength |
| float | CurrentScaleFactor |
| float | PreviousScaleFactor |
| double | CurrentTime |
| float | DeltaTime |
| float | ElapsedTime |
| float | LastElapsedTime |
| float | DebugOpacity |
| SVirtualControl::SVirtualControl | ( | ) |
|
overridevirtual |
Called when this widget is destroyed
| bool SVirtualControl::AddChild | ( | TSharedPtr< SVirtualControl > | Other | ) |
| void SVirtualControl::AddNewLayer | ( | const FVisualLayer & | VisualLayer | ) |
Add new layer in default group
|
protected |
Clamp control position into screen
| bool SVirtualControl::ApplyModification | ( | ) |
Apply changes to the structure (FVirtualControl)
|
protectedvirtual |
Adjust all virtual control properties based on geometry and ScaleFactor
| Center | Center of control in screen in relative |
| Offset | Offset from CorrectedCenter in absolute |
| AllottedGeometry | Touch Interface Geometry |
| InScaleFactor | ScaleFactor used by Touch Interface |
Reimplemented in SVirtualControlJoystick.
|
overridevirtual |
Reimplemented in STouchRegion, and SVirtualControlJoystick.
| void SVirtualControl::Construct | ( | const FArguments & | InArgs | ) |
Constructs this widget with InArgs
| bool SVirtualControl::ContainPointerIndex | ( | int32 | PointerIndex | ) |
|
virtual |
|
virtual |
|
inline |
|
inline |
|
inline |
|
inline |
| UEnhancedInputLocalPlayerSubsystem * SVirtualControl::GetEnhancedInputSubsystem | ( | ) |
| UMaterialInstanceDynamic * SVirtualControl::GetLayerDynamicMaterialInstance | ( | const FName | LayerName, |
| UObject * | InOuter ) |
|
inline |
|
inline |
|
protected |
Get Virtual control Designer Settings
|
inline |
| void SVirtualControl::HandleOnOrientationChanged | ( | const bool | bOrientToLandscape | ) |
| void SVirtualControl::InjectInput | ( | const UInputAction * | Action, |
| FInputActionValue | RawValue ) |
| void SVirtualControl::InsertNewLayer | ( | const FVisualLayer & | VisualLayer, |
| const int32 | Index ) |
Add new layer in group. Group allow to manage visual layer 0 means default group
|
inline |
|
virtual |
|
inline |
|
inlineprotected |
|
virtual |
Reimplemented in STouchRegion, SVirtualButton, and SVirtualControlJoystick.
|
overridevirtual |
Reimplemented in STouchRegion, SVirtualButton, and SVirtualControlJoystick.
|
virtual |
return true if control block touch region input
Reimplemented in STouchRegion, SVirtualButton, and SVirtualControlJoystick.
|
virtual |
Reimplemented in STouchRegion, SVirtualButton, and SVirtualControlJoystick.
|
virtual |
Reimplemented in STouchRegion, SVirtualButton, and SVirtualControlJoystick.
| void SVirtualControl::PreDestroy | ( | ) |
|
protectedvirtual |
Recenter virtual control position at desired position
Reimplemented in SVirtualControlJoystick.
|
protectedvirtual |
|
protectedvirtual |
Called by parent control to refresh position of children
|
inlinevirtual |
Re-calculate position of control
| bool SVirtualControl::RemoveChild | ( | TSharedPtr< SVirtualControl > | ChildToRemove | ) |
| void SVirtualControl::RemoveLayer | ( | const FName | LayerName | ) |
| void SVirtualControl::RemoveLayerByIndex | ( | const int32 | LayerIndex | ) |
| void SVirtualControl::Reset | ( | ) |
| void SVirtualControl::ResetChild | ( | const FVector2D | ParentPosition | ) |
|
protected |
Set Position value based on RelativeTo (Normalized to Local)
|
inline |
|
inline |
|
protected |
Set position in canvas. If
|
inline |
| void SVirtualControl::StopInjectingInput | ( | const UInputAction * | Action | ) |
|
inlineoverridevirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Time since creation
|
protected |
|
protected |
Time since last frame
|
protected |
|
protected |
Duration from press to release
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |