Skip to reading
GUI Styling, Shaders & Effects

Use the shared action from 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

The styling action is shared. These small examples all change the art Panel’s common radius to 24. That Panel’s corners use -1, so they inherit the new value.

PCA Script:

Code example
language 1.0
Code example
let p = {"guiId":"style_lab","elementId":"art_panel","property":"radius","value":24}
change_gui_element_property(p)

Lua:

Code example
local Script = {}
function Script.run(context)
    await(ChangeGUIElementProperty({
        guiId = "style_lab", elementId = "art_panel",
        property = "radius", value = 24
    }))
    return true
end
return Script

BASIC:

Code example
OPTION PCA3D BASIC 1.0
FUNCTION Run(context AS Dictionary)
    DIM p = {"guiId":"style_lab","elementId":"art_panel","property":"radius","value":24}
    AWAIT ChangeGUIElementProperty(p)
    RETURN TRUE
END FUNCTION

Use numerical values for radii and opacity. Use strings for hex colors and asset IDs. A shader value is a Dictionary, not a string containing a pretend shader name.

Page 56 of 70Permalink
Go to page