Account for relative z-indexes when y-sorting

This commit is contained in:
Xentripetal 2022-07-08 07:50:20 -05:00
parent d479eba7b4
commit f514b82fd3
3 changed files with 19 additions and 5 deletions

View file

@ -53,6 +53,7 @@ public:
Transform2D ysort_xform;
Vector2 ysort_pos;
int ysort_index;
int ysort_parent_abs_z_index; // Absolute Z index of parent. Only populated and used when y-sorting.
Vector<Item *> child_items;
@ -84,6 +85,7 @@ public:
ysort_xform = Transform2D();
ysort_pos = Vector2();
ysort_index = 0;
ysort_parent_abs_z_index = 0;
}
};