using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("HudSafeZoneAdjuster")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HudSafeZoneAdjuster")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("a6920fa5-f131-4ccc-8028-d62f490cbce7")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
[BepInPlugin("com.yourname.hudsafezone", "HUD Safe Zone Adjuster", "5.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class HudSafeZoneAdjuster : BaseUnityPlugin
{
private ConfigEntry<float> horizontal;
private ConfigEntry<float> vertical;
private RectTransform hud;
private void Awake()
{
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Expected O, but got Unknown
//IL_0064: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: Expected O, but got Unknown
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_0095: Expected O, but got Unknown
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_009a: Expected O, but got Unknown
horizontal = ((BaseUnityPlugin)this).Config.Bind<float>("HUD", "Horizontal Safe Zone", 40f, (ConfigDescription)null);
vertical = ((BaseUnityPlugin)this).Config.Bind<float>("HUD", "Vertical Safe Zone", 40f, (ConfigDescription)null);
ModSettingsManager.AddOption((BaseOption)new SliderOption(horizontal, new SliderConfig
{
min = -300f,
max = 300f
}));
ModSettingsManager.AddOption((BaseOption)new SliderOption(vertical, new SliderConfig
{
min = -300f,
max = 300f
}));
}
private void LateUpdate()
{
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
if (!Object.op_Implicit((Object)(object)hud))
{
GameObject val = GameObject.Find("MainContainer");
if (Object.op_Implicit((Object)(object)val))
{
hud = val.GetComponent<RectTransform>();
}
}
if (Object.op_Implicit((Object)(object)hud))
{
float value = horizontal.Value;
float value2 = vertical.Value;
hud.offsetMin = new Vector2(value, value2);
hud.offsetMax = new Vector2(0f - value, 0f - value2);
}
}
}