Navigation
API > API/Runtime > API/Runtime/UMG
A numerical entry box that allows for direct entry of the number or allows the user to click and slide the number.
| Name | USpinBox |
| Type | class |
| Header File | /Engine/Source/Runtime/UMG/Public/Components/SpinBox.h |
| Include Path | #include "Components/SpinBox.h" |
Syntax
UCLASS (MinimalAPI)
class USpinBox : public UWidget
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UVisual → UWidget → USpinBox
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
USpinBox
(
const FObjectInitializer& ObjectInitializer |
Components/SpinBox.h |
Classes
| Name | Remarks |
|---|---|
| FOnSpinBoxBeginSliderMovement | |
| FOnSpinBoxValueChangedEvent | |
| FOnSpinBoxValueCommittedEvent |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAlwaysUsesDeltaSnap | bool | Whether this spin box should use the delta snapping logic for typed values - default false | Components/SpinBox.h |
|
| bEnableSlider | bool | Whether this spin box should have slider feature enabled | Components/SpinBox.h |
|
| ClearKeyboardFocusOnCommit | bool | Whether to remove the keyboard focus from the spin box when the value is committed | Components/SpinBox.h |
|
| Delta | float | The amount by which to change the spin box value as the slider moves. | Components/SpinBox.h |
|
| Font | FSlateFontInfo | Font color and opacity (overrides style) | Components/SpinBox.h |
|
| ForegroundColor | FSlateColor | Components/SpinBox.h |
|
|
| Justification | TEnumAsByte< ETextJustify::Type > | The justification the value text should appear as. | Components/SpinBox.h |
|
| KeyboardType | TEnumAsByte< EVirtualKeyboardType::Type > | If we're on a platform that requires a virtual keyboard, what kind of keyboard should this widget use? | Components/SpinBox.h |
|
| MaxFractionalDigits | int32 | The maximum required fractional digits - default 6 | Components/SpinBox.h |
|
| MinDesiredWidth | float | The minimum width of the spin box | Components/SpinBox.h |
|
| MinFractionalDigits | int32 | The minimum required fractional digits - default 1 | Components/SpinBox.h |
|
| OnBeginSliderMovement | FOnSpinBoxBeginSliderMovement | Called right before the slider begins to move | Components/SpinBox.h |
|
| OnEndSliderMovement | FOnSpinBoxValueChangedEvent | Called right after the slider handle is released by the user | Components/SpinBox.h |
|
| OnValueChanged | FOnSpinBoxValueChangedEvent | Called when the value is changed interactively by the user | Components/SpinBox.h |
|
| OnValueCommitted | FOnSpinBoxValueCommittedEvent | Called when the value is committed. Occurs when the user presses Enter or the text box loses focus. | Components/SpinBox.h |
|
| SelectAllTextOnCommit | bool | Whether to select the text in the spin box when the value is committed | Components/SpinBox.h |
|
| SliderExponent | float | The exponent by which to increase the delta as the mouse moves. | Components/SpinBox.h |
|
| Value | float | Value stored in this spin box | Components/SpinBox.h |
|
| ValueDelegate | FGetFloat | A bindable delegate to allow logic to drive the value of the widget | Components/SpinBox.h | |
| WidgetStyle | FSpinBoxStyle | The Style | Components/SpinBox.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ClearMaxSliderValue() |
Clear the maximum value that can be specified using the slider. | Components/SpinBox.h |
|
void ClearMaxValue() |
Clear the maximum value that can be manually set in the spin box. | Components/SpinBox.h |
|
void ClearMinSliderValue() |
Clear the minimum value that can be specified using the slider. | Components/SpinBox.h |
|
void ClearMinValue() |
Clear the minimum value that can be manually set in the spin box. | Components/SpinBox.h |
|
bool GetAlwaysUsesDeltaSnap() |
Get whether the spin box uses delta snap on type. | Components/SpinBox.h |
|
bool GetClearKeyboardFocusOnCommit() |
Get whether the keyboard focus is removed from the spin box when the value is committed. | Components/SpinBox.h | |
float GetDelta() |
Get the current delta for the spin box. | Components/SpinBox.h |
|
bool GetEnableSlider() |
Get whether the spin box uses the slider feature. | Components/SpinBox.h | |
const FSlateFontInfo & GetFont() |
Get the font color and opacity that overrides the style font. | Components/SpinBox.h | |
FSlateColor GetForegroundColor() |
Get the foreground color of the spin box. | Components/SpinBox.h | |
const ETextJustify::Type GetJustification() |
Get the justification for value text. | Components/SpinBox.h | |
int32 GetMaxFractionalDigits() |
Get the current Max Fractional Digits for the spin box. | Components/SpinBox.h |
|
float GetMaxSliderValue() |
Get the current maximum value that can be specified using the slider. | Components/SpinBox.h |
|
float GetMaxValue() |
Get the current maximum value that can be manually set in the spin box. | Components/SpinBox.h |
|
float GetMinDesiredWidth() |
Get the minimum width of the spin box. | Components/SpinBox.h | |
int32 GetMinFractionalDigits() |
Get the current Min Fractional Digits for the spin box. | Components/SpinBox.h |
|
float GetMinSliderValue() |
Get the current minimum value that can be specified using the slider. | Components/SpinBox.h |
|
float GetMinValue() |
Get the current minimum value that can be manually set in the spin box. | Components/SpinBox.h |
|
bool GetSelectAllTextOnCommit() |
Get whether to select the text in the spin box when the value is committed. | Components/SpinBox.h | |
float GetSliderExponent() |
Get the current slider exponent for the spin box. | Components/SpinBox.h | |
float GetValue() |
Get the current value of the spin box. | Components/SpinBox.h |
|
const FSpinBoxStyle & GetWidgetStyle() |
Set the style for the spin box. | Components/SpinBox.h | |
void SetAlwaysUsesDeltaSnap
(
bool bNewValue |
Set whether the spin box uses delta snap on type. | Components/SpinBox.h |
|
void SetClearKeyboardFocusOnCommit
(
bool bNewValue |
Set whether the keyboard focus is removed from the spin box when the value is committed. | Components/SpinBox.h | |
void SetDelta
(
float NewValue |
Set the delta for the spin box. | Components/SpinBox.h |
|
void SetEnableSlider
(
bool bNewValue |
Set whether the spin box uses the slider feature. | Components/SpinBox.h | |
void SetFont
(
const FSlateFontInfo& InFont |
Set the font color and opacity that overrides the style font. | Components/SpinBox.h | |
void SetForegroundColor
(
FSlateColor InForegroundColor |
Components/SpinBox.h |
|
|
void SetJustification
(
ETextJustify::Type InJustification |
Set the justification for value text. | Components/SpinBox.h | |
void SetMaxFractionalDigits
(
int32 NewValue |
Set the Max Fractional Digits for the spin box. | Components/SpinBox.h |
|
void SetMaxSliderValue
(
float NewValue |
Set the maximum value that can be specified using the slider. | Components/SpinBox.h |
|
void SetMaxValue
(
float NewValue |
Set the maximum value that can be manually set in the spin box. | Components/SpinBox.h |
|
void SetMinDesiredWidth
(
float NewValue |
Set the minimum width of the spin box. | Components/SpinBox.h | |
void SetMinFractionalDigits
(
int32 NewValue |
Set the Min Fractional Digits for the spin box. | Components/SpinBox.h |
|
void SetMinSliderValue
(
float NewValue |
Set the minimum value that can be specified using the slider. | Components/SpinBox.h |
|
void SetMinValue
(
float NewValue |
Set the minimum value that can be manually set in the spin box. | Components/SpinBox.h |
|
void SetSelectAllTextOnCommit
(
bool bNewValue |
Set whether to select the text in the spin box when the value is committed. | Components/SpinBox.h | |
void SetSliderExponent
(
float NewValue |
Set the slider exponent for the spin box. | Components/SpinBox.h | |
void SetValue
(
float NewValue |
Set the value of the spin box. | Components/SpinBox.h |
|
void SetWidgetStyle
(
const FSpinBoxStyle& InWidgetStyle |
Get the style for the spin box. | Components/SpinBox.h |
Overridden from UWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const FText GetPaletteCategory() |
Gets the palette category of the widget | Components/SpinBox.h | |
virtual void SynchronizeProperties () |
Applies all properties to the native widget if possible. | Components/SpinBox.h |
Overridden from UVisual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ReleaseSlateResources
(
bool bReleaseChildren |
Components/SpinBox.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void HandleOnBeginSliderMovement() |
Components/SpinBox.h | ||
void HandleOnEndSliderMovement
(
float InValue |
Components/SpinBox.h | ||
void HandleOnValueChanged
(
float InValue |
Components/SpinBox.h | ||
void HandleOnValueCommitted
(
float InValue, |
Components/SpinBox.h | ||
float K2_Gate_Value() |
Components/SpinBox.h |
Overridden from UWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedRef< SWidget > RebuildWidget() |
Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed. | Components/SpinBox.h |