Skip to content

Allow some non-integer built-in constants in gdscript

Bernhard Liebl requested to merge github/fork/poke1024/colorconstants into master

I'm always missing named compile-time color constants for Colors in the editor. This adds them:

demo

Since adding full fledged static constants to gdscript (I started) might entail some longer discussions due to various side effects (time of initialization, change of byte code for singletons, etc.), this PR's implementaiton is just adding some syntactic sugar by expanding Color.xyz into Color(r, g, b, a) in the gdscript parser.

Merge request reports