diff options
Diffstat (limited to 'scene/gui/tree.h')
-rw-r--r-- | scene/gui/tree.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/scene/gui/tree.h b/scene/gui/tree.h index f3c88eb5ac..b179c5bcba 100644 --- a/scene/gui/tree.h +++ b/scene/gui/tree.h @@ -66,7 +66,7 @@ private: TreeCellMode mode; - Ref<Texture> icon; + Ref<Texture2D> icon; Rect2i icon_region; String text; String suffix; @@ -97,7 +97,7 @@ private: struct Button { int id; bool disabled; - Ref<Texture> texture; + Ref<Texture2D> texture; Color color; String tooltip; Button() { @@ -112,7 +112,7 @@ private: Cell() { - custom_draw_obj = 0; + custom_draw_obj = ObjectID(); custom_button = false; mode = TreeItem::CELL_MODE_STRING; min = 0; @@ -172,7 +172,7 @@ protected: remove_child(Object::cast_to<TreeItem>(p_child)); } - Variant _call_recursive_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error); + Variant _call_recursive_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error); public: /* cell mode */ @@ -189,8 +189,8 @@ public: void set_suffix(int p_column, String p_suffix); String get_suffix(int p_column) const; - void set_icon(int p_column, const Ref<Texture> &p_icon); - Ref<Texture> get_icon(int p_column) const; + void set_icon(int p_column, const Ref<Texture2D> &p_icon); + Ref<Texture2D> get_icon(int p_column) const; void set_icon_region(int p_column, const Rect2 &p_icon_region); Rect2 get_icon_region(int p_column) const; @@ -201,14 +201,14 @@ public: void set_icon_max_width(int p_column, int p_max); int get_icon_max_width(int p_column) const; - void add_button(int p_column, const Ref<Texture> &p_button, int p_id = -1, bool p_disabled = false, const String &p_tooltip = ""); + void add_button(int p_column, const Ref<Texture2D> &p_button, int p_id = -1, bool p_disabled = false, const String &p_tooltip = ""); int get_button_count(int p_column) const; String get_button_tooltip(int p_column, int p_idx) const; - Ref<Texture> get_button(int p_column, int p_idx) const; + Ref<Texture2D> get_button(int p_column, int p_idx) const; int get_button_id(int p_column, int p_idx) const; void erase_button(int p_column, int p_idx); int get_button_by_id(int p_column, int p_id) const; - void set_button(int p_column, int p_idx, const Ref<Texture> &p_button); + void set_button(int p_column, int p_idx, const Ref<Texture2D> &p_button); void set_button_color(int p_column, int p_idx, const Color &p_color); void set_button_disabled(int p_column, int p_idx, bool p_disabled); bool is_button_disabled(int p_column, int p_idx) const; @@ -282,7 +282,7 @@ public: void set_disable_folding(bool p_disable); bool is_folding_disabled() const; - void call_recursive(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); + void call_recursive(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); ~TreeItem(); }; @@ -374,7 +374,7 @@ private: int compute_item_height(TreeItem *p_item) const; int get_item_height(TreeItem *p_item) const; - //void draw_item_text(String p_text,const Ref<Texture>& p_icon,int p_icon_max_w,bool p_tool,Rect2i p_rect,const Color& p_color); + //void draw_item_text(String p_text,const Ref<Texture2D>& p_icon,int p_icon_max_w,bool p_tool,Rect2i p_rect,const Color& p_color); void draw_item_rect(const TreeItem::Cell &p_cell, const Rect2i &p_rect, const Color &p_color, const Color &p_icon_color); int draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2 &p_draw_size, TreeItem *p_item); void select_single_item(TreeItem *p_selected, TreeItem *p_current, int p_col, TreeItem *p_prev = NULL, bool *r_in_range = NULL, bool p_force_deselect = false); @@ -416,12 +416,12 @@ private: Color title_button_color; - Ref<Texture> checked; - Ref<Texture> unchecked; - Ref<Texture> arrow_collapsed; - Ref<Texture> arrow; - Ref<Texture> select_arrow; - Ref<Texture> updown; + Ref<Texture2D> checked; + Ref<Texture2D> unchecked; + Ref<Texture2D> arrow_collapsed; + Ref<Texture2D> arrow; + Ref<Texture2D> select_arrow; + Ref<Texture2D> updown; Color font_color; Color font_color_selected; |