diff --git a/ActionTimelineEx/Windows/SettingsWindow.cs b/ActionTimelineEx/Windows/SettingsWindow.cs index 1865675..04b0e11 100644 --- a/ActionTimelineEx/Windows/SettingsWindow.cs +++ b/ActionTimelineEx/Windows/SettingsWindow.cs @@ -41,7 +41,6 @@ public override void Draw() ImGui.EndTabItem(); } - HashSet showedName = new HashSet(); int index = 0; DrawingSettings? removingSetting = null; @@ -49,13 +48,7 @@ public override void Draw() foreach (var setting in Settings.TimelineSettings) { - var duplicated = showedName.Contains(setting.Name); - if (duplicated) ImGui.PushStyleColor(ImGuiCol.Text, ImGui.ColorConvertFloat4ToU32(ImGuiColors.DPSRed)); - - var showTab = ImGui.BeginTabItem($"TL:{index}"); - if (duplicated) ImGui.PopStyleColor(); - - if (showTab) + if (ImGui.BeginTabItem($"TL:{index}")) { if (DrawTimelineSetting(setting)) { @@ -63,8 +56,6 @@ public override void Draw() } ImGui.EndTabItem(); } - - showedName.Add(setting.Name); index++; } @@ -135,10 +126,6 @@ private void DrawGeneralSetting() ImGui.DragIntRange2("Clipping Range", ref Settings.PrintClippingMin, ref Settings.PrintClippingMax); } - //ImGui.NewLine(); - - //ImGui.DragFloat("Status checking delay (seconds)", ref Settings.StatusCheckDelay, 0.01f, 0, 1); - ImGui.NewLine(); var index = 0; @@ -318,7 +305,7 @@ private bool RemoveValue(string name) private bool DrawGeneralTab(DrawingSettings settings) { ImGui.InputText("Name: ", ref settings.Name, 32); - var result = RemoveValue(settings.Name); + var result = Plugin.Settings.TimelineSettings.Any() ? RemoveValue(settings.Name) : false; ImGui.Checkbox("Enable", ref settings.Enable); ImGui.Checkbox("Is Rotation", ref settings.IsRotation);