Class: UIDDButton

UIDDButton(position, text, textSize, color, boxColor, callback, context) → {UIDDButton}

new UIDDButton(position, text, textSize, color, boxColor, callback, context) → {UIDDButton}

A Drop Down Button
Parameters:
Name Type Description
position Array.<Array> The position for the button
text String The text for the button
textSize float The size for the text
color Array.<Array> The color for the text
boxColor Array.<Array> The color for the box
callback function The function to call when it is clicked
context object who is function belongs to
Source:
Returns:
Type
UIDDButton

Methods

_applyUIXform(aCamera)

Changes the size and position to be compatible witht the camera
Parameters:
Name Type Description
aCamera Camera The camera to adjust for
Source:

draw(aCamera)

Draws the button
Parameters:
Name Type Description
aCamera type The camera to draw it on
Source:

getBoxColor() → {Array.<Array>}

Return the color of the box renderable
Source:
Returns:
Type
Array.<Array>

getBoxPos() → {Array.<Array>}

Returns the position of the box renderable
Source:
Returns:
Type
Array.<Array>

getClick() → {Boolean}

Returns whether the button was clicked this update
Source:
Returns:
Type
Boolean

getWidth() → {float}

Returns the width
Source:
Returns:
Type
float

setBoxColor(color)

Set the box renderable to a new color
Parameters:
Name Type Description
color Array.<Array> The new color
Source:

setWidth(w)

Sets the width of the button
Parameters:
Name Type Description
w type The new width
Source:

update(aCamera)

Update the button
Parameters:
Name Type Description
aCamera type The camera that's used to draw this button
Source: