Editor: Show name of open scene in window title

This commit is contained in:
Simon Lübeß
2024-01-12 15:41:56 +01:00
parent 827f3bb564
commit ba68eb7428
4 changed files with 32 additions and 3 deletions
+15 -1
View File
@@ -563,7 +563,19 @@ namespace GlitchyEditor
/// Updates the title of the window.
private void UpdateWindowTitle()
{
Application.Instance.Window.Title = scope $"Glitchy Engine - {_currentProject.Name}";
String title = scope String("Glitchy Engine");
if (_currentProject != null)
{
title.AppendF($" - {_currentProject.Name}");
}
if (_editorScene != null)
{
title.AppendF($" | {_editorScene.Name}");
}
Application.Instance.Window.Title = title;
}
#region Project Management
@@ -1047,6 +1059,8 @@ namespace GlitchyEditor
ScriptEngine.DeserializeScriptInstances(serializedObjects);
}
}
UpdateWindowTitle();
}
/// Creates a new default scene.