Decompiled source of F11ToFullscreen v1.0.0

F11ToFullscreen.dll

Decompiled 3 days ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("F11ToFullscreen")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("My first plugin")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("F11ToFullscreen")]
[assembly: AssemblyTitle("F11ToFullscreen")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace F11ToFullscreen;

[BepInPlugin("F11ToFullscreen", "F11ToFullscreen", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	public static bool fullscreen;

	private void Awake()
	{
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin F11ToFullscreen is loaded!");
	}

	private void Update()
	{
		fullscreen = Settings.instance.FullScreen == 1;
		if (((ButtonControl)Keyboard.current.f11Key).wasPressedThisFrame)
		{
			Settings.instance.FullScreen = ((Settings.instance.FullScreen == 0) ? 1 : 0);
			Settings.instance.Save();
			((BaseUnityPlugin)this).Logger.LogInfo((object)("Switched to " + ((Settings.instance.FullScreen == 1) ? "fullscreen" : "windowed") + " mode"));
		}
	}
}
public static class PluginInfo
{
	public const string PLUGIN_GUID = "F11ToFullscreen";

	public const string PLUGIN_NAME = "F11ToFullscreen";

	public const string PLUGIN_VERSION = "1.0.0";
}