Class: GraphicTextIcon

GraphicTextIcon

The graphic displaying a text and an icon

new GraphicTextIcon (text, iconID, opts)

Name Type Default Description
text string The brut text to display
iconID number The icon ID
opts Object {} optional Options
Name Type Default Description
side Align Align.Left optional The side to display icon
align Align Align.left optional The complete graphic align
space number RPM.MEDIUM_SPACE optional The space between icon and text
Properties:
Name Type Description
text string The brut text to display
iconID number The icon ID
side Align The side to display icon
align Align The complete graphic align
space number The space between icon and text
graphicIcon Picture2D The picture 2D icon
graphicText GraphicText The graphic text
length number The text length

Methods

getMaxHeight ()number

Get the max possible height
Returns:
Type Description
number

getWidth ()number

Get the width
Returns:
Type Description
number

drawChoice (x, y, w, h)

Drawing the content
Name Type Description
x number The x position to draw graphic
y number The y position to draw graphic
w number The width dimention to draw graphic
h number The height dimention to draw graphic

drawBox (x, y, w, h)

Drawing the content
Name Type Description
x number The x position to draw graphic
y number The y position to draw graphic
w number The width dimention to draw graphic
h number The height dimention to draw graphic

draw (x, y, w, h)

Drawing the content
Name Type Description
x number The x position to draw graphic
y number The y position to draw graphic
w number The width dimention to draw graphic
h number The height dimention to draw graphic