Skin
| Function |
|---|
AddTexture(name: string, texturePath: string)AddTexture(name: string, texture: LuaTexture) |
Adds a texture to the skin by name and path or LuaTexture object.
Throws error if texture file is not found. |
AddButtonStyle(name: string, config: { up: string; down: string; checked: string; over: string }) |
Adds a button style to the skin.
Style properties are drawable paths that will be resolved using the skin. |
AddLabelStyle(name: string, config: { font: string; fontColor: string; background: string }) |
Adds a label style to the skin.
Font colors can be hex strings or color names. Background is optional. |
AddImageButtonStyle(name: string, config: { up: string; down: string; over: string; imageUp: string; imageDown: string; imageOver: string }) |
Adds an image button style to the skin.
Supports both button states (up, down, over) and image states (imageUp, imageDown, etc.). |
AddTextFieldStyle(name: string, config: { font: string; fontColor: string; cursor: string; selection: string; background: string; focusedFontColor: string; disabledFontColor: string; focusedBackground: string; disabledBackground: string; messageFont: string; messageFontColor: string }) |
Adds a text field style to the skin.
Creates both regular TextField and VisTextField styles. Supports focused and disabled states. |
AddScrollPaneStyle(name: string, config: { background: string; hScroll: string; hScrollKnob: string; vScroll: string; vScrollKnob: string; corner: string }) |
Adds a scroll pane style to the skin.
All drawable properties are optional and will be resolved using the skin. |
AddProgressBarStyle(name: string, config: { background: string; knob: string; knobBefore: string; knobAfter: string; disabledBackground: string; disabledKnob: string; disabledKnobBefore: string; disabledKnobAfter: string }) |
Adds a progress bar style to the skin.
Supports both normal and disabled states for all drawable properties. |