editor window title improvements
Shows the project name in the window title (good to differentiate multiple instances of Godot with different projects loaded). Clears the previous scene name from the window title when creating a new scene.
This commit is contained in:
parent
e1970a4dda
commit
c6df9d8a41
1 changed files with 6 additions and 3 deletions
|
@ -97,13 +97,14 @@ EditorNode *EditorNode::singleton=NULL;
|
|||
|
||||
void EditorNode::_update_title() {
|
||||
|
||||
String appname = Globals::get_singleton()->get("application/name");
|
||||
String title = appname.empty()?String(VERSION_FULL_NAME):String(_MKSTR(VERSION_NAME) + String(" - ") + appname);
|
||||
String edited = edited_scene?edited_scene->get_filename():String();
|
||||
|
||||
String title = edited.empty()?String(VERSION_FULL_NAME):String(_MKSTR(VERSION_NAME) + String(" - ")+edited.get_file());
|
||||
if (!edited.empty())
|
||||
title+=" - " + String(edited.get_file());
|
||||
if (unsaved_cache)
|
||||
title+=" (*)";
|
||||
|
||||
|
||||
OS::get_singleton()->set_window_title(title);
|
||||
|
||||
}
|
||||
|
@ -1589,6 +1590,8 @@ void EditorNode::_cleanup_scene() {
|
|||
|
||||
}
|
||||
|
||||
_update_title();
|
||||
|
||||
}
|
||||
|
||||
void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
|
||||
|
|
Loading…
Reference in a new issue