diff --git a/src/AcDream.Plugins.MossTank/AcDream.Plugins.MossTank.csproj b/src/AcDream.Plugins.MossTank/AcDream.Plugins.MossTank.csproj index 92abd08a0..b593eb88b 100644 --- a/src/AcDream.Plugins.MossTank/AcDream.Plugins.MossTank.csproj +++ b/src/AcDream.Plugins.MossTank/AcDream.Plugins.MossTank.csproj @@ -22,6 +22,12 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + diff --git a/src/AcDream.Plugins.MossTank/MossTankPanel.cs b/src/AcDream.Plugins.MossTank/MossTankPanel.cs index 3e58f0c3b..185052e5d 100644 --- a/src/AcDream.Plugins.MossTank/MossTankPanel.cs +++ b/src/AcDream.Plugins.MossTank/MossTankPanel.cs @@ -347,17 +347,23 @@ internal sealed partial class MossTankPanel public bool RouteTabEnabled => true; public bool MetaTabEnabled => true; - public bool OptionsVisible => OptionsSelected - && !_lootEditorVisible - && !_advancedOptionsVisible; - public bool ProfilesVisible => ProfilesSelected && !_lootEditorVisible; - public bool VitalsVisible => VitalsSelected && !_lootEditorVisible; - public bool MonstersVisible => MonstersSelected && !_lootEditorVisible; - public bool ItemsVisible => ItemsSelected && !_lootEditorVisible; - public bool ConsumablesVisible => ConsumablesSelected && !_lootEditorVisible; - public bool BuffsVisible => BuffsSelected && !_lootEditorVisible; - public bool RouteVisible => RouteSelected && !_lootEditorVisible; - public bool MetaVisible => MetaSelected && !_lootEditorVisible; + // Fix round A (2026-09-07): Advanced Options / Loot Editor used to be + // in-panel groups sharing this SAME window with the nine normal tabs, + // so a tab's own content had to hide while a popup was open to avoid + // drawing both at once. Now that both popups are their own separate + // plugin panels (MossTankPlugin.cs, mosstank-advanced.xml / + // mosstank-loot-editor.xml), they no longer share screen space with + // any tab body, so these guards are gone — a tab stays visible + // (or not) purely by tab selection again. + public bool OptionsVisible => OptionsSelected; + public bool ProfilesVisible => ProfilesSelected; + public bool VitalsVisible => VitalsSelected; + public bool MonstersVisible => MonstersSelected; + public bool ItemsVisible => ItemsSelected; + public bool ConsumablesVisible => ConsumablesSelected; + public bool BuffsVisible => BuffsSelected; + public bool RouteVisible => RouteSelected; + public bool MetaVisible => MetaSelected; public bool LootEditorVisible => _lootEditorVisible; public bool AdvancedOptionsVisible => _advancedOptionsVisible; public IReadOnlyList AdvancedOptionNames => VtankOptionCatalog.Names; diff --git a/src/AcDream.Plugins.MossTank/MossTankPlugin.cs b/src/AcDream.Plugins.MossTank/MossTankPlugin.cs index 40f5fa461..bf8b565f4 100644 --- a/src/AcDream.Plugins.MossTank/MossTankPlugin.cs +++ b/src/AcDream.Plugins.MossTank/MossTankPlugin.cs @@ -52,6 +52,38 @@ public sealed class MossTankPlugin : IAcDreamPlugin Path.Combine(directory, "mosstank.xml"), _panel); + // Fix round A (2026-09-07): Advanced Options / Loot Editor were + // in-panel groups sharing the main window (forcing it to 350px + // tall with dead space under the nine normal tabs); they are now + // their own plugin panels, matching VTank's own separate popup + // windows (docs/research/vtank-kb/08-ui-views.md §1's secondary- + // view table). ShowInSidePanel=false — VTank's popups have no + // independent shelf/taskbar entry, they only exist while opened + // from the Options/Profiles tab checkbox + // (AdvancedOptionsVisible/LootEditorVisible). Each popup's own + // binding is the SAME flag the checkbox + // flips and the popup's own "Back" button clears, so closing the + // popup unchecks the box for free — no new IUiRegistry show/hide + // API needed (MarkupDocument.Build already re-evaluates a root + // 's VisibleSource every frame; see the two files' own + // header comments). + _host.Ui.AddPanel( + new PluginPanelDescriptor("advanced-options", "MossTank Advanced Options") + { + StartVisible = false, + ShowInSidePanel = false, + }, + Path.Combine(directory, "mosstank-advanced.xml"), + _panel); + _host.Ui.AddPanel( + new PluginPanelDescriptor("loot-editor", "MossTank Loot Editor") + { + StartVisible = false, + ShowInSidePanel = false, + }, + Path.Combine(directory, "mosstank-loot-editor.xml"), + _panel); + _commandRegistration = _host.Commands.Register( "vt", _panel.ExecuteVtankCommand); diff --git a/src/AcDream.Plugins.MossTank/mosstank-advanced.xml b/src/AcDream.Plugins.MossTank/mosstank-advanced.xml new file mode 100644 index 000000000..f8917bc64 --- /dev/null +++ b/src/AcDream.Plugins.MossTank/mosstank-advanced.xml @@ -0,0 +1,44 @@ + + + +