diff --git a/Penumbra/UI/TabInstalledDetails.cs b/Penumbra/UI/TabInstalledDetails.cs index 5e30c00a..077f01b3 100644 --- a/Penumbra/UI/TabInstalledDetails.cs +++ b/Penumbra/UI/TabInstalledDetails.cs @@ -377,9 +377,11 @@ namespace Penumbra.UI if (_selectedOption == null) SelectOption(); - DrawEditGroupSelector(); + if (!DrawEditGroupSelector()) + return; ImGui.SameLine(); - DrawEditOptionSelector(); + if (!DrawEditOptionSelector()) + return; ImGui.SameLine(); DrawAddToGroupButton(); ImGui.SameLine(); diff --git a/Penumbra/UI/TabInstalledDetailsEdit.cs b/Penumbra/UI/TabInstalledDetailsEdit.cs index 7cb026e9..6cdf0cca 100644 --- a/Penumbra/UI/TabInstalledDetailsEdit.cs +++ b/Penumbra/UI/TabInstalledDetailsEdit.cs @@ -15,7 +15,7 @@ namespace Penumbra.UI private const string LabelNewMultiGroup = "New Multi Group"; private const string LabelGamePathsEdit = "Game Paths"; private const string LabelGamePathsEditBox = "##gamePathsEdit"; - private const string TextNoOptionAvailable = "[No Option Available]"; + private const string TextNoOptionAvailable = "[Not Available]"; private const string ButtonAddToGroup = "Add to Group"; private const string ButtonRemoveFromGroup = "Remove from Group"; private const string TooltipAboutEdit = "Use Ctrl+Enter for newlines."; @@ -27,12 +27,13 @@ namespace Penumbra.UI private const float MultiEditBoxWidth = 300f; - private void DrawEditGroupSelector() + private bool DrawEditGroupSelector() { ImGui.SetNextItemWidth( OptionSelectionWidth ); if (Meta.Groups.Count == 0) { ImGui.Combo( LabelGroupSelect, ref _selectedGroupIndex, TextNoOptionAvailable, 1); + return false; } else { @@ -42,21 +43,23 @@ namespace Penumbra.UI SelectOption(0); } } + return true; } - private void DrawEditOptionSelector() + private bool DrawEditOptionSelector() { ImGui.SameLine(); ImGui.SetNextItemWidth( OptionSelectionWidth ); - if (_selectedGroup?.Options.Count == 0) + if ((_selectedGroup?.Options.Count ?? 0) == 0) { ImGui.Combo( LabelOptionSelect, ref _selectedOptionIndex, TextNoOptionAvailable, 1); - return; + return false; } var group = (InstallerInfo) _selectedGroup; if (ImGui.Combo( LabelOptionSelect, ref _selectedOptionIndex, group.Options.Select(O => O.OptionName).ToArray(), group.Options.Count)) SelectOption(); + return true; } private void DrawFileListTabEdit()