fix: require window to be open to be added
This commit is contained in:
parent
7e4db37b2a
commit
6cbe5b24a7
|
@ -930,8 +930,14 @@ namespace HUD_Manager {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui.BeginPopup(Popups.AddWindow)) {
|
if (ImGui.BeginPopup(Popups.AddWindow)) {
|
||||||
|
ImGui.TextUnformatted("Windows must be open to add them");
|
||||||
|
ImGui.Separator();
|
||||||
|
|
||||||
foreach (var window in WindowKindExt.All) {
|
foreach (var window in WindowKindExt.All) {
|
||||||
if (!ImGui.Selectable(window)) {
|
var addon = this.Plugin.Interface.Framework.Gui.GetAddonByName(window, 1);
|
||||||
|
var flags = addon?.Visible == true ? ImGuiSelectableFlags.None : ImGuiSelectableFlags.Disabled;
|
||||||
|
|
||||||
|
if (!ImGui.Selectable(window, false, flags)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue