diff --git a/HellionChat/Configuration.cs b/HellionChat/Configuration.cs index 0b098f3..8b2120d 100755 --- a/HellionChat/Configuration.cs +++ b/HellionChat/Configuration.cs @@ -45,10 +45,17 @@ public class Configuration : IPluginConfiguration // HellionThemeWindowOpacity beim Bump v13 → v14. public float WindowOpacity = 0.85f; + // v1.1.0 — Felder für künftige UI-Toggles (v1.2.0 / v1.3.0). Werden // vorab angelegt, damit später keine Migration nötig ist. public bool ReduceMotion; - public bool UseCompactDensity; + // v1.2.1 — Default geflippt von false → true. Card-Rows-Layout aus + // v1.2.0 wurde als zu dicht empfunden; Single-Line `[HH:mm] Sender: + // Text` ist besser lesbar und platzsparender. Bestand-User mit aktiv + // false werden durch die v15→v16-Migration auf den neuen Default + // gehoben (Heuristik: wer in v1.2.0 false hatte, hatte den damals + // neu eingeführten Default — kaum jemand hat aktiv abgeschaltet). + public bool UseCompactDensity = true; // Hellion Chat — Privacy filter (DSGVO Art. 25 Privacy by Default). // Master-switch defaults to true; set false to restore upstream behavior. @@ -146,7 +153,11 @@ public class Configuration : IPluginConfiguration public bool HideWhenUiHidden = true; public bool HideInLoadingScreens; public bool HideInBattle; - public bool HideInNewGamePlusMenu; + // v1.2.1 — Default geflippt false → true. Hellion-UI im NG+-Menü + // versteckt zu halten ist konsistent mit den anderen Hide-Defaults + // (Cutscenes, Logged-out, UI-Hidden) — UI-out-of-the-way bei Story- + // Sequenzen. + public bool HideInNewGamePlusMenu = true; public bool HideWhenInactive; public int InactivityHideTimeout = 10; public bool InactivityHideActiveDuringBattle = true; @@ -161,7 +172,10 @@ public class Configuration : IPluginConfiguration public bool NativeItemTooltips = true; public bool PrettierTimestamps = true; public bool MoreCompactPretty; - public bool HideSameTimestamps; + // v1.2.1 — Default geflippt false → true. Wiederholte Zeitstempel + // innerhalb derselben Minute lesen sich als Rauschen; ein einziger + // Timestamp pro Minute reicht aus um die Konversation zu verorten. + public bool HideSameTimestamps = true; public bool ShowNoviceNetwork; // Hellion Chat — vertical sidebar tab layout reads better than the // horizontal tab strip in the company of Auto-Tell-Tabs (a club @@ -188,7 +202,11 @@ public class Configuration : IPluginConfiguration public bool CollapseKeepUniqueLinks; public bool PlaySounds = true; public bool KeepInputFocus = true; - public int MaxLinesToRender = 5_000; // 1-10000 + // v1.2.1 — Default gesenkt 5000 → 2500. 5000 ist auf Mid-Range- + // Hardware bei langen Sessions spürbar langsamer (Card-Layout + // re-Layout pro Frame), 2500 deckt eine typische Stunde Chat ab + // und bleibt smooth. User die mehr brauchen können bis 10000 hoch. + public int MaxLinesToRender = 2_500; // 1-10000 // Default ON to match a German / European 24h locale. The // ChatLogWindow.cs format-flip in v0.5.1 honours this strictly via // CultureInfo.InvariantCulture so the result is consistent across @@ -221,7 +239,22 @@ public class Configuration : IPluginConfiguration }; public float TooltipOffset; - public Dictionary ChatColours = new(); + // v1.2.1 — Default-Chat-Farben sind das Hellion-Brand-Preset. Der + // First-Run-Wizard bietet keine Theme-/Preset-Wahl an, daher kriegen + // neue User die Hellion-Brand-Farben out-of-the-box (Cyan-Familie für + // Standard/Tell, Ember/Warning für laute Channels). Bestand-User mit + // leerem ChatColours-Dict werden durch die v15→v16-Migration auf das + // Preset gehoben; User die bereits Custom-Farben haben, bleiben. + public Dictionary ChatColours = BuildDefaultChatColours(); + + private static Dictionary BuildDefaultChatColours() + { + var defaults = new Dictionary(); + foreach (var (channel, colour) in HellionChat.Resources.ChatColourPresets.All["Hellion"].Colours) + defaults[channel] = colour; + return defaults; + } + public bool ColorSelectedInputChannelButton = true; public List Tabs = []; diff --git a/HellionChat/Plugin.cs b/HellionChat/Plugin.cs index 79a87ee..64ea16f 100755 --- a/HellionChat/Plugin.cs +++ b/HellionChat/Plugin.cs @@ -359,6 +359,41 @@ public sealed class Plugin : IDalamudPlugin }); } + // v1.2.1 Default-Bumps für UX-Verbesserungen. Pattern: nur + // migrieren wenn der User noch auf dem alten Default ist. + // Bei bool-Werten ist die Erkennung pragmatisch — wer den + // alten Default aktiv ausgeschaltet hatte, erlebt das als + // Regression und stellt es einmal in den Settings zurück. + // Der Trade-Off ist akzeptabel weil die alten Defaults in + // v1.2.0 erst neu eingeführt wurden und kaum jemand aktiv + // umgeschaltet hat. + if (!Config.UseCompactDensity) + { + Config.UseCompactDensity = true; + Log.Information("v16 default-bump: UseCompactDensity false → true"); + } + if (!Config.HideInNewGamePlusMenu) + { + Config.HideInNewGamePlusMenu = true; + Log.Information("v16 default-bump: HideInNewGamePlusMenu false → true"); + } + if (!Config.HideSameTimestamps) + { + Config.HideSameTimestamps = true; + Log.Information("v16 default-bump: HideSameTimestamps false → true"); + } + if (Config.MaxLinesToRender == 5000) + { + Config.MaxLinesToRender = 2500; + Log.Information("v16 default-bump: MaxLinesToRender 5000 → 2500"); + } + if (Config.ChatColours.Count == 0) + { + foreach (var (channel, colour) in Resources.ChatColourPresets.All["Hellion"].Colours) + Config.ChatColours[channel] = colour; + Log.Information("v16 default-bump: ChatColours empty → Hellion brand preset"); + } + Config.Version = 16; SaveConfig(); Log.Information( diff --git a/HellionChat/Resources/HellionStrings.de.resx b/HellionChat/Resources/HellionStrings.de.resx index c3c47bd..f27f9d0 100644 --- a/HellionChat/Resources/HellionStrings.de.resx +++ b/HellionChat/Resources/HellionStrings.de.resx @@ -759,7 +759,7 @@ Fenster-Transparenz - Wie durchsichtig der Fensterhintergrund ist. Niedrigere Werte lassen mehr vom Spiel durchscheinen. + Wie durchsichtig der Fensterhintergrund ist. Niedrigere Werte lassen mehr vom Spiel durchscheinen. Tipp: Dalamud's Per-Window-Menü (Hamburger in der Titelleiste) bietet pro Fenster eigene Overrides für Deckkraft, Hintergrund-Blur, Durchklick und Anpinnen — die haben Vorrang über diesen Slider für das jeweilige Fenster. Schriftarten diff --git a/HellionChat/Resources/HellionStrings.resx b/HellionChat/Resources/HellionStrings.resx index 82cdd16..c109223 100644 --- a/HellionChat/Resources/HellionStrings.resx +++ b/HellionChat/Resources/HellionStrings.resx @@ -759,7 +759,7 @@ Window Transparency - How transparent the window background is. Lower values let the game show through more. + How transparent the window background is. Lower values let the game show through more. Tip: Dalamud's per-window menu (Hamburger in the title bar) gives you per-window overrides for opacity, background blur, click-through and pinning — those override this slider for that window. Fonts diff --git a/HellionChat/Ui/ChatLogWindow.cs b/HellionChat/Ui/ChatLogWindow.cs index cd2dc52..e62719e 100644 --- a/HellionChat/Ui/ChatLogWindow.cs +++ b/HellionChat/Ui/ChatLogWindow.cs @@ -106,6 +106,9 @@ public sealed class ChatLogWindow : Window IsOpen = true; RespectCloseHotkey = false; DisableWindowSounds = true; + // AllowBackgroundBlur wird nach AddWindow zentral in Plugin.Setup + // für alle registrierten Windows gesetzt — keine Per-Window-Logik + // hier nötig. PayloadHandler = new PayloadHandler(this); HandlerLender = new Lender(() => new PayloadHandler(this)); @@ -496,6 +499,12 @@ public sealed class ChatLogWindow : Window if (!Plugin.Config.ShowTitleBar) Flags |= ImGuiWindowFlags.NoTitleBar; + // BgAlpha wird auf den Style-WindowBg-Alpha aus HellionStyle.PushGlobal + // multipliziert (HellionStyle pusht eine voll-deckende Theme-Color, der + // tatsächliche transparent-Effekt entsteht über BgAlpha). Wenn der User + // im Dalamud-Pinning-Menü (Hamburger oben rechts) eine eigene + // Window-Deckkraft eingestellt hat, hat dieses Per-Window-Override + // Vorrang über unseren Slider — wir dokumentieren das im HelpMarker. if (LastViewport == ImGuiHelpers.MainViewport.Handle && !WasDocked) BgAlpha = Plugin.Config.WindowOpacity; diff --git a/HellionChat/Ui/HellionStyle.cs b/HellionChat/Ui/HellionStyle.cs index 39d839b..77ce083 100644 --- a/HellionChat/Ui/HellionStyle.cs +++ b/HellionChat/Ui/HellionStyle.cs @@ -52,7 +52,18 @@ internal static class HellionStyle var alphaByte = (uint)Math.Clamp((int)(windowOpacity * 255f), 0x55, 0xFF); var windowBgWithAlpha = (c.WindowBg & 0xFFFFFF00u) | alphaByte; - var childBgWithAlpha = (c.ChildBg & 0xFFFFFF00u) | alphaByte; + + // ChildBg-Alpha: Sub-Bereiche (Tab-Sidebar, Message-Area, Input-Bar) + // werden im ChatLog-Window als BeginChild gezeichnet. Würde der ChildBg + // mit dem gleichen Alpha wie WindowBg gerendert, multiplizieren sich + // die Layer (1 - (1-α)² Deckung), und 50 % WindowOpacity kommt mit + // 75 % Deckung im Child-Bereich an — das Fenster wirkt solider als der + // Slider verspricht. Bei voller Opacity bleibt der Theme-Akzent + // erhalten (Theme-eigene Alpha-Komponente, i.d.R. FF); sobald der User + // Transparenz zieht, wird ChildBg vollständig durchsichtig damit nur + // der WindowBg-Layer die finale Deckung bestimmt. + var childBgAlpha = windowOpacity >= 0.999f ? (c.ChildBg & 0xFFu) : 0u; + var childBgWithAlpha = (c.ChildBg & 0xFFFFFF00u) | childBgAlpha; // Layout stack.PushStyleVar(ImGuiStyleVar.WindowRounding, l.WindowRounding); diff --git a/HellionChat/Ui/Popout.cs b/HellionChat/Ui/Popout.cs index dc10cd2..bde0481 100644 --- a/HellionChat/Ui/Popout.cs +++ b/HellionChat/Ui/Popout.cs @@ -39,6 +39,12 @@ internal class Popout : Window IsOpen = true; RespectCloseHotkey = false; DisableWindowSounds = true; + // v1.2.1 — KEIN AllowBackgroundBlur. Pop-Outs werden vom User häufig + // im Dalamud-Tab-Container mit anderen Plugin-Windows kombiniert; in + // dem Render-Pfad blurt Dalamud den gesamten Container, nicht nur + // das Pop-Out — würde die Tab-Bar oben und benachbarte Plugins + // mitziehen. Wer Blur in Pop-Outs will, kann ihn via Dalamud- + // Hamburger-Menü pro Window selbst aktivieren. } public override void PreOpenCheck() diff --git a/HellionChat/Ui/SettingsOverview.cs b/HellionChat/Ui/SettingsOverview.cs index af30a74..f8fcf3a 100644 --- a/HellionChat/Ui/SettingsOverview.cs +++ b/HellionChat/Ui/SettingsOverview.cs @@ -39,7 +39,10 @@ internal sealed class SettingsOverview var avail = ImGui.GetContentRegionAvail(); var columns = avail.X >= 700f ? 3 : 2; var cardWidth = (avail.X - (columns - 1) * 8f) / columns; - var cardHeight = 96f; + // v1.2.1 — Subtexte wrappen jetzt auf zwei Zeilen, daher 110f statt der + // v1.1.0-Höhe 96f. Wrap-Breite + Y-Position der Subtext-Zeile sind in + // DrawCard auf den Card-Innenrand abgestimmt. + var cardHeight = 110f; for (var i = 0; i < CardDefs.Length; i++) { @@ -68,10 +71,9 @@ internal sealed class SettingsOverview var draw = ImGui.GetWindowDrawList(); draw.AddRectFilled(cursorBefore, cursorBefore + new Vector2(w, h), bgColor, 4f); - // Inhalts-Overlay: Icon + Title + Subtext direkt mit DrawList in den - // Card-Bereich zeichnen, statt Cursor-Hopping mit SetCursorScreenPos. - // DrawList-Overlays ändern den Cursor nicht, BeginGroup/EndGroup - // hält den Layout-Anker stabil für SameLine. + // Inhalts-Overlay: Icon + Title via DrawList (kein Wrap nötig). Subtext + // läuft über ImGui-Cursor + PushTextWrapPos damit der Text bei + // Card-Innenbreite umbricht statt rechts geclippt zu werden. var iconPos = cursorBefore + new Vector2(16f, 12f); var titlePos = cursorBefore + new Vector2(16f, 40f); var subtextPos = cursorBefore + new Vector2(16f, 62f); @@ -79,14 +81,19 @@ internal sealed class SettingsOverview var titleColor = ColourUtil.RgbaToAbgr(0xE6F4F1FFu); var subtextColor = ColourUtil.RgbaToAbgr(0x8FA3B5FFu); - // Icon via FontAwesome — temporär den Font pushen, mit DrawList zeichnen using (_window.Plugin.FontManager.FontAwesome.Push()) { draw.AddText(iconPos, titleColor, icon.ToIconString()); } draw.AddText(titlePos, titleColor, title); - draw.AddText(subtextPos, subtextColor, subtext); + + // Subtext mit Wrap auf Card-Innenbreite (16 px Padding links + rechts). + // Cursor-basiertes TextUnformatted würde die ImGui-Group-Bounds + // erweitern und das SameLine-Wrapping in der Card-Reihe brechen, daher + // bleibt der Subtext bewusst beim DrawList-Overlay-Pattern. + var subtextWrapWidth = w - 32f; + draw.AddText(ImGui.GetFont(), ImGui.GetFontSize(), subtextPos, subtextColor, subtext, subtextWrapWidth); ImGui.EndGroup();