Skip to main content
Skip to main content

HUDTextButtonElement

HUDTextButtonElement

Description

A simple text button that can be used in the HUD. Use left-alt to release the mouse.

Functions

setText

Description

Set the text to display.

Definition

setText(string text, float textSize, integer textAlignment, table textColor, boolean textBool)

Arguments

stringtextDisplay text.
floattextSizeText size in reference resolution pixels.
integertextAlignmentText alignment as one of RenderText.[ALIGN_LEFTALIGN_CENTERALIGN_RIGHT].
tabletextColorText display color as an array {r, g, b, a}.
booleantextBoolIf true, will render the text in bold.

Code

function HUDTextButtonElement:setText(text, textSize, textAlignment, textColor, textBold)
self.textDisplay:setText(text, textSize, textAlignment, textColor, textBold)
end