summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/http_request.cpp26
-rw-r--r--scene/main/http_request.h2
-rwxr-xr-xscene/main/node.cpp28
-rw-r--r--scene/main/node.h2
-rw-r--r--scene/main/scene_tree.cpp25
-rw-r--r--scene/main/scene_tree.h1
-rwxr-xr-xscene/main/timer.cpp4
-rw-r--r--scene/main/viewport.cpp64
8 files changed, 79 insertions, 73 deletions
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp
index a9b2dba186..e57cd857f8 100644
--- a/scene/main/http_request.cpp
+++ b/scene/main/http_request.cpp
@@ -547,19 +547,19 @@ void HTTPRequest::_bind_methods() {
ADD_SIGNAL(MethodInfo("request_completed", PropertyInfo(Variant::INT, "result"), PropertyInfo(Variant::INT, "response_code"), PropertyInfo(Variant::POOL_STRING_ARRAY, "headers"), PropertyInfo(Variant::POOL_BYTE_ARRAY, "body")));
- BIND_CONSTANT(RESULT_SUCCESS);
- //BIND_CONSTANT( RESULT_NO_BODY );
- BIND_CONSTANT(RESULT_CHUNKED_BODY_SIZE_MISMATCH);
- BIND_CONSTANT(RESULT_CANT_CONNECT);
- BIND_CONSTANT(RESULT_CANT_RESOLVE);
- BIND_CONSTANT(RESULT_CONNECTION_ERROR);
- BIND_CONSTANT(RESULT_SSL_HANDSHAKE_ERROR);
- BIND_CONSTANT(RESULT_NO_RESPONSE);
- BIND_CONSTANT(RESULT_BODY_SIZE_LIMIT_EXCEEDED);
- BIND_CONSTANT(RESULT_REQUEST_FAILED);
- BIND_CONSTANT(RESULT_DOWNLOAD_FILE_CANT_OPEN);
- BIND_CONSTANT(RESULT_DOWNLOAD_FILE_WRITE_ERROR);
- BIND_CONSTANT(RESULT_REDIRECT_LIMIT_REACHED);
+ BIND_ENUM_CONSTANT(RESULT_SUCCESS);
+ //BIND_ENUM_CONSTANT( RESULT_NO_BODY );
+ BIND_ENUM_CONSTANT(RESULT_CHUNKED_BODY_SIZE_MISMATCH);
+ BIND_ENUM_CONSTANT(RESULT_CANT_CONNECT);
+ BIND_ENUM_CONSTANT(RESULT_CANT_RESOLVE);
+ BIND_ENUM_CONSTANT(RESULT_CONNECTION_ERROR);
+ BIND_ENUM_CONSTANT(RESULT_SSL_HANDSHAKE_ERROR);
+ BIND_ENUM_CONSTANT(RESULT_NO_RESPONSE);
+ BIND_ENUM_CONSTANT(RESULT_BODY_SIZE_LIMIT_EXCEEDED);
+ BIND_ENUM_CONSTANT(RESULT_REQUEST_FAILED);
+ BIND_ENUM_CONSTANT(RESULT_DOWNLOAD_FILE_CANT_OPEN);
+ BIND_ENUM_CONSTANT(RESULT_DOWNLOAD_FILE_WRITE_ERROR);
+ BIND_ENUM_CONSTANT(RESULT_REDIRECT_LIMIT_REACHED);
}
HTTPRequest::HTTPRequest() {
diff --git a/scene/main/http_request.h b/scene/main/http_request.h
index 6099d4e9bf..104f529eae 100644
--- a/scene/main/http_request.h
+++ b/scene/main/http_request.h
@@ -137,4 +137,6 @@ public:
~HTTPRequest();
};
+VARIANT_ENUM_CAST(HTTPRequest::Result);
+
#endif // HTTPREQUEST_H
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 8a31b1ef01..c850a5ae74 100755
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -2876,20 +2876,20 @@ void Node::_bind_methods() {
BIND_CONSTANT(NOTIFICATION_INTERNAL_PROCESS);
BIND_CONSTANT(NOTIFICATION_INTERNAL_FIXED_PROCESS);
- BIND_CONSTANT(RPC_MODE_DISABLED);
- BIND_CONSTANT(RPC_MODE_REMOTE);
- BIND_CONSTANT(RPC_MODE_SYNC);
- BIND_CONSTANT(RPC_MODE_MASTER);
- BIND_CONSTANT(RPC_MODE_SLAVE);
-
- BIND_CONSTANT(PAUSE_MODE_INHERIT);
- BIND_CONSTANT(PAUSE_MODE_STOP);
- BIND_CONSTANT(PAUSE_MODE_PROCESS);
-
- BIND_CONSTANT(DUPLICATE_SIGNALS);
- BIND_CONSTANT(DUPLICATE_GROUPS);
- BIND_CONSTANT(DUPLICATE_SCRIPTS);
- BIND_CONSTANT(DUPLICATE_USE_INSTANCING);
+ BIND_ENUM_CONSTANT(RPC_MODE_DISABLED);
+ BIND_ENUM_CONSTANT(RPC_MODE_REMOTE);
+ BIND_ENUM_CONSTANT(RPC_MODE_SYNC);
+ BIND_ENUM_CONSTANT(RPC_MODE_MASTER);
+ BIND_ENUM_CONSTANT(RPC_MODE_SLAVE);
+
+ BIND_ENUM_CONSTANT(PAUSE_MODE_INHERIT);
+ BIND_ENUM_CONSTANT(PAUSE_MODE_STOP);
+ BIND_ENUM_CONSTANT(PAUSE_MODE_PROCESS);
+
+ BIND_ENUM_CONSTANT(DUPLICATE_SIGNALS);
+ BIND_ENUM_CONSTANT(DUPLICATE_GROUPS);
+ BIND_ENUM_CONSTANT(DUPLICATE_SCRIPTS);
+ BIND_ENUM_CONSTANT(DUPLICATE_USE_INSTANCING);
ADD_SIGNAL(MethodInfo("renamed"));
ADD_SIGNAL(MethodInfo("tree_entered"));
diff --git a/scene/main/node.h b/scene/main/node.h
index 180ec05773..b5ce6682d8 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -414,6 +414,8 @@ public:
~Node();
};
+VARIANT_ENUM_CAST(Node::DuplicateFlags);
+
typedef Set<Node *, Node::Comparator> NodeSet;
#endif
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 8c0733e8b2..66f3d7d627 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -2191,18 +2191,19 @@ void SceneTree::_bind_methods() {
ADD_SIGNAL(MethodInfo("connection_failed"));
ADD_SIGNAL(MethodInfo("server_disconnected"));
- BIND_CONSTANT(GROUP_CALL_DEFAULT);
- BIND_CONSTANT(GROUP_CALL_REVERSE);
- BIND_CONSTANT(GROUP_CALL_REALTIME);
- BIND_CONSTANT(GROUP_CALL_UNIQUE);
-
- BIND_CONSTANT(STRETCH_MODE_DISABLED);
- BIND_CONSTANT(STRETCH_MODE_2D);
- BIND_CONSTANT(STRETCH_MODE_VIEWPORT);
- BIND_CONSTANT(STRETCH_ASPECT_IGNORE);
- BIND_CONSTANT(STRETCH_ASPECT_KEEP);
- BIND_CONSTANT(STRETCH_ASPECT_KEEP_WIDTH);
- BIND_CONSTANT(STRETCH_ASPECT_KEEP_HEIGHT);
+ BIND_ENUM_CONSTANT(GROUP_CALL_DEFAULT);
+ BIND_ENUM_CONSTANT(GROUP_CALL_REVERSE);
+ BIND_ENUM_CONSTANT(GROUP_CALL_REALTIME);
+ BIND_ENUM_CONSTANT(GROUP_CALL_UNIQUE);
+
+ BIND_ENUM_CONSTANT(STRETCH_MODE_DISABLED);
+ BIND_ENUM_CONSTANT(STRETCH_MODE_2D);
+ BIND_ENUM_CONSTANT(STRETCH_MODE_VIEWPORT);
+
+ BIND_ENUM_CONSTANT(STRETCH_ASPECT_IGNORE);
+ BIND_ENUM_CONSTANT(STRETCH_ASPECT_KEEP);
+ BIND_ENUM_CONSTANT(STRETCH_ASPECT_KEEP_WIDTH);
+ BIND_ENUM_CONSTANT(STRETCH_ASPECT_KEEP_HEIGHT);
}
SceneTree *SceneTree::singleton = NULL;
diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h
index 5563bd33be..c62607244e 100644
--- a/scene/main/scene_tree.h
+++ b/scene/main/scene_tree.h
@@ -456,5 +456,6 @@ public:
VARIANT_ENUM_CAST(SceneTree::StretchMode);
VARIANT_ENUM_CAST(SceneTree::StretchAspect);
+VARIANT_ENUM_CAST(SceneTree::CallGroupFlags);
#endif
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index 06801ee49d..42690ab93a 100755
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -204,8 +204,8 @@ void Timer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "is_one_shot");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autostart"), "set_autostart", "has_autostart");
- BIND_CONSTANT(TIMER_PROCESS_FIXED);
- BIND_CONSTANT(TIMER_PROCESS_IDLE);
+ BIND_ENUM_CONSTANT(TIMER_PROCESS_FIXED);
+ BIND_ENUM_CONSTANT(TIMER_PROCESS_IDLE);
}
Timer::Timer() {
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index e19e069282..e0800f4907 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -2776,38 +2776,38 @@ void Viewport::_bind_methods() {
ADD_SIGNAL(MethodInfo("size_changed"));
- BIND_CONSTANT(UPDATE_DISABLED);
- BIND_CONSTANT(UPDATE_ONCE);
- BIND_CONSTANT(UPDATE_WHEN_VISIBLE);
- BIND_CONSTANT(UPDATE_ALWAYS);
-
- BIND_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED);
- BIND_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_1);
- BIND_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_4);
- BIND_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_16);
- BIND_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_64);
- BIND_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_256);
- BIND_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_1024);
- BIND_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_MAX);
-
- BIND_CONSTANT(RENDER_INFO_OBJECTS_IN_FRAME);
- BIND_CONSTANT(RENDER_INFO_VERTICES_IN_FRAME);
- BIND_CONSTANT(RENDER_INFO_MATERIAL_CHANGES_IN_FRAME);
- BIND_CONSTANT(RENDER_INFO_SHADER_CHANGES_IN_FRAME);
- BIND_CONSTANT(RENDER_INFO_SURFACE_CHANGES_IN_FRAME);
- BIND_CONSTANT(RENDER_INFO_DRAW_CALLS_IN_FRAME);
- BIND_CONSTANT(RENDER_INFO_MAX);
-
- BIND_CONSTANT(DEBUG_DRAW_DISABLED);
- BIND_CONSTANT(DEBUG_DRAW_UNSHADED);
- BIND_CONSTANT(DEBUG_DRAW_OVERDRAW);
- BIND_CONSTANT(DEBUG_DRAW_WIREFRAME);
-
- BIND_CONSTANT(MSAA_DISABLED);
- BIND_CONSTANT(MSAA_2X);
- BIND_CONSTANT(MSAA_4X);
- BIND_CONSTANT(MSAA_8X);
- BIND_CONSTANT(MSAA_16X);
+ BIND_ENUM_CONSTANT(UPDATE_DISABLED);
+ BIND_ENUM_CONSTANT(UPDATE_ONCE);
+ BIND_ENUM_CONSTANT(UPDATE_WHEN_VISIBLE);
+ BIND_ENUM_CONSTANT(UPDATE_ALWAYS);
+
+ BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED);
+ BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_1);
+ BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_4);
+ BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_16);
+ BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_64);
+ BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_256);
+ BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_1024);
+ BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_MAX);
+
+ BIND_ENUM_CONSTANT(RENDER_INFO_OBJECTS_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_INFO_VERTICES_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_INFO_MATERIAL_CHANGES_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_INFO_SHADER_CHANGES_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_INFO_SURFACE_CHANGES_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_INFO_DRAW_CALLS_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_INFO_MAX);
+
+ BIND_ENUM_CONSTANT(DEBUG_DRAW_DISABLED);
+ BIND_ENUM_CONSTANT(DEBUG_DRAW_UNSHADED);
+ BIND_ENUM_CONSTANT(DEBUG_DRAW_OVERDRAW);
+ BIND_ENUM_CONSTANT(DEBUG_DRAW_WIREFRAME);
+
+ BIND_ENUM_CONSTANT(MSAA_DISABLED);
+ BIND_ENUM_CONSTANT(MSAA_2X);
+ BIND_ENUM_CONSTANT(MSAA_4X);
+ BIND_ENUM_CONSTANT(MSAA_8X);
+ BIND_ENUM_CONSTANT(MSAA_16X);
}
Viewport::Viewport() {