aboutsummaryrefslogtreecommitdiff
path: root/editor/editor_data.cpp
diff options
context:
space:
mode:
authorvolzhs2017-06-16 00:30:03 +0900
committervolzhs2017-06-16 13:21:05 +0900
commitfc2fe7ebd1ed54318ca82a3d20bb8892d9bd7fd2 (patch)
tree1c008c9e41f6c45f2d369f3382604bfce8bdf657 /editor/editor_data.cpp
parent95c248e24fb6094160f9c71140402305b57469ab (diff)
downloadgodot-fc2fe7ebd1ed54318ca82a3d20bb8892d9bd7fd2.tar.gz
godot-fc2fe7ebd1ed54318ca82a3d20bb8892d9bd7fd2.tar.zst
godot-fc2fe7ebd1ed54318ca82a3d20bb8892d9bd7fd2.zip
Enhance scene tabs
- show scene thumbnail on hover - resize if has many tabs - show full scene file name with current edited scene - can be customized EditorSettings > Interface > Scene Tab - close scene with mouse middle button
Diffstat (limited to 'editor/editor_data.cpp')
-rw-r--r--editor/editor_data.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index 31c1402c8..58ffa223f 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -675,7 +675,12 @@ String EditorData::get_scene_title(int p_idx) const {
return "[empty]";
if (edited_scene[p_idx].root->get_filename() == "")
return "[unsaved]";
- return edited_scene[p_idx].root->get_filename().get_file();
+ bool show_ext = EDITOR_DEF("interface/scene_tabs/show_extension", false);
+ String name = edited_scene[p_idx].root->get_filename().get_file();
+ if (!show_ext) {
+ name = name.get_basename();
+ }
+ return name;
}
String EditorData::get_scene_path(int p_idx) const {