feat(engine): Display chrome, Vaulted gate, and chat 0x1C for sk release prep

Port tonight's local engine work onto standing sk (2026.10.5.71): borderless/layout Display settings, Navigation Vaulted Dungeons checkbox, and ILT channel chat typing.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
BlankenshipG 2026-10-16 00:55:13 -04:00
commit a1011c8fe7
20 changed files with 733 additions and 21 deletions

View file

@ -278,6 +278,10 @@ internal static class EngineFrameController
// in ImGui-off mode so Avalonia owner-window binding works.
EnsureCore(pDevice);
// Settings > Display: borderless windowed + restore AC placement (throttled).
try { UI.AcWindowChrome.Tick(_gameHwnd); }
catch (Exception ex) { RynthLog.UI($"AcWindowChrome.Tick threw {ex.GetType().Name}: {ex.Message}"); }
// Cache the D3D9 device function pointers used by Nav3DRenderInjector,
// RenderNav3D, and the always-on render path. This is a strict subset
// of what InitImGui needs and is safe to run without ImGui state.

View file

@ -512,6 +512,8 @@ internal static class ImGuiPanelHost
{
if (_restored) return;
_restored = true;
// Settings > Display "Remember open windows and positions" (default on).
if (!Plugins.EngineSettings.RememberWindowLayout) return;
List<string> titles = new();
// Script windows (dynamic) open when their owner says so, not from the saved state.
lock (Sync)

View file

@ -222,17 +222,26 @@ internal static class FaceKit
/// <summary>
/// One popup list per face, opened from any button: call Open from the
/// button's click and Draw once per frame at the end of the face's Draw
/// (outside any child window, so the popup id always matches).
/// (outside any child window, so the popup id always matches). Long lists
/// (Slayer Type's creature names, materials, long keys…) get a type-to-filter
/// box so players can pick by name instead of scrolling.
/// </summary>
internal sealed class Picker
{
/// <summary>Show the filter box when the list is at least this long.</summary>
private const int FilterAt = 12;
private const float FilterH = 22f;
private const float RowH = 20f;
private readonly string _popupId;
private readonly byte[] _filter = new byte[64];
private string[] _items = Array.Empty<string>();
private int _selected = -1;
private Action<int>? _onPick;
private Vector2 _pos;
private float _width = 220;
private bool _openRequested;
private bool _focusFilter;
public Picker(string popupId) => _popupId = popupId;
@ -244,6 +253,8 @@ internal static class FaceKit
_pos = below;
_width = width;
_openRequested = items.Length > 0;
_filter[0] = 0; // clear the previous open's filter
_focusFilter = items.Length >= FilterAt;
}
public void Draw()
@ -255,38 +266,74 @@ internal static class FaceKit
ImGuiNET.ImGui.SetNextWindowPos(new Vector2(Math.Clamp(_pos.X, 0, Math.Max(0, display.X - _width)), _pos.Y));
ImGuiNET.ImGui.OpenPopup(_popupId);
}
bool filterOn = _items.Length >= FilterAt;
string filterText = filterOn ? Utf8(_filter) : string.Empty;
// Count matches so the popup height tracks a short filtered list.
int shown = 0;
if (!filterOn) shown = _items.Length;
else
{
for (int i = 0; i < _items.Length; i++)
if (FilterMatch(_items[i], filterText)) shown++;
}
float listH = Math.Min(Math.Max(shown, 1) * RowH + 4, 340);
float totalH = listH + (filterOn ? FilterH + 4 : 0);
ImGuiNET.ImGui.PushStyleColor(ImGuiCol.PopupBg, ShellBg);
ImGuiNET.ImGui.PushStyleColor(ImGuiCol.Border, Teal);
ImGuiNET.ImGui.PushStyleVar(ImGuiStyleVar.PopupRounding, 4f);
ImGuiNET.ImGui.PushStyleVar(ImGuiStyleVar.WindowPadding, new Vector2(2, 2));
ImGuiNET.ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(0, 1));
ImGuiNET.ImGui.SetNextWindowSize(new Vector2(_width, Math.Min(_items.Length * 21 + 4, 340)));
ImGuiNET.ImGui.SetNextWindowSize(new Vector2(_width, totalH));
bool open = ImGuiNET.ImGui.BeginPopup(_popupId);
ImGuiNET.ImGui.PopStyleVar(3);
ImGuiNET.ImGui.PopStyleColor(2);
if (!open) return;
if (filterOn)
{
Vector2 fp = ImGuiNET.ImGui.GetCursorScreenPos();
if (_focusFilter)
{
_focusFilter = false;
ImGuiNET.ImGui.SetKeyboardFocusHere(0); // next widget = the filter box
}
TextBox("##pick_filter", _filter, fp, ImGuiNET.ImGui.GetContentRegionAvail().X, "Type to filter…", out _,
ImGuiInputTextFlags.None, FilterH);
ImGuiNET.ImGui.SetCursorScreenPos(new Vector2(fp.X, fp.Y + FilterH + 2));
filterText = Utf8(_filter);
}
var dl = ImGuiNET.ImGui.GetWindowDrawList();
float iw = ImGuiNET.ImGui.GetContentRegionAvail().X;
for (int i = 0; i < _items.Length; i++)
{
if (filterOn && !FilterMatch(_items[i], filterText)) continue;
ImGuiNET.ImGui.PushID(i);
Vector2 ip = ImGuiNET.ImGui.GetCursorScreenPos();
bool click = ImGuiNET.ImGui.InvisibleButton("##it", new Vector2(iw, 20));
bool click = ImGuiNET.ImGui.InvisibleButton("##it", new Vector2(iw, RowH));
bool hot = ImGuiNET.ImGui.IsItemHovered();
ImGuiNET.ImGui.PopID();
bool sel = i == _selected;
dl.AddRectFilled(ip, ip + new Vector2(iw, 20), sel ? Selected : hot ? Lighten(BtnFill) : BtnFill);
dl.AddRect(ip, ip + new Vector2(iw, 20), BtnBord);
dl.AddText(ip + new Vector2(6, (20 - ImGuiNET.ImGui.GetFontSize()) * 0.5f), sel ? Teal : Text, _items[i]);
dl.AddRectFilled(ip, ip + new Vector2(iw, RowH), sel ? Selected : hot ? Lighten(BtnFill) : BtnFill);
dl.AddRect(ip, ip + new Vector2(iw, RowH), BtnBord);
dl.AddText(ip + new Vector2(6, (RowH - ImGuiNET.ImGui.GetFontSize()) * 0.5f), sel ? Teal : Text, _items[i]);
if (click)
{
Action<int>? act = _onPick;
ImGuiNET.ImGui.CloseCurrentPopup();
act?.Invoke(i);
act?.Invoke(i); // still the original index for the caller
}
}
ImGuiNET.ImGui.EndPopup();
}
/// <summary>Case-insensitive substring match; empty filter shows everything.</summary>
private static bool FilterMatch(string item, string filter)
{
if (filter.Length == 0) return true;
return item.IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0;
}
}
// ── Text buffers ─────────────────────────────────────────────────────

