public class World3DText extends WorldElement
| Constructor and Description |
|---|
World3DText(java.lang.String text)
Creates a new
World3DText element with the provided text. |
| Modifier and Type | Method and Description |
|---|---|
int |
getBackgroundColor()
Gets the background color of this element.
|
Font |
getFont()
Gets the current font of this label.
|
int |
getFontColor()
Gets the font color.
|
int |
getFontsize()
Gets the font size of this text.
|
java.lang.String |
getText()
Gets the text.
|
boolean |
isAlwaysVisible()
Gets whether this element is always visible (i.e. visible through walls etc)
or not.
|
boolean |
isBillboard()
Gets whether this element always faces to the player or not.
|
void |
setAlwaysVisible(boolean set)
Determines if the element should be always visible (i.e. visible
through walls etc) or not.
|
void |
setBackgroundColor(float r,
float g,
float b,
float a)
Sets the background color (RGBA) of this element.
|
void |
setBackgroundColor(int backgroundColor)
Sets the background color (RGBA) of this element.
|
void |
setBillboard(boolean set)
If set to true, the text will always face towars the player (acting like
a "sprite").
|
void |
setFont(Font font)
Sets the font for this label.
|
void |
setFontColor(float r,
float g,
float b,
float a)
Sets the font color, defined as an RGBA int (e.g. 0xFF0000FF).
|
void |
setFontColor(int color)
Sets the font color, defined as an RGBA int (e.g. 0xFF0000FF).
|
void |
setFontsize(int size)
Sets the font size of the text.
|
void |
setText(java.lang.String text)
Sets the text.
|
deleteAttribute, destroy, getAttribute, getID, getPosition, getRotation, getVisibleRange, hasAttribute, moveTo, moveTo, refresh, setAttribute, setPosition, setPosition, setRotation, setRotation, setVisibleRangepublic World3DText(java.lang.String text)
World3DText element with the provided text.text - the text.public void setText(java.lang.String text)
text - the new text.public java.lang.String getText()
public void setAlwaysVisible(boolean set)
set - set to true to make this element always visible.public boolean isAlwaysVisible()
public void setBillboard(boolean set)
WorldElement.setRotation(net.risingworld.api.utils.Quaternion)set - set to true if you want this element facing always to the player.public void setFont(Font font)
font - the new font.public Font getFont()
public boolean isBillboard()
public void setFontsize(int size)
size - the new size.public int getFontsize()
public void setFontColor(int color)
color - the new int RGBA color value.public void setFontColor(float r,
float g,
float b,
float a)
r - the red color value (0-1)g - the green color value (0-1)b - the blue color value (0-1)a - the alpha value (0-1), 0 makes the font invisible, 1 fully
opaque.public int getFontColor()
public void setBackgroundColor(int backgroundColor)
backgroundColor - the new background color as an RGBA int value.public void setBackgroundColor(float r,
float g,
float b,
float a)
r - the red color value (0-1)g - the green color value (0-1)b - the blue color value (0-1)a - the alpha value (0-1), 0 makes the background invisible, 1 fully
opaque.public int getBackgroundColor()