Work in progress
Godot documentation is being updated to reflect the latest changes in version
4.0
. Some documentation pages may
still state outdated information. This banner will tell you if you're reading one of such pages.
The contents of this page are up to date. If you can still find outdated information, please open an issue.
@GlobalScopeΒΆ
Global scope constants and functions.
DescriptionΒΆ
A list of global scope enumerated constants and built-in functions. This is all that resides in the globals, constants regarding error codes, keycodes, property hints, etc.
Singletons are also documented here, since they can be accessed from anywhere.
For the entries related to GDScript which can be accessed in any script see @GDScript.
TutorialsΒΆ
PropertiesΒΆ
MethodsΒΆ
EnumerationsΒΆ
enum Side:
Side SIDE_LEFT = 0
Left side, usually used for Control or StyleBox-derived classes.
Side SIDE_TOP = 1
Top side, usually used for Control or StyleBox-derived classes.
Side SIDE_RIGHT = 2
Right side, usually used for Control or StyleBox-derived classes.
Side SIDE_BOTTOM = 3
Bottom side, usually used for Control or StyleBox-derived classes.
enum Corner:
Corner CORNER_TOP_LEFT = 0
Top-left corner.
Corner CORNER_TOP_RIGHT = 1
Top-right corner.
Corner CORNER_BOTTOM_RIGHT = 2
Bottom-right corner.
Corner CORNER_BOTTOM_LEFT = 3
Bottom-left corner.
enum Orientation:
Orientation VERTICAL = 1
General vertical alignment, usually used for Separator, ScrollBar, Slider, etc.
Orientation HORIZONTAL = 0
General horizontal alignment, usually used for Separator, ScrollBar, Slider, etc.
enum ClockDirection:
ClockDirection CLOCKWISE = 0
Clockwise rotation. Used by some methods (e.g. Image.rotate_90).
ClockDirection COUNTERCLOCKWISE = 1
Counter-clockwise rotation. Used by some methods (e.g. Image.rotate_90).
enum HorizontalAlignment:
HorizontalAlignment HORIZONTAL_ALIGNMENT_LEFT = 0
Horizontal left alignment, usually for text-derived classes.
HorizontalAlignment HORIZONTAL_ALIGNMENT_CENTER = 1
Horizontal center alignment, usually for text-derived classes.
HorizontalAlignment HORIZONTAL_ALIGNMENT_RIGHT = 2
Horizontal right alignment, usually for text-derived classes.
HorizontalAlignment HORIZONTAL_ALIGNMENT_FILL = 3
Expand row to fit width, usually for text-derived classes.
enum VerticalAlignment:
VerticalAlignment VERTICAL_ALIGNMENT_TOP = 0
Vertical top alignment, usually for text-derived classes.
VerticalAlignment VERTICAL_ALIGNMENT_CENTER = 1
Vertical center alignment, usually for text-derived classes.
VerticalAlignment VERTICAL_ALIGNMENT_BOTTOM = 2
Vertical bottom alignment, usually for text-derived classes.
VerticalAlignment VERTICAL_ALIGNMENT_FILL = 3
Expand rows to fit height, usually for text-derived classes.
enum InlineAlignment:
InlineAlignment INLINE_ALIGNMENT_TOP_TO = 0
Aligns the top of the inline object (e.g. image, table) to the position of the text specified by INLINE_ALIGNMENT_TO_*
constant.
InlineAlignment INLINE_ALIGNMENT_CENTER_TO = 1
Aligns the center of the inline object (e.g. image, table) to the position of the text specified by INLINE_ALIGNMENT_TO_*
constant.
InlineAlignment INLINE_ALIGNMENT_BASELINE_TO = 3
Aligns the baseline (user defined) of the inline object (e.g. image, table) to the position of the text specified by INLINE_ALIGNMENT_TO_*
constant.
InlineAlignment INLINE_ALIGNMENT_BOTTOM_TO = 2
Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by INLINE_ALIGNMENT_TO_*
constant.
InlineAlignment INLINE_ALIGNMENT_TO_TOP = 0
Aligns the position of the inline object (e.g. image, table) specified by INLINE_ALIGNMENT_*_TO
constant to the top of the text.
InlineAlignment INLINE_ALIGNMENT_TO_CENTER = 4
Aligns the position of the inline object (e.g. image, table) specified by INLINE_ALIGNMENT_*_TO
constant to the center of the text.
InlineAlignment INLINE_ALIGNMENT_TO_BASELINE = 8
Aligns the position of the inline object (e.g. image, table) specified by INLINE_ALIGNMENT_*_TO
constant to the baseline of the text.
InlineAlignment INLINE_ALIGNMENT_TO_BOTTOM = 12
Aligns inline object (e.g. image, table) to the bottom of the text.
InlineAlignment INLINE_ALIGNMENT_TOP = 0
Aligns top of the inline object (e.g. image, table) to the top of the text. Equivalent to INLINE_ALIGNMENT_TOP_TO | INLINE_ALIGNMENT_TO_TOP
.
InlineAlignment INLINE_ALIGNMENT_CENTER = 5
Aligns center of the inline object (e.g. image, table) to the center of the text. Equivalent to INLINE_ALIGNMENT_CENTER_TO | INLINE_ALIGNMENT_TO_CENTER
.
InlineAlignment INLINE_ALIGNMENT_BOTTOM = 14
Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equivalent to INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM
.
InlineAlignment INLINE_ALIGNMENT_IMAGE_MASK = 3
A bit mask for INLINE_ALIGNMENT_*_TO
alignment constants.
InlineAlignment INLINE_ALIGNMENT_TEXT_MASK = 12
A bit mask for INLINE_ALIGNMENT_TO_*
alignment constants.
enum EulerOrder:
EulerOrder EULER_ORDER_XYZ = 0
Specifies that Euler angles should be in XYZ order. When composing, the order is X, Y, Z. When decomposing, the order is reversed, first Z, then Y, and X last.
EulerOrder EULER_ORDER_XZY = 1
Specifies that Euler angles should be in XZY order. When composing, the order is X, Z, Y. When decomposing, the order is reversed, first Y, then Z, and X last.
EulerOrder EULER_ORDER_YXZ = 2
Specifies that Euler angles should be in YXZ order. When composing, the order is Y, X, Z. When decomposing, the order is reversed, first Z, then X, and Y last.
EulerOrder EULER_ORDER_YZX = 3
Specifies that Euler angles should be in YZX order. When composing, the order is Y, Z, X. When decomposing, the order is reversed, first X, then Z, and Y last.
EulerOrder EULER_ORDER_ZXY = 4
Specifies that Euler angles should be in ZXY order. When composing, the order is Z, X, Y. When decomposing, the order is reversed, first Y, then X, and Z last.
EulerOrder EULER_ORDER_ZYX = 5
Specifies that Euler angles should be in ZYX order. When composing, the order is Z, Y, X. When decomposing, the order is reversed, first X, then Y, and Z last.
enum Key:
Key KEY_NONE = 0
Enum value which doesn't correspond to any key. This is used to initialize Key properties with a generic state.
Key KEY_SPECIAL = 4194304
Keycodes with this bit applied are non-printable.
Key KEY_ESCAPE = 4194305
Escape key.
Key KEY_TAB = 4194306
Tab key.
Key KEY_BACKTAB = 4194307
Shift + Tab key.
Key KEY_BACKSPACE = 4194308
Backspace key.
Key KEY_ENTER = 4194309
Return key (on the main keyboard).
Key KEY_KP_ENTER = 4194310
Enter key on the numeric keypad.
Key KEY_INSERT = 4194311
Insert key.
Key KEY_DELETE = 4194312
Delete key.
Key KEY_PAUSE = 4194313
Pause key.
Key KEY_PRINT = 4194314
Print Screen key.
Key KEY_SYSREQ = 4194315
System Request key.
Key KEY_CLEAR = 4194316
Clear key.
Key KEY_HOME = 4194317
Home key.
Key KEY_END = 4194318
End key.
Key KEY_LEFT = 4194319
Left arrow key.
Key KEY_UP = 4194320
Up arrow key.
Key KEY_RIGHT = 4194321
Right arrow key.
Key KEY_DOWN = 4194322
Down arrow key.
Key KEY_PAGEUP = 4194323
Page Up key.
Key KEY_PAGEDOWN = 4194324
Page Down key.
Key KEY_SHIFT = 4194325
Shift key.
Key KEY_CTRL = 4194326
Control key.
Key KEY_META = 4194327
Meta key.
Key KEY_ALT = 4194328
Alt key.
Key KEY_CAPSLOCK = 4194329
Caps Lock key.
Key KEY_NUMLOCK = 4194330
Num Lock key.
Key KEY_SCROLLLOCK = 4194331
Scroll Lock key.
Key KEY_F1 = 4194332
F1 key.
Key KEY_F2 = 4194333
F2 key.
Key KEY_F3 = 4194334
F3 key.
Key KEY_F4 = 4194335
F4 key.