Skip to reading
GUI Styling, Shaders & Effects

Change the containing window

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
Code example
extends "res://scripts/runtime/script_base.gd"
Code example
func run(_context: Dictionary = {}) -> Variant:
    await ChangeGUIProperty({
        "guiId": "style_lab",
        "property": "windowFrame.windowBackground",
        "value": "#182b39"
    })
    await ChangeGUIProperty({
        "guiId": "style_lab",
        "property": "windowFrame.radiusTopLeft",
        "value": 0
    })
    return true

Change GUI Property addresses the window. Change GUI Element Property addresses a particular element. The explicit windowFrame prefix in this script identifies the stored window-chrome property.

A project can have several GUIs open, each with a different background. Supply the GUI ID deliberately so an alert style changes the intended window.

For a full theme change, update the title bar, close control, element colors, image states and text as appropriate. Changing the outer window alone does not retheme the separate controls inside it.

Page 55 of 70Permalink
Go to page