using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using HG;
using Microsoft.CodeAnalysis;
using RoR2;
using UnityEngine;
[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 = ".NET Standard 2.1")]
[assembly: AssemblyCompany("ESP")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+a4865819a6e05eac75d7a1c2e22d35b6c901ebaf")]
[assembly: AssemblyProduct("ESP")]
[assembly: AssemblyTitle("ESP")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.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 ESP
{
public class config
{
public static ConfigFile configFile;
public static ConfigEntry<KeyCode> ToggleEspKey;
public static ConfigEntry<KeyCode> ToggleMenuKey;
public static ConfigEntry<int> LabelSize;
public static ConfigEntry<bool> AltTextToggle;
public static ConfigEntry<string> AltText;
public static ConfigEntry<bool> DrawTextShadow;
public static ConfigEntry<float> TextShadowSize;
public static ConfigEntry<bool> DrawChestsToggle;
public static ConfigEntry<bool> ShowChestItemNames;
public static ConfigEntry<bool> DrawShopsToggle;
public static ConfigEntry<bool> ShowShopItemNames;
public static ConfigEntry<bool> DrawScrappersToggle;
public static ConfigEntry<bool> DrawPrintersToggle;
public static ConfigEntry<bool> ShowPrinterItemNames;
public static ConfigEntry<bool> DrawTeleportersToggle;
public static ConfigEntry<bool> DrawDronesToggle;
public static ConfigEntry<bool> DrawShrinesToggle;
public static ConfigEntry<bool> DrawPortalsToggle;
public static ConfigEntry<bool> DrawAllPurchaseInteractionsToggle;
public static ConfigEntry<Color> ColorTier_Common;
public static ConfigEntry<Color> ColorTier_Uncommon;
public static ConfigEntry<Color> ColorTier_Legendary;
public static ConfigEntry<Color> ColorTier_Boss;
public static ConfigEntry<Color> ColorTier_Lunar;
public static ConfigEntry<Color> ColorTier_VoidCommon;
public static ConfigEntry<Color> ColorTier_VoidUncommon;
public static ConfigEntry<Color> ColorTier_VoidLegendary;
public static ConfigEntry<Color> ColorTier_VoidBoss;
public static ConfigEntry<Color> Color_Equipment;
public static ConfigEntry<Color> Color_LunarEquipment;
public static ConfigEntry<bool> DrawShrine_Blood;
public static ConfigEntry<Color> ColorShrine_Blood;
public static ConfigEntry<bool> DrawShrine_Chance;
public static ConfigEntry<Color> ColorShrine_Chance;
public static ConfigEntry<bool> DrawShrine_Combat;
public static ConfigEntry<Color> ColorShrine_Combat;
public static ConfigEntry<bool> DrawShrine_Gold;
public static ConfigEntry<Color> ColorShrine_Gold;
public static ConfigEntry<bool> DrawShrine_Mountain;
public static ConfigEntry<Color> ColorShrine_Mountain;
public static ConfigEntry<bool> DrawShrine_Woods;
public static ConfigEntry<Color> ColorShrine_Woods;
public static ConfigEntry<bool> DrawShrine_Healing;
public static ConfigEntry<Color> ColorShrine_Healing;
public static ConfigEntry<bool> DrawShrine_Cleanse;
public static ConfigEntry<Color> ColorShrine_Cleanse;
public static ConfigEntry<bool> DrawShrine_Halcyon;
public static ConfigEntry<Color> ColorShrine_Halcyon;
public static ConfigEntry<bool> DrawPortal_Newt;
public static ConfigEntry<Color> ColorPortal_Newt;
public static ConfigEntry<bool> DrawPortal_Gold;
public static ConfigEntry<Color> ColorPortal_Gold;
public static ConfigEntry<Color> ShopColor;
public static ConfigEntry<Color> TeleporterColor;
public static ConfigEntry<Color> ScrapperColor;
public static ConfigEntry<Color> PrinterColor;
public static ConfigEntry<Color> DroneColor;
public static ConfigEntry<Color> AllInteractionColor;
public static void Init(ConfigFile file)
{
//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
//IL_020f: Unknown result type (might be due to invalid IL or missing references)
//IL_022a: Unknown result type (might be due to invalid IL or missing references)
//IL_0245: Unknown result type (might be due to invalid IL or missing references)
//IL_0260: Unknown result type (might be due to invalid IL or missing references)
//IL_028a: Unknown result type (might be due to invalid IL or missing references)
//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
//IL_02de: Unknown result type (might be due to invalid IL or missing references)
//IL_0308: Unknown result type (might be due to invalid IL or missing references)
//IL_0332: Unknown result type (might be due to invalid IL or missing references)
//IL_034d: Unknown result type (might be due to invalid IL or missing references)
//IL_037f: Unknown result type (might be due to invalid IL or missing references)
//IL_03b1: Unknown result type (might be due to invalid IL or missing references)
//IL_03f2: Unknown result type (might be due to invalid IL or missing references)
//IL_0433: Unknown result type (might be due to invalid IL or missing references)
//IL_0474: Unknown result type (might be due to invalid IL or missing references)
//IL_04b5: Unknown result type (might be due to invalid IL or missing references)
//IL_04f6: Unknown result type (might be due to invalid IL or missing references)
//IL_0528: Unknown result type (might be due to invalid IL or missing references)
//IL_0569: Unknown result type (might be due to invalid IL or missing references)
//IL_059b: Unknown result type (might be due to invalid IL or missing references)
//IL_05dc: Unknown result type (might be due to invalid IL or missing references)
//IL_0606: Unknown result type (might be due to invalid IL or missing references)
//IL_0630: Unknown result type (might be due to invalid IL or missing references)
//IL_064b: Unknown result type (might be due to invalid IL or missing references)
//IL_0666: Unknown result type (might be due to invalid IL or missing references)
//IL_0681: Unknown result type (might be due to invalid IL or missing references)
//IL_069c: Unknown result type (might be due to invalid IL or missing references)
configFile = file;
ToggleEspKey = file.Bind<KeyCode>("1. Keybinds", "Toggle ESP", (KeyCode)283, "Key to toggle the ESP on/off.");
ToggleMenuKey = file.Bind<KeyCode>("1. Keybinds", "Toggle Menu", (KeyCode)284, "Key to toggle the settings menu on/off.");
LabelSize = file.Bind<int>("2. General", "Label Size", 12, "Font size for the labels.");
AltTextToggle = file.Bind<bool>("2. General", "Alternative Look", false, "Replaces all labels with a single character for a cleaner look.");
AltText = file.Bind<string>("2. General", "Alternative Text", "+", "The character to use for the Alternative Look.");
DrawTextShadow = file.Bind<bool>("2. General", "Text Shadow", true, "Draw a shadow behind text for better readability.");
TextShadowSize = file.Bind<float>("2. General", "Text Shadow Size", 1.5f, "How thick the shadow is around the text.");
DrawChestsToggle = file.Bind<bool>("3. Main Toggles", "Chests", true, (ConfigDescription)null);
ShowChestItemNames = file.Bind<bool>("3. Main Toggles", "Show Chest Item Names", true, (ConfigDescription)null);
DrawShopsToggle = file.Bind<bool>("3. Main Toggles", "Shops", true, (ConfigDescription)null);
ShowShopItemNames = file.Bind<bool>("3. Main Toggles", "Show Shop Item Names", true, (ConfigDescription)null);
DrawPrintersToggle = file.Bind<bool>("3. Main Toggles", "Printers", true, (ConfigDescription)null);
ShowPrinterItemNames = file.Bind<bool>("3. Main Toggles", "Show Printer Item Names", true, (ConfigDescription)null);
DrawScrappersToggle = file.Bind<bool>("3. Main Toggles", "Scrappers", true, (ConfigDescription)null);
DrawTeleportersToggle = file.Bind<bool>("3. Main Toggles", "Teleporters", true, (ConfigDescription)null);
DrawDronesToggle = file.Bind<bool>("3. Main Toggles", "Drones & Turrets", true, (ConfigDescription)null);
DrawShrinesToggle = file.Bind<bool>("3. Main Toggles", "Shrines", true, (ConfigDescription)null);
DrawPortalsToggle = file.Bind<bool>("3. Main Toggles", "Altars", true, (ConfigDescription)null);
DrawAllPurchaseInteractionsToggle = file.Bind<bool>("3. Main Toggles", "All Other Interactions", false, (ConfigDescription)null);
ColorTier_Common = file.Bind<Color>("4. Item & Equipment Colors", "Common (White)", Color.white, (ConfigDescription)null);
ColorTier_Uncommon = file.Bind<Color>("4. Item & Equipment Colors", "Uncommon (Green)", Color.green, (ConfigDescription)null);
ColorTier_Legendary = file.Bind<Color>("4. Item & Equipment Colors", "Legendary (Red)", Color.red, (ConfigDescription)null);
ColorTier_Boss = file.Bind<Color>("4. Item & Equipment Colors", "Boss (Yellow)", Color.yellow, (ConfigDescription)null);
ColorTier_Lunar = file.Bind<Color>("4. Item & Equipment Colors", "Lunar (Blue)", Color.cyan, (ConfigDescription)null);
ColorTier_VoidCommon = file.Bind<Color>("4. Item & Equipment Colors", "Void Common", new Color(0.988f, 0.725f, 0.925f), (ConfigDescription)null);
ColorTier_VoidUncommon = file.Bind<Color>("4. Item & Equipment Colors", "Void Uncommon", new Color(0.776f, 0.47f, 0.705f), (ConfigDescription)null);
ColorTier_VoidLegendary = file.Bind<Color>("4. Item & Equipment Colors", "Void Legendary", new Color(0.584f, 0.043f, 0.458f), (ConfigDescription)null);
ColorTier_VoidBoss = file.Bind<Color>("4. Item & Equipment Colors", "Void Boss", new Color(0.584f, 0.043f, 0.458f), (ConfigDescription)null);
Color_Equipment = file.Bind<Color>("4. Item & Equipment Colors", "Equipment (Orange)", new Color(1f, 0.5f, 0f), (ConfigDescription)null);
Color_LunarEquipment = file.Bind<Color>("4. Item & Equipment Colors", "Lunar Equipment (Blue)", Color.cyan, (ConfigDescription)null);
DrawShrine_Blood = file.Bind<bool>("5. Shrine Settings", "Show Shrine of Blood", true, (ConfigDescription)null);
ColorShrine_Blood = file.Bind<Color>("5. Shrine Settings", "Color Shrine of Blood", Color.red, (ConfigDescription)null);
DrawShrine_Chance = file.Bind<bool>("5. Shrine Settings", "Show Shrine of Chance", true, (ConfigDescription)null);
ColorShrine_Chance = file.Bind<Color>("5. Shrine Settings", "Color Shrine of Chance", Color.yellow, (ConfigDescription)null);
DrawShrine_Combat = file.Bind<bool>("5. Shrine Settings", "Show Shrine of Combat", true, (ConfigDescription)null);
ColorShrine_Combat = file.Bind<Color>("5. Shrine Settings", "Color Shrine of Combat", new Color(1f, 0.5f, 0.2f), (ConfigDescription)null);
DrawShrine_Gold = file.Bind<bool>("5. Shrine Settings", "Show Shrine of Gold", true, (ConfigDescription)null);
ColorShrine_Gold = file.Bind<Color>("5. Shrine Settings", "Color Shrine of Gold", new Color(0.9f, 0.8f, 0.3f), (ConfigDescription)null);
DrawShrine_Mountain = file.Bind<bool>("5. Shrine Settings", "Show Shrine of the Mountain", true, (ConfigDescription)null);
ColorShrine_Mountain = file.Bind<Color>("5. Shrine Settings", "Color Shrine of the Mountain", new Color(0.7f, 0.7f, 0.7f), (ConfigDescription)null);
DrawShrine_Woods = file.Bind<bool>("5. Shrine Settings", "Show Shrine of the Woods", true, (ConfigDescription)null);
ColorShrine_Woods = file.Bind<Color>("5. Shrine Settings", "Color Shrine of the Woods", new Color(0.4f, 0.9f, 0.4f), (ConfigDescription)null);
DrawShrine_Healing = file.Bind<bool>("5. Shrine Settings", "Show Shrine of Healing", true, (ConfigDescription)null);
ColorShrine_Healing = file.Bind<Color>("5. Shrine Settings", "Color Shrine of Healing", new Color(0.4f, 0.9f, 0.4f), (ConfigDescription)null);
DrawShrine_Cleanse = file.Bind<bool>("5. Shrine Settings", "Show Cleansing Pool", true, (ConfigDescription)null);
ColorShrine_Cleanse = file.Bind<Color>("5. Shrine Settings", "Color Cleansing Pool", Color.white, (ConfigDescription)null);
DrawShrine_Halcyon = file.Bind<bool>("5. Shrine Settings", "Show Halcyon Shrine", true, (ConfigDescription)null);
ColorShrine_Halcyon = file.Bind<Color>("5. Shrine Settings", "Color Halcyon Shrine", new Color(0.2f, 0.9f, 0.7f), (ConfigDescription)null);
DrawPortal_Newt = file.Bind<bool>("6. Altar Settings", "Show Newt Altar", true, (ConfigDescription)null);
ColorPortal_Newt = file.Bind<Color>("6. Altar Settings", "Color Newt Altar", Color.cyan, (ConfigDescription)null);
DrawPortal_Gold = file.Bind<bool>("6. Altar Settings", "Show Gold Altar", true, (ConfigDescription)null);
ColorPortal_Gold = file.Bind<Color>("6. Altar Settings", "Color Gold Altar", new Color(0.9f, 0.8f, 0.3f), (ConfigDescription)null);
ShopColor = file.Bind<Color>("7. Generic Colors", "Shop", new Color(0f, 0.5f, 1f), (ConfigDescription)null);
PrinterColor = file.Bind<Color>("7. Generic Colors", "Printer", new Color(0.8f, 0.8f, 0f), (ConfigDescription)null);
ScrapperColor = file.Bind<Color>("7. Generic Colors", "Scrapper", Color.yellow, (ConfigDescription)null);
TeleporterColor = file.Bind<Color>("7. Generic Colors", "Teleporter", Color.red, (ConfigDescription)null);
DroneColor = file.Bind<Color>("7. Generic Colors", "Drones & Turrets", Color.green, (ConfigDescription)null);
AllInteractionColor = file.Bind<Color>("7. Generic Colors", "All Other Interactions", Color.gray, (ConfigDescription)null);
}
}
public class ESP : MonoBehaviour
{
private List<PurchaseInteraction> purchaseInteractions;
private List<MultiShopController> shops;
private List<ScrapperController> scrappers;
private List<TeleporterInteraction> teleporters;
private readonly HashSet<GameObject> processedTerminals = new HashSet<GameObject>();
public void Find()
{
((MonoBehaviour)this).Invoke("FindObjects", 1f);
}
private void FindObjects()
{
purchaseInteractions = Object.FindObjectsOfType<PurchaseInteraction>().ToList();
shops = Object.FindObjectsOfType<MultiShopController>().ToList();
scrappers = Object.FindObjectsOfType<ScrapperController>().ToList();
teleporters = Object.FindObjectsOfType<TeleporterInteraction>().ToList();
}
public void drawESP()
{
processedTerminals.Clear();
if (config.DrawShopsToggle.Value)
{
drawShops();
}
drawInteractables();
if (config.DrawScrappersToggle.Value)
{
drawScrappers();
}
if (config.DrawTeleportersToggle.Value)
{
drawTeleporters();
}
}
private void drawShops()
{
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
//IL_010b: Unknown result type (might be due to invalid IL or missing references)
//IL_0118: Unknown result type (might be due to invalid IL or missing references)
if (shops == null)
{
return;
}
foreach (MultiShopController shop in shops)
{
if ((Object)(object)shop == (Object)null)
{
continue;
}
drawLabel(((Component)shop).transform.position, "Shop", config.ShopColor.Value);
if (!config.ShowShopItemNames.Value)
{
continue;
}
int num = 0;
Enumerator<GameObject> enumerator2 = shop.terminalGameObjects.GetEnumerator();
try
{
while (enumerator2.MoveNext())
{
GameObject current2 = enumerator2.Current;
if (!((Object)(object)current2 == (Object)null))
{
processedTerminals.Add(current2);
PurchaseInteraction component = current2.GetComponent<PurchaseInteraction>();
if (!((Object)(object)component == (Object)null) && component.available)
{
ShopTerminalBehavior component2 = current2.GetComponent<ShopTerminalBehavior>();
int num2 = (config.LabelSize.Value + 2) * (num + 1);
DrawPickupDef(PickupCatalog.GetPickupDef(component2.pickupIndex), ((Component)shop).transform.position, new Vector2(0f, (float)num2));
num++;
}
}
}
}
finally
{
((IDisposable)enumerator2).Dispose();
}
}
}
private void drawInteractables()
{
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_0374: Unknown result type (might be due to invalid IL or missing references)
//IL_037a: Invalid comparison between Unknown and I4
//IL_038d: Unknown result type (might be due to invalid IL or missing references)
//IL_039c: Unknown result type (might be due to invalid IL or missing references)
//IL_00db: Unknown result type (might be due to invalid IL or missing references)
//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
//IL_0446: Unknown result type (might be due to invalid IL or missing references)
//IL_044b: Unknown result type (might be due to invalid IL or missing references)
//IL_0427: Unknown result type (might be due to invalid IL or missing references)
//IL_0437: Unknown result type (might be due to invalid IL or missing references)
//IL_03b9: Unknown result type (might be due to invalid IL or missing references)
//IL_03bf: Invalid comparison between Unknown and I4
//IL_04d4: Unknown result type (might be due to invalid IL or missing references)
//IL_04da: Invalid comparison between Unknown and I4
//IL_046d: Unknown result type (might be due to invalid IL or missing references)
//IL_0472: Unknown result type (might be due to invalid IL or missing references)
//IL_04f1: Unknown result type (might be due to invalid IL or missing references)
//IL_0500: Unknown result type (might be due to invalid IL or missing references)
//IL_04a4: Unknown result type (might be due to invalid IL or missing references)
//IL_04af: Unknown result type (might be due to invalid IL or missing references)
//IL_0496: Unknown result type (might be due to invalid IL or missing references)
//IL_049b: Unknown result type (might be due to invalid IL or missing references)
//IL_03d2: Unknown result type (might be due to invalid IL or missing references)
//IL_03e1: Unknown result type (might be due to invalid IL or missing references)
//IL_011f: Unknown result type (might be due to invalid IL or missing references)
//IL_012e: Unknown result type (might be due to invalid IL or missing references)
//IL_052d: Unknown result type (might be due to invalid IL or missing references)
//IL_053e: Unknown result type (might be due to invalid IL or missing references)
//IL_054b: Unknown result type (might be due to invalid IL or missing references)
//IL_057e: Unknown result type (might be due to invalid IL or missing references)
//IL_058e: Unknown result type (might be due to invalid IL or missing references)
//IL_05b3: Unknown result type (might be due to invalid IL or missing references)
//IL_05c3: Unknown result type (might be due to invalid IL or missing references)
//IL_0240: Unknown result type (might be due to invalid IL or missing references)
//IL_024f: Unknown result type (might be due to invalid IL or missing references)
//IL_019f: Unknown result type (might be due to invalid IL or missing references)
//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
//IL_0284: Unknown result type (might be due to invalid IL or missing references)
//IL_0293: Unknown result type (might be due to invalid IL or missing references)
//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
//IL_020a: Unknown result type (might be due to invalid IL or missing references)
//IL_02d5: Unknown result type (might be due to invalid IL or missing references)
//IL_02e4: Unknown result type (might be due to invalid IL or missing references)
//IL_0326: Unknown result type (might be due to invalid IL or missing references)
//IL_0335: Unknown result type (might be due to invalid IL or missing references)
if (purchaseInteractions == null)
{
return;
}
ShrineBloodBehavior val = default(ShrineBloodBehavior);
ShrineChanceBehavior val2 = default(ShrineChanceBehavior);
ShrineCombatBehavior val3 = default(ShrineCombatBehavior);
ShrineBossBehavior val4 = default(ShrineBossBehavior);
ShrineHealingBehavior val5 = default(ShrineHealingBehavior);
ShrineCleanseBehavior val6 = default(ShrineCleanseBehavior);
PortalStatueBehavior val7 = default(PortalStatueBehavior);
ChestBehavior val8 = default(ChestBehavior);
ShopTerminalBehavior val9 = default(ShopTerminalBehavior);
SummonMasterBehavior val10 = default(SummonMasterBehavior);
foreach (PurchaseInteraction purchaseInteraction in purchaseInteractions)
{
if ((Object)(object)purchaseInteraction == (Object)null || !purchaseInteraction.available || processedTerminals.Contains(((Component)purchaseInteraction).gameObject))
{
continue;
}
if (config.DrawShrinesToggle.Value)
{
if (config.DrawShrine_Blood.Value && ((Component)purchaseInteraction).TryGetComponent<ShrineBloodBehavior>(ref val))
{
drawLabel(((Component)purchaseInteraction).transform.position, "Shrine of Blood", config.ColorShrine_Blood.Value);
continue;
}
if (config.DrawShrine_Chance.Value && ((Component)purchaseInteraction).TryGetComponent<ShrineChanceBehavior>(ref val2))
{
drawLabel(((Component)purchaseInteraction).transform.position, "Shrine of Chance", config.ColorShrine_Chance.Value);
continue;
}
if (config.DrawShrine_Combat.Value && ((Component)purchaseInteraction).TryGetComponent<ShrineCombatBehavior>(ref val3))
{
drawLabel(((Component)purchaseInteraction).transform.position, "Shrine of Combat", config.ColorShrine_Combat.Value);
continue;
}
if (((Component)purchaseInteraction).TryGetComponent<ShrineBossBehavior>(ref val4) && (Object)(object)val4.symbolTransform != (Object)null)
{
if (config.DrawShrine_Mountain.Value && ((Object)((Component)val4.symbolTransform).gameObject).name.ToLower().Contains("mountain"))
{
drawLabel(((Component)purchaseInteraction).transform.position, "Shrine of the Mountain", config.ColorShrine_Mountain.Value);
continue;
}
if (config.DrawShrine_Woods.Value && ((Object)((Component)val4.symbolTransform).gameObject).name.ToLower().Contains("woods"))
{
drawLabel(((Component)purchaseInteraction).transform.position, "Shrine of the Woods", config.ColorShrine_Woods.Value);
continue;
}
}
if (config.DrawShrine_Healing.Value && ((Component)purchaseInteraction).TryGetComponent<ShrineHealingBehavior>(ref val5))
{
drawLabel(((Component)purchaseInteraction).transform.position, "Shrine of Healing", config.ColorShrine_Healing.Value);
continue;
}
if (config.DrawShrine_Cleanse.Value && ((Component)purchaseInteraction).TryGetComponent<ShrineCleanseBehavior>(ref val6))
{
drawLabel(((Component)purchaseInteraction).transform.position, "Cleansing Pool", config.ColorShrine_Cleanse.Value);
continue;
}
if (config.DrawShrine_Halcyon.Value && purchaseInteraction.GetDisplayName().ToLower().Contains("halcyon shrine"))
{
drawLabel(((Component)purchaseInteraction).transform.position, "Halcyon Shrine", config.ColorShrine_Halcyon.Value);
continue;
}
if (config.DrawShrine_Gold.Value && ((Object)purchaseInteraction).name.ToLower().Contains("shrinegold"))
{
drawLabel(((Component)purchaseInteraction).transform.position, "Shrine of Gold", config.ColorShrine_Gold.Value);
continue;
}
}
if (config.DrawPortalsToggle.Value && ((Component)purchaseInteraction).TryGetComponent<PortalStatueBehavior>(ref val7))
{
if (config.DrawPortal_Newt.Value && (int)val7.portalType == 0)
{
drawLabel(((Component)purchaseInteraction).transform.position, "Newt Altar", config.ColorPortal_Newt.Value);
continue;
}
if (config.DrawPortal_Gold.Value && (int)val7.portalType == 1)
{
drawLabel(((Component)purchaseInteraction).transform.position, "Gold Altar", config.ColorPortal_Gold.Value);
continue;
}
}
if (config.DrawChestsToggle.Value && ((Component)purchaseInteraction).TryGetComponent<ChestBehavior>(ref val8))
{
if (config.ShowChestItemNames.Value)
{
DrawPickupDef(PickupCatalog.GetPickupDef(val8.dropPickup), ((Component)purchaseInteraction).transform.position);
continue;
}
Color labelColor = Color.white;
if (((Object)purchaseInteraction).name.ToLower().Contains("lunar"))
{
labelColor = config.ColorTier_Lunar.Value;
}
else if (((Object)purchaseInteraction).name.ToLower().Contains("void"))
{
labelColor = config.ColorTier_VoidCommon.Value;
}
drawLabel(((Component)purchaseInteraction).transform.position, purchaseInteraction.GetDisplayName(), labelColor);
}
else if (config.DrawPrintersToggle.Value && ((Component)purchaseInteraction).TryGetComponent<ShopTerminalBehavior>(ref val9) && (int)purchaseInteraction.costType != 1)
{
drawLabel(((Component)val9).transform.position, "Printer", config.PrinterColor.Value);
if (config.ShowPrinterItemNames.Value)
{
int num = config.LabelSize.Value + 2;
DrawPickupDef(PickupCatalog.GetPickupDef(val9.pickupIndex), ((Component)val9).transform.position, new Vector2(0f, (float)num));
}
}
else if (config.DrawDronesToggle.Value && ((Component)purchaseInteraction).TryGetComponent<SummonMasterBehavior>(ref val10))
{
drawLabel(((Component)purchaseInteraction).transform.position, purchaseInteraction.GetDisplayName(), config.DroneColor.Value);
}
else if (config.DrawAllPurchaseInteractionsToggle.Value)
{
drawLabel(((Component)purchaseInteraction).transform.position, purchaseInteraction.GetDisplayName(), config.AllInteractionColor.Value);
}
}
}
private void DrawPickupDef(PickupDef def, Vector3 position, Vector2 screenOffset)
{
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Invalid comparison between Unknown and I4
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Invalid comparison between Unknown and I4
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_009e: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: 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_0096: Unknown result type (might be due to invalid IL or missing references)
if (def == null)
{
return;
}
string @string;
Color labelColor;
if ((int)def.itemIndex != -1)
{
ItemDef itemDef = ItemCatalog.GetItemDef(def.itemIndex);
@string = Language.GetString(itemDef.nameToken);
labelColor = GetColorForItemTier(itemDef.tier);
}
else
{
if ((int)def.equipmentIndex == -1)
{
return;
}
EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(def.equipmentIndex);
@string = Language.GetString(equipmentDef.nameToken);
labelColor = (equipmentDef.isLunar ? config.Color_LunarEquipment.Value : config.Color_Equipment.Value);
}
drawLabel(position, @string, labelColor, screenOffset);
}
private void DrawPickupDef(PickupDef def, Vector3 position)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
DrawPickupDef(def, position, Vector2.zero);
}
private Color GetColorForItemTier(ItemTier tier)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_0004: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected I4, but got Unknown
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: 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_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0095: Unknown result type (might be due to invalid IL or missing references)
//IL_009a: Unknown result type (might be due to invalid IL or missing references)
//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
return (Color)((int)tier switch
{
0 => config.ColorTier_Common.Value,
1 => config.ColorTier_Uncommon.Value,
2 => config.ColorTier_Legendary.Value,
4 => config.ColorTier_Boss.Value,
3 => config.ColorTier_Lunar.Value,
6 => config.ColorTier_VoidCommon.Value,
7 => config.ColorTier_VoidUncommon.Value,
8 => config.ColorTier_VoidLegendary.Value,
9 => config.ColorTier_VoidBoss.Value,
_ => Color.grey,
});
}
private void drawLabel(Vector3 objectPosition, string labelText, Color labelColor, Vector2 screenOffset)
{
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_005d: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Expected O, but got Unknown
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Expected O, but got Unknown
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
//IL_010e: Unknown result type (might be due to invalid IL or missing references)
//IL_0113: Unknown result type (might be due to invalid IL or missing references)
//IL_0119: Unknown result type (might be due to invalid IL or missing references)
//IL_0126: Expected O, but got Unknown
//IL_0151: Unknown result type (might be due to invalid IL or missing references)
//IL_017e: Unknown result type (might be due to invalid IL or missing references)
//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)Camera.main == (Object)null)
{
return;
}
string text = (config.AltTextToggle.Value ? config.AltText.Value : labelText);
Vector3 val = Camera.main.WorldToScreenPoint(objectPosition);
if (!(val.z < 0f))
{
val.y = (float)Screen.height - val.y;
val.x += screenOffset.x;
val.y += screenOffset.y;
GUIContent val2 = new GUIContent(text);
GUIStyle val3 = new GUIStyle
{
fontSize = config.LabelSize.Value,
alignment = (TextAnchor)4
};
Vector2 val4 = val3.CalcSize(val2);
Rect val5 = default(Rect);
((Rect)(ref val5))..ctor(val.x - val4.x / 2f, val.y - val4.y / 2f, val4.x, val4.y);
if (config.DrawTextShadow.Value)
{
GUIStyle val6 = new GUIStyle(val3);
val6.normal.textColor = Color.black;
GUIStyle val7 = val6;
float value = config.TextShadowSize.Value;
GUI.Label(new Rect(((Rect)(ref val5)).x - value, ((Rect)(ref val5)).y, ((Rect)(ref val5)).width, ((Rect)(ref val5)).height), val2, val7);
GUI.Label(new Rect(((Rect)(ref val5)).x + value, ((Rect)(ref val5)).y, ((Rect)(ref val5)).width, ((Rect)(ref val5)).height), val2, val7);
GUI.Label(new Rect(((Rect)(ref val5)).x, ((Rect)(ref val5)).y - value, ((Rect)(ref val5)).width, ((Rect)(ref val5)).height), val2, val7);
GUI.Label(new Rect(((Rect)(ref val5)).x, ((Rect)(ref val5)).y + value, ((Rect)(ref val5)).width, ((Rect)(ref val5)).height), val2, val7);
}
val3.normal.textColor = labelColor;
GUI.Label(val5, val2, val3);
}
}
private void drawLabel(Vector3 objectPosition, string labelText, Color labelColor)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_0004: Unknown result type (might be due to invalid IL or missing references)
drawLabel(objectPosition, labelText, labelColor, Vector2.zero);
}
private void drawScrappers()
{
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
if (scrappers == null)
{
return;
}
foreach (ScrapperController scrapper in scrappers)
{
if ((Object)(object)scrapper != (Object)null)
{
drawLabel(((Component)scrapper).transform.position, "Scrapper", config.ScrapperColor.Value);
}
}
}
private void drawTeleporters()
{
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
if (teleporters == null)
{
return;
}
foreach (TeleporterInteraction teleporter in teleporters)
{
if ((Object)(object)teleporter != (Object)null)
{
drawLabel(((Component)teleporter).transform.position, "Teleporter", config.TeleporterColor.Value);
}
}
}
}
[BepInPlugin("Rabusu.ESP", "ESP", "1.1.5")]
public class Main : BaseUnityPlugin
{
public const string PluginGUID = "Rabusu.ESP";
public const string PluginAuthor = "Rabusu";
public const string PluginName = "ESP";
public const string PluginVersion = "1.1.5";
private ESP esp;
private Menu menu;
private bool espEnabled = false;
private void Awake()
{
config.Init(((BaseUnityPlugin)this).Config);
menu = ((Component)this).gameObject.AddComponent<Menu>();
esp = ((Component)this).gameObject.AddComponent<ESP>();
Stage.onStageStartGlobal += OnStageStart;
}
private void Update()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
if (Input.GetKeyDown(config.ToggleEspKey.Value))
{
espEnabled = !espEnabled;
}
if (Input.GetKeyDown(config.ToggleMenuKey.Value))
{
menu.showMenu = !menu.showMenu;
config.configFile.Save();
}
}
private void OnGUI()
{
menu.OnGUI();
if (espEnabled)
{
esp.drawESP();
}
}
public void OnStageStart(Stage stage)
{
esp.Find();
}
private void OnDestroy()
{
Stage.onStageStartGlobal -= OnStageStart;
}
}
public class Menu : MonoBehaviour
{
public bool showMenu;
private Rect _mainRect = new Rect(40f, 40f, 360f, 720f);
private Rect _colorPickerRect = new Rect(410f, 40f, 250f, 180f);
private ConfigEntry<Color> _colorToEdit;
private string _colorPickerTitle;
private Vector2 _scrollPosition;
public void OnGUI()
{
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Expected O, but got Unknown
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Expected O, but got Unknown
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
if (!showMenu)
{
_colorToEdit = null;
return;
}
_mainRect = GUI.Window(0, _mainRect, new WindowFunction(MenuWindow), "ESP Settings");
if (_colorToEdit != null)
{
_colorPickerRect = GUI.Window(1, _colorPickerRect, new WindowFunction(ColorPickerWindow), _colorPickerTitle);
}
}
private void MenuWindow(int windowID)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
GUI.DragWindow(new Rect(0f, 0f, 10000f, 20f));
_scrollPosition = GUILayout.BeginScrollView(_scrollPosition, Array.Empty<GUILayoutOption>());
GUILayout.BeginVertical(GUIStyle.op_Implicit("box"), Array.Empty<GUILayoutOption>());
GUILayout.Label("General Settings", Array.Empty<GUILayoutOption>());
GUILayout.Label($"Label Size: {config.LabelSize.Value}", Array.Empty<GUILayoutOption>());
config.LabelSize.Value = (int)GUILayout.HorizontalSlider((float)config.LabelSize.Value, 8f, 80f, Array.Empty<GUILayoutOption>());
config.AltTextToggle.Value = GUILayout.Toggle(config.AltTextToggle.Value, " Alternative Look", Array.Empty<GUILayoutOption>());
if (config.AltTextToggle.Value)
{
GUILayout.Label("Alt Text:", Array.Empty<GUILayoutOption>());
config.AltText.Value = GUILayout.TextField(config.AltText.Value, 1, Array.Empty<GUILayoutOption>());
}
config.DrawTextShadow.Value = GUILayout.Toggle(config.DrawTextShadow.Value, " Text Shadow", Array.Empty<GUILayoutOption>());
GUILayout.EndVertical();
GUILayout.BeginVertical(GUIStyle.op_Implicit("box"), Array.Empty<GUILayoutOption>());
GUILayout.Label("Main Toggles", Array.Empty<GUILayoutOption>());
config.DrawChestsToggle.Value = GUILayout.Toggle(config.DrawChestsToggle.Value, " Chests", Array.Empty<GUILayoutOption>());
if (config.DrawChestsToggle.Value)
{
IndentedToggle(config.ShowChestItemNames, "Show Item Names");
}
DrawColorOption("Shops", config.DrawShopsToggle, config.ShopColor);
if (config.DrawShopsToggle.Value)
{
IndentedToggle(config.ShowShopItemNames, "Show Shop Items");
}
GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
DrawColorOption("Printers", config.DrawPrintersToggle, config.PrinterColor);
if (config.DrawPrintersToggle.Value)
{
IndentedToggle(config.ShowPrinterItemNames, "Show Item Names");
}
GUILayout.EndVertical();
DrawColorOption("Scrappers", config.DrawScrappersToggle, config.ScrapperColor);
DrawColorOption("Teleporters", config.DrawTeleportersToggle, config.TeleporterColor);
DrawColorOption("Drones & Turrets", config.DrawDronesToggle, config.DroneColor);
config.DrawShrinesToggle.Value = GUILayout.Toggle(config.DrawShrinesToggle.Value, " Shrines", Array.Empty<GUILayoutOption>());
config.DrawPortalsToggle.Value = GUILayout.Toggle(config.DrawPortalsToggle.Value, " Altars", Array.Empty<GUILayoutOption>());
DrawColorOption("All Other Interactions", config.DrawAllPurchaseInteractionsToggle, config.AllInteractionColor);
GUILayout.EndVertical();
if (config.ShowChestItemNames.Value || config.ShowPrinterItemNames.Value || config.ShowShopItemNames.Value)
{
GUILayout.BeginVertical(GUIStyle.op_Implicit("box"), Array.Empty<GUILayoutOption>());
GUILayout.Label("Item & Equipment Colors", Array.Empty<GUILayoutOption>());
DrawColorOption("Common", config.ColorTier_Common);
DrawColorOption("Uncommon", config.ColorTier_Uncommon);
DrawColorOption("Legendary", config.ColorTier_Legendary);
DrawColorOption("Boss", config.ColorTier_Boss);
DrawColorOption("Lunar", config.ColorTier_Lunar);
DrawColorOption("Void Common", config.ColorTier_VoidCommon);
DrawColorOption("Void Uncommon", config.ColorTier_VoidUncommon);
DrawColorOption("Void Legendary", config.ColorTier_VoidLegendary);
DrawColorOption("Void Boss", config.ColorTier_VoidBoss);
DrawColorOption("Equipment", config.Color_Equipment);
DrawColorOption("Lunar Equipment", config.Color_LunarEquipment);
GUILayout.EndVertical();
}
if (config.DrawShrinesToggle.Value)
{
GUILayout.BeginVertical(GUIStyle.op_Implicit("box"), Array.Empty<GUILayoutOption>());
GUILayout.Label("Shrine Settings", Array.Empty<GUILayoutOption>());
DrawSubColorOption("Shrine of Blood", config.DrawShrine_Blood, config.ColorShrine_Blood);
DrawSubColorOption("Shrine of Chance", config.DrawShrine_Chance, config.ColorShrine_Chance);
DrawSubColorOption("Shrine of Combat", config.DrawShrine_Combat, config.ColorShrine_Combat);
DrawSubColorOption("Shrine of Gold", config.DrawShrine_Gold, config.ColorShrine_Gold);
DrawSubColorOption("Shrine of the Mountain", config.DrawShrine_Mountain, config.ColorShrine_Mountain);
DrawSubColorOption("Shrine of the Woods", config.DrawShrine_Woods, config.ColorShrine_Woods);
DrawSubColorOption("Shrine of Healing", config.DrawShrine_Healing, config.ColorShrine_Healing);
DrawSubColorOption("Cleansing Pool", config.DrawShrine_Cleanse, config.ColorShrine_Cleanse);
DrawSubColorOption("Halcyon Shrine", config.DrawShrine_Halcyon, config.ColorShrine_Halcyon);
GUILayout.EndVertical();
}
if (config.DrawPortalsToggle.Value)
{
GUILayout.BeginVertical(GUIStyle.op_Implicit("box"), Array.Empty<GUILayoutOption>());
GUILayout.Label("Altar Settings", Array.Empty<GUILayoutOption>());
DrawSubColorOption("Newt Altar", config.DrawPortal_Newt, config.ColorPortal_Newt);
DrawSubColorOption("Gold Altar", config.DrawPortal_Gold, config.ColorPortal_Gold);
GUILayout.EndVertical();
}
GUILayout.EndScrollView();
}
private void IndentedToggle(ConfigEntry<bool> config, string text)
{
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayout.Space(20f);
config.Value = GUILayout.Toggle(config.Value, text, Array.Empty<GUILayoutOption>());
GUILayout.EndHorizontal();
}
private void ColorPickerWindow(int windowID)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: 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_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_009a: Unknown result type (might be due to invalid IL or missing references)
//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Unknown result type (might be due to invalid IL or missing references)
//IL_0122: Unknown result type (might be due to invalid IL or missing references)
//IL_0133: Unknown result type (might be due to invalid IL or missing references)
GUI.DragWindow(new Rect(0f, 0f, 10000f, 20f));
if (_colorToEdit != null)
{
Color value = _colorToEdit.Value;
GUI.color = Color.red;
GUILayout.Label($"R: {value.r:F2}", Array.Empty<GUILayoutOption>());
value.r = GUILayout.HorizontalSlider(value.r, 0f, 1f, Array.Empty<GUILayoutOption>());
GUI.color = Color.green;
GUILayout.Label($"G: {value.g:F2}", Array.Empty<GUILayoutOption>());
value.g = GUILayout.HorizontalSlider(value.g, 0f, 1f, Array.Empty<GUILayoutOption>());
GUI.color = Color.blue;
GUILayout.Label($"B: {value.b:F2}", Array.Empty<GUILayoutOption>());
value.b = GUILayout.HorizontalSlider(value.b, 0f, 1f, Array.Empty<GUILayoutOption>());
GUI.color = Color.white;
_colorToEdit.Value = value;
if (GUILayout.Button("Close", Array.Empty<GUILayoutOption>()))
{
_colorToEdit = null;
}
}
}
private void DrawColorOption(string title, ConfigEntry<bool> toggle, ConfigEntry<Color> color)
{
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
toggle.Value = GUILayout.Toggle(toggle.Value, " " + title, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) });
if (toggle.Value)
{
ColorButton(color, title);
}
GUILayout.EndHorizontal();
}
private void DrawColorOption(string title, ConfigEntry<Color> color)
{
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayout.Label(" " + title, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) });
ColorButton(color, title);
GUILayout.EndHorizontal();
}
private void DrawSubColorOption(string title, ConfigEntry<bool> toggle, ConfigEntry<Color> color)
{
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayout.Space(20f);
toggle.Value = GUILayout.Toggle(toggle.Value, " " + title, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) });
if (toggle.Value)
{
ColorButton(color, title);
}
GUILayout.EndHorizontal();
}
private void ColorButton(ConfigEntry<Color> color, string title)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
Color backgroundColor = GUI.backgroundColor;
GUI.backgroundColor = color.Value;
if (GUILayout.Button("", (GUILayoutOption[])(object)new GUILayoutOption[2]
{
GUILayout.Width(40f),
GUILayout.Height(18f)
}))
{
if (_colorToEdit == color)
{
_colorToEdit = null;
}
else
{
_colorToEdit = color;
_colorPickerTitle = title + " Color";
}
}
GUI.backgroundColor = backgroundColor;
}
}
}