summaryrefslogtreecommitdiff
path: root/scene/main/canvas_item.h
diff options
context:
space:
mode:
authorHendrik Brucker <hendrik.brucker@mail.de>2022-11-29 17:11:06 +0100
committerHendrik Brucker <hendrik.brucker@mail.de>2022-11-29 17:11:22 +0100
commite84f45fc9365b069b1ec5aff37c0c454ec72b55e (patch)
tree12f794c992ad0975325c82bbeea1d7393ef44cc5 /scene/main/canvas_item.h
parentd930b308836af09ea3e3bf4b689ac436977db940 (diff)
Move z_index, z_as_relative and y_sort_enabled from Node2D to CanvasItem
Diffstat (limited to 'scene/main/canvas_item.h')
-rw-r--r--scene/main/canvas_item.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/scene/main/canvas_item.h b/scene/main/canvas_item.h
index 4e78a175dc..4ace982825 100644
--- a/scene/main/canvas_item.h
+++ b/scene/main/canvas_item.h
@@ -91,6 +91,10 @@ private:
int light_mask = 1;
uint32_t visibility_layer = 1;
+ int z_index = 0;
+ bool z_relative = true;
+ bool y_sort_enabled = false;
+
Window *window = nullptr;
bool visible = true;
bool parent_visible_in_tree = false;
@@ -230,6 +234,17 @@ public:
void set_visibility_layer_bit(uint32_t p_visibility_layer, bool p_enable);
bool get_visibility_layer_bit(uint32_t p_visibility_layer) const;
+ /* ORDERING */
+
+ void set_z_index(int p_z);
+ int get_z_index() const;
+
+ void set_z_as_relative(bool p_enabled);
+ bool is_z_relative() const;
+
+ virtual void set_y_sort_enabled(bool p_enabled);
+ virtual bool is_y_sort_enabled() const;
+
/* DRAWING API */
void draw_dashed_line(const Point2 &p_from, const Point2 &p_to, const Color &p_color, real_t p_width = 1.0, real_t p_dash = 2.0);