summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-01-04 00:41:45 +0100
committerGitHub <noreply@github.com>2018-01-04 00:41:45 +0100
commitf9f6f250e68853dc0b3ab397145b8c060e1cb110 (patch)
tree44ccf761daa04e0a96b7610d064bac3359387b80 /servers
parent66d541c69db95fc7951bc587b20b7a4a93e955d2 (diff)
parent42ae3525a3adfc9518361aab5625d7ff76e97623 (diff)
Merge pull request #15191 from Jerome67000/z_renaming
renames "z" Node2D property to "z_index"
Diffstat (limited to 'servers')
-rw-r--r--servers/visual/visual_server_canvas.cpp8
-rw-r--r--servers/visual/visual_server_canvas.h6
-rw-r--r--servers/visual/visual_server_raster.h2
-rw-r--r--servers/visual/visual_server_wrap_mt.h2
-rw-r--r--servers/visual_server.cpp2
-rw-r--r--servers/visual_server.h2
6 files changed, 11 insertions, 11 deletions
diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp
index 60530e48e2..b163402a07 100644
--- a/servers/visual/visual_server_canvas.cpp
+++ b/servers/visual/visual_server_canvas.cpp
@@ -102,9 +102,9 @@ void VisualServerCanvas::_render_canvas_item(Item *p_canvas_item, const Transfor
}
if (ci->z_relative)
- p_z = CLAMP(p_z + ci->z, VS::CANVAS_ITEM_Z_MIN, VS::CANVAS_ITEM_Z_MAX);
+ p_z = CLAMP(p_z + ci->z_index, VS::CANVAS_ITEM_Z_MIN, VS::CANVAS_ITEM_Z_MAX);
else
- p_z = ci->z;
+ p_z = ci->z_index;
for (int i = 0; i < child_item_count; i++) {
@@ -805,14 +805,14 @@ void VisualServerCanvas::canvas_item_set_sort_children_by_y(RID p_item, bool p_e
canvas_item->sort_y = p_enable;
}
-void VisualServerCanvas::canvas_item_set_z(RID p_item, int p_z) {
+void VisualServerCanvas::canvas_item_set_z_index(RID p_item, int p_z) {
ERR_FAIL_COND(p_z < VS::CANVAS_ITEM_Z_MIN || p_z > VS::CANVAS_ITEM_Z_MAX);
Item *canvas_item = canvas_item_owner.getornull(p_item);
ERR_FAIL_COND(!canvas_item);
- canvas_item->z = p_z;
+ canvas_item->z_index = p_z;
}
void VisualServerCanvas::canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable) {
diff --git a/servers/visual/visual_server_canvas.h b/servers/visual/visual_server_canvas.h
index b86dd0316c..320fc2fb0b 100644
--- a/servers/visual/visual_server_canvas.h
+++ b/servers/visual/visual_server_canvas.h
@@ -39,7 +39,7 @@ public:
RID parent; // canvas it belongs to
List<Item *>::Element *E;
- int z;
+ int z_index;
bool z_relative;
bool sort_y;
Color modulate;
@@ -53,7 +53,7 @@ public:
Item() {
children_order_dirty = true;
E = NULL;
- z = 0;
+ z_index = 0;
modulate = Color(1, 1, 1, 1);
self_modulate = Color(1, 1, 1, 1);
sort_y = false;
@@ -187,7 +187,7 @@ public:
void canvas_item_add_set_transform(RID p_item, const Transform2D &p_transform);
void canvas_item_add_clip_ignore(RID p_item, bool p_ignore);
void canvas_item_set_sort_children_by_y(RID p_item, bool p_enable);
- void canvas_item_set_z(RID p_item, int p_z);
+ void canvas_item_set_z_index(RID p_item, int p_z);
void canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable);
void canvas_item_set_copy_to_backbuffer(RID p_item, bool p_enable, const Rect2 &p_rect);
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index 95d7269d7a..864ae81140 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -586,7 +586,7 @@ public:
BIND2(canvas_item_add_set_transform, RID, const Transform2D &)
BIND2(canvas_item_add_clip_ignore, RID, bool)
BIND2(canvas_item_set_sort_children_by_y, RID, bool)
- BIND2(canvas_item_set_z, RID, int)
+ BIND2(canvas_item_set_z_index, RID, int)
BIND2(canvas_item_set_z_as_relative_to_parent, RID, bool)
BIND3(canvas_item_set_copy_to_backbuffer, RID, bool, const Rect2 &)
diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h
index 48a76aea6b..276e445f4d 100644
--- a/servers/visual/visual_server_wrap_mt.h
+++ b/servers/visual/visual_server_wrap_mt.h
@@ -504,7 +504,7 @@ public:
FUNC2(canvas_item_add_set_transform, RID, const Transform2D &)
FUNC2(canvas_item_add_clip_ignore, RID, bool)
FUNC2(canvas_item_set_sort_children_by_y, RID, bool)
- FUNC2(canvas_item_set_z, RID, int)
+ FUNC2(canvas_item_set_z_index, RID, int)
FUNC2(canvas_item_set_z_as_relative_to_parent, RID, bool)
FUNC3(canvas_item_set_copy_to_backbuffer, RID, bool, const Rect2 &)
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index b4949b6093..bf6d425fb9 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -1611,7 +1611,7 @@ void VisualServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("canvas_item_add_set_transform", "item", "transform"), &VisualServer::canvas_item_add_set_transform);
ClassDB::bind_method(D_METHOD("canvas_item_add_clip_ignore", "item", "ignore"), &VisualServer::canvas_item_add_clip_ignore);
ClassDB::bind_method(D_METHOD("canvas_item_set_sort_children_by_y", "item", "enabled"), &VisualServer::canvas_item_set_sort_children_by_y);
- ClassDB::bind_method(D_METHOD("canvas_item_set_z", "item", "z"), &VisualServer::canvas_item_set_z);
+ ClassDB::bind_method(D_METHOD("canvas_item_set_z_index", "item", "z_index"), &VisualServer::canvas_item_set_z_index);
ClassDB::bind_method(D_METHOD("canvas_item_set_z_as_relative_to_parent", "item", "enabled"), &VisualServer::canvas_item_set_z_as_relative_to_parent);
ClassDB::bind_method(D_METHOD("canvas_item_set_copy_to_backbuffer", "item", "enabled", "rect"), &VisualServer::canvas_item_set_copy_to_backbuffer);
ClassDB::bind_method(D_METHOD("canvas_item_clear", "item"), &VisualServer::canvas_item_clear);
diff --git a/servers/visual_server.h b/servers/visual_server.h
index e1def0b713..eb2c56cd3a 100644
--- a/servers/visual_server.h
+++ b/servers/visual_server.h
@@ -847,7 +847,7 @@ public:
virtual void canvas_item_add_set_transform(RID p_item, const Transform2D &p_transform) = 0;
virtual void canvas_item_add_clip_ignore(RID p_item, bool p_ignore) = 0;
virtual void canvas_item_set_sort_children_by_y(RID p_item, bool p_enable) = 0;
- virtual void canvas_item_set_z(RID p_item, int p_z) = 0;
+ virtual void canvas_item_set_z_index(RID p_item, int p_z) = 0;
virtual void canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable) = 0;
virtual void canvas_item_set_copy_to_backbuffer(RID p_item, bool p_enable, const Rect2 &p_rect) = 0;