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


Public Member Functions | |
| SLATE_BEGIN_ARGS (SVirtualControlJoystick) | |
| SVirtualControlJoystick () | |
| void | Construct (const FArguments &InArgs) |
| virtual bool | OnPress (const FGeometry &MyGeometry, const FPointerEvent &Event) override |
| virtual void | OnMove (const FGeometry &MyGeometry, const FPointerEvent &Event) override |
| virtual void | OnRelease (const FGeometry &MyGeometry, const FPointerEvent &Event) override |
| virtual void | OnTick (const FGeometry &MyGeometry, const float InScaleFactor, const double InCurrentTime, const float InDeltaTime, const bool InForceUpdate, const bool OrientToLandscape) override |
| virtual void | CalculateCorrectedValues (const FVector2D &Center, const FVector2D Offset, const FGeometry &AllottedGeometry, const float InScaleFactor) override |
| virtual void | Recenter (const FVector2D DesiredPosition) override |
| 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 |
| bool | LockThumb () |
| bool | LockThumbAtDesiredPosition (const FVector2D LockPosition, const bool Clamp=true) |
| void | UnlockThumb (const bool bRecenter) |
| FVector2D | GetThumbPosition (const bool bNormalized) const |
| FVector2D | GetThumbOffset () const |
| float | GetAngleDelta () const |
| FVector2D | GetRawValue (const bool bApplyModifiers=false) |
| FVector2D | GetLastRawValue () const |
| Public Member Functions inherited from SVirtualControl | |
| SLATE_BEGIN_ARGS (SVirtualControl) | |
| SVirtualControl () | |
| void | Construct (const FArguments &InArgs) |
| virtual | ~SVirtualControl () 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 |
Additional Inherited Members | |
| Protected Member Functions inherited from SVirtualControl | |
| const UTouchInterfaceSettings * | GetSettings () |
| void | AlignBoxIntoScreen (FVector2D &Position, const FVector2D &Size, const FVector2D &ScreenSize) |
| void | ResolveRelativePosition (FVector2D &Position, const FVector2D RelativeTo) |
| 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 inherited from SVirtualControl | |
| 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 |
| BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION SVirtualControlJoystick::SVirtualControlJoystick | ( | ) |
|
overridevirtual |
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 from SVirtualControl.
|
overridevirtual |
Reimplemented from SVirtualControl.
| void SVirtualControlJoystick::Construct | ( | const FArguments & | InArgs | ) |
Constructs this widget with InArgs
|
inline |
|
inline |
| FVector2D SVirtualControlJoystick::GetRawValue | ( | const bool | bApplyModifiers = false | ) |
|
inline |
| FVector2D SVirtualControlJoystick::GetThumbPosition | ( | const bool | bNormalized | ) | const |
| bool SVirtualControlJoystick::LockThumb | ( | ) |
Lock thumb position at current position Implies that the input is continuously injected unless the current position is zero
| bool SVirtualControlJoystick::LockThumbAtDesiredPosition | ( | const FVector2D | LockPosition, |
| const bool | Clamp = true ) |
Lock thumb position at desired position Implies that the input is continuously injected unless the desired position is zero
|
overridevirtual |
Reimplemented from SVirtualControl.
|
overridevirtual |
Reimplemented from SVirtualControl.
|
overridevirtual |
return true if control block touch region input
Reimplemented from SVirtualControl.
|
overridevirtual |
Reimplemented from SVirtualControl.
|
overridevirtual |
Reimplemented from SVirtualControl.
|
overridevirtual |
Recenter virtual control position at desired position
Reimplemented from SVirtualControl.
|
inline |
| void SVirtualControlJoystick::UnlockThumb | ( | const bool | bRecenter | ) |
Unlock thumb position Implies that the input injected is stopped even if current position is different to zero