mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-19 15:51:54 +00:00
Temporary fix for GUILayoutEntry
This commit is contained in:
1 file changed
+4
-4
@@ -46,12 +46,12 @@ namespace Reactor.Unstrip
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPatch(typeof(GUILayoutEntry), nameof(GUILayoutEntry.CalcWidth))]
|
// [HarmonyPatch(typeof(GUILayoutEntry), nameof(GUILayoutEntry.CalcWidth))]
|
||||||
public static class CalcWidthPatch
|
public static class CalcWidthPatch
|
||||||
{
|
{
|
||||||
public static bool Prefix(GUILayoutEntry __instance)
|
public static bool Prefix(GUILayoutEntry __instance)
|
||||||
{
|
{
|
||||||
var cast = __instance.TryCast<GUIWordWrapSizer>();
|
var cast = __instance?.TryCast<GUIWordWrapSizer>();
|
||||||
if (cast != null)
|
if (cast != null)
|
||||||
{
|
{
|
||||||
cast.CalcWidth();
|
cast.CalcWidth();
|
||||||
@@ -62,12 +62,12 @@ namespace Reactor.Unstrip
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPatch(typeof(GUILayoutEntry), nameof(GUILayoutEntry.CalcHeight))]
|
// [HarmonyPatch(typeof(GUILayoutEntry), nameof(GUILayoutEntry.CalcHeight))]
|
||||||
public static class CalcHeightPatch
|
public static class CalcHeightPatch
|
||||||
{
|
{
|
||||||
public static bool Prefix(GUILayoutEntry __instance)
|
public static bool Prefix(GUILayoutEntry __instance)
|
||||||
{
|
{
|
||||||
var cast = __instance.TryCast<GUIWordWrapSizer>();
|
var cast = __instance?.TryCast<GUIWordWrapSizer>();
|
||||||
if (cast != null)
|
if (cast != null)
|
||||||
{
|
{
|
||||||
cast.CalcHeight();
|
cast.CalcHeight();
|
||||||
|
|||||||
Reference in new issue
Block a user