Пример #1
0
        static void ShowDebugInfo(Gizmo gizmo, Vector2 topLeft, float maxWidth, GizmoRenderParms parms)
        {
            var info = gizmo.GetType().ToString();

            if (gizmo is Command_Action action)
            {
                info += $"\n\n{MpUtil.DelegateMethodInfo(action.action?.Method)}";
            }

            if (gizmo is Command_Toggle toggle)
            {
                info += $"\n\n{MpUtil.DelegateMethodInfo(toggle.toggleAction?.Method)}";
            }

            TooltipHandler.TipRegion(
                new Rect(topLeft, new Vector2(gizmo.GetWidth(maxWidth), 75f)),
                info
                );
        }
Пример #2
0
 static void Postfix(FloatMenuOption __instance, Rect rect)
 {
     TooltipHandler.TipRegion(rect, MpUtil.DelegateMethodInfo(__instance.action?.Method));
 }