add "*" to editor settings window title when settings are dirty

This commit is contained in:
Saas
2025-10-16 21:05:10 +02:00
parent e19be4c0c6
commit 5ec2476aec

View File

@@ -45,7 +45,7 @@ namespace FlaxEditor.Windows
{
Parent = this
};
_saveButton = (ToolStripButton)toolstrip.AddButton(editor.Icons.Save64, SaveData).LinkTooltip("Save");
_saveButton = (ToolStripButton)toolstrip.AddButton(editor.Icons.Save64, SaveData).LinkTooltip("Save.");
_saveButton.Enabled = false;
_tabs = new Tabs
@@ -104,6 +104,8 @@ namespace FlaxEditor.Windows
{
_saveButton.Enabled = true;
_isDataDirty = true;
if (!Title.EndsWith('*'))
Title += "*";
}
}
@@ -113,6 +115,8 @@ namespace FlaxEditor.Windows
{
_saveButton.Enabled = false;
_isDataDirty = false;
if (Title.EndsWith('*'))
Title = Title.Remove(Title.Length - 1);
}
}