Skip to content

GDScript

Patrick Dawson edited this page Apr 30, 2024 · 4 revisions

The GDExtension offers partial bindings for GDScript, based on the official dear_bindings. If there's an ImGui feature you want which isn't available in GDScript, please submit an issue.

Function names may differ slightly from the original C++ API.

Where the ImGui API uses pointers to pass a single variable by reference, the GDScript bindings use one-element arrays, similar to the progress parameter in ResourceLoader.load_threaded_get_status.

For example:

var mynum := [42]

func _process(_delta):
    ImGui.Begin("window name")
    ImGui.DragInt("my number", mynum)
    ImGui.Text("number = %d" % mynum[0])
    ImGui.End()
Clone this wiki locally