mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
disable search and sort when in profile editor
This commit is contained in:
parent
ea01e62936
commit
ffb0a0c41d
1 changed files with 42 additions and 41 deletions
|
|
@ -15,6 +15,7 @@ using Dalamud.Game.Command;
|
|||
using Dalamud.Interface.Colors;
|
||||
using Dalamud.Interface.Components;
|
||||
using Dalamud.Interface.Internal.Notifications;
|
||||
using Dalamud.Interface.Raii;
|
||||
using Dalamud.Interface.Style;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Logging.Internal;
|
||||
|
|
@ -482,6 +483,9 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
|
||||
ImGui.SetCursorPosX(windowSize.X - sortSelectWidth - (style.ItemSpacing.X * 2) - searchInputWidth - searchClearButtonWidth);
|
||||
|
||||
// Disable search if profile editor
|
||||
using (ImRaii.Disabled(this.categoryManager.CurrentCategoryIdx == 14))
|
||||
{
|
||||
var searchTextChanged = false;
|
||||
ImGui.SetNextItemWidth(searchInputWidth);
|
||||
searchTextChanged |= ImGui.InputTextWithHint(
|
||||
|
|
@ -502,12 +506,11 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
|
||||
if (searchTextChanged)
|
||||
this.UpdateCategoriesOnSearchChange();
|
||||
}
|
||||
|
||||
// Changelog group
|
||||
var isSortDisabled = this.categoryManager.CurrentGroupIdx == 3;
|
||||
if (isSortDisabled)
|
||||
ImGui.BeginDisabled();
|
||||
|
||||
// Disable sort if changelogs or profile editor
|
||||
using (ImRaii.Disabled(this.categoryManager.CurrentGroupIdx == 3 || this.categoryManager.CurrentCategoryIdx == 14))
|
||||
{
|
||||
ImGui.SameLine();
|
||||
ImGui.SetCursorPosY(downShift);
|
||||
ImGui.SetNextItemWidth(selectableWidth);
|
||||
|
|
@ -527,9 +530,7 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
|
||||
ImGui.EndCombo();
|
||||
}
|
||||
|
||||
if (isSortDisabled)
|
||||
ImGui.EndDisabled();
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawFooter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue