feat: disable sort on changelog tab (#963)

This commit is contained in:
Aireil 2022-08-21 18:51:46 +02:00 committed by GitHub
parent c515d249fe
commit d59eec195e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,7 +45,7 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
private readonly List<int> openPluginCollapsibles = new(); private readonly List<int> openPluginCollapsibles = new();
private readonly DateTime timeLoaded; private readonly DateTime timeLoaded;
#region Image Tester State #region Image Tester State
private string[] testerImagePaths = new string[5]; private string[] testerImagePaths = new string[5];
@ -226,7 +226,9 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
/// </summary> /// </summary>
public void OpenPluginChangelogs() public void OpenPluginChangelogs()
{ {
// Changelog group
this.categoryManager.CurrentGroupIdx = 3; this.categoryManager.CurrentGroupIdx = 3;
// Plugins category
this.categoryManager.CurrentCategoryIdx = 2; this.categoryManager.CurrentCategoryIdx = 2;
this.IsOpen = true; this.IsOpen = true;
} }
@ -400,6 +402,11 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
if (searchTextChanged) if (searchTextChanged)
this.UpdateCategoriesOnSearchChange(); this.UpdateCategoriesOnSearchChange();
// Changelog group
var isSortDisabled = this.categoryManager.CurrentGroupIdx == 3;
if (isSortDisabled)
ImGui.BeginDisabled();
ImGui.SameLine(); ImGui.SameLine();
ImGui.SetCursorPosY(downShift); ImGui.SetCursorPosY(downShift);
ImGui.SetNextItemWidth(selectableWidth); ImGui.SetNextItemWidth(selectableWidth);
@ -418,6 +425,9 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
ImGui.EndCombo(); ImGui.EndCombo();
} }
if (isSortDisabled)
ImGui.EndDisabled();
} }
private void DrawFooter() private void DrawFooter()