Decompiled source of UITest v1.1.0

plugins/UITest.dll

Decompiled a month ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using Microsoft.CodeAnalysis;
using Nebula;
using Nebula.UI;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyCompany("UITest")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Adds \"hello world\" to the console")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: AssemblyInformationalVersion("1.1.0")]
[assembly: AssemblyProduct("UITest")]
[assembly: AssemblyTitle("UITest")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace UITest
{
	[BepInPlugin("UITest", "UITest", "1.1.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInProcess("dyingsun.exe")]
	public class Plugin : BaseUnityPlugin
	{
		private void Awake()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			NebulaPlugin.SceneReady += new SceneReadyDelegate(LoadUI);
		}

		private void LoadUI(Scene scene)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Expected O, but got Unknown
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Expected O, but got Unknown
			//IL_007e: 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)
			//IL_008a: Expected O, but got Unknown
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Expected O, but got Unknown
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Expected O, but got Unknown
			NebulaPlugin.SceneReady -= new SceneReadyDelegate(LoadUI);
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Loading UI elements...");
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(352f, 24f, 0f);
			int num = 20;
			string text = "GATE_MainMenu/ANCHOR_MainMenu/PANEL_MainMenu/ROOT_MainMenu";
			string text2 = "ROOT_Left/010_BUTTONS";
			List<EventDelegate> list = new List<EventDelegate>();
			EventDelegate.Add(list, new Callback(HelloWorld));
			ButtonDetailDatum val2 = new ButtonDetailDatum(Color.cyan, (Font)null);
			ButtonFactoryDatum val3 = new ButtonFactoryDatum("HelloWorld", "HELLO WORLD", list, num, val, text, text2, val2);
			UIButton val4 = ButtonFactory.Create(val3);
			MOTDDatum val5 = new MOTDDatum("Prints \"Hello world!\" to the console.", "WIDGET_MOTD/PANEL_ScrollWindow/010_LABEL_BlockText");
			ButtonDatum item = new ButtonDatum(val4, text, 21, val5);
			ButtonSpawner.buttonQueue.Enqueue(item);
		}

		private void HelloWorld()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Hello world!");
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "UITest";

		public const string PLUGIN_NAME = "UITest";

		public const string PLUGIN_VERSION = "1.1.0";
	}
}