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