GuiFocus

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 12:44, 4 August 2026 by QCherry (talk | contribs) (Automatyczna aktualizacja dokumentacji funkcji)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.