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:
parent
2c3d2410a8
commit
01c7a549bd
8 changed files with 312 additions and 20 deletions
|
|
@ -117,6 +117,8 @@ internal static class PluginManager
|
|||
private static DoJumpCallbackDelegate? _doJumpCallback;
|
||||
private static LaunchJumpWithMotionCallbackDelegate? _launchJumpWithMotionCallback;
|
||||
private static GetRadarRectCallbackDelegate? _getRadarRectCallback;
|
||||
private static SetRadarSuppressedCallbackDelegate? _setRadarSuppressedCallback;
|
||||
private static SetChatSuppressedCallbackDelegate? _setChatSuppressedCallback;
|
||||
private static SetMotionCallbackDelegate? _setMotionCallback;
|
||||
private static StopCompletelyCallbackDelegate? _stopCompletelyCallback;
|
||||
private static TurnToHeadingCallbackDelegate? _turnToHeadingCallback;
|
||||
|
|
@ -1679,6 +1681,8 @@ internal static class PluginManager
|
|||
_doJumpCallback ??= DoJump;
|
||||
_launchJumpWithMotionCallback ??= LaunchJumpWithMotion;
|
||||
_getRadarRectCallback ??= GetRadarRect;
|
||||
_setRadarSuppressedCallback ??= SetRadarSuppressed;
|
||||
_setChatSuppressedCallback ??= SetChatSuppressed;
|
||||
_setMotionCallback ??= SetMotion;
|
||||
_stopCompletelyCallback ??= StopCompletely;
|
||||
_turnToHeadingCallback ??= TurnToHeading;
|
||||
|
|
@ -1851,6 +1855,8 @@ internal static class PluginManager
|
|||
_api.DoJumpFn = Marshal.GetFunctionPointerForDelegate(_doJumpCallback);
|
||||
_api.LaunchJumpWithMotionFn = Marshal.GetFunctionPointerForDelegate(_launchJumpWithMotionCallback);
|
||||
_api.GetRadarRectFn = Marshal.GetFunctionPointerForDelegate(_getRadarRectCallback);
|
||||
_api.SetRadarSuppressedFn = Marshal.GetFunctionPointerForDelegate(_setRadarSuppressedCallback);
|
||||
_api.SetChatSuppressedFn = Marshal.GetFunctionPointerForDelegate(_setChatSuppressedCallback);
|
||||
}
|
||||
|
||||
private static void ProbeClientHooks()
|
||||
|
|
@ -2222,6 +2228,16 @@ internal static class PluginManager
|
|||
return 1;
|
||||
}
|
||||
|
||||
private static void SetRadarSuppressed(int enabled)
|
||||
{
|
||||
RadarHooks.SuppressOriginalDraw = enabled != 0;
|
||||
}
|
||||
|
||||
private static void SetChatSuppressed(int enabled)
|
||||
{
|
||||
ChatHooks.SuppressOriginalChat = enabled != 0;
|
||||
}
|
||||
|
||||
private static int SetMotion(uint motion, int enabled)
|
||||
{
|
||||
return ToAbiBool(ClientActionHooks.SetMotion(motion, enabled != 0));
|
||||
|
|
|
|||
Loading…
Reference in a new issue