GuiSetDisabled: Difference between revisions
Jump to navigation
Jump to search
Automatyczna aktualizacja dokumentacji funkcji |
Complete Lua function catalog |
||
| Line 33: | Line 33: | ||
* The target must derive from an RmlUi form-control element. | * The target must derive from an RmlUi form-control element. | ||
[[Category:Lua Functions]] | |||
[[Category:Client Functions]] | [[Category:Client Functions]] | ||
[[Category:GUI Functions]] | [[Category:GUI Functions]] | ||
Latest revision as of 09:54, 15 August 2026
guiSetDisabled
Enables or disables an RML form control.
Syntax
bool guiSetDisabled(DocumentHandle document, string elementId, bool disabled)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
document |
DocumentHandle |
yes | The owning RML document handle. |
elementId |
string |
yes | The id of an RML form control. |
disabled |
bool |
yes | True to disable the control or false to enable it. |
Returns
Returns true when the target is a valid form control and its state is changed; otherwise returns false.
Examples
Disable a submit button while waiting for the server:
guiSetDisabled(loginWindow, "submit", true)
triggerServerEvent("account:login", resourceRoot, username, password)
Notes
- Available only in client-side resource scripts.
- The target must derive from an RmlUi form-control element.