summaryrefslogtreecommitdiff
path: root/modules/visual_script/visual_script_nodes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/visual_script/visual_script_nodes.cpp')
-rw-r--r--modules/visual_script/visual_script_nodes.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index 093f01c49f..b617c11bab 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -1882,6 +1882,16 @@ void VisualScriptMathConstant::_bind_methods() {
cc += const_name[i];
}
ADD_PROPERTY(PropertyInfo(Variant::INT, "constant", PROPERTY_HINT_ENUM, cc), "set_math_constant", "get_math_constant");
+
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_ONE);
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_PI);
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_2PI);
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_HALF_PI);
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_E);
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_SQRT2);
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_INF);
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_NAN);
+ BIND_ENUM_CONSTANT(MATH_CONSTANT_MAX);
}
VisualScriptMathConstant::VisualScriptMathConstant() {
@@ -2002,7 +2012,7 @@ void VisualScriptEngineSingleton::_bind_methods() {
cc += E->get().name;
}
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "/constant", PROPERTY_HINT_ENUM, cc), "set_singleton", "get_singleton");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "constant", PROPERTY_HINT_ENUM, cc), "set_singleton", "get_singleton");
}
VisualScriptEngineSingleton::VisualScriptEngineSingleton() {
@@ -3535,6 +3545,11 @@ void VisualScriptInputAction::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "action"), "set_action_name", "get_action_name");
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Pressed,Released,JustPressed,JustReleased"), "set_action_mode", "get_action_mode");
+
+ BIND_ENUM_CONSTANT(MODE_PRESSED);
+ BIND_ENUM_CONSTANT(MODE_RELEASED);
+ BIND_ENUM_CONSTANT(MODE_JUST_PRESSED);
+ BIND_ENUM_CONSTANT(MODE_JUST_RELEASED);
}
VisualScriptInputAction::VisualScriptInputAction() {