UIResourceTexture
UIResourceTexture is a reference to a texture asset saved in the LDLib2 editor resource system. It resolves the actual IGuiTexture lazily from the TexturesResource registry at draw time, making it suitable for editor-managed, data-driven textures.
Registry name: ui_resource_texture
Extends TransformTexture — supports rotate(), scale(), transform().
This texture type is primarily used by the in-game editor. For code-driven textures, prefer one of the other concrete types.
Usage
LSS
/* Built-in resource */
background: builtin(MY_BG);
/* File-based resource */
background: file("mymod:ui/panel");
Fields
| Name | Type | Description |
|---|---|---|
resourcePath |
IResourcePath |
The path used to look up the texture in TexturesResource. |
Methods
| Method | Returns | Description |
|---|---|---|
getRawTexture() |
IGuiTexture |
Returns the raw underlying texture (resolving through internalTexture). |
setColor(int) |
IGuiTexture |
Copies and tints the resolved internal texture. |
copy() |
UIResourceTexture |
Returns this (the reference is immutable). |