17 SLATE_ARGUMENT(
float, DPIScale)
18 SLATE_ARGUMENT(
float, ResizeSensibility)
20 SLATE_EVENT(FOnVirtualInputSelected, OnVirtualControlSelected)
25 void Construct(const FArguments& InArgs);
27 virtual FVector2D ComputeDesiredSize(
float LayoutScaleMultiplier) const override;
29 virtual FReply OnTouchStarted(const FGeometry& MyGeometry, const FPointerEvent& InTouchEvent) override;
30 virtual FReply OnDragDetected(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override;
31 virtual FReply OnTouchMoved(const FGeometry& MyGeometry, const FPointerEvent& InTouchEvent) override;
32 virtual FReply OnTouchEnded(const FGeometry& MyGeometry, const FPointerEvent& InTouchEvent) override;
34 virtual int32 OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle,
bool bParentEnabled) const override;
37 virtual
void PaintButton(const
FVirtualControl& VirtualControl, const FGeometry& AllottedGeometry, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle) const;
38 virtual
void PaintJoystick(const
FVirtualControl& VirtualControl, const FGeometry& AllottedGeometry, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle) const;
39 virtual
void PaintTouchRegion(const
FVirtualControl& VirtualControl, const FGeometry& AllottedGeometry, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle) const;
41 void DrawLayer(const
FVisualLayer& InLayer, const FVector2D InSize, const FVector2D InBrushSize, const FVector2D InOffset, const FGeometry& AllottedGeometry, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle) const;
43 float GetScaleFactor(const FGeometry& AllottedGeometry) const;
45 bool IsInside(const
FVirtualControl& VirtualControl, const FGeometry& AllottedGeometry, const FVector2D FingerPosition);
47 FVector2D GetVirtualControlLocation(const FName Name, const FGeometry& AllottedGeometry, const
bool bSubtractVisualSize) const;
49 FVector2D GetVirtualControlPositionFromSetup(const FName Name) const;
57 void ClearTouchInterface();
62 void SetOpacity(
const float NewActive,
const float NewInactive);
64 FVector2D GetVirtualInputOffset(
const FName InputName);
65 void SetVirtualInputOffset(
const FName InputName,
const FVector2D Offset);
66 FVector2D AddOffsetToVirtualInput(
const FName InputName,
const FVector2D Delta);
68 float GetVirtualInputSizeScale(
const FName InputName);
69 void SetVirtualInputSizeScale(
const FName InputName,
const float Size);
70 float AddDeltaToVirtualInputSizeScale(
const FName InputName,
const float Delta);
72 void SetDPIScale(
const float NewDPIScale) { DPIScale = NewDPIScale; }
87 FOnVirtualInputSelected OnVirtualInputSelected;
97 float InactiveOpacity;
98 float LastDistanceBetweenFingers;
103 FVector2D TouchLocation_Finger0;
104 FVector2D TouchLocation_Finger1;
106 FName VirtualControlSelectedName;
112 uint8 bDragVirtualControl:1;
113 uint8 bResizeVirtualControl:1;
114 uint8 bCanDrawPositioningBrush:1;