-
Notifications
You must be signed in to change notification settings - Fork 11
OryUIInputSpinner
Returns whether or not any input spinner has focus.
Returns whether or not any input spinner textfield has focus.
Creates an input spinner and returns a input spinner ID. See Available Parameters section below for the options.
Deletes an input spinner.
Returns whether or not the input spinner value has changed.
Returns the input spinner default value as a float.
Returns the input spinner default value as a integer.
Returns the input spinner textfield value as a float.
Returns whether or not the input spinner textfield has focus.
Returns the height of the input spinner.
Returns the input spinner textfield value as an integer.
Returns the value of the input spinner as a string.
Returns whether or not the input spinner is visible.
Returns the width of the input spinner.
Returns the X position of the input spinner.
Returns the Y position of the input spinner.
Required to register input spinner activity.
Updates an input spinner. See Available Parameters section below for the options.
| Parameter | Description |
|---|---|
| activeButtonColor | The colour of the buttons when active. Accepts RGB values, and RGBA values (comma delimited) Also accepts MakeColor() value/id, and hex color codes. |
| activeIconColor | The colour of the button icons when active. Accepts RGB values, and RGBA values (comma delimited) Also accepts MakeColor() value/id, and hex color codes. |
| addIcon | The icon to show on the add button. See the list of Available Icons |
| addIconID | Apply a custom icon to the add button. Requires a LoadImage() value/id. |
| addIconSize | The width and height of the icon shown on the add button, comma delimited. Also accepts -1 in either one to create a square icon. Accepts decimals. |
| autoCorrectIfOutOfRange | If true, the value in the input spinner textfield will change to the max or min value allowed when the textfield loses focus. |
| backgroundColor | The background colour of the input spinner. Accepts RGB values, and RGBA values (comma delimited) Also accepts MakeColor() value/id, and hex color codes. |
| decimals | The number of decimals to show in the input spinner. |
| defaultValue | The default value to show when the input spinner field is empty. |
| depth | The depth of the inputSpinner. |
| disableKeyboardInput | If disabled, only the buttons can be used to increase/decrease the value. Accepts the values true, false, 0, and 1. |
| height | The height of the input spinner. Accepts decimals. |
| inputText | The text shown in the input spinner textfield. |
| inactiveButtonColor | The colour of the buttons when inactive. Accepts RGB values, and RGBA values (comma delimited) Also accepts MakeColor() value/id, and hex color codes. |
| inactiveIconColor | The colour of the button icons when inactive. Accepts RGB values, and RGBA values (comma delimited) Also accepts MakeColor() value/id, and hex color codes. |
| max | The maximum value allowed in the input spinner. |
| maxLength | The maximum number of characters allowed in the input spinner. |
| min | The minimum value allowed in the input spinner. |
| position | The x and y position where the input spinner should be placed, comma delimited. |
| size | The width and height of the input spinner, comma delimited. Also accepts -1 in either one to create a square button. Accepts decimals. |
| step | The number the input spinner value increases or decreases by when the add and subtract buttons are pressed. |
| subtractIcon | The icon to show on the subtract button. See the list of Available Icons |
| subtractIconID | Apply a custom icon to the subtract button. Requires a LoadImage() value/id. |
| subtractIconSize | The width and height of the icon shown on the subtract button, comma delimited. Also accepts -1 in either one to create a square icon. Accepts decimals. |
| textColor | The colour of the button text. Accepts RGB values, and RGBA values (comma delimited) Also accepts MakeColor() value/id, and hex color codes. |
| textSize | The size of the button text. Accepts decimals. |
| width | The width of the input spinner. Accepts decimals. |
| x | The x position where the input spinner should be placed. |
| y | The y position where the input spinner should be placed. |
Example 1
inputSpinner = OryUICreateInputSpinner("position:10,20;min:0;max:399;step:1;maxLength:3;autoCorrectIfOutOfRange:true")
do
OryUIStartTrackingTouch()
OryUIInsertInputSpinnerListener(inputSpinner)
OryUIEndTrackingTouch()
Sync()
loop
Example 2
inputSpinner = OryUICreateInputSpinner("backgroundColor:41,128,185,255;activeButtonColor:44,62,80,255;textColor:255,255,255,255;size:40,5.8;position:10,20;min:0;max:99999;step:5;maxLength:5")
do
OryUIStartTrackingTouch()
OryUIInsertInputSpinnerListener(inputSpinner)
OryUIEndTrackingTouch()
Sync()
loop
Example 3
inputSpinner = OryUICreateInputSpinner("backgroundColor:255,255,255,255;activeButtonColor:255,255,255,255;activeIconColor:0,0,0,255;size:40,5.8;position:10,20;decimals:2;step:0.01")
do
OryUIStartTrackingTouch()
OryUIInsertInputSpinnerListener(inputSpinner)
OryUIEndTrackingTouch()
Sync()
loop