Skip to reading
GDScript Programming & Godot

EnableGUIElement()

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Enable Gui Element

Enable one element for interaction.

Source table from EnableGUIElement(), page 177
Option key / fieldMeaning and inputDefault
GUI guiIdChoose an authored GUI ID.Blank
Element / Group elementIdChoose an element inside the selected GUI.Blank

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await EnableGUIElement({"guiId": "hud", "elementId": "topline"})

In use. Enable the Continue button once the necessary option has been selected. A parent interface or modal input lock can still prevent access even when this child's enabled flag is on.

DisableGUIElement()#

Disable Gui Element

Disable one element for interaction.

Source table from EnableGUIElement(), page 177
Option key / fieldMeaning and inputDefault
GUI guiIdChoose an authored GUI ID.Blank
Element / Group elementIdChoose an element inside the selected GUI.Blank

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await DisableGUIElement({"guiId": "hud", "elementId": "topline"})

In use. Disable Save until a save slot has been selected. Decide what visual disabled treatment the element should use so the player understands why it cannot be used.

Page 177 of 378Permalink
Go to page