GuiFocus: Difference between revisions
Jump to navigation
Jump to search
Automatyczna aktualizacja dokumentacji funkcji |
Complete Lua function catalog |
||
| Line 30: | Line 30: | ||
* 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
guiFocus
Moves keyboard focus to an element in an RML document.
Syntax
bool guiFocus(DocumentHandle document, string elementId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
document |
DocumentHandle |
yes | The owning document. |
elementId |
string |
yes | The element that should receive focus. |
Returns
Returns true when focus is applied; otherwise returns false.
Examples
Focus the chat input after opening chat:
guiShow(chatDocument)
guiFocus(chatDocument, "chat-input")
Notes
- Available only in client-side resource scripts.