summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/dialogs.cpp4
-rw-r--r--scene/gui/item_list.cpp34
-rw-r--r--scene/gui/item_list.h8
-rw-r--r--scene/gui/label.cpp16
-rw-r--r--scene/gui/line_edit.cpp6
-rw-r--r--scene/gui/popup_menu.cpp12
-rw-r--r--scene/gui/range.cpp6
-rw-r--r--scene/gui/rich_text_label.cpp2
-rw-r--r--scene/gui/spin_box.cpp2
-rw-r--r--scene/gui/tabs.cpp13
-rw-r--r--scene/gui/tabs.h6
-rw-r--r--scene/gui/text_edit.cpp4
-rw-r--r--scene/gui/texture_progress.cpp12
-rw-r--r--scene/gui/texture_rect.cpp4
-rw-r--r--scene/gui/tree.cpp2
15 files changed, 96 insertions, 35 deletions
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index 8885bec03c..7d7c636bc2 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -584,6 +584,8 @@ Button *ConfirmationDialog::get_cancel() {
ConfirmationDialog::ConfirmationDialog() {
set_title(RTR("Please Confirm..."));
- set_custom_minimum_size(Size2(200, 70));
+#ifdef TOOLS_ENABLED
+ set_custom_minimum_size(Size2(200, 70) * EDSCALE);
+#endif
cancel = add_cancel();
}
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index eff9d801b6..97f49da2be 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "item_list.h"
-#include "project_settings.h"
#include "os/os.h"
+#include "project_settings.h"
void ItemList::add_item(const String &p_item, const Ref<Texture> &p_texture, bool p_selectable) {
@@ -743,12 +743,10 @@ void ItemList::_notification(int p_what) {
Size2 size = get_size();
- float page = size.height - bg->get_minimum_size().height;
int width = size.width - bg->get_minimum_size().width;
if (scroll_bar->is_visible()) {
width -= mw + bg->get_margin(MARGIN_RIGHT);
}
- scroll_bar->set_page(page);
draw_style_box(bg, Rect2(Point2(), size));
@@ -883,8 +881,12 @@ void ItemList::_notification(int p_what) {
}
if (all_fit) {
+ float page = size.height - bg->get_minimum_size().height;
float max = MAX(page, ofs.y + max_h);
+ if (auto_height)
+ auto_height_value = ofs.y + max_h + bg->get_minimum_size().height;
scroll_bar->set_max(max);
+ scroll_bar->set_page(page);
//print_line("max: "+rtos(max)+" page "+rtos(page));
if (max <= page) {
scroll_bar->set_value(0);
@@ -1253,6 +1255,26 @@ Array ItemList::_get_items() const {
return items;
}
+Size2 ItemList::get_minimum_size() const {
+
+ if (auto_height) {
+ return Size2(0, auto_height_value);
+ }
+ return Size2();
+}
+
+void ItemList::set_auto_height(bool p_enable) {
+
+ auto_height = p_enable;
+ shape_changed = true;
+ update();
+}
+
+bool ItemList::has_auto_height() const {
+
+ return auto_height;
+}
+
void ItemList::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_item", "text", "icon:Texture", "selectable"), &ItemList::add_item, DEFVAL(Variant()), DEFVAL(true));
@@ -1323,6 +1345,9 @@ void ItemList::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_allow_rmb_select", "allow"), &ItemList::set_allow_rmb_select);
ClassDB::bind_method(D_METHOD("get_allow_rmb_select"), &ItemList::get_allow_rmb_select);
+ ClassDB::bind_method(D_METHOD("set_auto_height", "enable"), &ItemList::set_auto_height);
+ ClassDB::bind_method(D_METHOD("has_auto_height"), &ItemList::has_auto_height);
+
ClassDB::bind_method(D_METHOD("get_item_at_pos", "pos", "exact"), &ItemList::get_item_at_pos, DEFVAL(false));
ClassDB::bind_method(D_METHOD("ensure_current_is_visible"), &ItemList::ensure_current_is_visible);
@@ -1340,6 +1365,7 @@ void ItemList::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "select_mode", PROPERTY_HINT_ENUM, "Single,Multi"), "set_select_mode", "get_select_mode");
ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "allow_rmb_select"), "set_allow_rmb_select", "get_allow_rmb_select");
ADD_PROPERTYNO(PropertyInfo(Variant::INT, "max_text_lines"), "set_max_text_lines", "get_max_text_lines");
+ ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "auto_height"), "set_auto_height", "has_auto_height");
ADD_GROUP("Columns", "");
ADD_PROPERTYNO(PropertyInfo(Variant::INT, "max_columns"), "set_max_columns", "get_max_columns");
ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "same_column_width"), "set_same_column_width", "is_same_column_width");
@@ -1372,6 +1398,8 @@ ItemList::ItemList() {
same_column_width = false;
max_text_lines = 1;
max_columns = 1;
+ auto_height = false;
+ auto_height_value = 0.0f;
scroll_bar = memnew(VScrollBar);
add_child(scroll_bar);
diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h
index 9cb7016b60..137eff8885 100644
--- a/scene/gui/item_list.h
+++ b/scene/gui/item_list.h
@@ -78,6 +78,9 @@ private:
bool ensure_selected_visible;
bool same_column_width;
+ bool auto_height;
+ float auto_height_value;
+
Vector<Item> items;
Vector<int> separators;
@@ -198,6 +201,11 @@ public:
void set_icon_scale(real_t p_scale);
real_t get_icon_scale() const;
+ void set_auto_height(bool p_enable);
+ bool has_auto_height() const;
+
+ Size2 get_minimum_size() const;
+
VScrollBar *get_v_scroll() { return scroll_bar; }
ItemList();
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 159d81eb09..589ba9e538 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "label.h"
-#include "project_settings.h"
#include "print_string.h"
+#include "project_settings.h"
#include "translation.h"
void Label::set_autowrap(bool p_autowrap) {
@@ -292,7 +292,7 @@ void Label::_notification(int p_what) {
Size2 Label::get_minimum_size() const {
if (autowrap)
- return Size2(1, 1);
+ return Size2(1, clip ? 1 : minsize.height);
else {
// don't want to mutable everything
@@ -487,13 +487,13 @@ void Label::regenerate_word_cache() {
}
}
- if (!autowrap) {
+ if (!autowrap)
minsize.width = width;
- if (max_lines_visible > 0 && line_count > max_lines_visible) {
- minsize.height = (font->get_height() * max_lines_visible) + (line_spacing * (max_lines_visible - 1));
- } else {
- minsize.height = (font->get_height() * line_count) + (line_spacing * (line_count - 1));
- }
+
+ if (max_lines_visible > 0 && line_count > max_lines_visible) {
+ minsize.height = (font->get_height() * max_lines_visible) + (line_spacing * (max_lines_visible - 1));
+ } else {
+ minsize.height = (font->get_height() * line_count) + (line_spacing * (line_count - 1));
}
word_cache_dirty = false;
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index adcf86357d..f4dd3e92cd 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -628,6 +628,12 @@ void LineEdit::_notification(int p_what) {
font_color.a *= placeholder_alpha;
font_color.a *= disabled_alpha;
+ if (has_icon("right_icon")) {
+ Ref<Texture> r_icon = Control::get_icon("right_icon");
+ ofs_max -= r_icon->get_width();
+ r_icon->draw(ci, Point2(width - r_icon->get_width() - x_ofs, y_ofs), Color(1, 1, 1, disabled_alpha * .9));
+ }
+
int caret_height = font->get_height() > y_area ? y_area : font->get_height();
while (true) {
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index 864fb3d3d5..f59a2e06eb 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -1075,19 +1075,19 @@ void PopupMenu::clear_autohide_areas() {
void PopupMenu::_bind_methods() {
ClassDB::bind_method(D_METHOD("_gui_input"), &PopupMenu::_gui_input);
- ClassDB::bind_method(D_METHOD("add_icon_item", "texture", "label", "id", "accel"), &PopupMenu::add_icon_item, DEFVAL(-1), DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("add_icon_item", "texture:Texture", "label", "id", "accel"), &PopupMenu::add_icon_item, DEFVAL(-1), DEFVAL(0));
ClassDB::bind_method(D_METHOD("add_item", "label", "id", "accel"), &PopupMenu::add_item, DEFVAL(-1), DEFVAL(0));
- ClassDB::bind_method(D_METHOD("add_icon_check_item", "texture", "label", "id", "accel"), &PopupMenu::add_icon_check_item, DEFVAL(-1), DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("add_icon_check_item", "texture:Texture", "label", "id", "accel"), &PopupMenu::add_icon_check_item, DEFVAL(-1), DEFVAL(0));
ClassDB::bind_method(D_METHOD("add_check_item", "label", "id", "accel"), &PopupMenu::add_check_item, DEFVAL(-1), DEFVAL(0));
ClassDB::bind_method(D_METHOD("add_submenu_item", "label", "submenu", "id"), &PopupMenu::add_submenu_item, DEFVAL(-1));
- ClassDB::bind_method(D_METHOD("add_icon_shortcut", "texture", "shortcut:ShortCut", "id", "global"), &PopupMenu::add_icon_shortcut, DEFVAL(-1), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("add_icon_shortcut", "texture:Texture", "shortcut:ShortCut", "id", "global"), &PopupMenu::add_icon_shortcut, DEFVAL(-1), DEFVAL(false));
ClassDB::bind_method(D_METHOD("add_shortcut", "shortcut:ShortCut", "id", "global"), &PopupMenu::add_shortcut, DEFVAL(-1), DEFVAL(false));
- ClassDB::bind_method(D_METHOD("add_icon_check_shortcut", "texture", "shortcut:ShortCut", "id", "global"), &PopupMenu::add_icon_check_shortcut, DEFVAL(-1), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("add_icon_check_shortcut", "texture:Texture", "shortcut:ShortCut", "id", "global"), &PopupMenu::add_icon_check_shortcut, DEFVAL(-1), DEFVAL(false));
ClassDB::bind_method(D_METHOD("add_check_shortcut", "shortcut:ShortCut", "id", "global"), &PopupMenu::add_check_shortcut, DEFVAL(-1), DEFVAL(false));
ClassDB::bind_method(D_METHOD("set_item_text", "idx", "text"), &PopupMenu::set_item_text);
- ClassDB::bind_method(D_METHOD("set_item_icon", "idx", "icon"), &PopupMenu::set_item_icon);
+ ClassDB::bind_method(D_METHOD("set_item_icon", "idx", "icon:Texture"), &PopupMenu::set_item_icon);
ClassDB::bind_method(D_METHOD("set_item_checked", "idx", "checked"), &PopupMenu::set_item_checked);
ClassDB::bind_method(D_METHOD("set_item_ID", "idx", "id"), &PopupMenu::set_item_ID);
ClassDB::bind_method(D_METHOD("set_item_accelerator", "idx", "accel"), &PopupMenu::set_item_accelerator);
@@ -1102,7 +1102,7 @@ void PopupMenu::_bind_methods() {
ClassDB::bind_method(D_METHOD("toggle_item_checked", "idx"), &PopupMenu::toggle_item_checked);
ClassDB::bind_method(D_METHOD("get_item_text", "idx"), &PopupMenu::get_item_text);
- ClassDB::bind_method(D_METHOD("get_item_icon", "idx"), &PopupMenu::get_item_icon);
+ ClassDB::bind_method(D_METHOD("get_item_icon:Texture", "idx"), &PopupMenu::get_item_icon);
ClassDB::bind_method(D_METHOD("is_item_checked", "idx"), &PopupMenu::is_item_checked);
ClassDB::bind_method(D_METHOD("get_item_ID", "idx"), &PopupMenu::get_item_ID);
ClassDB::bind_method(D_METHOD("get_item_index", "id"), &PopupMenu::get_item_index);
diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp
index 7158592bb1..6bec365dcf 100644
--- a/scene/gui/range.cpp
+++ b/scene/gui/range.cpp
@@ -234,7 +234,7 @@ void Range::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_exp_ratio", "enabled"), &Range::set_exp_ratio);
ClassDB::bind_method(D_METHOD("is_ratio_exp"), &Range::is_ratio_exp);
- ClassDB::bind_method(D_METHOD("share", "with"), &Range::_share);
+ ClassDB::bind_method(D_METHOD("share", "with:Node"), &Range::_share);
ClassDB::bind_method(D_METHOD("unshare"), &Range::unshare);
ADD_SIGNAL(MethodInfo("value_changed", PropertyInfo(Variant::REAL, "value")));
@@ -273,8 +273,8 @@ Range::Range() {
shared = memnew(Shared);
shared->min = 0;
shared->max = 100;
- shared->val =
- shared->step = 1;
+ shared->val = 0;
+ shared->step = 1;
shared->page = 0;
shared->owners.insert(this);
shared->exp_ratio = false;
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index c6b8398736..9f71fa070c 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -1855,7 +1855,7 @@ void RichTextLabel::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_text", "text"), &RichTextLabel::set_text);
ClassDB::bind_method(D_METHOD("add_image", "image:Texture"), &RichTextLabel::add_image);
ClassDB::bind_method(D_METHOD("newline"), &RichTextLabel::add_newline);
- ClassDB::bind_method(D_METHOD("remove_line"), &RichTextLabel::remove_line);
+ ClassDB::bind_method(D_METHOD("remove_line", "line"), &RichTextLabel::remove_line);
ClassDB::bind_method(D_METHOD("push_font", "font:Font"), &RichTextLabel::push_font);
ClassDB::bind_method(D_METHOD("push_color", "color"), &RichTextLabel::push_color);
ClassDB::bind_method(D_METHOD("push_align", "align"), &RichTextLabel::push_align);
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index c5b9df15b9..1ba6e6e4bd 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -253,7 +253,7 @@ void SpinBox::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_editable", "editable"), &SpinBox::set_editable);
ClassDB::bind_method(D_METHOD("is_editable"), &SpinBox::is_editable);
ClassDB::bind_method(D_METHOD("_line_edit_focus_exit"), &SpinBox::_line_edit_focus_exit);
- ClassDB::bind_method(D_METHOD("get_line_edit"), &SpinBox::get_line_edit);
+ ClassDB::bind_method(D_METHOD("get_line_edit:LineEdit"), &SpinBox::get_line_edit);
ClassDB::bind_method(D_METHOD("_line_edit_input"), &SpinBox::_line_edit_input);
ClassDB::bind_method(D_METHOD("_range_click_timeout"), &SpinBox::_range_click_timeout);
diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp
index ee0ae1fb41..c477a3156f 100644
--- a/scene/gui/tabs.cpp
+++ b/scene/gui/tabs.cpp
@@ -630,6 +630,7 @@ int Tabs::get_tab_idx_at_point(const Point2 &p_point) const {
void Tabs::set_tab_align(TabAlign p_align) {
+ ERR_FAIL_INDEX(p_align, ALIGN_MAX);
tab_align = p_align;
update();
}
@@ -764,10 +765,17 @@ Rect2 Tabs::get_tab_rect(int p_tab) const {
}
void Tabs::set_tab_close_display_policy(CloseButtonDisplayPolicy p_policy) {
+
+ ERR_FAIL_INDEX(p_policy, CLOSE_BUTTON_MAX);
cb_displaypolicy = p_policy;
update();
}
+Tabs::CloseButtonDisplayPolicy Tabs::get_tab_close_display_policy() const {
+
+ return cb_displaypolicy;
+}
+
void Tabs::set_min_width(int p_width) {
min_width = p_width;
}
@@ -791,6 +799,8 @@ void Tabs::_bind_methods() {
ClassDB::bind_method(D_METHOD("ensure_tab_visible", "idx"), &Tabs::ensure_tab_visible);
ClassDB::bind_method(D_METHOD("get_tab_rect", "tab_idx"), &Tabs::get_tab_rect);
ClassDB::bind_method(D_METHOD("move_tab", "from", "to"), &Tabs::move_tab);
+ ClassDB::bind_method(D_METHOD("set_tab_close_display_policy", "policy"), &Tabs::set_tab_close_display_policy);
+ ClassDB::bind_method(D_METHOD("get_tab_close_display_policy"), &Tabs::get_tab_close_display_policy);
ADD_SIGNAL(MethodInfo("tab_changed", PropertyInfo(Variant::INT, "tab")));
ADD_SIGNAL(MethodInfo("right_button_pressed", PropertyInfo(Variant::INT, "tab")));
@@ -799,14 +809,17 @@ void Tabs::_bind_methods() {
ADD_SIGNAL(MethodInfo("reposition_active_tab_request", PropertyInfo(Variant::INT, "idx_to")));
ADD_PROPERTY(PropertyInfo(Variant::INT, "current_tab", PROPERTY_HINT_RANGE, "-1,4096,1", PROPERTY_USAGE_EDITOR), "set_current_tab", "get_current_tab");
+ ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "tab_close_display_policy", PROPERTY_HINT_ENUM, "Show Never,Show Active Only,Show Always"), "set_tab_close_display_policy", "get_tab_close_display_policy");
BIND_CONSTANT(ALIGN_LEFT);
BIND_CONSTANT(ALIGN_CENTER);
BIND_CONSTANT(ALIGN_RIGHT);
+ BIND_CONSTANT(ALIGN_MAX);
BIND_CONSTANT(CLOSE_BUTTON_SHOW_ACTIVE_ONLY);
BIND_CONSTANT(CLOSE_BUTTON_SHOW_ALWAYS);
BIND_CONSTANT(CLOSE_BUTTON_SHOW_NEVER);
+ BIND_CONSTANT(CLOSE_BUTTON_MAX);
}
Tabs::Tabs() {
diff --git a/scene/gui/tabs.h b/scene/gui/tabs.h
index a9dd6bddd7..86ad128dcd 100644
--- a/scene/gui/tabs.h
+++ b/scene/gui/tabs.h
@@ -41,7 +41,8 @@ public:
ALIGN_LEFT,
ALIGN_CENTER,
- ALIGN_RIGHT
+ ALIGN_RIGHT,
+ ALIGN_MAX
};
enum CloseButtonDisplayPolicy {
@@ -49,6 +50,7 @@ public:
CLOSE_BUTTON_SHOW_NEVER,
CLOSE_BUTTON_SHOW_ACTIVE_ONLY,
CLOSE_BUTTON_SHOW_ALWAYS,
+ CLOSE_BUTTON_MAX
};
private:
@@ -122,6 +124,7 @@ public:
void move_tab(int from, int to);
void set_tab_close_display_policy(CloseButtonDisplayPolicy p_policy);
+ CloseButtonDisplayPolicy get_tab_close_display_policy() const;
int get_tab_count() const;
void set_current_tab(int p_current);
@@ -142,5 +145,6 @@ public:
};
VARIANT_ENUM_CAST(Tabs::TabAlign);
+VARIANT_ENUM_CAST(Tabs::CloseButtonDisplayPolicy);
#endif // TABS_H
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index c32dafc809..8baca50d32 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -33,8 +33,8 @@
#include "os/keyboard.h"
#include "os/os.h"
-#include "project_settings.h"
#include "message_queue.h"
+#include "project_settings.h"
#include "scene/main/viewport.h"
#define TAB_PIXELS
@@ -4597,7 +4597,7 @@ void TextEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_keyword_color", "keyword", "color"), &TextEdit::add_keyword_color);
ClassDB::bind_method(D_METHOD("add_color_region", "begin_key", "end_key", "color", "line_only"), &TextEdit::add_color_region, DEFVAL(false));
ClassDB::bind_method(D_METHOD("clear_colors"), &TextEdit::clear_colors);
- ClassDB::bind_method(D_METHOD("menu_option"), &TextEdit::menu_option);
+ ClassDB::bind_method(D_METHOD("menu_option", "option"), &TextEdit::menu_option);
ClassDB::bind_method(D_METHOD("get_menu:PopupMenu"), &TextEdit::get_menu);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "syntax_highlighting"), "set_syntax_coloring", "is_syntax_coloring_enabled");
diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp
index 081c7ddb73..40995b19fa 100644
--- a/scene/gui/texture_progress.cpp
+++ b/scene/gui/texture_progress.cpp
@@ -242,14 +242,14 @@ Point2 TextureProgress::get_radial_center_offset() {
void TextureProgress::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_under_texture", "tex"), &TextureProgress::set_under_texture);
- ClassDB::bind_method(D_METHOD("get_under_texture"), &TextureProgress::get_under_texture);
+ ClassDB::bind_method(D_METHOD("set_under_texture", "tex:Texture"), &TextureProgress::set_under_texture);
+ ClassDB::bind_method(D_METHOD("get_under_texture:Texture"), &TextureProgress::get_under_texture);
- ClassDB::bind_method(D_METHOD("set_progress_texture", "tex"), &TextureProgress::set_progress_texture);
- ClassDB::bind_method(D_METHOD("get_progress_texture"), &TextureProgress::get_progress_texture);
+ ClassDB::bind_method(D_METHOD("set_progress_texture", "tex:Texture"), &TextureProgress::set_progress_texture);
+ ClassDB::bind_method(D_METHOD("get_progress_texture:Texture"), &TextureProgress::get_progress_texture);
- ClassDB::bind_method(D_METHOD("set_over_texture", "tex"), &TextureProgress::set_over_texture);
- ClassDB::bind_method(D_METHOD("get_over_texture"), &TextureProgress::get_over_texture);
+ ClassDB::bind_method(D_METHOD("set_over_texture", "tex:Texture"), &TextureProgress::set_over_texture);
+ ClassDB::bind_method(D_METHOD("get_over_texture:Texture"), &TextureProgress::get_over_texture);
ClassDB::bind_method(D_METHOD("set_fill_mode", "mode"), &TextureProgress::set_fill_mode);
ClassDB::bind_method(D_METHOD("get_fill_mode"), &TextureProgress::get_fill_mode);
diff --git a/scene/gui/texture_rect.cpp b/scene/gui/texture_rect.cpp
index 92a3db6a74..9459002bc0 100644
--- a/scene/gui/texture_rect.cpp
+++ b/scene/gui/texture_rect.cpp
@@ -101,8 +101,8 @@ Size2 TextureRect::get_minimum_size() const {
}
void TextureRect::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_texture", "texture"), &TextureRect::set_texture);
- ClassDB::bind_method(D_METHOD("get_texture"), &TextureRect::get_texture);
+ ClassDB::bind_method(D_METHOD("set_texture", "texture:Texture"), &TextureRect::set_texture);
+ ClassDB::bind_method(D_METHOD("get_texture:Texture"), &TextureRect::get_texture);
ClassDB::bind_method(D_METHOD("set_expand", "enable"), &TextureRect::set_expand);
ClassDB::bind_method(D_METHOD("has_expand"), &TextureRect::has_expand);
ClassDB::bind_method(D_METHOD("set_stretch_mode", "stretch_mode"), &TextureRect::set_stretch_mode);
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 8527ead01f..1456ab51c0 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -710,7 +710,7 @@ void TreeItem::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_next_visible:TreeItem"), &TreeItem::get_next_visible);
ClassDB::bind_method(D_METHOD("get_prev_visible:TreeItem"), &TreeItem::get_prev_visible);
- ClassDB::bind_method(D_METHOD("remove_child:TreeItem", "child"), &TreeItem::_remove_child);
+ ClassDB::bind_method(D_METHOD("remove_child", "child"), &TreeItem::_remove_child);
ClassDB::bind_method(D_METHOD("set_selectable", "column", "selectable"), &TreeItem::set_selectable);
ClassDB::bind_method(D_METHOD("is_selectable", "column"), &TreeItem::is_selectable);