Package net.risingworld.api.ui
Class UIMesh
java.lang.Object
net.risingworld.api.ui.UIElement
net.risingworld.api.ui.UIMesh
Represents a UI mesh. It enables you to create custom shapes and elements on the screen. For a simplified version,
you can use the
Please note that most style properties have no impact on the UIMesh!
Another note: Unity internally has a hard-coded mesh vertex limit of 65535 for UI elements. If the amount of vertices exceed this value, the UI element can no longer be rendered. Unfortunately there is no workaround available yet, so if you need to work with more than 65535 vertices, you have to split the element into multiple UIMeshes.
UIPainter2D
instead, which provides a Vector API to create shapes. Please note that most style properties have no impact on the UIMesh!
Another note: Unity internally has a hard-coded mesh vertex limit of 65535 for UI elements. If the amount of vertices exceed this value, the UI element can no longer be rendered. Unfortunately there is no workaround available yet, so if you need to work with more than 65535 vertices, you have to split the element into multiple UIMeshes.
- See Also:
-
Field Summary
Fields inherited from class net.risingworld.api.ui.UIElement
hoverStyle, style
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
setNextIndex
(short index) void
setNextVertex
(Vector2f position, float r, float g, float b, float a) void
setNextVertex
(Vector2f position, ColorRGBA color) void
setNextVertex
(Vector2f position, Vector2f uv) void
setNextVertex
(Vector2f position, Vector2f uv, float r, float g, float b, float a) void
setTexture
(TextureAsset texture) void
update()
Methods inherited from class net.risingworld.api.ui.UIElement
addChild, addStyleSheet, addToClassList, getChildCount, getChilds, getID, getParent, getPluginID, isClickable, onClick, removeAllChilds, removeChild, removeFromClassList, removeFromParent, removeStyleSheet, resetPivot, resetPosition, setBackgroundColor, setBackgroundColor, setBorder, setBorderColor, setBorderColor, setBorderEdgeRadius, setClickable, setOpacity, setPickable, setPivot, setPosition, setSize, setVisible, updateStyle
-
Constructor Details
-
UIMesh
public UIMesh()
-
-
Method Details
-
setTexture
-
setNextVertex
-
setNextVertex
-
setNextVertex
-
setNextVertex
-
setNextIndex
public void setNextIndex(short index) -
clear
public void clear() -
update
public void update()
-