Add power bar suppression API, pin imgui.ini, bump SDK to v56

- New PowerbarHooks scaffold hooking gmPowerbarUI's RecvNotice_Begin/Level/
  Finish trio. SetPowerbarSuppressed exposed via the plugin contract; current
  implementation no-ops the notices (a deeper SetVisible/HidePowerBar path
  crashed on the captured pointer, so full hide is parked for later).
- ImGuiController pins io.IniFilename to a stable absolute path
  (C:\Games\RynthSuite\RynthAi\imgui.ini) so window positions, sizes, and
  dock layout persist across RL hot-reload and AC restarts. Default ImGui
  behavior wrote into the host process working dir which varied per launch.
- PluginContract version bumped to 56 with SetPowerbarSuppressedFn added to
  RynthCoreAPI; SDK exposes Has/Set methods on RynthCoreHost.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
tombohar 2026-04-25 10:03:58 -04:00
commit cd3ccfd550
7 changed files with 276 additions and 3 deletions

View file

@ -83,6 +83,23 @@ internal static class ImGuiController
ImGuiNET.ImGui.SetCurrentContext(_context);
ImGuiIOPtr io = ImGuiNET.ImGui.GetIO();
// Pin imgui.ini to a stable absolute path so window positions/sizes
// persist across plugin reloads (RL) and AC restarts. The default
// ImGui behavior writes to the working directory which can differ
// between launches. Allocated once, kept alive for the process lifetime.
try
{
const string iniPath = @"C:\Games\RynthSuite\RynthAi\imgui.ini";
System.IO.Directory.CreateDirectory(@"C:\Games\RynthSuite\RynthAi");
IntPtr iniPtr = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(iniPath);
unsafe { io.NativePtr->IniFilename = (byte*)iniPtr; }
RynthLog.Render($"ImGuiController: imgui.ini pinned to {iniPath}");
}
catch (Exception ex)
{
RynthLog.Render($"ImGuiController: failed to pin imgui.ini path - {ex.Message}");
}
io.ConfigFlags |= ImGuiConfigFlags.DockingEnable;
io.ConfigFlags |= ImGuiConfigFlags.ViewportsEnable;
// Popped-out plugin windows use WS_EX_TOOLWINDOW so they don't show