diff options
Diffstat (limited to 'scene/gui/tree.h')
-rw-r--r-- | scene/gui/tree.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/gui/tree.h b/scene/gui/tree.h index 3200459b5a..17ea31a733 100644 --- a/scene/gui/tree.h +++ b/scene/gui/tree.h @@ -60,6 +60,7 @@ private: TreeCellMode mode = TreeItem::CELL_MODE_STRING; Ref<Texture2D> icon; + Ref<Texture2D> icon_overlay; Rect2i icon_region; String text; String xl_text; @@ -136,6 +137,7 @@ private: TreeItem *prev = nullptr; // previous in list TreeItem *next = nullptr; // next in list TreeItem *first_child = nullptr; + TreeItem *last_child = nullptr; Vector<TreeItem *> children_cache; bool is_root = false; // for tree root @@ -177,6 +179,9 @@ private: if (parent->first_child == this) { parent->first_child = next; } + if (parent->last_child == this) { + parent->last_child = prev; + } } } @@ -253,6 +258,9 @@ public: void set_icon(int p_column, const Ref<Texture2D> &p_icon); Ref<Texture2D> get_icon(int p_column) const; + void set_icon_overlay(int p_column, const Ref<Texture2D> &p_icon_overlay); + Ref<Texture2D> get_icon_overlay(int p_column) const; + void set_icon_region(int p_column, const Rect2 &p_icon_region); Rect2 get_icon_region(int p_column) const; |