Klasse Text3D
java.lang.Object
net.risingworld.api.worldelements.GameObject
net.risingworld.api.worldelements.Text3D
Represents a 3d world text
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen net.risingworld.api.worldelements.GameObject
GameObject.AttachTarget
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetText()
void
setAlwaysVisible
(boolean set) Determines if the element should be always visible (i.e visible through walls etc) or not.void
setBillboard
(boolean set) Enables or disables billboard handling for the text element.void
setFontColor
(float r, float g, float b, float a) void
setFontColor
(int rgba) void
setFontSize
(float size) Sets the font size.void
void
setTextContainer
(float width, float height) Restricts the size of the actual text container.void
setTextWrappingMode
(Text3D.TextWrappingMode textWrap) Sets the text wrapping mode.Von Klasse geerbte Methoden net.risingworld.api.worldelements.GameObject
addChild, addComponent, attachTo, attachTo, deleteAttribute, getAttribute, getAttributes, getChildCount, getChilds, getCollider, getID, getLayer, getLocalPosition, getLocalRotation, getLocalScale, getParent, getPluginID, hasAttribute, hasAttribute, invokeComponentMethod, isActive, isAttached, isColliderVisible, isDisposed, moveToLocalPosition, moveToLocalPosition, moveToLocalPosition, moveToLocalPosition, moveToLocalTransform, readWorldPosition, readWorldRotation, removeAllChilds, removeChild, removeComponent, removeFromParent, rotateToLocalRotation, setActive, setAttribute, setCollider, setColliderVisible, setComponentEnabled, setComponentProperty, setLayer, setLocalPosition, setLocalPosition, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale
-
Konstruktordetails
-
Text3D
-
Text3D
-
-
Methodendetails
-
setText
-
getText
-
setFontColor
public void setFontColor(float r, float g, float b, float a) -
setFontColor
public void setFontColor(int rgba) -
setFontSize
public void setFontSize(float size) Sets the font size. If set to 0, the game adjust the font size automatically depending on the text container size.- Parameter:
size
- the new font size.
-
setTextWrappingMode
Sets the text wrapping mode. By default it's set toNoWrap
, so no automatic text wrapping occurs. Otherwise the game tries to fit the text to the size of the text container and wraps it if necessary. Irrespective of this setting, you can always manually insert a new line by adding the\n
escape sequence.- Parameter:
textWrap
- sets the text wrapping mode.
-
getTextWrappingMode
-
setTextContainer
public void setTextContainer(float width, float height) Restricts the size of the actual text container. If set to 0 (default), the text container will be adjusted automatically, depending on the text size. The size of the text container is usually relevant if a text wrapping mode is set: If it's not set toNoWrap
, the text will wrap automatically if it exceeds the width of the container.- Parameter:
width
- the text container width (world space units).height
- the text container height (world space units).
-
setBillboard
public void setBillboard(boolean set) Enables or disables billboard handling for the text element. If true, this means that the text object will always face towards the player camera (in this case, the local rotation of the element will be ignored). Otherwise the element will always have a fixed rotation (controlled by the rotation property).- Parameter:
set
- true to force the text to always face towards the player camera, false to have a fixed rotation.
-
setAlwaysVisible
public void setAlwaysVisible(boolean set) Determines if the element should be always visible (i.e visible through walls etc) or not.- Parameter:
set
- set to true to make this element always visible.
-