config: pivot pop-out input from per-tab to global master switch

This commit is contained in:
2026-05-03 13:01:07 +02:00
parent 2c79a67dae
commit 9e1f559644
5 changed files with 23 additions and 22 deletions
+8 -5
View File
@@ -108,6 +108,13 @@ public class Configuration : IPluginConfiguration
// pop-out window; never reset after that.
public bool SeenPopOutInputHint;
// Hellion Chat — v0.6.0 master switch for the pop-out input bar.
// Global on purpose: per-tab makes no sense for Auto-Tell-Tabs which
// are session-only and would force the user to re-enable it for every
// new conversation. Default OFF so existing users see no behavior
// change after the v10→v11 migration.
public bool PopOutInputEnabled;
public int GetRetentionDays(ChatType type)
{
if (RetentionPerChannelDays.TryGetValue(type, out var userOverride))
@@ -303,6 +310,7 @@ public class Configuration : IPluginConfiguration
AutoTellTabsShowGreetedToggle = other.AutoTellTabsShowGreetedToggle;
SeenPopOutInputHint = other.SeenPopOutInputHint;
PopOutInputEnabled = other.PopOutInputEnabled;
}
}
@@ -350,10 +358,6 @@ public class Tab
public bool DisplayTimestamp = true;
public InputChannel? Channel;
public bool PopOut;
// Hellion Chat — v0.6.0 opt-in input bar inside the pop-out window for
// this tab. Independent text buffer and channel state per pop-out;
// history is shared with the main window via InputHistoryService.
public bool PopOutInputEnabled;
public bool IndependentOpacity;
public float Opacity = 100f;
public bool InputDisabled;
@@ -434,7 +438,6 @@ public class Tab
DisplayTimestamp = DisplayTimestamp,
Channel = Channel,
PopOut = PopOut,
PopOutInputEnabled = PopOutInputEnabled,
IndependentOpacity = IndependentOpacity,
Opacity = Opacity,
Identifier = Identifier,
+6 -7
View File
@@ -152,19 +152,18 @@ public sealed class Plugin : IDalamudPlugin
});
}
// Hellion Chat v10 → v11 — adds Tab.PopOutInputEnabled and
// Configuration.SeenPopOutInputHint for the v0.6.0 pop-out input
// feature. Lightweight migration: defaults the new fields, no
// user-facing notification because the change is opt-in only.
// Hellion Chat v10 → v11 — adds the global Configuration.PopOutInputEnabled
// master switch and SeenPopOutInputHint flag for the v0.6.0 pop-out
// input feature. Lightweight migration: defaults both fields,
// no user-facing notification because the change is opt-in only.
if (Config.Version < 11)
{
foreach (var tab in Config.Tabs)
tab.PopOutInputEnabled = false;
Config.PopOutInputEnabled = false;
Config.SeenPopOutInputHint = false;
Config.Version = 11;
SaveConfig();
Log.Information(
"Migrated config v10 → v11: PopOutInputEnabled added per tab (default off), " +
"Migrated config v10 → v11: PopOutInputEnabled added (global, default off), " +
"SeenPopOutInputHint added (default false)");
}
+4 -4
View File
@@ -107,9 +107,9 @@ internal class Popout : Window
// v0.6.0 — pop-out optional input bar. Reserve height first so the
// message log draws into the right region; only shown when the
// per-tab toggle is on. Toggle-OFF resets InputBar so the next
// toggle-ON gives a fresh buffer (no stale text persists).
var inputEnabled = Tab.PopOutInputEnabled;
// global master switch is on. Toggle-OFF resets InputBar so the
// next toggle-ON gives a fresh buffer (no stale text persists).
var inputEnabled = Plugin.Config.PopOutInputEnabled;
if (!inputEnabled && InputBar != null)
{
InputBar = null;
@@ -145,7 +145,7 @@ internal class Popout : Window
return 0f;
// Inline strings — i18n keys follow in Task 29 (Phase E).
const string hintText = "Neu in v0.6.0: Du kannst jetzt direkt im Pop-Out tippen. Pro Tab in den Tab-Settings aktivieren.";
const string hintText = "Neu in v0.6.0: Du kannst jetzt direkt im Pop-Out tippen. Master-Switch in den Fenster-Settings aktivieren.";
const string ackLabel = "Verstanden";
const string openLabel = "Tab-Settings öffnen";
-6
View File
@@ -96,12 +96,6 @@ internal sealed class Tabs : ISettingsTab
if (tab.PopOut)
{
using var _ = ImRaii.PushIndent(10.0f);
// v0.6.0 — Pop-Out optional input bar. Inline strings; i18n
// keys follow in Task 29 (Phase E).
ImGui.Checkbox("Eingabe im Pop-Out aktivieren", ref tab.PopOutInputEnabled);
ImGuiUtil.HelpMarker("Erlaubt direktes Tippen und Absenden im Pop-Out-Fenster dieses Tabs. Jedes Pop-Out hat einen eigenen Text-Buffer; Channel-Wechsel wirkt global wie im Hauptfenster.");
ImGui.Spacing();
ImGui.Checkbox(Language.Options_Tabs_IndependentOpacity, ref tab.IndependentOpacity);
if (tab.IndependentOpacity)
ImGuiUtil.DragFloatVertical(Language.Options_Tabs_Opacity, ref tab.Opacity, 0.25f, 0f, 100f, $"{tab.Opacity:N2}%%", ImGuiSliderFlags.AlwaysClamp);
+5
View File
@@ -133,6 +133,11 @@ internal sealed class Window : ISettingsTab
ImGui.Checkbox(Language.Options_ShowPopOutTitleBar_Name, ref Mutable.ShowPopOutTitleBar);
// v0.6.0 — global master switch for the pop-out input bar.
// Inline strings; i18n keys follow in Task 29 (Phase E).
ImGui.Checkbox("Eingabe in Pop-Outs aktivieren", ref Mutable.PopOutInputEnabled);
ImGuiUtil.HelpMarker("Master-Switch: erlaubt direktes Tippen und Absenden in jedem Pop-Out-Fenster (inkl. Auto-Tell-Tabs). Channel-Wechsel im Pop-Out wirkt global wie im Hauptfenster; Text-Buffer und History-Cursor sind pro Pop-Out unabhängig.");
ImGui.Checkbox(Language.Options_ShowHideButton_Name, ref Mutable.ShowHideButton);
ImGuiUtil.HelpMarker(Language.Options_ShowHideButton_Description);