summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorneikeq <ignalfonsore@gmail.com>2015-12-04 19:33:30 +0100
committerneikeq <ignalfonsore@gmail.com>2015-12-04 19:33:30 +0100
commit71eaa2d547082212d32f78eb4d9580a276a0510f (patch)
tree3f5744d058fc12f9a34c01edeeb1dbf8736531b1 /tools
parent35fa048af555e1f8411a2034706e9e452ce2f399 (diff)
Add refresh button to file dialogs
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/editor_file_dialog.cpp5
-rw-r--r--tools/editor/editor_file_dialog.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/tools/editor/editor_file_dialog.cpp b/tools/editor/editor_file_dialog.cpp
index c62347d129..66b38e2f0c 100644
--- a/tools/editor/editor_file_dialog.cpp
+++ b/tools/editor/editor_file_dialog.cpp
@@ -27,6 +27,7 @@ void EditorFileDialog::_notification(int p_what) {
dir_prev->set_icon(get_icon("ArrowLeft","EditorIcons"));
dir_next->set_icon(get_icon("ArrowRight","EditorIcons"));
dir_up->set_icon(get_icon("ArrowUp","EditorIcons"));
+ refresh->set_icon(get_icon("Reload","EditorIcons"));
favorite->set_icon(get_icon("Favorites","EditorIcons"));
fav_up->set_icon(get_icon("MoveUp","EditorIcons"));
@@ -1170,6 +1171,10 @@ EditorFileDialog::EditorFileDialog() {
pathhb->add_child(dir);
dir->set_h_size_flags(SIZE_EXPAND_FILL);
+ refresh = memnew( ToolButton );
+ refresh->connect("pressed",this,"_update_file_list");
+ pathhb->add_child(refresh);
+
favorite = memnew( ToolButton );
favorite->set_toggle_mode(true);
favorite->connect("toggled",this,"_favorite_toggled");
diff --git a/tools/editor/editor_file_dialog.h b/tools/editor/editor_file_dialog.h
index 6cfd970516..eb38c3c02f 100644
--- a/tools/editor/editor_file_dialog.h
+++ b/tools/editor/editor_file_dialog.h
@@ -108,6 +108,7 @@ private:
ToolButton *mode_list;
+ ToolButton *refresh;
ToolButton *favorite;
ToolButton *fav_up;