SpinBox

Numerical input text field.

SpinBox is a numerical input text field. It allows entering integers and floats. Example:

More...

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

_guiInput
void _guiInput(InputEvent arg0)
_lineEditFocusExit
void _lineEditFocusExit()
_lineEditInput
void _lineEditInput(InputEvent arg0)
_rangeClickTimeout
void _rangeClickTimeout()
_textEntered
void _textEntered(String arg0)
apply
void apply()

Applies the current value of this SpinBox.

getAlign
LineEdit.Align getAlign()
getLineEdit
LineEdit getLineEdit()

Returns the LineEdit instance from this SpinBox. You can use it to access properties and methods of LineEdit.

getPrefix
String getPrefix()
getSuffix
String getSuffix()
isEditable
bool isEditable()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(SpinBox other)
opEquals
bool opEquals(typeof(null) n)
setAlign
void setAlign(long _align)
setEditable
void setEditable(bool editable)
setPrefix
void setPrefix(String prefix)
setSuffix
void setSuffix(String suffix)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

_align
LineEdit.Align _align [@property getter]
long _align [@property setter]

Sets the text alignment of the SpinBox.

editable
bool editable [@property getter]
bool editable [@property setter]

If true, the SpinBox will be editable. Otherwise, it will be read only.

prefix
String prefix [@property getter]
String prefix [@property setter]

Adds the specified prefix string before the numerical value of the SpinBox.

suffix
String suffix [@property getter]
String suffix [@property setter]

Adds the specified suffix string after the numerical value of the SpinBox.

Static functions

_new
SpinBox _new()

Construct a new instance of SpinBox. Note: use memnew!SpinBox instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Detailed Description

var spin_box = SpinBox.new() add_child(spin_box) var line_edit = spin_box.get_line_edit() line_edit.context_menu_enabled = false spin_box.align = LineEdit.ALIGN_RIGHT

The above code will create a SpinBox, disable context menu on it and set the text alignment to right. See Range class for more options over the SpinBox. Note: SpinBox relies on an underlying LineEdit node. To theme a SpinBox's background, add theme items for LineEdit and customize them.

Meta