Texture
What it does
- Draws a texture onto the screen
Builder Parameters
textureSize
(Optional)- The size of the texture image file.
- Default: 256x256
uv
(Optional)- The uv coordinate to draw from on the texture file.
- Default: (0, 0)
uvSize
(Optional)- The size of the area on the texture to be drawn.
- Default: the texture size
size
(Optional)- The size the texture should be displayed
- Default the uv size
texture
- The
ResourceLocation
of the texture file.
- The
Space Behaviour
- Minimum
Example
public class TestTexture implements UIComponent {
@Override
public UIComponent build(Layout layout) {
return new Center(new Texture.Builder(InventoryScreen.INVENTORY_LOCATION)
.withUvSize(new Vector2i(176, 166));
}
}