using System; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text.RegularExpressions; using ModifAmorphic.Outward.Unity.ActionMenus; using ModifAmorphic.Outward.Unity.ActionUI; using ModifAmorphic.Outward.Unity.ActionUI.Controllers; using ModifAmorphic.Outward.Unity.ActionUI.Data; using ModifAmorphic.Outward.Unity.ActionUI.EquipmentSets; using ModifAmorphic.Outward.Unity.ActionUI.Extensions; using ModifAmorphic.Outward.Unity.ActionUI.Models.EquipmentSets; using ModifAmorphic.Outward.Unity.ActionUI.Services; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; 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: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")] [assembly: AssemblyCompany("ModifAmorphic.Outward.ActionUI")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+0748ee4c3e5cabdf3003c1bbf7caa92a7535e9c1")] [assembly: AssemblyProduct("ModifAmorphic.Outward.ActionUI")] [assembly: AssemblyTitle("ModifAmorphic.Outward.ActionUI")] [assembly: AssemblyVersion("1.0.0.0")] public class ActionImages : MonoBehaviour { public static readonly Color DisabledColor = new Color(0f, 0f, 0f, 0.9f); public Image BaseImage; private Dictionary _bottomImages = new Dictionary(); private Dictionary _topImages = new Dictionary(); private const string DisabledKey = "disabled"; public Image AddOrUpdateImage(ActionSlotIcon slotIcon) { if (_bottomImages.TryGetValue(slotIcon.Name, out var value)) { if ((Object)(object)value.sprite != (Object)(object)slotIcon.Icon) { value.sprite = slotIcon.Icon; } return value; } Image val = Object.Instantiate(BaseImage, ((Component)this).transform); val.sprite = slotIcon.Icon; val.overrideSprite = null; ((Component)val).gameObject.SetActive(true); ((Object)val).name = slotIcon.Name; if (!slotIcon.IsTopSprite) { _bottomImages.Add(slotIcon.Name, val); } else { _topImages.Add(slotIcon.Name, val); } SetSiblingIndexes(); return val; } public void ToggleEnabled(bool enabled) { //IL_007d: Unknown result type (might be due to invalid IL or missing references) if (enabled && _bottomImages.TryGetValue("disabled", out var value)) { Object.Destroy((Object)(object)((Component)value).gameObject); _bottomImages.Remove("disabled"); } else if (!enabled && !_bottomImages.ContainsKey("disabled")) { value = AddOrUpdateImage(new ActionSlotIcon { Name = "disabled", Icon = null }); ((Graphic)value).color = DisabledColor; } } public void RemoveImage(string imageName) { if (_bottomImages.TryGetValue(imageName, out var value)) { if ((Object)(object)((value != null) ? ((Component)value).gameObject : null) != (Object)null) { ((Component)value).gameObject.Destroy(); } _bottomImages.Remove(imageName); } if (_topImages.TryGetValue(imageName, out var value2)) { if ((Object)(object)((value2 != null) ? ((Component)value2).gameObject : null) != (Object)null) { ((Component)value2).gameObject.Destroy(); } _topImages.Remove(imageName); } } public void ClearImages() { foreach (Image value in _bottomImages.Values) { if ((Object)(object)((value != null) ? ((Component)value).gameObject : null) != (Object)null) { ((Component)value).gameObject.Destroy(); } } foreach (Image value2 in _topImages.Values) { if ((Object)(object)((value2 != null) ? ((Component)value2).gameObject : null) != (Object)null) { ((Component)value2).gameObject.Destroy(); } } _bottomImages.Clear(); _topImages.Clear(); } private void SetSiblingIndexes() { int num = 0; foreach (Image value in _bottomImages.Values) { ((Component)value).transform.SetSiblingIndex(num); num++; } foreach (Image value2 in _topImages.Values) { ((Component)value2).transform.SetSiblingIndex(num); num++; } } } public class ToggleChild : MonoBehaviour { public Color EnabledColor = new Color(0.8392157f, 0.7215686f, 0.3921569f, 1f); public Color DisabledColor = new Color(Color.gray.r, Color.gray.g, Color.gray.b, 0.7f); public InputField InputField; public Selectable ChildToggle; public Selectable[] ChildToggles; public void Toggle(bool enabled) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) ((Graphic)InputField.textComponent).color = (enabled ? EnabledColor : DisabledColor); if (ChildToggles != null) { for (int i = 0; i < ChildToggles.Length; i++) { ChildToggles[i].interactable = enabled; } } } } public class ToggleParent : MonoBehaviour { public List Children; private void Awake() { ((UnityEvent)(object)((Component)this).GetComponent().onValueChanged).AddListener((UnityAction)ToggleChildren); } private void Start() { ToggleChildren(((Component)this).GetComponent().isOn); } public void ToggleChildren(bool enabled) { if (Children == null) { return; } foreach (ToggleChild child in Children) { child.Toggle(enabled); } } } namespace ModifAmorphic.Outward.Unity.ActionMenus { [UnityScriptComponent] public class ActionItemView : MonoBehaviour, IEventSystemHandler, IPointerEnterHandler, IPointerExitHandler { public ActionImages ActionImages; public MouseClickListener MouseClickListener; public UnityEvent OnSlotActionSet; public UnityEvent OnSlotActionReset; private ISlotAction _slotAction; private int _viewID = -1; private Button _button; private Text _text; private Text _stackText; private Image _borderImage; private Image _borderHighlightImage; private bool _isAwake; public ISlotAction SlotAction => _slotAction; public int ViewID => _viewID; public Button Button => _button; public Image BorderImage => _borderImage; public Image ActionBorderHighlight => _borderHighlightImage; private void Awake() { //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown _button = ((Component)this).GetComponentInChildren