View file

@ -64,7 +64,7 @@ internal sealed partial class MiniRemoteFace
private static bool RailShown => PanelColumnStore.Get(RailKey, 1f) >= 0.5f;
// ── Requests (commands; render thread) ──────────────────────────────
// ── Requests (commands; render thread) ──────────────────────────────
/// <summary>Shows section <paramref name="sectionId"/> ("remote" = the remote) on the next draw.</summary>
public static void RequestSection(string sectionId)
@ -149,7 +149,7 @@ internal sealed partial class MiniRemoteFace
if (PanelColumnStore.Get(SectionKey, -1f) != index) PanelColumnStore.Set(SectionKey, index);
}
// ── Rail ────────────────────────────────────────────────────────────
// ── Rail ────────────────────────────────────────────────────────────
/// <summary>Draws the rail at the body's left; returns the width it takes (with its gap).</summary>
private float DrawRail(SectionRegistry.Snapshot snap, Vector2 origin, Vector2 size)
@ -233,7 +233,7 @@ internal sealed partial class MiniRemoteFace
_ => "nothing installed adds to it on this world.",
};
// ── Section body ────────────────────────────────────────────────────
// ── Section body ────────────────────────────────────────────────────
private void DrawSection(SectionRegistry.Snapshot snap, float w, Vector2 origin, Vector2 size)
{
@ -456,7 +456,7 @@ internal sealed partial class MiniRemoteFace
return result == PluginManager.EmbedDrawn ? want : Vector2.Zero;
}
// ── Session Stats overview ──────────────────────────────────────────
// ── Session Stats overview ──────────────────────────────────────────
/// <summary>
/// The Session Stats section's stand-in, shown only while no plugin fills the section (RynthAi
@ -490,7 +490,7 @@ internal sealed partial class MiniRemoteFace
}
}
// ── Menu ────────────────────────────────────────────────────────────
// ── Menu ────────────────────────────────────────────────────────────
/// <summary>The menu's section half: every section, the active servers' items, the rail switch.</summary>
private void DrawSectionsMenuItems()

View file

@ -180,7 +180,7 @@ internal sealed partial class MiniRemoteFace : IImGuiPanel
FitGrid(data, w, haveH);
}
// ── RynthAi's Mini Remote ───────────────────────────────────────────
// ── RynthAi's Mini Remote ───────────────────────────────────────────
/// <summary>
/// Lets RynthAi draw its Mini Remote here. True when it did (or is mid-layout after
@ -236,10 +236,10 @@ internal sealed partial class MiniRemoteFace : IImGuiPanel
if (result == PluginManager.EmbedFailed) _embedOff = true;
}
// ── Window fit ──────────────────────────────────────────────────────
// ── Window fit ──────────────────────────────────────────────────────
/// <summary>
/// Sizes the window so the body area (<paramref name="haveW"/> × <paramref name="haveH"/>
/// Sizes the window so the body area (<paramref name="haveW"/> × <paramref name="haveH"/>
/// now) becomes <paramref name="wantPx"/>; never taller than the screen. Docked only:
/// popped out the OS window keeps its size, as other faces do (RynthNavArrowFace).
/// </summary>
@ -276,7 +276,7 @@ internal sealed partial class MiniRemoteFace : IImGuiPanel
FitWindow(body, w, haveH);
}
// ── Engine grid ─────────────────────────────────────────────────────
// ── Engine grid ─────────────────────────────────────────────────────
private void Resolve(ItemHudCharacter data, HudItem[] items)
{
@ -409,7 +409,7 @@ internal sealed partial class MiniRemoteFace : IImGuiPanel
if (!ItemHudStore.Update(d => d.WithSlot(i, new RemoteSlot(itemId, name)), out string why)) ShowMessage(why, Amber);
}
// ── Status ──────────────────────────────────────────────────────────
// ── Status ──────────────────────────────────────────────────────────
private void ShowMessage(string text, uint color)
{
@ -441,7 +441,7 @@ internal sealed partial class MiniRemoteFace : IImGuiPanel
private static float BodyGripRoom() => ImGuiPanelHost.BodyGripReserve;
// ── Right-click menu ────────────────────────────────────────────────
// ── Right-click menu ────────────────────────────────────────────────
/// <summary>
/// The right-click menu: a slot's options (the engine grid), then the sections, the active