FontRenderer
This page goes over about the FontRnederer object.
width(text): Number
width(text): Number
Argument
Type
Description
text
String
Text to calculate the width of.
Returns the text width.
height(): Number
height(): Number
Returns the font height.
draw(text, x, y, color): Undefined
draw(text, x, y, color): Undefined
drawCentered(text, x, y, color): Undefined
drawCentered(text, x, y, color): Undefined
drawWithShadow(text, x, y, color): Undefined
drawWithShadow(text, x, y, color): Undefined
drawCenteredWithShadow(text, x, y, color): Undefined
drawCenteredWithShadow(text, x, y, color): Undefined
Argument
Type
Description
text
String
Text to draw.
x
Number
X position of the string to draw.
y
Number
Y position of the string to draw.
color
Number[]
4-element array with the RGBA color to use. Example: [255, 255, 255, 255] would translate to a white color. You are not required to provide the alpha.
Renders a string. The function name speaks for itself.
Last updated