Skip to reading
The GUI Designer

Open the same menu in other languages

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
On this page

These short alternatives all call the same shared GUI action. You only need the language you are using for your project. Create a record in the matching script designer, validate/apply it and call it from an event or action list.

PCA Script#

Code example
language 1.0
Code example
function run(context)
    show gui workshop_menu
    return true
end

Lua#

Code example
local Script = {}
function Script.run(context)
    await(ShowGUI({guiId = "workshop_menu"}))
    return true
end
return Script

BASIC#

Code example
OPTION PCA3D BASIC 1.0
FUNCTION Run(context AS Dictionary)
    AWAIT ShowGUI({"guiId": "workshop_menu"})
    RETURN TRUE
END FUNCTION

Each version opened the same Workshop Menu in the runtime checks. Use HideGUI / the matching hide-gui statement for a closing path, or call the shared Hide GUI action from the event editor.

Native GDScript also provides GetGUIProperty, SetGUIProperty, GetGUIElementProperty and SetGUIElementProperty for direct reads and writes. Supply the GUI ID, element ID where needed, property key and value/default appropriate to that helper.

Page 37 of 57Permalink
Go to page