Skip to content

OryUIInputSpinner

Kevin Cross edited this page Jun 28, 2020 · 5 revisions

Available Functions

OryUIAnyInputSpinnerFocused()

Returns whether or not any input spinner has focus.

OryUIAnyInputSpinnerTextfieldFocused()

Returns whether or not any input spinner textfield has focus.

OryUICreateInputSpinner(parameters$)

Creates an input spinner and returns a input spinner ID. See Available Parameters section below for the options.

OryUIDeleteInputSpinner(inputSpinnerID)

Deletes an input spinner.

OryUIGetInputSpinnerChangedValue(inputSpinnerID)

Returns whether or not the input spinner value has changed.

OryUIGetInputSpinnerDefaultFloat(inputSpinnerID)

Returns the input spinner default value as a float.

OryUIGetInputSpinnerDefaultInteger(inputSpinnerID)

Returns the input spinner default value as a integer.

OryUIGetInputSpinnerFloat(inputSpinnerID)

Returns the input spinner textfield value as a float.

OryUIGetInputSpinnerHasFocus(inputSpinnerID)

Returns whether or not the input spinner textfield has focus.

OryUIGetInputSpinnerHeight(inputSpinnerID)

Returns the height of the input spinner.

OryUIGetInputSpinnerInteger(inputSpinnerID)

Returns the input spinner textfield value as an integer.

OryUIGetInputSpinnerString(inputSpinnerID)

Returns the value of the input spinner as a string.

OryUIGetInputSpinnerVisible(inputSpinnerID)

Returns whether or not the input spinner is visible.

OryUIGetInputSpinnerWidth(inputSpinnerID)

Returns the width of the input spinner.

OryUIGetInputSpinnerX(inputSpinnerID)

Returns the X position of the input spinner.

OryUIGetInputSpinnerY(inputSpinnerID)

Returns the Y position of the input spinner.

OryUIInsertInputSpinnerListener(inputSpinnerID)

Required to register input spinner activity.

OryUIUpdateInputSpinner(inputSpinnerID, parameters$)

Updates an input spinner. See Available Parameters section below for the options.

Available Parameters (all optional)

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 Code

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

Clone this wiki locally