@GlobalScope¶
Global scope constants and variables.
Description¶
Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc.
Singletons are also documented here, since they can be accessed from anywhere.
Properties¶
Enumerations¶
enum Margin:
Margin MARGIN_LEFT = 0
Left margin, usually used for Control or StyleBox-derived classes.
Margin MARGIN_TOP = 1
Top margin, usually used for Control or StyleBox-derived classes.
Margin MARGIN_RIGHT = 2
Right margin, usually used for Control or StyleBox-derived classes.
Margin MARGIN_BOTTOM = 3
Bottom margin, 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 HAlign:
HAlign HALIGN_LEFT = 0
Horizontal left alignment, usually for text-derived classes.
HAlign HALIGN_CENTER = 1
Horizontal center alignment, usually for text-derived classes.
HAlign HALIGN_RIGHT = 2
Horizontal right alignment, usually for text-derived classes.
enum VAlign:
VAlign VALIGN_TOP = 0
Vertical top alignment, usually for text-derived classes.
VAlign VALIGN_CENTER = 1
Vertical center alignment, usually for text-derived classes.
VAlign VALIGN_BOTTOM = 2
Vertical bottom alignment, usually for text-derived classes.
enum KeyList:
KeyList KEY_ESCAPE = 16777217
Escape key.
KeyList KEY_TAB = 16777218
Tab key.
KeyList KEY_BACKTAB = 16777219
Shift + Tab key.
KeyList KEY_BACKSPACE = 16777220
Backspace key.
KeyList KEY_ENTER = 16777221
Return key (on the main keyboard).
KeyList KEY_KP_ENTER = 16777222
Enter key on the numeric keypad.
KeyList KEY_INSERT = 16777223
Insert key.
KeyList KEY_DELETE = 16777224
Delete key.
KeyList KEY_PAUSE = 16777225
Pause key.
KeyList KEY_PRINT = 16777226
Print Screen key.
KeyList KEY_SYSREQ = 16777227
System Request key.
KeyList KEY_CLEAR = 16777228
Clear key.
KeyList KEY_HOME = 16777229
Home key.
KeyList KEY_END = 16777230
End key.
KeyList KEY_LEFT = 16777231
Left arrow key.
KeyList KEY_UP = 16777232
Up arrow key.
KeyList KEY_RIGHT = 16777233
Right arrow key.
KeyList KEY_DOWN = 16777234
Down arrow key.
KeyList KEY_PAGEUP = 16777235
Page Up key.
KeyList KEY_PAGEDOWN = 16777236
Page Down key.
KeyList KEY_SHIFT = 16777237
Shift key.
KeyList KEY_CONTROL = 16777238
Control key.
KeyList KEY_META = 16777239
Meta key.
KeyList KEY_ALT = 16777240
Alt key.
KeyList KEY_CAPSLOCK = 16777241
Caps Lock key.
KeyList KEY_NUMLOCK = 16777242
Num Lock key.
KeyList KEY_SCROLLLOCK = 16777243
Scroll Lock key.
KeyList KEY_F1 = 16777244
F1 key.
KeyList KEY_F2 = 16777245
F2 key.
KeyList KEY_F3 = 16777246
F3 key.
KeyList KEY_F4 = 16777247
F4 key.
KeyList KEY_F5 = 16777248
F5 key.
KeyList KEY_F6 = 16777249
F6 key.
KeyList KEY_F7 = 16777250
F7 key.
KeyList KEY_F8 = 16777251
F8 key.
KeyList KEY_F9 = 16777252
F9 key.
KeyList KEY_F10 = 16777253
F10 key.
KeyList KEY_F11 = 16777254
F11 key.
KeyList KEY_F12 = 16777255
F12 key.
KeyList KEY_F13 = 16777256
F13 key.
KeyList KEY_F14 = 16777257
F14 key.
KeyList KEY_F15 = 16777258
F15 key.
KeyList KEY_F16 = 16777259
F16 key.
KeyList KEY_KP_MULTIPLY = 16777345
Multiply (*) key on the numeric keypad.
KeyList KEY_KP_DIVIDE = 16777346
Divide (/) key on the numeric keypad.
KeyList KEY_KP_SUBTRACT = 16777347
Subtract (-) key on the numeric keypad.
KeyList KEY_KP_PERIOD = 16777348
Period (.) key on the numeric keypad.
KeyList KEY_KP_ADD = 16777349
Add (+) key on the numeric keypad.
KeyList KEY_KP_0 = 16777350
Number 0 on the numeric keypad.
KeyList KEY_KP_1 = 16777351
Number 1 on the numeric keypad.
KeyList KEY_KP_2 = 16777352
Number 2 on the numeric keypad.
KeyList KEY_KP_3 = 16777353
Number 3 on the numeric keypad.
KeyList KEY_KP_4 = 16777354
Number 4 on the numeric keypad.
KeyList KEY_KP_5 = 16777355
Number 5 on the numeric keypad.
KeyList KEY_KP_6 = 16777356
Number 6 on the numeric keypad.
KeyList KEY_KP_7 = 16777357
Number 7 on the numeric keypad.
KeyList KEY_KP_8 = 16777358
Number 8 on the numeric keypad.
KeyList KEY_KP_9 = 16777359
Number 9 on the numeric keypad.
KeyList KEY_SUPER_L = 16777260
Left Super key (Windows key).
KeyList KEY_SUPER_R = 16777261
Right Super key (Windows key).
Context menu key.
KeyList KEY_HYPER_L = 16777263
Left Hyper key.
KeyList KEY_HYPER_R = 16777264
Right Hyper key.
KeyList KEY_HELP = 16777265
Help key.
KeyList KEY_DIRECTION_L = 16777266
Left Direction key.
KeyList KEY_DIRECTION_R = 16777267
Right Direction key.
KeyList KEY_BACK = 16777280
Media back key. Not to be confused with the Back button on an Android device.
KeyList KEY_FORWARD = 16777281
Media forward key.
KeyList KEY_STOP = 16777282
Media stop key.
KeyList KEY_REFRESH = 16777283
Media refresh key.
KeyList KEY_VOLUMEDOWN = 16777284
Volume down key.
KeyList KEY_VOLUMEMUTE = 16777285
Mute volume key.
KeyList KEY_VOLUMEUP = 16777286
Volume up key.
KeyList KEY_BASSBOOST = 16777287
Bass Boost key.
KeyList KEY_BASSUP = 16777288
Bass up key.
KeyList KEY_BASSDOWN = 16777289
Bass down key.
KeyList KEY_TREBLEUP = 16777290
Treble up key.
KeyList KEY_TREBLEDOWN = 16777291
Treble down key.
KeyList KEY_MEDIAPLAY = 16777292
Media play key.
KeyList KEY_MEDIASTOP = 16777293
Media stop key.
KeyList KEY_MEDIAPREVIOUS = 16777294
Previous song key.
KeyList KEY_MEDIANEXT = 16777295
Next song key.
KeyList KEY_MEDIARECORD = 16777296
Media record key.
KeyList KEY_HOMEPAGE = 16777297
Home page key.
KeyList KEY_FAVORITES = 16777298
Favorites key.
KeyList KEY_SEARCH = 16777299
Search key.
KeyList KEY_STANDBY = 16777300
Standby key.
KeyList KEY_OPENURL = 16777301
Open URL / Launch Browser key.
KeyList KEY_LAUNCHMAIL = 16777302
Launch Mail key.
KeyList KEY_LAUNCHMEDIA = 16777303
Launch Media key.
KeyList KEY_LAUNCH0 = 16777304
Launch Shortcut 0 key.
KeyList KEY_LAUNCH1 = 16777305
Launch Shortcut 1 key.
KeyList KEY_LAUNCH2 = 16777306
Launch Shortcut 2 key.
KeyList KEY_LAUNCH3 = 16777307
Launch Shortcut 3 key.
KeyList KEY_LAUNCH4 = 16777308
Launch Shortcut 4 key.
KeyList KEY_LAUNCH5 = 16777309
Launch Shortcut 5 key.
KeyList KEY_LAUNCH6 = 16777310
Launch Shortcut 6 key.
KeyList KEY_LAUNCH7 = 16777311
Launch Shortcut 7 key.
KeyList KEY_LAUNCH8 = 16777312
Launch Shortcut 8 key.
KeyList KEY_LAUNCH9 = 16777313
Launch Shortcut 9 key.
KeyList KEY_LAUNCHA = 16777314
Launch Shortcut A key.
KeyList KEY_LAUNCHB = 16777315
Launch Shortcut B key.
KeyList KEY_LAUNCHC = 16777316
Launch Shortcut C key.
KeyList KEY_LAUNCHD = 16777317
Launch Shortcut D key.
KeyList KEY_LAUNCHE = 16777318
Launch Shortcut E key.
KeyList KEY_LAUNCHF = 16777319
Launch Shortcut F key.
KeyList KEY_UNKNOWN = 33554431
Unknown key.
KeyList KEY_SPACE = 32
Space key.
KeyList KEY_EXCLAM = 33
! key.
KeyList KEY_QUOTEDBL = 34
" key.
KeyList KEY_NUMBERSIGN = 35
# key.
KeyList KEY_DOLLAR = 36
$ key.
KeyList KEY_PERCENT = 37
% key.
KeyList KEY_AMPERSAND = 38
& key.
KeyList KEY_APOSTROPHE = 39
' key.
KeyList KEY_PARENLEFT = 40
( key.
KeyList KEY_PARENRIGHT = 41
) key.
KeyList KEY_ASTERISK = 42
* key.
KeyList KEY_PLUS = 43
key.
KeyList KEY_COMMA = 44
, key.
KeyList KEY_MINUS = 45
key.
KeyList KEY_PERIOD = 46
. key.
KeyList KEY_SLASH = 47
/ key.
KeyList KEY_0 = 48
Number 0.
KeyList KEY_1 = 49
Number 1.
KeyList KEY_2 = 50
Number 2.
KeyList KEY_3 = 51
Number 3.
KeyList KEY_4 = 52
Number 4.
KeyList KEY_5 = 53
Number 5.
KeyList KEY_6 = 54
Number 6.
KeyList KEY_7 = 55
Number 7.
KeyList KEY_8 = 56
Number 8.
KeyList KEY_9 = 57
Number 9.
KeyList KEY_COLON = 58
: key.
KeyList KEY_SEMICOLON = 59
; key.
KeyList KEY_LESS = 60
< key.
KeyList KEY_EQUAL = 61
= key.
KeyList KEY_GREATER = 62
> key.
KeyList KEY_QUESTION = 63
? key.
KeyList KEY_AT = 64
@ key.
KeyList KEY_A = 65
A key.
KeyList KEY_B = 66
B key.
KeyList KEY_C = 67
C key.
KeyList KEY_D = 68
D key.
KeyList KEY_E = 69
E key.
KeyList KEY_F = 70
F key.
KeyList KEY_G = 71
G key.
KeyList KEY_H = 72
H key.
KeyList KEY_I = 73
I key.
KeyList KEY_J = 74
J key.
KeyList KEY_K = 75
K key.
KeyList KEY_L = 76
L key.
KeyList KEY_M = 77
M key.
KeyList KEY_N = 78
N key.
KeyList KEY_O = 79
O key.
KeyList KEY_P = 80
P key.
KeyList KEY_Q = 81
Q key.
KeyList KEY_R = 82
R key.
KeyList KEY_S = 83
S key.
KeyList KEY_T = 84
T key.
KeyList KEY_U = 85
U key.
KeyList KEY_V = 86
V key.
KeyList KEY_W = 87
W key.
KeyList KEY_X = 88
X key.
KeyList KEY_Y = 89
Y key.
KeyList KEY_Z = 90
Z key.
KeyList KEY_BRACKETLEFT = 91
[ key.
KeyList KEY_BACKSLASH = 92
\ key.
KeyList KEY_BRACKETRIGHT = 93
] key.
KeyList KEY_ASCIICIRCUM = 94
^ key.
KeyList KEY_UNDERSCORE = 95
_ key.
KeyList KEY_QUOTELEFT = 96
` key.
KeyList KEY_BRACELEFT = 123
{ key.
KeyList KEY_BAR = 124
KeyList KEY_BRACERIGHT = 125
} key.
KeyList KEY_ASCIITILDE = 126
~ key.
KeyList KEY_NOBREAKSPACE = 160
Non-breakable space key.
KeyList KEY_EXCLAMDOWN = 161
¡ key.
KeyList KEY_CENT = 162
¢ key.
KeyList KEY_STERLING = 163
£ key.
KeyList KEY_CURRENCY = 164
¤ key.
KeyList KEY_YEN = 165
¥ key.
KeyList KEY_BROKENBAR = 166
¦ key.
KeyList KEY_SECTION = 167
§ key.
KeyList KEY_DIAERESIS = 168
¨ key.
KeyList KEY_COPYRIGHT = 169
© key.
KeyList KEY_ORDFEMININE = 170
ª key.
KeyList KEY_GUILLEMOTLEFT = 171
« key.
KeyList KEY_NOTSIGN = 172
¬ key.
KeyList KEY_HYPHEN = 173
Soft hyphen key.
KeyList KEY_REGISTERED = 174
® key.
KeyList KEY_MACRON = 175
¯ key.
KeyList KEY_DEGREE = 176
° key.
KeyList KEY_PLUSMINUS = 177
± key.
KeyList KEY_TWOSUPERIOR = 178
² key.
KeyList KEY_THREESUPERIOR = 179
³ key.
KeyList KEY_ACUTE = 180
´ key.
KeyList KEY_MU = 181
µ key.
KeyList KEY_PARAGRAPH = 182
¶ key.
KeyList KEY_PERIODCENTERED = 183
· key.
KeyList KEY_CEDILLA = 184
¸ key.
KeyList KEY_ONESUPERIOR = 185
¹ key.
KeyList KEY_MASCULINE = 186
º key.
KeyList KEY_GUILLEMOTRIGHT = 187
» key.
KeyList KEY_ONEQUARTER = 188
¼ key.
KeyList KEY_ONEHALF = 189
½ key.
KeyList KEY_THREEQUARTERS = 190
¾ key.
KeyList KEY_QUESTIONDOWN = 191
¿ key.
KeyList KEY_AGRAVE = 192
À key.
KeyList KEY_AACUTE = 193
Á key.
KeyList KEY_ACIRCUMFLEX = 194
 key.
KeyList KEY_ATILDE = 195
à key.
KeyList KEY_ADIAERESIS = 196
Ä key.
KeyList KEY_ARING = 197
Å key.
KeyList KEY_AE = 198
Æ key.
KeyList KEY_CCEDILLA = 199
Ç key.
KeyList KEY_EGRAVE = 200
È key.
KeyList KEY_EACUTE = 201
É key.
KeyList KEY_ECIRCUMFLEX = 202
Ê key.
KeyList KEY_EDIAERESIS = 203
Ë key.
KeyList KEY_IGRAVE = 204
Ì key.
KeyList KEY_IACUTE = 205
Í key.
KeyList KEY_ICIRCUMFLEX = 206
Î key.
KeyList KEY_IDIAERESIS = 207
Ï key.
KeyList KEY_ETH = 208
Ð key.
KeyList KEY_NTILDE = 209
Ñ key.
KeyList KEY_OGRAVE = 210
Ò key.
KeyList KEY_OACUTE = 211
Ó key.
KeyList KEY_OCIRCUMFLEX = 212
Ô key.
KeyList KEY_OTILDE = 213
Õ key.
KeyList KEY_ODIAERESIS = 214
Ö key.
KeyList KEY_MULTIPLY = 215
× key.
KeyList KEY_OOBLIQUE = 216
Ø key.
KeyList KEY_UGRAVE = 217
Ù key.
KeyList KEY_UACUTE = 218
Ú key.
KeyList KEY_UCIRCUMFLEX = 219
Û key.
KeyList KEY_UDIAERESIS = 220
Ü key.
KeyList KEY_YACUTE = 221
Ý key.
KeyList KEY_THORN = 222
Þ key.
KeyList KEY_SSHARP = 223
ß key.
KeyList KEY_DIVISION = 247
÷ key.
KeyList KEY_YDIAERESIS = 255
ÿ key.
enum KeyModifierMask:
KeyModifierMask KEY_CODE_MASK = 33554431
Key Code mask.
KeyModifierMask KEY_MODIFIER_MASK = -16777216
Modifier key mask.
KeyModifierMask KEY_MASK_SHIFT = 33554432
Shift key mask.
KeyModifierMask KEY_MASK_ALT = 67108864
Alt key mask.
KeyModifierMask KEY_MASK_META = 134217728
Meta key mask.
KeyModifierMask KEY_MASK_CTRL = 268435456
Ctrl key mask.
KeyModifierMask KEY_MASK_CMD = platform-dependent
Command key mask. On macOS, this is equivalent to KEY_MASK_META. On other platforms, this is equivalent to KEY_MASK_CTRL. This mask should be preferred to KEY_MASK_META or KEY_MASK_CTRL for system shortcuts as it handles all platforms correctly.
KeyModifierMask KEY_MASK_KPAD = 536870912
Keypad key mask.
KeyModifierMask KEY_MASK_GROUP_SWITCH = 1073741824
Group Switch key mask.
enum ButtonList:
ButtonList BUTTON_LEFT = 1
Primary mouse button, usually the left button.
ButtonList BUTTON_RIGHT = 2
Secondary mouse button, usually the right button.
ButtonList BUTTON_MIDDLE = 3
Middle mouse button.
ButtonList BUTTON_XBUTTON1 = 8
Extra mouse button 1 (only present on some mice).
ButtonList BUTTON_XBUTTON2 = 9
Extra mouse button 2 (only present on some mice).
ButtonList BUTTON_WHEEL_UP = 4
Mouse wheel up.
ButtonList BUTTON_WHEEL_DOWN = 5
Mouse wheel down.
ButtonList BUTTON_WHEEL_LEFT = 6
Mouse wheel left button (only present on some mice).
ButtonList BUTTON_WHEEL_RIGHT = 7
Mouse wheel right button (only present on some mice).
ButtonList BUTTON_MASK_LEFT = 1
Primary mouse button mask, usually for the left button.
ButtonList BUTTON_MASK_RIGHT = 2
Secondary mouse button mask, usually for the right button.
ButtonList BUTTON_MASK_MIDDLE = 4
Middle mouse button mask.
ButtonList BUTTON_MASK_XBUTTON1 = 128
Extra mouse button 1 mask.
ButtonList BUTTON_MASK_XBUTTON2 = 256
Extra mouse button 2 mask.
enum JoystickList:
JoystickList JOY_INVALID_OPTION = -1
Invalid button or axis.
JoystickList JOY_BUTTON_0 = 0
Gamepad button 0.
JoystickList JOY_BUTTON_1 = 1
Gamepad button 1.
JoystickList JOY_BUTTON_2 = 2
Gamepad button 2.
JoystickList JOY_BUTTON_3 = 3
Gamepad button 3.
JoystickList JOY_BUTTON_4 = 4
Gamepad button 4.
JoystickList JOY_BUTTON_5 = 5
Gamepad button 5.
JoystickList JOY_BUTTON_6 = 6
Gamepad button 6.
JoystickList JOY_BUTTON_7 = 7
Gamepad button 7.
JoystickList JOY_BUTTON_8 = 8
Gamepad button 8.
JoystickList JOY_BUTTON_9 = 9
Gamepad button 9.
JoystickList JOY_BUTTON_10 = 10
Gamepad button 10.
JoystickList JOY_BUTTON_11 = 11
Gamepad button 11.
JoystickList JOY_BUTTON_12 = 12
Gamepad button 12.
JoystickList JOY_BUTTON_13 = 13
Gamepad button 13.
JoystickList JOY_BUTTON_14 = 14
Gamepad button 14.
JoystickList JOY_BUTTON_15 = 15
Gamepad button 15.
JoystickList JOY_BUTTON_16 = 16
Gamepad button 16.
JoystickList JOY_BUTTON_17 = 17
Gamepad button 17.
JoystickList JOY_BUTTON_18 = 18
Gamepad button 18.
JoystickList JOY_BUTTON_19 = 19
Gamepad button 19.
JoystickList JOY_BUTTON_20 = 20
Gamepad button 20.
JoystickList JOY_BUTTON_21 = 21
Gamepad button 21.
JoystickList JOY_BUTTON_22 = 22
Gamepad button 22.
JoystickList JOY_BUTTON_MAX = 128
The maximum number of game controller buttons supported by the engine. The actual limit may be lower on specific platforms:
Android: Up to 36 buttons.
Linux: Up to 80 buttons.
Windows and macOS: Up to 128 buttons.
JoystickList JOY_SONY_CIRCLE = 1
DualShock circle button.
JoystickList JOY_SONY_X = 0
DualShock X button.
JoystickList JOY_SONY_SQUARE = 2
DualShock square button.
JoystickList JOY_SONY_TRIANGLE = 3
DualShock triangle button.
JoystickList JOY_XBOX_B = 1
Xbox controller B button.
JoystickList JOY_XBOX_A = 0
Xbox controller A button.
JoystickList JOY_XBOX_X = 2
Xbox controller X button.
JoystickList JOY_XBOX_Y = 3
Xbox controller Y button.
JoystickList JOY_DS_A = 1
Nintendo controller A button.
JoystickList JOY_DS_B = 0
Nintendo controller B button.
JoystickList JOY_DS_X = 3
Nintendo controller X button.
JoystickList JOY_DS_Y = 2
Nintendo controller Y button.
JoystickList JOY_VR_GRIP = 2
Grip (side) buttons on a VR controller.
JoystickList JOY_VR_PAD = 14
Push down on the touchpad or main joystick on a VR controller.
JoystickList JOY_VR_TRIGGER = 15
Trigger on a VR controller.
JoystickList JOY_OCULUS_AX = 7
A button on the right Oculus Touch controller, X button on the left controller (also when used in OpenVR).
JoystickList JOY_OCULUS_BY = 1
B button on the right Oculus Touch controller, Y button on the left controller (also when used in OpenVR).
Menu button on either Oculus Touch controller.
Menu button in OpenVR (Except when Oculus Touch controllers are used).
JoystickList JOY_SELECT = 10
Gamepad button Select.
JoystickList JOY_START = 11
Gamepad button Start.
JoystickList JOY_DPAD_UP = 12
Gamepad DPad up.
JoystickList JOY_DPAD_DOWN = 13
Gamepad DPad down.
JoystickList JOY_DPAD_LEFT = 14
Gamepad DPad left.
JoystickList JOY_DPAD_RIGHT = 15
Gamepad DPad right.
JoystickList JOY_GUIDE = 16
Gamepad SDL guide button.
JoystickList JOY_MISC1 = 17
Gamepad SDL miscellaneous button.
JoystickList JOY_PADDLE1 = 18
Gamepad SDL paddle 1 button.
JoystickList JOY_PADDLE2 = 19
Gamepad SDL paddle 2 button.
JoystickList JOY_PADDLE3 = 20
Gamepad SDL paddle 3 button.
JoystickList JOY_PADDLE4 = 21
Gamepad SDL paddle 4 button.
JoystickList JOY_TOUCHPAD = 22
Gamepad SDL touchpad button.
JoystickList JOY_L = 4
Gamepad left Shoulder button.
JoystickList JOY_L2 = 6
Gamepad left trigger.
JoystickList JOY_L3 = 8
Gamepad left stick click.
JoystickList JOY_R = 5
Gamepad right Shoulder button.
JoystickList JOY_R2 = 7
Gamepad right trigger.
JoystickList JOY_R3 = 9
Gamepad right stick click.
JoystickList JOY_AXIS_0 = 0
Gamepad left stick horizontal axis.
JoystickList JOY_AXIS_1 = 1
Gamepad left stick vertical axis.
JoystickList JOY_AXIS_2 = 2
Gamepad right stick horizontal axis.
JoystickList JOY_AXIS_3 = 3
Gamepad right stick vertical axis.
JoystickList JOY_AXIS_4 = 4
Generic gamepad axis 4.
JoystickList JOY_AXIS_5 = 5
Generic gamepad axis 5.
JoystickList JOY_AXIS_6 = 6
Gamepad left trigger analog axis.
JoystickList JOY_AXIS_7 = 7
Gamepad right trigger analog axis.
JoystickList JOY_AXIS_8 = 8
Generic gamepad axis 8.
JoystickList JOY_AXIS_9 = 9
Generic gamepad axis 9.
JoystickList JOY_AXIS_MAX = 10
Represents the maximum number of joystick axes supported.
JoystickList JOY_ANALOG_LX = 0
Gamepad left stick horizontal axis.
JoystickList JOY_ANALOG_LY = 1
Gamepad left stick vertical axis.
JoystickList JOY_ANALOG_RX = 2
Gamepad right stick horizontal axis.
JoystickList JOY_ANALOG_RY = 3
Gamepad right stick vertical axis.
JoystickList JOY_ANALOG_L2 = 6
Gamepad left analog trigger.
JoystickList JOY_ANALOG_R2 = 7
Gamepad right analog trigger.
JoystickList JOY_VR_ANALOG_TRIGGER = 2
VR Controller analog trigger.
JoystickList JOY_VR_ANALOG_GRIP = 4
VR Controller analog grip (side buttons).
JoystickList JOY_OPENVR_TOUCHPADX = 0
OpenVR touchpad X axis (Joystick axis on Oculus Touch and Windows MR controllers).
JoystickList JOY_OPENVR_TOUCHPADY = 1
OpenVR touchpad Y axis (Joystick axis on Oculus Touch and Windows MR controllers).
enum MidiMessageList:
MidiMessageList MIDI_MESSAGE_NOTE_OFF = 8
MIDI note OFF message. See the documentation of InputEventMIDI for information of how to use MIDI inputs.
MidiMessageList MIDI_MESSAGE_NOTE_ON = 9
MIDI note ON message. See the documentation of InputEventMIDI for information of how to use MIDI inputs.
MidiMessageList MIDI_MESSAGE_AFTERTOUCH = 10
MIDI aftertouch message. This message is most often sent by pressing down on the key after it "bottoms out".
MidiMessageList MIDI_MESSAGE_CONTROL_CHANGE = 11
MIDI control change message. This message is sent when a controller value changes. Controllers include devices such as pedals and levers.
MidiMessageList MIDI_MESSAGE_PROGRAM_CHANGE = 12
MIDI program change message. This message sent when the program patch number changes.
MidiMessageList MIDI_MESSAGE_CHANNEL_PRESSURE = 13
MIDI channel pressure message. This message is most often sent by pressing down on the key after it "bottoms out". This message is different from polyphonic after-touch as it indicates the highest pressure across all keys.
MidiMessageList MIDI_MESSAGE_PITCH_BEND = 14
MIDI pitch bend message. This message is sent to indicate a change in the pitch bender (wheel or lever, typically).
MidiMessageList MIDI_MESSAGE_SYSTEM_EXCLUSIVE = 240
MIDI system exclusive message. This has behavior exclusive to the device you're receiving input from. Getting this data is not implemented in Redot.
MidiMessageList MIDI_MESSAGE_QUARTER_FRAME = 241
MIDI quarter frame message. Contains timing information that is used to synchronize MIDI devices. Getting this data is not implemented in Redot.
MidiMessageList MIDI_MESSAGE_SONG_POSITION_POINTER = 242
MIDI song position pointer message. Gives the number of 16th notes since the start of the song. Getting this data is not implemented in Redot.
MidiMessageList MIDI_MESSAGE_SONG_SELECT = 243
MIDI song select message. Specifies which sequence or song is to be played. Getting this data is not implemented in Redot.
MidiMessageList MIDI_MESSAGE_TUNE_REQUEST = 246
MIDI tune request message. Upon receiving a tune request, all analog synthesizers should tune their oscillators.
MidiMessageList MIDI_MESSAGE_TIMING_CLOCK = 248
MIDI timing clock message. Sent 24 times per quarter note when synchronization is required.
MidiMessageList MIDI_MESSAGE_START = 250
MIDI start message. Start the current sequence playing. This message will be followed with Timing Clocks.
MidiMessageList MIDI_MESSAGE_CONTINUE = 251
MIDI continue message. Continue at the point the sequence was stopped.
MidiMessageList MIDI_MESSAGE_STOP = 252
MIDI stop message. Stop the current sequence.
MidiMessageList MIDI_MESSAGE_ACTIVE_SENSING = 254
MIDI active sensing message. This message is intended to be sent repeatedly to tell the receiver that a connection is alive.
MidiMessageList MIDI_MESSAGE_SYSTEM_RESET = 255
MIDI system reset message. Reset all receivers in the system to power-up status. It should not be sent on power-up itself.
enum Error:
Error OK = 0
Methods that return Error return OK when no error occurred. Note that many functions don't return an error code but will print error messages to standard output.
Since OK has value 0, and all other failure codes are positive integers, it can also be used in boolean checks, e.g.:
var err = method_that_returns_error()
if err != OK:
print("Failure!")
# Or, equivalent:
if err:
print("Still failing!")
Error FAILED = 1
Generic error.
Unavailable error.
Error ERR_UNCONFIGURED = 3
Unconfigured error.
Error ERR_UNAUTHORIZED = 4
Unauthorized error.
Error ERR_PARAMETER_RANGE_ERROR = 5
Parameter range error.
Error ERR_OUT_OF_MEMORY = 6
Out of memory (OOM) error.
Error ERR_FILE_NOT_FOUND = 7
File: Not found error.
Error ERR_FILE_BAD_DRIVE = 8
File: Bad drive error.
Error ERR_FILE_BAD_PATH = 9
File: Bad path error.
Error ERR_FILE_NO_PERMISSION = 10
File: No permission error.
Error ERR_FILE_ALREADY_IN_USE = 11
File: Already in use error.
Error ERR_FILE_CANT_OPEN = 12
File: Can't open error.
Error ERR_FILE_CANT_WRITE = 13
File: Can't write error.
Error ERR_FILE_CANT_READ = 14
File: Can't read error.
Error ERR_FILE_UNRECOGNIZED = 15
File: Unrecognized error.
Error ERR_FILE_CORRUPT = 16
File: Corrupt error.
Error ERR_FILE_MISSING_DEPENDENCIES = 17
File: Missing dependencies error.
Error ERR_FILE_EOF = 18
File: End of file (EOF) error.
Error ERR_CANT_OPEN = 19
Can't open error.
Error ERR_CANT_CREATE = 20
Can't create error.
Error ERR_QUERY_FAILED = 21
Query failed error.
Error ERR_ALREADY_IN_USE = 22
Already in use error.
Error ERR_LOCKED = 23
Locked error.
Error ERR_TIMEOUT = 24
Timeout error.
Error ERR_CANT_CONNECT = 25
Can't connect error.
Error ERR_CANT_RESOLVE = 26
Can't resolve error.
Error ERR_CONNECTION_ERROR = 27
Connection error.
Error ERR_CANT_ACQUIRE_RESOURCE = 28
Can't acquire resource error.
Error ERR_CANT_FORK = 29
Can't fork process error.
Error ERR_INVALID_DATA = 30
Invalid data error.
Error ERR_INVALID_PARAMETER = 31
Invalid parameter error.
Error ERR_ALREADY_EXISTS = 32
Already exists error.
Error ERR_DOES_NOT_EXIST = 33
Does not exist error.
Error ERR_DATABASE_CANT_READ = 34
Database: Read error.
Error ERR_DATABASE_CANT_WRITE = 35
Database: Write error.
Error ERR_COMPILATION_FAILED = 36
Compilation failed error.
Error ERR_METHOD_NOT_FOUND = 37
Method not found error.
Error ERR_LINK_FAILED = 38
Linking failed error.
Error ERR_SCRIPT_FAILED = 39
Script failed error.
Error ERR_CYCLIC_LINK = 40
Cycling link (import cycle) error.
Error ERR_INVALID_DECLARATION = 41
Invalid declaration error.
Error ERR_DUPLICATE_SYMBOL = 42
Duplicate symbol error.
Error ERR_PARSE_ERROR = 43
Parse error.
Error ERR_BUSY = 44
Busy error.
Error ERR_SKIP = 45
Skip error.
Error ERR_HELP = 46
Help error.
Error ERR_BUG = 47
Bug error.
Error ERR_PRINTER_ON_FIRE = 48
Printer on fire error. (This is an easter egg, no engine methods return this error code.)
enum PropertyHint:
PropertyHint PROPERTY_HINT_NONE = 0
No hint for the edited property.
PropertyHint PROPERTY_HINT_RANGE = 1
Hints that an integer or float property should be within a range specified via the hint string "min,max"
or "min,max,step"
. The hint string can optionally include "or_greater"
and/or "or_lesser"
to allow manual input going respectively above the max or below the min values. Example: "-360,360,1,or_greater,or_lesser"
.
PropertyHint PROPERTY_HINT_EXP_RANGE = 2
Hints that a float property should be within an exponential range specified via the hint string "min,max"
or "min,max,step"
. The hint string can optionally include "or_greater"
and/or "or_lesser"
to allow manual input going respectively above the max or below the min values. Example: "0.01,100,0.01,or_greater"
.
PropertyHint PROPERTY_HINT_ENUM = 3
Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string.
The hint string is a comma separated list of names such as "Hello,Something,Else"
. Whitespaces are not removed from either end of a name. For integer and float properties, the first name in the list has value 0, the next 1, and so on. Explicit values can also be specified by appending :integer
to the name, e.g. "Zero,One,Three:3,Four,Six:6"
.
PropertyHint PROPERTY_HINT_ENUM_SUGGESTION = 40
Hints that a string property can be an enumerated value to pick in a list specified via a hint string such as "Hello,Something,Else"
.
Unlike PROPERTY_HINT_ENUM a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values.
PropertyHint PROPERTY_HINT_EXP_EASING = 4
Hints that a float property should be edited via an exponential easing function. The hint string can include "attenuation"
to flip the curve horizontally and/or "inout"
to also include in/out easing.
PropertyHint PROPERTY_HINT_LENGTH = 5
Deprecated hint, unused.
PropertyHint PROPERTY_HINT_LINK = 6
Hints that a vector property should allow linking values (e.g. to edit both x
and y
together).
PropertyHint PROPERTY_HINT_KEY_ACCEL = 8
Deprecated hint, unused.
PropertyHint PROPERTY_HINT_FLAGS = 9
Hints that an integer property is a bitmask with named bit flags. For example, to allow toggling bits 0, 1, 2 and 4, the hint could be something like "Bit0,Bit1,Bit2,,Bit4"
.
PropertyHint PROPERTY_HINT_LAYERS_2D_RENDER = 10
Hints that an integer property is a bitmask using the optionally named 2D render layers.
PropertyHint PROPERTY_HINT_LAYERS_2D_PHYSICS = 11
Hints that an integer property is a bitmask using the optionally named 2D physics layers.
Hints that an integer property is a bitmask using the optionally named 2D navigation layers.
PropertyHint PROPERTY_HINT_LAYERS_3D_RENDER = 13
Hints that an integer property is a bitmask using the optionally named 3D render layers.
PropertyHint PROPERTY_HINT_LAYERS_3D_PHYSICS = 14
Hints that an integer property is a bitmask using the optionally named 3D physics layers.
Hints that an integer property is a bitmask using the optionally named 3D navigation layers.
PropertyHint PROPERTY_HINT_FILE = 16
Hints that a string property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like "*.png,*.jpg"
.
PropertyHint PROPERTY_HINT_DIR = 17
Hints that a string property is a path to a directory. Editing it will show a file dialog for picking the path.
PropertyHint PROPERTY_HINT_GLOBAL_FILE = 18
Hints that a string property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like "*.png,*.jpg"
.
PropertyHint PROPERTY_HINT_GLOBAL_DIR = 19
Hints that a string property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path.
PropertyHint PROPERTY_HINT_RESOURCE_TYPE = 20
Hints that a property is an instance of a Resource-derived type, optionally specified via the hint string (e.g. "Texture"
). Editing it will show a popup menu of valid resource types to instantiate.
PropertyHint PROPERTY_HINT_MULTILINE_TEXT = 21
Hints that a string property is text with line breaks. Editing it will show a text input field where line breaks can be typed.
PropertyHint PROPERTY_HINT_PLACEHOLDER_TEXT = 22
Hints that a string property should have a placeholder text visible on its input field, whenever the property is empty. The hint string is the placeholder text to use.
PropertyHint PROPERTY_HINT_COLOR_NO_ALPHA = 23
Hints that a color property should be edited without changing its alpha component, i.e. only R, G and B channels are edited.
PropertyHint PROPERTY_HINT_IMAGE_COMPRESS_LOSSY = 24
Hints that an image is compressed using lossy compression.
PropertyHint PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS = 25
Hints that an image is compressed using lossless compression.
PropertyHint PROPERTY_HINT_OBJECT_ID = 26
PropertyHint PROPERTY_HINT_TYPE_STRING = 27
Hint that a property represents a particular type. If a property is TYPE_STRING, allows to set a type from the create dialog. If you need to create an Array to contain elements of a specific type, the hint_string
must encode nested types using ":"
and "/"
for specifying Resource types. For instance:
hint_string = "%s:" % [TYPE_INT] # Array of integers.
hint_string = "%s:%s:" % [TYPE_ARRAY, TYPE_REAL] # Two-dimensional array of floats.
hint_string = "%s/%s:Resource" % [TYPE_OBJECT, TYPE_OBJECT] # Array of resources.
hint_string = "%s:%s/%s:Resource" % [TYPE_ARRAY, TYPE_OBJECT, TYPE_OBJECT] # Two-dimensional array of resources.
Note: The final colon is required to specify for properly detecting built-in types.
PropertyHint PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE = 28
PropertyHint PROPERTY_HINT_METHOD_OF_VARIANT_TYPE = 29
PropertyHint PROPERTY_HINT_METHOD_OF_BASE_TYPE = 30
PropertyHint PROPERTY_HINT_METHOD_OF_INSTANCE = 31
PropertyHint PROPERTY_HINT_METHOD_OF_SCRIPT = 32
PropertyHint PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE = 33
PropertyHint PROPERTY_HINT_PROPERTY_OF_BASE_TYPE = 34
PropertyHint PROPERTY_HINT_PROPERTY_OF_INSTANCE = 35
PropertyHint PROPERTY_HINT_PROPERTY_OF_SCRIPT = 36
PropertyHint PROPERTY_HINT_OBJECT_TOO_BIG = 37
PropertyHint PROPERTY_HINT_NODE_PATH_VALID_TYPES = 38
PropertyHint PROPERTY_HINT_SAVE_FILE = 39
PropertyHint PROPERTY_HINT_LOCALE_ID = 41
Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country.
PropertyHint PROPERTY_HINT_MAX = 42
enum PropertyUsageFlags:
PropertyUsageFlags PROPERTY_USAGE_STORAGE = 1
The property is serialized and saved in the scene file (default).
PropertyUsageFlags PROPERTY_USAGE_EDITOR = 2
The property is shown in the editor inspector (default).
PropertyUsageFlags PROPERTY_USAGE_NETWORK = 4
Deprecated usage flag, unused.
PropertyUsageFlags PROPERTY_USAGE_EDITOR_HELPER = 8
Deprecated usage flag, unused.
PropertyUsageFlags PROPERTY_USAGE_CHECKABLE = 16
The property can be checked in the editor inspector.
PropertyUsageFlags PROPERTY_USAGE_CHECKED = 32
The property is checked in the editor inspector.
PropertyUsageFlags PROPERTY_USAGE_INTERNATIONALIZED = 64
The property is a translatable string.
PropertyUsageFlags PROPERTY_USAGE_GROUP = 128
Used to group properties together in the editor. See EditorInspector.
PropertyUsageFlags PROPERTY_USAGE_CATEGORY = 256
Used to categorize properties together in the editor.
PropertyUsageFlags PROPERTY_USAGE_NO_INSTANCE_STATE = 2048
The property does not save its state in PackedScene.
PropertyUsageFlags PROPERTY_USAGE_RESTART_IF_CHANGED = 4096
Editing the property prompts the user for restarting the editor.
PropertyUsageFlags PROPERTY_USAGE_SCRIPT_VARIABLE = 8192
The property is a script variable which should be serialized and saved in the scene file.
PropertyUsageFlags PROPERTY_USAGE_DEFAULT = 7
Default usage (storage, editor and network).
PropertyUsageFlags PROPERTY_USAGE_DEFAULT_INTL = 71
Default usage for translatable strings (storage, editor, network and internationalized).
PropertyUsageFlags PROPERTY_USAGE_NOEDITOR = 5
Default usage but without showing the property in the editor (storage, network).
enum MethodFlags:
MethodFlags METHOD_FLAG_NORMAL = 1
Flag for a normal method.
MethodFlags METHOD_FLAG_EDITOR = 2
Flag for an editor method.
MethodFlags METHOD_FLAG_NOSCRIPT = 4
Deprecated method flag, unused.
MethodFlags METHOD_FLAG_CONST = 8
Flag for a constant method.
MethodFlags METHOD_FLAG_REVERSE = 16
Deprecated method flag, unused.
MethodFlags METHOD_FLAG_VIRTUAL = 32
Flag for a virtual method.
MethodFlags METHOD_FLAG_FROM_SCRIPT = 64
Deprecated method flag, unused.
MethodFlags METHOD_FLAG_VARARG = 128
MethodFlags METHOD_FLAGS_DEFAULT = 1
Default method flags.
enum Variant.Type:
Variant.Type TYPE_NIL = 0
Variable is null
.
Variant.Type TYPE_BOOL = 1
Variable is of type bool.
Variant.Type TYPE_INT = 2
Variable is of type int.
Variant.Type TYPE_REAL = 3
Variable is of type float (real).
Variant.Type TYPE_STRING = 4
Variable is of type String.
Variant.Type TYPE_VECTOR2 = 5
Variable is of type Vector2.
Variant.Type TYPE_RECT2 = 6
Variable is of type Rect2.
Variant.Type TYPE_VECTOR3 = 7
Variable is of type Vector3.
Variant.Type TYPE_TRANSFORM2D = 8
Variable is of type Transform2D.
Variant.Type TYPE_PLANE = 9
Variable is of type Plane.
Variant.Type TYPE_QUAT = 10
Variable is of type Quat.
Variant.Type TYPE_AABB = 11
Variable is of type AABB.
Variant.Type TYPE_BASIS = 12
Variable is of type Basis.
Variant.Type TYPE_TRANSFORM = 13
Variable is of type Transform.
Variant.Type TYPE_COLOR = 14
Variable is of type Color.
Variant.Type TYPE_NODE_PATH = 15
Variable is of type NodePath.
Variant.Type TYPE_RID = 16
Variable is of type RID.
Variant.Type TYPE_OBJECT = 17
Variable is of type Object.
Variant.Type TYPE_DICTIONARY = 18
Variable is of type Dictionary.
Variant.Type TYPE_ARRAY = 19
Variable is of type Array.
Variant.Type TYPE_RAW_ARRAY = 20
Variable is of type PoolByteArray.
Variant.Type TYPE_INT_ARRAY = 21
Variable is of type PoolIntArray.
Variant.Type TYPE_REAL_ARRAY = 22
Variable is of type PoolRealArray.
Variant.Type TYPE_STRING_ARRAY = 23
Variable is of type PoolStringArray.
Variant.Type TYPE_VECTOR2_ARRAY = 24
Variable is of type PoolVector2Array.
Variant.Type TYPE_VECTOR3_ARRAY = 25
Variable is of type PoolVector3Array.
Variant.Type TYPE_COLOR_ARRAY = 26
Variable is of type PoolColorArray.
Variant.Type TYPE_MAX = 27
Represents the size of the Variant.Type enum.
enum Variant.Operator:
Variant.Operator OP_EQUAL = 0
Equality operator (==
).
Variant.Operator OP_NOT_EQUAL = 1
Inequality operator (!=
).
Variant.Operator OP_LESS = 2
Less than operator (<
).
Variant.Operator OP_LESS_EQUAL = 3
Less than or equal operator (<=
).
Variant.Operator OP_GREATER = 4
Greater than operator (>
).
Variant.Operator OP_GREATER_EQUAL = 5
Greater than or equal operator (>=
).
Variant.Operator OP_ADD = 6
Addition operator (+
).
Variant.Operator OP_SUBTRACT = 7
Subtraction operator (-
).
Variant.Operator OP_MULTIPLY = 8
Multiplication operator (*
).
Variant.Operator OP_DIVIDE = 9
Division operator (/
).
Variant.Operator OP_NEGATE = 10
Unary negation operator (-
).
Variant.Operator OP_POSITIVE = 11
Unary plus operator (+
).
Variant.Operator OP_MODULE = 12
Remainder/modulo operator (%
).
Variant.Operator OP_STRING_CONCAT = 13
String concatenation operator (+
).
Variant.Operator OP_SHIFT_LEFT = 14
Left shift operator (<<
).
Variant.Operator OP_SHIFT_RIGHT = 15
Right shift operator (>>
).
Variant.Operator OP_BIT_AND = 16
Bitwise AND operator (&
).
Variant.Operator OP_BIT_OR = 17
Bitwise OR operator (|
).
Variant.Operator OP_BIT_XOR = 18
Bitwise XOR operator (^
).
Variant.Operator OP_BIT_NEGATE = 19
Bitwise NOT operator (~
).
Variant.Operator OP_AND = 20
Logical AND operator (and
or &&
).
Variant.Operator OP_OR = 21
Logical OR operator (or
or ||
).
Variant.Operator OP_XOR = 22
Logical XOR operator (not implemented in GDScript).
Variant.Operator OP_NOT = 23
Logical NOT operator (not
or !
).
Variant.Operator OP_IN = 24
Logical IN operator (in
).
Variant.Operator OP_MAX = 25
Represents the size of the Variant.Operator enum.
Constants¶
SPKEY = 16777216
Scancodes with this bit applied are non-printable.
Property Descriptions¶
ARVRServer ARVRServer
The ARVRServer singleton.
AudioServer AudioServer
The AudioServer singleton.
CameraServer CameraServer
The CameraServer singleton.
ClassDB ClassDB
The ClassDB singleton.
Engine Engine
The Engine singleton.
Geometry Geometry
The Geometry singleton.
IP IP
The IP singleton.
Input Input
The Input singleton.
InputMap InputMap
The InputMap singleton.
JSON JSON
The JSON singleton.
JavaClassWrapper JavaClassWrapper
The JavaClassWrapper singleton.
Note: Only implemented on Android.
JavaScript JavaScript
The JavaScript singleton.
Note: Only implemented on HTML5.
Marshalls Marshalls
The Marshalls singleton.
The Navigation2DServer singleton.
The NavigationMeshGenerator singleton.
The NavigationServer singleton.
OS OS
The OS singleton.
Performance Performance
The Performance singleton.
Physics2DServer Physics2DServer
The Physics2DServer singleton.
PhysicsServer PhysicsServer
The PhysicsServer singleton.
ProjectSettings ProjectSettings
The ProjectSettings singleton.
ResourceLoader ResourceLoader
The ResourceLoader singleton.
ResourceSaver ResourceSaver
The ResourceSaver singleton.
Time Time
The Time singleton.
TranslationServer TranslationServer
The TranslationServer singleton.
VisualScriptEditor VisualScriptEditor
The VisualScriptEditor singleton.
VisualServer VisualServer
The VisualServer singleton.