aboutsummaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorDmitry Koteroff2017-12-18 01:16:11 +0300
committerDmitry Koteroff2017-12-18 03:40:49 +0300
commitea14b0789b8442a930a4464e7e17a3473e2e221d (patch)
tree2ccf16a12d9cab2dc9abd3b178847423ff12f263 /scene
parent90d95c7ee17b94736045555f1810a2a920fd3b33 (diff)
downloadgodot-ea14b0789b8442a930a4464e7e17a3473e2e221d.tar.gz
godot-ea14b0789b8442a930a4464e7e17a3473e2e221d.tar.zst
godot-ea14b0789b8442a930a4464e7e17a3473e2e221d.zip
A few small Debugger->Errors tab enhancements:
1. Added "Clear" button to clear list. 2. Errors list now populated with newest items comes first, so no need to scroll everytime. 3. Added PopupMenu to errors list with ability to quickly Copy error text & details.
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/item_list.cpp9
-rw-r--r--scene/gui/item_list.h4
2 files changed, 13 insertions, 0 deletions
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 197e474fd..37f09481b 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -930,6 +930,9 @@ void ItemList::_notification(int p_what) {
scroll_bar->hide();
} else {
scroll_bar->show();
+
+ if (do_autoscroll_to_bottom)
+ scroll_bar->set_value(max);
}
break;
}
@@ -1313,6 +1316,11 @@ Size2 ItemList::get_minimum_size() const {
return Size2();
}
+void ItemList::set_autoscroll_to_bottom(const bool p_enable) {
+
+ do_autoscroll_to_bottom = p_enable;
+}
+
void ItemList::set_auto_height(bool p_enable) {
auto_height = p_enable;
@@ -1466,6 +1474,7 @@ ItemList::ItemList() {
ensure_selected_visible = false;
defer_select_single = -1;
allow_rmb_select = false;
+ do_autoscroll_to_bottom = false;
icon_scale = 1.0f;
set_clip_contents(true);
diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h
index b1e1e5eeb..19a53f2cf 100644
--- a/scene/gui/item_list.h
+++ b/scene/gui/item_list.h
@@ -107,6 +107,8 @@ private:
real_t icon_scale;
+ bool do_autoscroll_to_bottom;
+
Array _get_items() const;
void _set_items(const Array &p_items);
@@ -212,6 +214,8 @@ public:
Size2 get_minimum_size() const;
+ void set_autoscroll_to_bottom(const bool p_enable);
+
VScrollBar *get_v_scroll() { return scroll_bar; }
ItemList();