GuiSetClass: Difference between revisions
Jump to navigation
Jump to search
Automatyczna aktualizacja dokumentacji funkcji |
Complete Lua function catalog |
||
| Line 33: | Line 33: | ||
* Available only in client-side resource scripts. | * Available only in client-side resource scripts. | ||
[[Category:Lua Functions]] | |||
[[Category:Client Functions]] | [[Category:Client Functions]] | ||
[[Category:GUI Functions]] | [[Category:GUI Functions]] | ||
Latest revision as of 09:54, 15 August 2026
guiSetClass
Adds or removes an RCSS class on an RML element.
Syntax
bool guiSetClass(DocumentHandle document, string elementId, string className, bool enabled)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
document |
DocumentHandle |
yes | The owning document. |
elementId |
string |
yes | The target element's id attribute. |
className |
string |
yes | The RCSS class name. |
enabled |
bool |
yes | True to add the class, false to remove it. |
Returns
Returns true when the class list is changed; otherwise returns false.
Examples
Highlight a selected inventory slot:
guiSetClass(inventoryDocument, "slot-3", "selected", true)
Notes
- Available only in client-side resource scripts.