summaryrefslogtreecommitdiff
path: root/core/global_constants.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/global_constants.cpp')
-rw-r--r--core/global_constants.cpp215
1 files changed, 110 insertions, 105 deletions
diff --git a/core/global_constants.cpp b/core/global_constants.cpp
index e48556c064..b30685539a 100644
--- a/core/global_constants.cpp
+++ b/core/global_constants.cpp
@@ -30,15 +30,15 @@
#include "global_constants.h"
+#include "core/input/input_event.h"
#include "core/object.h"
-#include "core/os/input_event.h"
#include "core/os/keyboard.h"
#include "core/variant.h"
struct _GlobalConstant {
-
#ifdef DEBUG_METHODS_ENABLED
StringName enum_name;
+ bool ignore_value_in_docs;
#endif
const char *name;
int value;
@@ -46,8 +46,9 @@ struct _GlobalConstant {
_GlobalConstant() {}
#ifdef DEBUG_METHODS_ENABLED
- _GlobalConstant(const StringName &p_enum_name, const char *p_name, int p_value) :
+ _GlobalConstant(const StringName &p_enum_name, const char *p_name, int p_value, bool p_ignore_value_in_docs = false) :
enum_name(p_enum_name),
+ ignore_value_in_docs(p_ignore_value_in_docs),
name(p_name),
value(p_value) {
}
@@ -72,6 +73,15 @@ static Vector<_GlobalConstant> _global_constants;
#define BIND_GLOBAL_ENUM_CONSTANT_CUSTOM(m_custom_name, m_constant) \
_global_constants.push_back(_GlobalConstant(__constant_get_enum_name(m_constant, #m_constant), m_custom_name, m_constant));
+#define BIND_GLOBAL_CONSTANT_NO_VAL(m_constant) \
+ _global_constants.push_back(_GlobalConstant(StringName(), #m_constant, m_constant, true));
+
+#define BIND_GLOBAL_ENUM_CONSTANT_NO_VAL(m_constant) \
+ _global_constants.push_back(_GlobalConstant(__constant_get_enum_name(m_constant, #m_constant), #m_constant, m_constant, true));
+
+#define BIND_GLOBAL_ENUM_CONSTANT_CUSTOM_NO_VAL(m_custom_name, m_constant) \
+ _global_constants.push_back(_GlobalConstant(__constant_get_enum_name(m_constant, #m_constant), m_custom_name, m_constant, true));
+
#else
#define BIND_GLOBAL_CONSTANT(m_constant) \
@@ -83,18 +93,25 @@ static Vector<_GlobalConstant> _global_constants;
#define BIND_GLOBAL_ENUM_CONSTANT_CUSTOM(m_custom_name, m_constant) \
_global_constants.push_back(_GlobalConstant(m_custom_name, m_constant));
+#define BIND_GLOBAL_CONSTANT_NO_VAL(m_constant) \
+ _global_constants.push_back(_GlobalConstant(#m_constant, m_constant));
+
+#define BIND_GLOBAL_ENUM_CONSTANT_NO_VAL(m_constant) \
+ _global_constants.push_back(_GlobalConstant(#m_constant, m_constant));
+
+#define BIND_GLOBAL_ENUM_CONSTANT_CUSTOM_NO_VAL(m_custom_name, m_constant) \
+ _global_constants.push_back(_GlobalConstant(m_custom_name, m_constant));
+
#endif
VARIANT_ENUM_CAST(KeyList);
VARIANT_ENUM_CAST(KeyModifierMask);
VARIANT_ENUM_CAST(ButtonList);
-VARIANT_ENUM_CAST(JoystickList);
+VARIANT_ENUM_CAST(JoyButtonList);
+VARIANT_ENUM_CAST(JoyAxisList);
VARIANT_ENUM_CAST(MidiMessageList);
void register_global_constants() {
-
- //{ KEY_BACKSPACE, VK_BACK },// (0x08) // backspace
-
BIND_GLOBAL_ENUM_CONSTANT(MARGIN_LEFT);
BIND_GLOBAL_ENUM_CONSTANT(MARGIN_TOP);
BIND_GLOBAL_ENUM_CONSTANT(MARGIN_RIGHT);
@@ -116,7 +133,7 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT(VALIGN_CENTER);
BIND_GLOBAL_ENUM_CONSTANT(VALIGN_BOTTOM);
- // hueg list of keys
+ // huge list of keys
BIND_GLOBAL_CONSTANT(SPKEY);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ESCAPE);
@@ -371,7 +388,7 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_ALT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_META);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_CTRL);
- BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_CMD);
+ BIND_GLOBAL_ENUM_CONSTANT_NO_VAL(KEY_MASK_CMD);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_KPAD);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_GROUP_SWITCH);
@@ -391,90 +408,70 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MASK_XBUTTON1);
BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MASK_XBUTTON2);
- //joypads
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_0);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_1);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_2);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_3);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_4);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_5);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_6);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_7);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_8);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_9);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_10);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_11);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_12);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_13);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_14);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_15);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_MAX);
-
- BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_CIRCLE);
+ // Joypad buttons
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_INVALID_BUTTON);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_A);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_B);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_X);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_Y);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_BACK);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_GUIDE);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_START);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_LEFT_STICK);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_RIGHT_STICK);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_LEFT_SHOULDER);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_RIGHT_SHOULDER);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_DPAD_UP);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_DPAD_DOWN);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_DPAD_LEFT);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_DPAD_RIGHT);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SDL_BUTTONS);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_X);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_CROSS);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_CIRCLE);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_SQUARE);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_TRIANGLE);
-
- BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_B);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_SELECT);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_START);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_PS);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_L1);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_R1);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_L3);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_R3);
BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_A);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_B);
BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_X);
BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_Y);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_BACK);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_START);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_HOME);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_LS);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_RS);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_LB);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_RB);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_MAX);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_A);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_B);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_X);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_Y);
-
- BIND_GLOBAL_ENUM_CONSTANT(JOY_VR_GRIP);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_VR_PAD);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_VR_TRIGGER);
-
- BIND_GLOBAL_ENUM_CONSTANT(JOY_OCULUS_AX);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_OCULUS_BY);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_OCULUS_MENU);
-
- BIND_GLOBAL_ENUM_CONSTANT(JOY_OPENVR_MENU);
-
- BIND_GLOBAL_ENUM_CONSTANT(JOY_SELECT);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_START);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_UP);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_DOWN);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_LEFT);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_RIGHT);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_L);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_L2);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_L3);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_R);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_R2);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_R3);
-
- BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_0);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_1);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_2);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_3);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_4);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_5);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_6);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_7);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_8);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_9);
+ // Joypad axes
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_INVALID_AXIS);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_LEFT_X);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_LEFT_Y);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_RIGHT_X);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_RIGHT_Y);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_TRIGGER_LEFT);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_TRIGGER_RIGHT);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SDL_AXES);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_0_X);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_0_Y);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_1_X);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_1_Y);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_2_X);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_2_Y);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_3_X);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_3_Y);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_4_X);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_4_Y);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_MAX);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_LX);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_LY);
-
- BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_RX);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_RY);
-
- BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_L2);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_R2);
-
- BIND_GLOBAL_ENUM_CONSTANT(JOY_VR_ANALOG_TRIGGER);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_VR_ANALOG_GRIP);
-
- BIND_GLOBAL_ENUM_CONSTANT(JOY_OPENVR_TOUCHPADX);
- BIND_GLOBAL_ENUM_CONSTANT(JOY_OPENVR_TOUCHPADY);
-
// midi
BIND_GLOBAL_ENUM_CONSTANT(MIDI_MESSAGE_NOTE_OFF);
BIND_GLOBAL_ENUM_CONSTANT(MIDI_MESSAGE_NOTE_ON);
@@ -571,9 +568,7 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_INTERNATIONALIZED);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_GROUP);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_CATEGORY);
- //deprecated, replaced by ClassDB function to check default value
- //BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_STORE_IF_NONZERO);
- //BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_STORE_IF_NONONE);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_SUBGROUP);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_NO_INSTANCE_STATE);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_RESTART_IF_CHANGED);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_SCRIPT_VARIABLE);
@@ -594,30 +589,38 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NIL", Variant::NIL);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_BOOL", Variant::BOOL);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT", Variant::INT);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL", Variant::REAL);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL", Variant::FLOAT);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING", Variant::STRING);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2", Variant::VECTOR2); // 5
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2", Variant::VECTOR2);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2I", Variant::VECTOR2I);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RECT2", Variant::RECT2);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RECT2I", Variant::RECT2I);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3", Variant::VECTOR3);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3I", Variant::VECTOR3I);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM2D", Variant::TRANSFORM2D);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_PLANE", Variant::PLANE);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_QUAT", Variant::QUAT); // 10
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_QUAT", Variant::QUAT);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_AABB", Variant::AABB);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_BASIS", Variant::BASIS);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM", Variant::TRANSFORM);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR", Variant::COLOR);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NODE_PATH", Variant::NODE_PATH); // 15
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING_NAME", Variant::STRING_NAME);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NODE_PATH", Variant::NODE_PATH);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RID", Variant::_RID);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_OBJECT", Variant::OBJECT);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_DICTIONARY", Variant::DICTIONARY); // 20
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_CALLABLE", Variant::CALLABLE);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_SIGNAL", Variant::SIGNAL);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_DICTIONARY", Variant::DICTIONARY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_ARRAY", Variant::ARRAY);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RAW_ARRAY", Variant::POOL_BYTE_ARRAY);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT_ARRAY", Variant::POOL_INT_ARRAY);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL_ARRAY", Variant::POOL_REAL_ARRAY);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING_ARRAY", Variant::POOL_STRING_ARRAY);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2_ARRAY", Variant::POOL_VECTOR2_ARRAY); // 25
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3_ARRAY", Variant::POOL_VECTOR3_ARRAY);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR_ARRAY", Variant::POOL_COLOR_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RAW_ARRAY", Variant::PACKED_BYTE_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT32_ARRAY", Variant::PACKED_INT32_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT64_ARRAY", Variant::PACKED_INT64_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_FLOAT32_ARRAY", Variant::PACKED_FLOAT32_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_FLOAT64_ARRAY", Variant::PACKED_FLOAT64_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING_ARRAY", Variant::PACKED_STRING_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2_ARRAY", Variant::PACKED_VECTOR2_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3_ARRAY", Variant::PACKED_VECTOR3_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR_ARRAY", Variant::PACKED_COLOR_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_MAX", Variant::VARIANT_MAX);
//comparison
@@ -654,33 +657,35 @@ void register_global_constants() {
}
void unregister_global_constants() {
-
_global_constants.clear();
}
int GlobalConstants::get_global_constant_count() {
-
return _global_constants.size();
}
#ifdef DEBUG_METHODS_ENABLED
StringName GlobalConstants::get_global_constant_enum(int p_idx) {
-
return _global_constants[p_idx].enum_name;
}
+
+bool GlobalConstants::get_ignore_value_in_docs(int p_idx) {
+ return _global_constants[p_idx].ignore_value_in_docs;
+}
#else
StringName GlobalConstants::get_global_constant_enum(int p_idx) {
-
return StringName();
}
+
+bool GlobalConstants::get_ignore_value_in_docs(int p_idx) {
+ return false;
+}
#endif
const char *GlobalConstants::get_global_constant_name(int p_idx) {
-
return _global_constants[p_idx].name;
}
int GlobalConstants::get_global_constant_value(int p_idx) {
-
return _global_constants[p_idx].value;
}