new UIRButton(callback, context, position, text, textSize, textColor, aCamera) → {UIRButton}
A radio button for UI purposes
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | The function to be called when the button is released |
context |
object | The owner of the callback function |
position |
Array.<Array> | The base position for the UIRButton |
text |
string | The text for the UIRButton |
textSize |
int | The size for the text and the button |
textColor |
Array.<Array> | The color for the text |
aCamera |
Camera | The camera that the UIRButton will be drawn on |
- Source:
Returns:
- Type
- UIRButton
Methods
_applyUIXform(aCamera)
This adjusts the button so it can be drawn by the camera
Parameters:
Name | Type | Description |
---|---|---|
aCamera |
Camera | the camera to adjust for |
- Source:
deselect()
Resets the radio button back to a non-clicked state
- Source:
draw(aCamera)
Draws the UIRButton on the passed camera
Parameters:
Name | Type | Description |
---|---|---|
aCamera |
Camera | The camera to draw the button on |
- Source:
getClick() → {Boolean}
Checks whether if the button was clicked this update
- Source:
Returns:
If the button was clicked
- Type
- Boolean
getText() → {UIText}
Returns the UIText on the UIRButton
- Source:
Returns:
- Type
- UIText
setTextColor(color)
Sets the text's color
Parameters:
Name | Type | Description |
---|---|---|
color |
Array.<Array> | The new text color |
- Source:
setTextHeight(height)
Set the height of the text
Parameters:
Name | Type | Description |
---|---|---|
height |
int | The new height |
- Source:
setTextString(text)
Sets the text for the UIRButton
Parameters:
Name | Type | Description |
---|---|---|
text |
String | The new text for the UIRButton |
- Source:
update()
Updates the UIRButton
- Source: