Add radar/chat suppression hooks and custom-widget API

- ChatHooks: captures gmMainChatUI via ListenToElementMessage and hides it
  via UIElement::SetVisible(false), re-asserted every frame from EndSceneHook.
  Suppression toggle restores visibility when flipped off.
- RadarHooks: also suppresses gmRadarUI::DrawChildren (bezel/compass/coords)
  alongside DrawObjects so the whole retail radar goes blank.
- PluginContract v55: SetRadarSuppressed + SetChatSuppressed fn pointers
  exposed to plugins via RynthCoreHost.
This commit is contained in:
tombohar 2026-04-23 21:08:26 -04:00
commit 01c7a549bd
8 changed files with 312 additions and 20 deletions

View file

@ -2,6 +2,7 @@ using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;
using RynthCore.Engine.Compatibility;
using RynthCore.Engine.Hooking;
using RynthCore.Engine.ImGuiBackend;
@ -205,6 +206,9 @@ internal static class EndSceneHook
_renderCount++;
_frameCount++;
// Per-frame chatbox visibility assertion (no-op unless plugin enables suppression).
try { ChatHooks.TickHide(); } catch { /* never let this bring down EndScene */ }
if (_renderCount == 1 && _offscreenFilterDisabled && _skipCount > 0)
{
long installElapsedMs = Environment.TickCount64 - _installTick;