summaryrefslogtreecommitdiff
path: root/scene/main/canvas_layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/canvas_layer.cpp')
-rw-r--r--scene/main/canvas_layer.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp
index 1de19959db..9f20e0f845 100644
--- a/scene/main/canvas_layer.cpp
+++ b/scene/main/canvas_layer.cpp
@@ -246,6 +246,15 @@ Node* CanvasLayer::get_custom_viewport() const {
return custom_viewport;
}
+void CanvasLayer::reset_sort_index() {
+ sort_index=0;
+}
+
+int CanvasLayer::get_sort_index() {
+
+ return sort_index++;
+}
+
void CanvasLayer::_bind_methods() {
@@ -296,4 +305,5 @@ CanvasLayer::CanvasLayer() {
canvas = Ref<World2D>( memnew(World2D) );
custom_viewport=NULL;
custom_viewport_id=0;
+ sort_index=0;
}