12#include "CoreMinimal.h"
13#include "WSModernCard.h"
14#include "Components/HorizontalBox.h"
15#include "Components/Overlay.h"
16#include "Widgets/WSSliderBase.h"
17#include "Widgets/Basic/WSIcon.h"
18#include "Widgets/Basic/WSText.h"
19#include "WSModernSpinBox.generated.h"
31 virtual TSharedRef<SWidget> RebuildWidget()
override;
32 virtual int32 NativePaint(
const FPaintArgs& Args,
const FGeometry& AllottedGeometry,
const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId,
const FWidgetStyle& InWidgetStyle,
bool bParentEnabled)
const override;
33 virtual FReply NativeOnMouseButtonDown(
const FGeometry& InGeometry,
const FPointerEvent& InMouseEvent)
override;
34 virtual FReply NativeOnMouseWheel(
const FGeometry& InGeometry,
const FPointerEvent& InMouseEvent)
override;
35 virtual void SynchronizeProperties()
override;
36 virtual void InitializeStyling()
override;
37 virtual void UpdateStyling()
override;
42 virtual void NativeTick(
const FGeometry& MyGeometry,
float InDeltaTime)
override;
45 void OnTextCommitted(
const FText& InText, ETextCommit::Type InCommitMethod);
52 void UpdateValueOnMouseMovement();
56 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
57 USizeBox* SizeBox =
nullptr;
59 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
60 UOverlay* Overlay =
nullptr;
62 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
65 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
66 UHorizontalBox* HorizontalBox =
nullptr;
68 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
71 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
72 UOverlay* BackgroundOverlay =
nullptr;
74 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
77 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
80 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
81 UHorizontalBox* ContentHorizontalBox =
nullptr;
83 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
86 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
89 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
90 UEditableTextBox* ValueInput =
nullptr;
96 bool bIsPressed =
false;
97 bool bIsLeftArrowPressed =
false;
98 bool bIsRightArrowPressed =
false;
101 float InitialMousePos = 0.f;
102 float LastMousePos = 0.f;
105 float PressTime = 0.f;
111 UPROPERTY(EditAnywhere, Category=
"Widget Studio")
118 UPROPERTY(EditAnywhere, Category="Widget Studio|Input")
119 bool bEnableArrowButtons = true;
122 UPROPERTY(EditAnywhere, Category="Widget Studio|Input")
123 bool bEnableMouseWheelInput = true;
129 UPROPERTY(EditAnywhere, Category="Widget Studio|Input")
130 bool bEnableDragInput = true;
133 UPROPERTY(EditAnywhere, Category="Widget Studio|Color")
134 EPalette BackgroundColor = EPalette::PrimaryBackground;
137 UPROPERTY(EditAnywhere, Category="Widget Studio|Color")
138 EPalette ContentColor = EPalette::PrimaryContent;
141 UPROPERTY(EditAnywhere, Category="Widget Studio|Color")
142 EPalette IndicatorColor = EPalette::PrimaryAccent;
149 UFUNCTION(BlueprintPure, Category="Widget Studio|Helper")
150 FText GetLabel() const;
153 UFUNCTION(BlueprintPure, Category="Widget Studio|Helper")
154 bool AreArrowButtonsEnabled() const;
157 UFUNCTION(BlueprintPure, Category="Widget Studio|Helper")
158 bool IsMouseWheelInputEnabled() const;
161 UFUNCTION(BlueprintPure, Category="Widget Studio|Helper")
162 bool IsDragInputEnabled() const;
165 UFUNCTION(BlueprintPure, Category="Widget Studio|Helper")
166 EPalette GetBackgroundColor() const;
169 UFUNCTION(BlueprintPure, Category="Widget Studio|Helper")
170 EPalette GetContentColor() const;
173 UFUNCTION(BlueprintPure, Category="Widget Studio|Helper")
174 EPalette GetIndicatorColor() const;
182 UFUNCTION(BlueprintCallable, Category="Widget Studio|Modifier")
183 void SetLabelText(const FText NewText);
189 UFUNCTION(BlueprintCallable, Category="Widget Studio|Modifier")
190 void SetArrowButtonsEnabled(const
bool bState);
196 UFUNCTION(BlueprintCallable, Category="Widget Studio|Modifier")
197 void SetMouseWheelInputEnabled(const
bool bState);
203 UFUNCTION(BlueprintCallable, Category="Widget Studio|Modifier")
204 void SetDragInputEnabled(const
bool bState);
210 UFUNCTION(BlueprintCallable, Category="Widget Studio|Modifier")
211 void SetBackgroundColor(const EPalette NewColor);
217 UFUNCTION(BlueprintCallable, Category="Widget Studio|Modifier")
218 void SetContentColor(const EPalette NewColor);
224 UFUNCTION(BlueprintCallable, Category="Widget Studio|Modifier")
225 void SetIndicatorColor(const EPalette NewColor);
228 virtual
void SetValue(
float NewValue,
bool bBroadcast = true) override;
A custom text widget setup to work with the Typography Styling.
Definition: WSText.h:92