Polish: README, AI disclosure, scoped Hellion ImGui style
Replace the inherited upstream README with a Hellion-specific one that lists the privacy/retention/cleanup/export features, links to upstream and the relevant unanswered filtering issues, documents the EUPL-1.2 license relationship, and acknowledges Infi & Anna for the Chat 2 engine that everything builds on. Add AI_DISCLOSURE.md with the goatcorp Pair classification, an explicit list of what AI is and is not used for in this fork (translations, visual assets and license-sensitive boundaries are handled by the maintainer), and the tooling list. Drops in before v0.1 so it's already in place when the repo goes public. HellionStyle.Push() returns a disposable bundle of ImGui color pushes (cyan-teal accents on a deep-slate frame with steel borders) and pops them in reverse on Dispose. Privacy tab and the first-run wizard wrap their Draw with `using var _style = HellionStyle.Push()` so only Hellion-owned surfaces get the HUD-flavored palette while upstream Chat 2 tabs render in their original style — important so cherry-picks from upstream don't fight with our color overrides.
This commit is contained in:
@@ -41,6 +41,8 @@ public sealed class FirstRunWizard : Window
|
||||
|
||||
public override void Draw()
|
||||
{
|
||||
using var _style = HellionStyle.Push();
|
||||
|
||||
ImGui.TextWrapped(HellionStrings.Wizard_Intro);
|
||||
ImGui.Spacing();
|
||||
ImGui.Separator();
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
using ChatTwo.Util;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
|
||||
namespace ChatTwo.Ui;
|
||||
|
||||
/// <summary>
|
||||
/// Local ImGui style override applied inside Hellion-owned settings surfaces
|
||||
/// (Privacy tab, first-run wizard). Industrial HUD palette: deep slate
|
||||
/// background with cyan-teal accents and sharper geometric framing. Scoped
|
||||
/// via using-blocks so upstream Chat 2 tabs render in their original style.
|
||||
/// </summary>
|
||||
internal static class HellionStyle
|
||||
{
|
||||
// Palette — kept central so a future theme switch only edits one file.
|
||||
private const uint AccentRgba = 0xFF00B8D4; // cyan-teal accent
|
||||
private const uint AccentHoverRgba = 0xFF26C6DA;
|
||||
private const uint AccentActiveRgba = 0xFF00838F;
|
||||
private const uint FrameBgRgba = 0xFF102027; // deep slate
|
||||
private const uint FrameBgHoverRgba = 0xFF1B2C36;
|
||||
private const uint FrameBgActiveRgba = 0xFF263A45;
|
||||
private const uint BorderRgba = 0xFF37474F; // steel border
|
||||
private const uint HeaderRgba = 0xFF1B2C36;
|
||||
private const uint HeaderHoverRgba = 0xFF263A45;
|
||||
private const uint HeaderActiveRgba = 0xFF324A57;
|
||||
private const uint TitleBgActiveRgba = 0xFF00838F;
|
||||
private const uint CheckMarkRgba = 0xFF00B8D4;
|
||||
private const uint SliderGrabRgba = 0xFF00B8D4;
|
||||
private const uint SliderGrabActiveRgba = 0xFF26C6DA;
|
||||
|
||||
/// <summary>
|
||||
/// Push the Hellion color stack. Returns a disposable bundle that pops
|
||||
/// every color in reverse order on Dispose. Use inside a `using` block.
|
||||
/// </summary>
|
||||
internal static IDisposable Push()
|
||||
{
|
||||
var stack = new StackHandle();
|
||||
// Order matters less than count: each PushColor needs a matching pop.
|
||||
stack.Add(ImRaii.PushColor(ImGuiCol.Button, ColourUtil.RgbaToAbgr(AccentRgba)));
|
||||
stack.Add(ImRaii.PushColor(ImGuiCol.ButtonHovered, ColourUtil.RgbaToAbgr(AccentHoverRgba)));
|
||||
stack.Add(ImRaii.PushColor(ImGuiCol.ButtonActive, ColourUtil.RgbaToAbgr(AccentActiveRgba)));
|
||||
stack.Add(ImRaii.PushColor(ImGuiCol.FrameBg, ColourUtil.RgbaToAbgr(FrameBgRgba)));
|
||||
stack.Add(ImRaii.PushColor(ImGuiCol.FrameBgHovered, ColourUtil.RgbaToAbgr(FrameBgHoverRgba)));
|
||||
stack.Add(ImRaii.PushColor(ImGuiCol.FrameBgActive, ColourUtil.RgbaToAbgr(FrameBgActiveRgba)));
|
||||
stack.Add(ImRaii.PushColor(ImGuiCol.Border, ColourUtil.RgbaToAbgr(BorderRgba)));
|
||||
stack.Add(ImRaii.PushColor(ImGuiCol.Header, ColourUtil.RgbaToAbgr(HeaderRgba)));
|
||||
stack.Add(ImRaii.PushColor(ImGuiCol.HeaderHovered, ColourUtil.RgbaToAbgr(HeaderHoverRgba)));
|
||||
stack.Add(ImRaii.PushColor(ImGuiCol.HeaderActive, ColourUtil.RgbaToAbgr(HeaderActiveRgba)));
|
||||
stack.Add(ImRaii.PushColor(ImGuiCol.TitleBgActive, ColourUtil.RgbaToAbgr(TitleBgActiveRgba)));
|
||||
stack.Add(ImRaii.PushColor(ImGuiCol.CheckMark, ColourUtil.RgbaToAbgr(CheckMarkRgba)));
|
||||
stack.Add(ImRaii.PushColor(ImGuiCol.SliderGrab, ColourUtil.RgbaToAbgr(SliderGrabRgba)));
|
||||
stack.Add(ImRaii.PushColor(ImGuiCol.SliderGrabActive, ColourUtil.RgbaToAbgr(SliderGrabActiveRgba)));
|
||||
return stack;
|
||||
}
|
||||
|
||||
private sealed class StackHandle : IDisposable
|
||||
{
|
||||
private readonly List<IDisposable> _items = new(16);
|
||||
|
||||
internal void Add(IDisposable d) => _items.Add(d);
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Pop in reverse order so the ImGui stack unwinds cleanly.
|
||||
for (var i = _items.Count - 1; i >= 0; i--)
|
||||
_items[i].Dispose();
|
||||
_items.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,6 +66,8 @@ internal sealed class Privacy : ISettingsTab
|
||||
|
||||
public void Draw(bool changed)
|
||||
{
|
||||
using var _style = HellionStyle.Push();
|
||||
|
||||
if (ImGui.Button(HellionStrings.Wizard_Reopen_Button))
|
||||
Plugin.FirstRunWizard.IsOpen = true;
|
||||
ImGui.Spacing();
|
||||
|
||||
Reference in New Issue
Block a user