Added 1.2 and 1.5 support, mod icon, DefaultValue/Key for FishSet/Table

This commit is contained in:
bbradson
2024-04-14 20:06:00 +02:00
parent c584f58dfd
commit 64152cef07
60 changed files with 643 additions and 251 deletions
+12 -3
View File
@@ -4,7 +4,6 @@
// You can obtain one at https://opensource.org/licenses/MIT/.
using System.Runtime.CompilerServices;
using JetBrains.Annotations;
using UnityEngine;
using Verse;
@@ -15,9 +14,19 @@ public static class GUIScope
{
public readonly record struct WidgetGroup : IDisposable
{
public WidgetGroup(in Rect rect) => Widgets.BeginGroup(rect);
public WidgetGroup(in Rect rect)
#if !V1_2
=> Widgets.BeginGroup(rect);
#else
=> GUI.BeginGroup(rect);
#endif
public void Dispose() => Widgets.EndGroup();
public void Dispose()
#if !V1_2
=> Widgets.EndGroup();
#else
=> GUI.EndGroup();
#endif
}
public readonly record struct ScrollView : IDisposable