diff --git a/Assembly.version b/Assembly.version
index 1e37924..2bd9b67 100644
--- a/Assembly.version
+++ b/Assembly.version
@@ -2,6 +2,6 @@
1
2
- 3
+ 4
\ No newline at end of file
diff --git a/TweaksAndThings/Patches/CarPickable_HandleShowContextMenu_Patch.cs b/TweaksAndThings/Patches/CarPickable_HandleShowContextMenu_Patch.cs
index 7a89fa8..3a15345 100644
--- a/TweaksAndThings/Patches/CarPickable_HandleShowContextMenu_Patch.cs
+++ b/TweaksAndThings/Patches/CarPickable_HandleShowContextMenu_Patch.cs
@@ -47,7 +47,6 @@ internal class CarPickable_HandleShowContextMenu_Patch
{
CameraSelector.shared.FollowCar(car);
});
- shared.radius = 200f;
shared.BuildItemAngles();
shared.StartCoroutine(shared.AnimateButtonsShown());
}
diff --git a/TweaksAndThings/Patches/ContextMenu_PositionForItem_Patch.cs b/TweaksAndThings/Patches/ContextMenu_PositionForItem_Patch.cs
new file mode 100644
index 0000000..1bef1ed
--- /dev/null
+++ b/TweaksAndThings/Patches/ContextMenu_PositionForItem_Patch.cs
@@ -0,0 +1,25 @@
+using HarmonyLib;
+using Railloader;
+using System;
+using UI.ContextMenu;
+using UnityEngine;
+
+
+namespace RMROC451.TweaksAndThings.Patches;
+
+[HarmonyPatch(typeof(UI.ContextMenu.ContextMenu))]
+//ContextMenuQuadrant quadrant, int index, float normalizedRadius = 1f
+[HarmonyPatch(nameof(UI.ContextMenu.ContextMenu.PositionForItem), typeof(ContextMenuQuadrant), typeof(int), typeof(float))]
+[HarmonyPatchCategory("RMROC451TweaksAndThings")]
+internal class ContextMenu_PositionForItem_Patch
+{
+ static void Postfix(UI.ContextMenu.ContextMenu __instance, ref Vector2 __result, ContextMenuQuadrant quadrant, int index, float normalizedRadius = 1f)
+ {
+ TweaksAndThingsPlugin tweaksAndThings = SingletonPluginBase.Shared;
+ if (!tweaksAndThings.IsEnabled) return;
+
+ float num = __instance._itemAngles[(quadrant, index)] * ((float)Math.PI / 180f);
+ float num2 = __instance.radius * normalizedRadius;
+ __result = new Vector2(1.3f * Mathf.Sin(num) * num2, Mathf.Cos(num) * num2);
+ }
+}
diff --git a/TweaksAndThings/Patches/ContextMenu_Show_Patch.cs b/TweaksAndThings/Patches/ContextMenu_Show_Patch.cs
new file mode 100644
index 0000000..84ba16a
--- /dev/null
+++ b/TweaksAndThings/Patches/ContextMenu_Show_Patch.cs
@@ -0,0 +1,127 @@
+using HarmonyLib;
+using Helpers;
+using Railloader;
+using Serilog;
+using System;
+using System.Collections.Generic;
+using UI;
+using UI.ContextMenu;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace RMROC451.TweaksAndThings.Patches;
+
+[HarmonyPatch(typeof(UI.ContextMenu.ContextMenu))]
+[HarmonyPatch(nameof(UI.ContextMenu.ContextMenu.Show), typeof(string))]
+[HarmonyPatchCategory("RMROC451TweaksAndThings")]
+internal class ContextMenu_Show_Patch
+{
+ static bool Prefix(UI.ContextMenu.ContextMenu __instance, string centerText)
+ {
+ TweaksAndThingsPlugin tweaksAndThings = SingletonPluginBase.Shared;
+ if (!tweaksAndThings.IsEnabled) return true;
+
+ if (!__instance.GetRootCanvas(out var rootCanvas))
+ {
+ Log.Warning("Couldn't get root canvas");
+ return true;
+ }
+ __instance.CancelHideCoroutine();
+ __instance.SetupTemplate(rootCanvas);
+ __instance.centerLabel.text = centerText;
+ Canvas componentInParent = ((Component)__instance.contentRectTransform).GetComponentInParent