What are Customs Constants?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By genete
:warning: Old Version Published before Godot 3 was released.

I can find “Custom Constants” in some Container derived nodes (i.e. GridContainer) but they are not documented in any section of the documentation.
Here is a screenshot:
Link to image

Where in the docs is there a reference to “Custom Constant”(s)?

Bojidar Marinov | 2016-04-01 06:04

Precisely, the lack of documentation is what is causing my question.
They seem to appear on nodes that are inside container type nodes. In particular one example is to add a LineEntry inside a Container type node (VBoxcontainer for example).
If you do that, then it appear a new section of nodes parameter called “Custom Constants” for the LineEntry node, inside the Container section, at the end. (cant’ take a screenshot now)

genete | 2016-04-01 08:12

Ahh… so “custom” constants of Control-based classes… I might answer later, unless somebody is faster.

Bojidar Marinov | 2016-04-01 08:41

@Bojidar: Nobody was faster so far apparently :wink:

@genete: Please try to be clearer in your question next time, nobody knows every single piece of text that is written in some node of the editor, so you should give the context yourself, not wait for others to ask themselves for 5 minutes what you are referring to with “Custom Constants”.

My natural answer to the question as you wrote it would be:

They are constants which are user-defined (custom).
You can define constants in GDScript with:

 const MYCONSTANT = 42

Obviously that’s not what you want to know, but that’s the kind of half-trollish answer your question calls for :wink:

Akien | 2016-04-05 11:28

@Akien: I’ll update the question.

genete | 2016-04-05 12:17