using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using LLGUI;
using LLHandlers;
using Rewired;
using UnityEngine;
using UnityEngine.UI;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("more inputs")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("more inputs")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("5c20c053-f176-4014-ae15-bc82b0e60192")]
[assembly: AssemblyFileVersion("1.0.0.4")]
[assembly: TargetFramework(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.4")]
[module: UnverifiableCode]
namespace moreinputs;
[BepInPlugin("us.wallace.plugins.llb.moreinputs", "more inputs Plug-In", "1.0.0.4")]
public class Plugin : BaseUnityPlugin
{
public static Dictionary<int, string> InputActions = new Dictionary<int, string>
{
[InputAction.SWING] = "Swing",
[InputAction.BUNT] = "Bunt",
[InputAction.GRAB] = "Grab",
[InputAction.JUMP] = "Jump",
[InputAction.TAUNT] = "Taunt",
[InputAction.PAUSE] = "Pause"
};
public static Dictionary<int, string> NewInputActions = new Dictionary<int, string>
{
[InputAction.UP] = "Up",
[InputAction.DOWN] = "Down",
[InputAction.LEFT] = "Left",
[InputAction.RIGHT] = "Right",
[InputAction.EXPRESS_UP] = "Nice",
[InputAction.EXPRESS_DOWN] = "Bring It",
[InputAction.EXPRESS_LEFT] = "Oops",
[InputAction.EXPRESS_RIGHT] = "Wow",
[InputAction.OK] = "Select",
[InputAction.MENU] = "Ready",
[InputAction.SHLEFT] = "Skin Left",
[InputAction.SHRIGHT] = "Skin Right"
};
private void Awake()
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Expected O, but got Unknown
((BaseUnityPlugin)this).Logger.LogDebug((object)"Patching effects settings...");
Harmony val = new Harmony("us.wallace.plugins.llb.moreinputs");
val.PatchAll(typeof(EConfigurablesPatch));
val.PatchAll(typeof(GetInputActionNamePatch));
val.PatchAll(typeof(PCBBCFNFDJLPatch));
val.PatchAll(typeof(SetMovementKeysPatch));
val.PatchAll(typeof(BFGFOCFBGMJPatch));
val.PatchAll(typeof(UpdateLooksPatch));
}
}
internal class EConfigurablesPatch
{
[HarmonyPatch(typeof(InputAction), "EConfigurables")]
[HarmonyPostfix]
private static void EConfigurables_Postfix(ref IEnumerable<int> __result)
{
__result = new List<int>
{
InputAction.UP,
InputAction.DOWN,
InputAction.LEFT,
InputAction.RIGHT,
InputAction.SWING,
InputAction.JUMP,
InputAction.BUNT,
InputAction.GRAB,
InputAction.TAUNT,
InputAction.EXPRESS_UP,
InputAction.EXPRESS_DOWN,
InputAction.EXPRESS_LEFT,
InputAction.EXPRESS_RIGHT,
InputAction.PAUSE,
InputAction.OK,
InputAction.MENU,
InputAction.BACK,
InputAction.MENU_UP,
InputAction.MENU_DOWN,
InputAction.MENU_LEFT,
InputAction.MENU_RIGHT,
InputAction.SHLEFT,
InputAction.SHRIGHT
};
}
}
public enum MyInputConfigBarType
{
MOREINPUT
}
internal class GetInputActionNamePatch
{
[HarmonyPrefix]
[HarmonyPatch(typeof(TextHandler), "GetInputActionName")]
public static bool GetInputActionName_Prefix(ref string __result, int inputAction)
{
string text = string.Empty;
if (inputAction == InputAction.UP)
{
text = "Up";
}
if (inputAction == InputAction.DOWN)
{
text = "Down";
}
if (inputAction == InputAction.LEFT)
{
text = "Left";
}
if (inputAction == InputAction.RIGHT)
{
text = "Right";
}
if (inputAction == InputAction.SWING)
{
text = "Swing";
}
if (inputAction == InputAction.JUMP)
{
text = "Jump";
}
if (inputAction == InputAction.BUNT)
{
text = "Bunt";
}
if (inputAction == InputAction.GRAB)
{
text = "Grab";
}
if (inputAction == InputAction.TAUNT)
{
text = "Taunt";
}
if (inputAction == InputAction.PAUSE)
{
text = "Pause";
}
if (inputAction == InputAction.MENU)
{
text = "Ready";
}
if (inputAction == InputAction.OK)
{
text = "Ok";
}
if (inputAction == InputAction.BACK)
{
text = "Back";
}
if (inputAction == InputAction.SHLEFT)
{
text = "Skin L";
}
if (inputAction == InputAction.SHRIGHT)
{
text = "Skin R";
}
if (inputAction == InputAction.EXPRESS_UP)
{
text = "Nice";
}
if (inputAction == InputAction.EXPRESS_DOWN)
{
text = "Bring It";
}
if (inputAction == InputAction.EXPRESS_LEFT)
{
text = "Oops";
}
if (inputAction == InputAction.EXPRESS_RIGHT)
{
text = "Wow";
}
if (inputAction == InputAction.MENU_UP)
{
text = "M Up";
}
if (inputAction == InputAction.MENU_DOWN)
{
text = "M Down";
}
if (inputAction == InputAction.MENU_LEFT)
{
text = "M Left";
}
if (inputAction == InputAction.MENU_RIGHT)
{
text = "M Right";
}
if (text == string.Empty)
{
__result = "???";
return true;
}
__result = TextHandler.Get(text.ToUpperInvariant() ?? "", new string[0]);
return false;
}
}
internal class PCBBCFNFDJLPatch
{
[HarmonyPatch(typeof(HGFCCNMEEEF), "PCBBCFNFDJL")]
[HarmonyPrefix]
private static bool PCBBCFNFDJL_Prefix(HGFCCNMEEEF __instance)
{
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: 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_0195: Unknown result type (might be due to invalid IL or missing references)
//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
__instance.CNINOFJOLNP.posBarNext = new Vector3(-150f, 120f, -30f);
__instance.CNINOFJOLNP.offsetBars = new Vector3(-5f, -20f, -30f);
OptionsBar obj = __instance.CNINOFJOLNP.AddBar((OptionsBarType)4, string.Empty, (HNEDEAGADKO)0, (List<string>)null);
((OptionsBarInputConfig)((obj is OptionsBarInputConfig) ? obj : null)).inputConfigBarType = (InputConfigBarType)1;
foreach (int item in InputAction.EConfigurables())
{
string inputActionName = TextHandler.GetInputActionName(item);
OptionsBar obj2 = __instance.CNINOFJOLNP.AddBar((OptionsBarType)4, inputActionName, (HNEDEAGADKO)400, (List<string>)null);
((OptionsBarInputConfig)((obj2 is OptionsBarInputConfig) ? obj2 : null)).inputAction = item;
if (item == InputAction.BUNT || item == InputAction.GRAB || item == InputAction.JUMP || item == InputAction.TAUNT || item == InputAction.SWING || item == InputAction.EXPRESS_DOWN)
{
OptionsBar obj3 = __instance.CNINOFJOLNP.AddBar((OptionsBarType)4, string.Empty, (HNEDEAGADKO)400, (List<string>)null);
OptionsBarInputConfig val = (OptionsBarInputConfig)(object)((obj3 is OptionsBarInputConfig) ? obj3 : null);
val.inputAction = item;
val.altInput = true;
}
if (item == InputAction.UP || item == InputAction.DOWN || item == InputAction.LEFT || item == InputAction.RIGHT)
{
OptionsBar obj4 = __instance.CNINOFJOLNP.AddBar((OptionsBarType)4, string.Empty, (HNEDEAGADKO)400, (List<string>)null);
OptionsBarInputConfig val2 = (OptionsBarInputConfig)(object)((obj4 is OptionsBarInputConfig) ? obj4 : null);
val2.inputAction = item;
val2.altInput = true;
}
}
OptionsBar obj5 = __instance.CNINOFJOLNP.AddBar((OptionsBarType)4, string.Empty, (HNEDEAGADKO)0, (List<string>)null);
((OptionsBarInputConfig)((obj5 is OptionsBarInputConfig) ? obj5 : null)).inputConfigBarType = (InputConfigBarType)2;
OptionsBar obj6 = __instance.CNINOFJOLNP.AddBar((OptionsBarType)4, string.Empty, (HNEDEAGADKO)0, (List<string>)null);
((OptionsBarInputConfig)((obj6 is OptionsBarInputConfig) ? obj6 : null)).inputConfigBarType = (InputConfigBarType)3;
return false;
}
}
internal class UpdateLooksPatch
{
[HarmonyPatch(typeof(InputConfigElement), "UpdateLooks")]
[HarmonyPrefix]
public static bool UpdateLooks_Prefix(InputConfigElement __instance)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: 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_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Expected I4, but got Unknown
//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_013a: Unknown result type (might be due to invalid IL or missing references)
//IL_0140: Invalid comparison between Unknown and I4
//IL_016d: Unknown result type (might be due to invalid IL or missing references)
//IL_0172: Unknown result type (might be due to invalid IL or missing references)
InputConfigBarType inputConfigBarType = __instance.inputConfigBarType;
InputConfigBarType val = inputConfigBarType;
switch ((int)val)
{
case 0:
{
int inputAction = __instance.inputAction;
__instance.SetText(InputHandler.GetControlName(__instance.inputConfigController, inputAction, __instance.altInput));
if (((LLClickable)__instance.button).CanClick() != __instance.inputConfigController.DJFKIGINECC)
{
((LLClickable)__instance.button).SetActive(__instance.inputConfigController.DJFKIGINECC);
((LLClickable)__instance.button).OnHoverOut(-1);
}
break;
}
case 1:
__instance.SetText(__instance.inputConfigController.KMBILNDIDKK);
__instance.button.colDisabled = OptionsBarInputConfig.HEADER_COLOR;
((LLClickable)__instance.button).SetActive(false);
break;
case 2:
if (__instance.inputConfigController.DJFKIGINECC)
{
__instance.SetTextCode("OPTIONS_BT_SAVE");
}
else
{
__instance.SetTextCode("OPTIONS_BT_CHANGE");
}
break;
case 3:
if (__instance.inputConfigController.DJFKIGINECC)
{
__instance.SetTextCode("OPTIONS_BT_CANCEL");
}
else
{
__instance.SetTextCode("BT_USE_DEFAULTS");
}
break;
case 4:
if ((int)__instance.inputConfigController.NNGJKLIIDNI > 0)
{
((LLClickable)__instance.button).SetActive(false);
((LLControl)__instance.button).visible = false;
}
else
{
MovementKeys movementKeys = InputHandler.movementKeys;
__instance.SetTextCode("OPTIONS_MOVEMENT_" + ((object)(MovementKeys)(ref movementKeys)).ToString());
((LLClickable)__instance.button).SetActive(__instance.inputConfigController.DJFKIGINECC);
}
break;
case 5:
__instance.SetText(string.Empty);
((LLClickable)__instance.button).SetActive(false);
break;
}
return false;
}
}
internal class SetMovementKeysPatch
{
[HarmonyPatch(typeof(InputHandler), "SetMovementKeys")]
[HarmonyPrefix]
public static bool SetMovementKeys_Prefix(MovementKeys mk)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
KeyCode[] movementKeys = InputHandler.GetMovementKeys(mk);
if (movementKeys == null)
{
return true;
}
int[] array = new int[4]
{
InputAction.LEFT,
InputAction.RIGHT,
InputAction.UP,
InputAction.DOWN
};
return false;
}
}
internal class BFGFOCFBGMJPatch
{
[HarmonyPatch(typeof(HGFCCNMEEEF), "BFGFOCFBGMJ")]
[HarmonyPrefix]
private static bool BFGFOCFBGMJ_Prefix(HGFCCNMEEEF __instance)
{
//IL_0032: 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_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Invalid comparison between Unknown and I4
//IL_0069: 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_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Invalid comparison between Unknown and I4
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_007f: Invalid comparison between Unknown and I4
//IL_0246: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0093: Invalid comparison between Unknown and I4
//IL_024e: Unknown result type (might be due to invalid IL or missing references)
//IL_0254: Invalid comparison between Unknown and I4
//IL_0095: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Invalid comparison between Unknown and I4
//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
//IL_00b0: Invalid comparison between Unknown and I4
//IL_0285: Unknown result type (might be due to invalid IL or missing references)
//IL_029c: Unknown result type (might be due to invalid IL or missing references)
//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
//IL_0264: Unknown result type (might be due to invalid IL or missing references)
//IL_0269: Unknown result type (might be due to invalid IL or missing references)
//IL_0279: 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)
//IL_00b9: Invalid comparison between Unknown and I4
//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
//IL_00cd: Invalid comparison between Unknown and I4
//IL_02db: Unknown result type (might be due to invalid IL or missing references)
//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_00d6: Invalid comparison between Unknown and I4
//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
//IL_00e7: Invalid comparison between Unknown and I4
//IL_032b: Unknown result type (might be due to invalid IL or missing references)
//IL_0330: Unknown result type (might be due to invalid IL or missing references)
//IL_033a: Unknown result type (might be due to invalid IL or missing references)
//IL_033c: Unknown result type (might be due to invalid IL or missing references)
//IL_0303: 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_030c: Unknown result type (might be due to invalid IL or missing references)
//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
//IL_00ed: Invalid comparison between Unknown and I4
//IL_031c: 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_0107: Invalid comparison between Unknown and I4
//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
//IL_00f3: Invalid comparison between Unknown and I4
//IL_0109: Unknown result type (might be due to invalid IL or missing references)
//IL_0110: Invalid comparison between Unknown and I4
//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
//IL_00f9: Invalid comparison between Unknown and I4
//IL_013e: Unknown result type (might be due to invalid IL or missing references)
//IL_0142: Invalid comparison between Unknown and I4
//IL_0112: Unknown result type (might be due to invalid IL or missing references)
//IL_0119: Invalid comparison between Unknown and I4
//IL_0144: Unknown result type (might be due to invalid IL or missing references)
//IL_0148: Invalid comparison between Unknown and I4
//IL_011b: Unknown result type (might be due to invalid IL or missing references)
//IL_0122: Invalid comparison between Unknown and I4
//IL_0155: Unknown result type (might be due to invalid IL or missing references)
//IL_015c: Invalid comparison between Unknown and I4
//IL_0124: Unknown result type (might be due to invalid IL or missing references)
//IL_012b: Invalid comparison between Unknown and I4
//IL_015e: Unknown result type (might be due to invalid IL or missing references)
//IL_0165: Invalid comparison between Unknown and I4
//IL_012d: Unknown result type (might be due to invalid IL or missing references)
//IL_0134: Invalid comparison between Unknown and I4
//IL_0172: Unknown result type (might be due to invalid IL or missing references)
//IL_0179: Invalid comparison between Unknown and I4
//IL_017b: Unknown result type (might be due to invalid IL or missing references)
//IL_0182: Invalid comparison between Unknown and I4
//IL_018f: Unknown result type (might be due to invalid IL or missing references)
//IL_0193: Invalid comparison between Unknown and I4
//IL_0195: Unknown result type (might be due to invalid IL or missing references)
//IL_019c: Invalid comparison between Unknown and I4
//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
//IL_01d0: Invalid comparison between Unknown and I4
InputConfigAssignment val2 = default(InputConfigAssignment);
foreach (JBKFDDKLDDG inputConfigController in HGFCCNMEEEF.inputConfigControllers)
{
if (inputConfigController.DOPGIJCCNLD == null)
{
continue;
}
ControllerPollingInfo val = ((Controller)(ref inputConfigController.GDEMBCKIDMA)).Poll();
if (!((ControllerPollingInfo)(ref val)).success)
{
continue;
}
if ((int)inputConfigController.NNGJKLIIDNI == 0 || (int)inputConfigController.NNGJKLIIDNI == 1)
{
KeyCode keyboardKey = ((ControllerPollingInfo)(ref val)).keyboardKey;
bool flag = false;
flag = flag || ((int)keyboardKey >= 97 && (int)keyboardKey <= 122);
flag = flag || ((int)keyboardKey >= 282 && (int)keyboardKey <= 296);
flag = flag || ((int)keyboardKey >= 273 && (int)keyboardKey <= 276);
flag = flag || ((int)keyboardKey >= 323 && (int)keyboardKey <= 329);
flag = flag || (int)keyboardKey == 9 || (int)keyboardKey == 13 || (int)keyboardKey == 19 || (int)keyboardKey == 27;
flag = flag || (int)keyboardKey == 127 || (int)keyboardKey == 277 || (int)keyboardKey == 278 || (int)keyboardKey == 279 || (int)keyboardKey == 280 || (int)keyboardKey == 281;
flag = flag || ((int)keyboardKey >= 32 && (int)keyboardKey <= 95);
flag = flag || ((int)keyboardKey >= 256 && (int)keyboardKey <= 272);
flag = flag || ((int)keyboardKey >= 300 && (int)keyboardKey <= 319);
flag = flag && ((int)keyboardKey != 45 || (int)keyboardKey != 269);
if (flag)
{
KeyCode[] movementKeys = InputHandler.GetMovementKeys();
if (movementKeys != null)
{
for (int i = 0; i < movementKeys.Length; i++)
{
if ((int)keyboardKey == (int)movementKeys[i])
{
flag = false;
}
}
}
}
if (!flag)
{
continue;
}
}
else
{
string text = ((ControllerPollingInfo)(ref val)).elementIdentifierName.ToLowerInvariant();
if (text.Contains("d-pad"))
{
continue;
}
}
InputConfigElement dOPGIJCCNLD = inputConfigController.DOPGIJCCNLD;
bool altInput = inputConfigController.DOPGIJCCNLD.altInput;
if ((int)inputConfigController.NNGJKLIIDNI == 0 || (int)inputConfigController.NNGJKLIIDNI == 0)
{
val2.keyCode = ((ControllerPollingInfo)(ref val)).keyboardKey;
val2.elementId = 0;
val2.elementType = (ControllerElementType)0;
}
else
{
val2.keyCode = (KeyCode)0;
val2.elementId = ((ControllerPollingInfo)(ref val)).elementIdentifierId;
val2.elementType = ((ControllerPollingInfo)(ref val)).elementType;
}
val2.inputAction = dOPGIJCCNLD.inputAction;
val2.altInput = altInput;
if (Input.GetKey((KeyCode)8))
{
((InputConfigAssignment)(ref val2)).SetNone();
}
if (((InputConfigAssignment)(ref dOPGIJCCNLD.curAssignment)).SameAs(val2))
{
continue;
}
if (altInput)
{
InputConfigAssignment val3 = PPHBCKEFJEP.LIPIINMJBCC(inputConfigController.PIPEFDJDICP, dOPGIJCCNLD.inputAction, false);
if (((InputConfigAssignment)(ref val2)).SameInputAs(val3))
{
((InputConfigAssignment)(ref val2)).SetNone();
}
}
PPHBCKEFJEP.IJJPHFJAMGK(inputConfigController.PIPEFDJDICP, inputConfigController.NNGJKLIIDNI, val2);
dOPGIJCCNLD.curAssignment = val2;
dOPGIJCCNLD.UpdateLooks();
__instance.LMLEFOBDCED(inputConfigController);
}
return false;
}
}
internal class SelectLanguagePatch
{
[HarmonyPatch(typeof(TextHandler), "SelectLanguage")]
[HarmonyPostfix]
private static void SelectLanguage_Postfix(TextHandler __instance)
{
TextHandler.dictText.Add("INPUT_MOUSE0", "Left Mouse");
TextHandler.dictText.Add("INPUT_MOUSE1", "Right Mouse");
TextHandler.dictText.Add("INPUT_MOUSE2", "Middle Mouse");
TextHandler.dictText.Add("INPUT_MOUSE3", "Mouse 4");
TextHandler.dictText.Add("INPUT_MOUSE4", "Mouse 5");
TextHandler.dictText.Add("INPUT_MOUSE5", "Mouse 6");
TextHandler.dictText.Add("INPUT_MOUSE6", "Mouse VII");
}
}
internal class OptionsBarUpdateLooksPatch
{
[HarmonyPatch(typeof(OptionsBar), "UpdateLooks")]
[HarmonyPostfix]
private static bool UpdateLooks_Prefix(OptionsBar __instance)
{
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0064: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: 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_0088: Expected I4, but got Unknown
//IL_019e: Unknown result type (might be due to invalid IL or missing references)
//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
//IL_01be: Unknown result type (might be due to invalid IL or missing references)
//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
if (((LLClickable)__instance.btButton).catchHover != __instance.isEnabled)
{
((LLClickable)__instance.btButton).SetActive(__instance.isEnabled);
if (__instance.isEnabled)
{
((LLClickable)__instance.btButton).OnHoverOut(-1);
}
else
{
((Graphic)__instance.lbText).color = Color.grey;
}
}
OptionsBarType barType = __instance.barType;
OptionsBarType val = barType;
switch ((int)val)
{
case 0:
TextHandler.SetText(__instance.lbText, __instance.curText);
break;
case 1:
TextHandler.SetText(__instance.lbText, __instance.curText + ": " + ((__instance.curValue != 0) ? TextHandler.Get("TXT_ENABLED", new string[0]) : TextHandler.Get("TXT_DISABLED", new string[0])));
break;
case 2:
TextHandler.SetText(__instance.lbText, __instance.curText + ":");
__instance.imToggle.sprite = ((__instance.curValue != 0) ? __instance.spriteToggle1 : __instance.spriteToggle0);
((Graphic)__instance.imToggle).SetNativeSize();
break;
case 3:
{
TextHandler.SetText(__instance.lbText, __instance.curText + ":");
float num = Mathf.Clamp01(__instance.curValueSlider / 100f);
RectTransform rectTransform = ((Graphic)__instance.rawSlider).rectTransform;
rectTransform.SetSizeWithCurrentAnchors((Axis)0, num * 208f);
((Transform)rectTransform).localPosition = Vector2.op_Implicit(new Vector2(-104f + num * 104f, ((Transform)rectTransform).localPosition.y));
Rect uvRect = __instance.rawSlider.uvRect;
((Rect)(ref uvRect)).width = num;
__instance.rawSlider.uvRect = uvRect;
TextHandler.SetText(__instance.lbValue, __instance.curValue.ToString());
break;
}
case 6:
TextHandler.SetText(__instance.lbText, __instance.curText + ": " + __instance.enumTextCodes[__instance.curValue]);
break;
}
return false;
}
}