Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of reMarksable v1.0.2
reMarksable.dll
Decompiled 4 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using ReMarksable.Compat; using ReMarksable.Config; using ReMarksable.I18n; using ReMarksable.Model; using ReMarksable.Patches; using ReMarksable.Services; using ReMarksable.UI; using Splatform; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("assembly_guiutils")] [assembly: IgnoresAccessChecksTo("assembly_utils")] [assembly: IgnoresAccessChecksTo("assembly_valheim")] [assembly: IgnoresAccessChecksTo("gui_framework")] [assembly: IgnoresAccessChecksTo("Splatform")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("reMarksable")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.2.0")] [assembly: AssemblyInformationalVersion("1.0.2")] [assembly: AssemblyProduct("reMarksable")] [assembly: AssemblyTitle("reMarksable")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.2.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 ReMarksable { [BepInPlugin("remarksable.valheim.markers", "reMarksable", "1.0.2")] [BepInProcess("valheim.exe")] public sealed class Plugin : BaseUnityPlugin { public const string Guid = "remarksable.valheim.markers"; public const string Name = "reMarksable"; public const string Version = "1.0.2"; private Harmony _harmony; internal static ManualLogSource Log { get; private set; } private void Awake() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; ModSettings.Bind(((BaseUnityPlugin)this).Config); HookSettingEvents(); GameBridge.Initialize(); Texts.Validate(); IdentityRegistry.Initialize(); FilterState.Initialize(); MarkerCatalog.Initialize(); MarkerVisibility.Initialize(); TombstoneDeathPinCleanup.Initialize(); UiAssets.Initialize(); MarkerListWindow.Initialize(); CartographyService.Initialize(); TableHoverCoverage.Initialize(); _harmony = new Harmony("remarksable.valheim.markers"); PatchInstaller.Apply(_harmony); ModSettings.UpdateCompatibilityStatus(GameBridge.CompatibilitySummary()); Texts.ApplyGameLocalizationOverrides(Localization.instance); ApplyEnabledRuntimeState(ModSettings.Enabled?.Value ?? true); ((BaseUnityPlugin)this).Logger.LogInfo((object)"reMarksable 1.0.2 loaded."); ((BaseUnityPlugin)this).Logger.LogInfo((object)GameBridge.DescribeCompatibility()); } private static void HookSettingEvents() { if (ModSettings.Enabled != null) { ModSettings.Enabled.SettingChanged += delegate { ApplyEnabledRuntimeState(ModSettings.Enabled.Value); Texts.ApplyGameLocalizationOverrides(Localization.instance); }; } if (ModSettings.EnglishFallback != null) { ModSettings.EnglishFallback.SettingChanged += delegate { Texts.ApplyGameLocalizationOverrides(Localization.instance); }; } if (ModSettings.ToggleWindowKey != null) { ModSettings.ToggleWindowKey.SettingChanged += delegate { Texts.ApplyGameLocalizationOverrides(Localization.instance); }; } if (ModSettings.WindowEditShortcut != null) { ModSettings.WindowEditShortcut.SettingChanged += delegate { Texts.ApplyGameLocalizationOverrides(Localization.instance); }; } } private static void ApplyEnabledRuntimeState(bool enabled) { try { if (enabled) { FilterState.SyncNativeIconFilters(); GameBridge.SetNativeDeathBossControlsHidden(hidden: true); GameBridge.RequestMarkerRefresh(); } else { GameBridge.SetNativeDeathBossControlsHidden(hidden: false); MarkerVisibility.Reset(); MarkerCatalog.Clear(); MarkerListWindow.ResetSession(); GameBridge.RequestMarkerRefresh(); } } catch (Exception ex) { ManualLogSource log = Log; if (log != null) { log.LogWarning((object)("Could not apply Enabled runtime state: " + ex.Message)); } } } private void OnDestroy() { try { GameBridge.SetNativeDeathBossControlsHidden(hidden: false); IdentityRegistry.Flush(); Harmony harmony = _harmony; if (harmony != null) { harmony.UnpatchSelf(); } } catch (Exception ex) { ManualLogSource log = Log; if (log != null) { log.LogWarning((object)("Shutdown cleanup failed: " + ex.Message)); } } } internal static void WarnOnce(string key, string message) { GameBridge.WarnOnce(key, message); } } internal static class ModVersion { public const string Value = "1.0.2"; } } namespace ReMarksable.UI { internal sealed class DragHandle : MonoBehaviour, IBeginDragHandler, IEventSystemHandler, IDragHandler, IEndDragHandler { internal RectTransform Target; internal bool Enabled = true; private RectTransform _parent; private Vector2 _lastPointerLocal; internal bool IsDragging { get; private set; } private void OnDisable() { StopAndPersist(); } public void OnBeginDrag(PointerEventData eventData) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) if (!Enabled || (Object)(object)Target == (Object)null) { IsDragging = false; return; } ref RectTransform parent = ref _parent; Transform parent2 = ((Transform)Target).parent; parent = (RectTransform)(object)((parent2 is RectTransform) ? parent2 : null); if ((Object)(object)_parent == (Object)null) { IsDragging = false; } else { IsDragging = RectTransformUtility.ScreenPointToLocalPointInRectangle(_parent, eventData.position, eventData.pressEventCamera, ref _lastPointerLocal); } } public void OnDrag(PointerEventData eventData) { //IL_0034: 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) //IL_004b: 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) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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) Vector2 val = default(Vector2); if (Enabled && IsDragging && !((Object)(object)Target == (Object)null) && !((Object)(object)_parent == (Object)null) && RectTransformUtility.ScreenPointToLocalPointInRectangle(_parent, eventData.position, eventData.pressEventCamera, ref val)) { Vector2 val2 = val - _lastPointerLocal; _lastPointerLocal = val; RectTransform target = Target; target.anchoredPosition += val2; WindowBounds.ClampInsideParent(Target); } } public void OnEndDrag(PointerEventData eventData) { StopAndPersist(); } internal void StopAndPersist() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Target != (Object)null && IsDragging) { WindowBounds.ClampInsideParent(Target); ModSettings.WindowPosition.Value = Target.anchoredPosition; } IsDragging = false; _parent = null; } } internal sealed class HeaderFilterButton { private readonly LayoutElement _layout; private readonly Image _icon; private readonly Image _slash; private readonly HeaderTooltipTrigger _tooltip; private Color _inactiveTint = new Color(0.48f, 0.48f, 0.48f, 1f); internal GameObject Root { get; } internal RectTransform Rect { get; } internal HeaderFilterButton(Transform parent, string objectName, string tooltipKey, Action onClick) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Expected O, but got Unknown //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_023b: 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_0250: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Expected O, but got Unknown Root = new GameObject(objectName, new Type[1] { typeof(RectTransform) }); Root.transform.SetParent(parent, false); Rect = (RectTransform)Root.transform; _layout = Root.AddComponent<LayoutElement>(); _layout.minWidth = (_layout.preferredWidth = 24f); _layout.minHeight = (_layout.preferredHeight = 24f); Image val = Root.AddComponent<Image>(); val.sprite = null; ((Graphic)val).color = new Color(1f, 1f, 1f, 0f); ((Graphic)val).raycastTarget = true; GameObject val2 = new GameObject("Icon", new Type[1] { typeof(RectTransform) }); val2.transform.SetParent(Root.transform, false); RectTransform val3 = (RectTransform)val2.transform; val3.anchorMin = new Vector2(0.5f, 0.5f); val3.anchorMax = new Vector2(0.5f, 0.5f); val3.pivot = new Vector2(0.5f, 0.5f); val3.sizeDelta = new Vector2(20f, 20f); val3.anchoredPosition = Vector2.zero; _icon = val2.AddComponent<Image>(); _icon.preserveAspect = true; ((Graphic)_icon).raycastTarget = false; GameObject val4 = new GameObject("DisabledSlash", new Type[1] { typeof(RectTransform) }); val4.transform.SetParent(Root.transform, false); RectTransform val5 = (RectTransform)val4.transform; val5.anchorMin = new Vector2(0.5f, 0.5f); val5.anchorMax = new Vector2(0.5f, 0.5f); val5.pivot = new Vector2(0.5f, 0.5f); val5.sizeDelta = new Vector2(22f, 22f); val5.anchoredPosition = Vector2.zero; _slash = val4.AddComponent<Image>(); _slash.sprite = UiAssets.FilterSlashSprite(); _slash.preserveAspect = true; ((Graphic)_slash).raycastTarget = false; Button val6 = Root.AddComponent<Button>(); ((Selectable)val6).targetGraphic = (Graphic)(object)val; Navigation navigation = default(Navigation); ((Navigation)(ref navigation)).mode = (Mode)0; ((Selectable)val6).navigation = navigation; ColorBlock colors = default(ColorBlock); ((ColorBlock)(ref colors)).normalColor = Color.white; ((ColorBlock)(ref colors)).highlightedColor = new Color(1f, 0.96f, 0.82f, 1f); ((ColorBlock)(ref colors)).pressedColor = new Color(0.8f, 0.7f, 0.5f, 1f); ((ColorBlock)(ref colors)).selectedColor = Color.white; ((ColorBlock)(ref colors)).disabledColor = new Color(0.5f, 0.5f, 0.5f, 0.5f); ((ColorBlock)(ref colors)).colorMultiplier = 1f; ((ColorBlock)(ref colors)).fadeDuration = 0.06f; ((Selectable)val6).colors = colors; if (onClick != null) { ((UnityEvent)val6.onClick).AddListener((UnityAction)delegate { onClick(); }); } _tooltip = Root.AddComponent<HeaderTooltipTrigger>(); _tooltip.LocalizationKey = tooltipKey; } internal void SetTooltipKey(string localizationKey) { if ((Object)(object)_tooltip != (Object)null) { _tooltip.LocalizationKey = localizationKey; } } internal void SetHitTargetSize(float width, float height) { if (!((Object)(object)_layout == (Object)null)) { LayoutElement layout = _layout; float minWidth = (_layout.preferredWidth = Mathf.Max(1f, width)); layout.minWidth = minWidth; LayoutElement layout2 = _layout; minWidth = (_layout.preferredHeight = Mathf.Max(1f, height)); layout2.minHeight = minWidth; } } internal void SetInactiveTint(Color color) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) color.a = 1f; _inactiveTint = color; } internal void Refresh(Sprite sprite, bool visible, float foregroundOpacity) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) Refresh(sprite, visible, foregroundOpacity, Color.white, 0f, showDisabledSlash: true); } internal void Refresh(Sprite sprite, bool visible, float foregroundOpacity, Color activeTint, float rotationDegrees, bool showDisabledSlash) { //IL_0023: 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_0031: 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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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) _icon.sprite = sprite; ((Transform)((Graphic)_icon).rectTransform).localRotation = Quaternion.Euler(0f, 0f, rotationDegrees); Color val = (visible ? activeTint : _inactiveTint); val.a *= foregroundOpacity; ((Graphic)_icon).color = (Color)(((Object)(object)sprite == (Object)null) ? new Color(val.r, val.g, val.b, 0f) : val); ((Behaviour)_slash).enabled = showDisabledSlash && !visible; ((Graphic)_slash).color = new Color(0.84f, 0.32f, 0.28f, foregroundOpacity); } } internal sealed class HeaderTooltipTrigger : MonoBehaviour, IPointerEnterHandler, IEventSystemHandler, IPointerExitHandler { internal string LocalizationKey { get; set; } public void OnPointerEnter(PointerEventData eventData) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown MarkerListWindow.ShowHeaderTooltip((RectTransform)((Component)this).transform, LocalizationKey); } public void OnPointerExit(PointerEventData eventData) { MarkerListWindow.HideHeaderTooltip(); } } internal static class MarkerListWindow { private const float BaseMinimumWidth = 340f; private const float MinimumHeight = 180f; private static readonly Vector2 DefaultWindowSize = new Vector2(340f, 220f); private static readonly Vector2 DefaultWindowPosition = new Vector2(24f, 0f); private const float DefaultWindowTransparency = 0f; private static float _adaptiveMinimumWidth = 340f; private const float OuterPadding = 7f; private const float Gap = 4f; private const float HeaderHeight = 34f; private const float FooterHeight = 34f; private const float ResizeSize = 17f; private const float ScrollbarWidth = 10f; private const float ScrollbarGap = 4f; private const float BaseScrollbarThumbRatio = 0.24f; private const float ScrollbarThumbReferenceWindowHeight = 260f; private const float ScrollbarThumbGrowthFactor = 0.0625f; private const float MaxScrollbarThumbHeight = 84f; private static GameObject _root; private static RectTransform _rootRect; private static RectTransform _content; private static Image _panelBackground; private static Image _headerBackground; private static Image _listBackground; private static Image _footerBackground; private static Image _sliderTrack; private static Image _sliderHandle; private static Image _scrollbarTrack; private static Image _scrollbarHandle; private static RectTransform _scrollbarSlidingRect; private static Outline _panelOutline; private static Shadow _panelShadow; private static TMP_Text _title; private static TMP_Text _stats; private static TMP_Text _transparencyText; private static TMP_Text _transparencyValue; private static TMP_Text _resizeText; private static LayoutElement _statsLayout; private static HeaderFilterButton _worldFilter; private static HeaderFilterButton _deathFilter; private static HeaderFilterButton _recoveredDeathCleanupFilter; private static HeaderFilterButton _bossFilter; private static HeaderFilterButton _playerPositionsFilter; private static GameObject _headerTooltipRoot; private static RectTransform _headerTooltipRect; private static Image _headerTooltipBackground; private static TMP_Text _headerTooltipText; private static string _activeHeaderTooltipKey = string.Empty; private static RectTransform _activeHeaderTooltipSource; private static LayoutElement _transparencyLabelLayout; private static Slider _transparencySlider; private static Scrollbar _listScrollbar; private static ScrollbarOnlyScrollRect _listScroll; private static CanvasGroup _scrollbarInputGroup; private static bool _listIsScrollable; private static float _rememberedScrollPosition = 1f; private static GameObject _editDragSurface; private static DragHandle _drag; private static ResizeHandle _resize; private static readonly List<MarkerRowView> Rows = new List<MarkerRowView>(); private static readonly Vector3[] TooltipWorldCorners = (Vector3[])(object)new Vector3[4]; private const float UiScaleReferenceHeight = 1440f; private const float MaximumAutomaticUiScale = 1.5f; private static bool _wantedVisible; private static bool _windowEditActive; private static int _renderedRevision = -1; private static string _lastLanguage = string.Empty; private const float UiScaleLogQuietPeriod = 0.35f; private static float _lastEffectiveUiScale = -1f; private static float _lastAutomaticUiScale = -1f; private static float _lastManualUiScale = -1f; private static int _lastScreenWidth = -1; private static int _lastScreenHeight = -1; private static bool _uiScaleLogPending; private static float _uiScaleLogStartedAutomatic; private static float _uiScaleLogStartedManual; private static float _uiScaleLogStartedEffective; private static int _uiScaleLogStartedWidth; private static int _uiScaleLogStartedHeight; private static float _uiScaleLogTargetAutomatic; private static float _uiScaleLogTargetManual; private static float _uiScaleLogTargetEffective; private static int _uiScaleLogTargetWidth; private static int _uiScaleLogTargetHeight; private static float _uiScaleLogLastChangeTime; private static Vector2 _lastObservedConfigPosition = new Vector2(float.NaN, float.NaN); private static Vector2 _lastObservedConfigSize = new Vector2(float.NaN, float.NaN); private static bool _normalizingConfiguredGeometry; internal static Vector2 MinimumSize => new Vector2(_adaptiveMinimumWidth, 180f); internal static bool WindowEditActive => _windowEditActive; internal static void Initialize() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) _root = null; _wantedVisible = ModSettings.WindowOpen != null && ModSettings.WindowOpen.Value; _windowEditActive = false; _renderedRevision = -1; _lastLanguage = string.Empty; _lastEffectiveUiScale = -1f; _lastAutomaticUiScale = -1f; _lastManualUiScale = -1f; _lastScreenWidth = -1; _lastScreenHeight = -1; _uiScaleLogPending = false; _lastObservedConfigPosition = (Vector2)((ModSettings.WindowPosition != null) ? ModSettings.WindowPosition.Value : new Vector2(float.NaN, float.NaN)); _lastObservedConfigSize = (Vector2)((ModSettings.WindowSize != null) ? ModSettings.WindowSize.Value : new Vector2(float.NaN, float.NaN)); _normalizingConfiguredGeometry = false; _adaptiveMinimumWidth = 340f; _listIsScrollable = false; _rememberedScrollPosition = 1f; Rows.Clear(); } internal static void Tick(bool largeMapOpen) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) FlushPendingUiScaleLog(force: false); if (!ModSettings.Enabled.Value) { GameBridge.SetNativeDeathBossControlsHidden(hidden: false); SetActive(active: false); return; } GameBridge.SetNativeDeathBossControlsHidden(hidden: true); if (largeMapOpen) { KeyboardShortcut value = ModSettings.ToggleWindowKey.Value; if (((KeyboardShortcut)(ref value)).IsDown()) { _wantedVisible = !_wantedVisible; ModSettings.WindowOpen.Value = _wantedVisible; ModSettings.Save(); } } if (!largeMapOpen || !_wantedVisible) { SetActive(active: false); return; } EnsureCreated(); if ((Object)(object)_root == (Object)null) { return; } SetActive(active: true); string text = Texts.ActiveLanguage(); bool flag = text != _lastLanguage; MarkerCatalog.Refresh(flag); if (_renderedRevision != MarkerCatalog.Revision || flag) { RebuildRows(); _lastLanguage = text; } else { foreach (MarkerRowView row in Rows) { row.Refresh(); } } ApplyConfigVisuals(); } internal static bool IsPointerOverWindow() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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) if ((Object)(object)_root == (Object)null || (Object)(object)_rootRect == (Object)null || !_root.activeInHierarchy) { return false; } Canvas componentInParent = _root.GetComponentInParent<Canvas>(); Camera val = null; if ((Object)(object)componentInParent != (Object)null && (int)componentInParent.renderMode != 0) { val = componentInParent.worldCamera; } return RectTransformUtility.RectangleContainsScreenPoint(_rootRect, Vector2.op_Implicit(Input.mousePosition), val); } internal static void ResetWindowToDefaults() { //IL_002c: 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_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_010f: 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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) _drag?.StopAndPersist(); _resize?.StopAndPersist(); if (ModSettings.WindowSize != null) { ModSettings.WindowSize.Value = DefaultWindowSize; } if (ModSettings.WindowTransparency != null) { ModSettings.WindowTransparency.Value = 0f; } if ((Object)(object)_rootRect != (Object)null) { _rootRect.sizeDelta = WindowBounds.ClampSizeToParent(_rootRect, DefaultWindowSize, MinimumSize); WindowBounds.PlaceTopRight(_rootRect); if (ModSettings.WindowPosition != null) { ModSettings.WindowPosition.Value = _rootRect.anchoredPosition; } if (ModSettings.InitialWindowPlacementPending != null) { ModSettings.InitialWindowPlacementPending.Value = false; } _lastObservedConfigSize = ModSettings.WindowSize.Value; _lastObservedConfigPosition = ModSettings.WindowPosition.Value; ApplyConfigVisuals(); } else { if (ModSettings.WindowPosition != null) { ModSettings.WindowPosition.Value = DefaultWindowPosition; } if (ModSettings.InitialWindowPlacementPending != null) { ModSettings.InitialWindowPlacementPending.Value = true; } _lastObservedConfigSize = ((ModSettings.WindowSize != null) ? ModSettings.WindowSize.Value : DefaultWindowSize); _lastObservedConfigPosition = ((ModSettings.WindowPosition != null) ? ModSettings.WindowPosition.Value : DefaultWindowPosition); } ModSettings.Save(); } internal static void NotifyCatalogChanged() { _renderedRevision = -1; } internal static void ResetSession() { _wantedVisible = ModSettings.WindowOpen != null && ModSettings.WindowOpen.Value; _windowEditActive = false; _renderedRevision = -1; _rememberedScrollPosition = 1f; GameBridge.ForgetNativeDeathBossControls(); DestroyWindow(); } private static void EnsureCreated() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: 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_0109: 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_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_root != (Object)null) { return; } GameObject val = GameBridge.LargeMapRoot(); if ((Object)(object)val == (Object)null) { return; } try { _root = new GameObject("reMarksable.MarkerList", new Type[1] { typeof(RectTransform) }); _root.transform.SetParent(val.transform, false); _rootRect = (RectTransform)_root.transform; _rootRect.anchorMin = new Vector2(0f, 0.5f); _rootRect.anchorMax = new Vector2(0f, 0.5f); _rootRect.pivot = new Vector2(0f, 0.5f); _rootRect.anchoredPosition = ModSettings.WindowPosition.Value; _rootRect.sizeDelta = ClampSize(ModSettings.WindowSize.Value); ((Transform)_rootRect).localScale = Vector3.one; ApplyUiScale(force: true); _rootRect.sizeDelta = WindowBounds.ClampSizeToParent(_rootRect, _rootRect.sizeDelta, MinimumSize); if (ModSettings.InitialWindowPlacementPending != null && ModSettings.InitialWindowPlacementPending.Value) { WindowBounds.PlaceTopRight(_rootRect); ModSettings.WindowPosition.Value = _rootRect.anchoredPosition; ModSettings.InitialWindowPlacementPending.Value = false; _lastObservedConfigPosition = _rootRect.anchoredPosition; ModSettings.Save(); } else { WindowBounds.ClampInsideParent(_rootRect); } _panelBackground = UiAssets.AddSlicedImage(_root, UiAssets.PanelSprite(), new Color(0.26f, 0.23f, 0.24f, 0.97f)); _panelOutline = _root.AddComponent<Outline>(); ((Shadow)_panelOutline).effectColor = new Color(0.16f, 0.13f, 0.16f, 0.46f); ((Shadow)_panelOutline).effectDistance = new Vector2(1.5f, -1.5f); ((Shadow)_panelOutline).useGraphicAlpha = false; _panelShadow = _root.AddComponent<Shadow>(); _panelShadow.effectColor = new Color(0f, 0f, 0f, 0.42f); _panelShadow.effectDistance = new Vector2(3f, -3f); _panelShadow.useGraphicAlpha = false; BuildHeader(); BuildList(); BuildFooter(); BuildHeaderTooltip(); BuildEditDragSurface(); BuildResizeHandle(); _root.SetActive(false); ApplyConfigVisuals(); } catch (Exception ex) { Plugin.WarnOnce("marker-window-build", "Marker list window could not be created: " + ex.Message); DestroyWindow(); } } private static void BuildHeader() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_028b: Unknown result type (might be due to invalid IL or missing references) GameObject val = CreateAnchoredPanel("Header", new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(7f, -41f), new Vector2(-7f, -7f)); _headerBackground = UiAssets.AddSlicedImage(val, UiAssets.ButtonSprite(), new Color(0.25f, 0.22f, 0.23f, 0.94f)); HorizontalLayoutGroup obj = val.AddComponent<HorizontalLayoutGroup>(); ((LayoutGroup)obj).padding = new RectOffset(9, 4, 4, 4); ((HorizontalOrVerticalLayoutGroup)obj).spacing = 3f; ((LayoutGroup)obj).childAlignment = (TextAnchor)3; ((HorizontalOrVerticalLayoutGroup)obj).childControlWidth = true; ((HorizontalOrVerticalLayoutGroup)obj).childControlHeight = true; ((HorizontalOrVerticalLayoutGroup)obj).childForceExpandWidth = false; ((HorizontalOrVerticalLayoutGroup)obj).childForceExpandHeight = false; GameObject val2 = new GameObject("Title", new Type[1] { typeof(RectTransform) }); val2.transform.SetParent(val.transform, false); LayoutElement obj2 = val2.AddComponent<LayoutElement>(); obj2.flexibleWidth = 1f; obj2.minWidth = 108f; obj2.preferredHeight = 24f; _title = UiAssets.AddText(val2, string.Empty, 16f, (TextAlignmentOptions)4097); ((Graphic)_title).raycastTarget = false; _worldFilter = new HeaderFilterButton(val.transform, "WorldMarkersFilter", "world_markers", delegate { FilterState.ToggleWorldMarkers(); RefreshHeaderFilters(); }); _deathFilter = new HeaderFilterButton(val.transform, "DeathMarkersFilter", "death_markers", delegate { FilterState.ToggleDeathMarkers(); RefreshHeaderFilters(); }); _bossFilter = new HeaderFilterButton(val.transform, "BossesFilter", "bosses", delegate { FilterState.ToggleBossMarkers(); RefreshHeaderFilters(); }); _playerPositionsFilter = new HeaderFilterButton(val.transform, "OtherPlayerPositionsFilter", "other_player_positions", delegate { FilterState.ToggleOtherPlayerPositions(); RefreshHeaderFilters(); }); CreateHeaderSpacer(val.transform, "TombstoneGroupGap", 8f); _recoveredDeathCleanupFilter = new HeaderFilterButton(val.transform, "RecoveredDeathMarkerCleanup", "death_marker_cleanup", delegate { ModSettings.RemoveRecoveredDeathMarkers.Value = !ModSettings.RemoveRecoveredDeathMarkers.Value; ModSettings.Save(); RefreshHeaderFilters(); }); _recoveredDeathCleanupFilter.SetHitTargetSize(20f, 24f); _recoveredDeathCleanupFilter.SetInactiveTint(new Color(0.64f, 0.64f, 0.64f, 1f)); } private static void CreateHeaderSpacer(Transform parent, string objectName, float width) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(objectName, new Type[1] { typeof(RectTransform) }); val.transform.SetParent(parent, false); LayoutElement obj = val.AddComponent<LayoutElement>(); float minWidth = (obj.preferredWidth = Mathf.Max(0f, width)); obj.minWidth = minWidth; minWidth = (obj.preferredHeight = 1f); obj.minHeight = minWidth; } private static void BuildList() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Expected O, but got Unknown //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Expected O, but got Unknown //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: 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_024f: Unknown result type (might be due to invalid IL or missing references) //IL_025a: 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_026f: 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_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: 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_02eb: Expected O, but got Unknown //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Expected O, but got Unknown //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0327: 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_0346: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Expected O, but got Unknown //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Expected O, but got Unknown //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) float num = 45f; float num2 = 45f; GameObject val = CreateAnchoredPanel("List", Vector2.zero, Vector2.one, new Vector2(7f, num), new Vector2(-7f, 0f - num2)); _listBackground = UiAssets.AddSlicedImage(val, UiAssets.PanelSprite(), new Color(0.23f, 0.2f, 0.22f, 0.88f)); GameObject val2 = new GameObject("Viewport", new Type[1] { typeof(RectTransform) }); val2.transform.SetParent(val.transform, false); RectTransform val3 = (RectTransform)val2.transform; val3.anchorMin = Vector2.zero; val3.anchorMax = Vector2.one; val3.offsetMin = new Vector2(5f, 5f); val3.offsetMax = new Vector2(-19f, -5f); val2.AddComponent<RectMask2D>(); GameObject val4 = new GameObject("Content", new Type[1] { typeof(RectTransform) }); val4.transform.SetParent(val2.transform, false); _content = (RectTransform)val4.transform; _content.anchorMin = new Vector2(0f, 1f); _content.anchorMax = new Vector2(1f, 1f); _content.pivot = new Vector2(0.5f, 1f); _content.anchoredPosition = Vector2.zero; _content.sizeDelta = Vector2.zero; VerticalLayoutGroup obj = val4.AddComponent<VerticalLayoutGroup>(); ((LayoutGroup)obj).padding = new RectOffset(3, 3, 3, 3); ((HorizontalOrVerticalLayoutGroup)obj).spacing = 3f; ((LayoutGroup)obj).childAlignment = (TextAnchor)0; ((HorizontalOrVerticalLayoutGroup)obj).childControlWidth = true; ((HorizontalOrVerticalLayoutGroup)obj).childControlHeight = true; ((HorizontalOrVerticalLayoutGroup)obj).childForceExpandWidth = true; ((HorizontalOrVerticalLayoutGroup)obj).childForceExpandHeight = false; ContentSizeFitter obj2 = val4.AddComponent<ContentSizeFitter>(); obj2.horizontalFit = (FitMode)0; obj2.verticalFit = (FitMode)2; Image obj3 = val4.AddComponent<Image>(); ((Graphic)obj3).color = Color.clear; ((Graphic)obj3).raycastTarget = true; GameObject val5 = new GameObject("VerticalScrollbar", new Type[1] { typeof(RectTransform) }); val5.transform.SetParent(val.transform, false); RectTransform val6 = (RectTransform)val5.transform; val6.anchorMin = new Vector2(1f, 0f); val6.anchorMax = new Vector2(1f, 1f); val6.pivot = new Vector2(1f, 0.5f); val6.sizeDelta = new Vector2(10f, -10f); val6.anchoredPosition = new Vector2(-5f, 0f); _scrollbarTrack = UiAssets.AddSlicedImage(val5, UiAssets.ButtonSprite(), new Color(0.18f, 0.16f, 0.18f, 0.62f)); GameObject val7 = new GameObject("SlidingArea", new Type[1] { typeof(RectTransform) }); val7.transform.SetParent(val5.transform, false); RectTransform val8 = (RectTransform)val7.transform; _scrollbarSlidingRect = val8; val8.anchorMin = Vector2.zero; val8.anchorMax = Vector2.one; val8.offsetMin = new Vector2(0f, 1f); val8.offsetMax = new Vector2(0f, -1f); GameObject val9 = new GameObject("Handle", new Type[1] { typeof(RectTransform) }); val9.transform.SetParent(val7.transform, false); RectTransform val10 = (RectTransform)val9.transform; val10.anchorMin = Vector2.zero; val10.anchorMax = Vector2.one; val10.offsetMin = Vector2.zero; val10.offsetMax = Vector2.zero; _scrollbarHandle = UiAssets.AddSlicedImage(val9, UiAssets.ButtonSprite(), new Color(0.48f, 0.34f, 0.2f, 0.96f)); _listScrollbar = val5.AddComponent<Scrollbar>(); _listScrollbar.handleRect = val10; ((Selectable)_listScrollbar).targetGraphic = (Graphic)(object)_scrollbarHandle; _listScrollbar.direction = (Direction)2; _listScrollbar.numberOfSteps = 0; _listScrollbar.size = 0.24f; _listScrollbar.SetValueWithoutNotify(_rememberedScrollPosition); Scrollbar listScrollbar = _listScrollbar; Navigation navigation = default(Navigation); ((Navigation)(ref navigation)).mode = (Mode)0; ((Selectable)listScrollbar).navigation = navigation; _scrollbarInputGroup = val5.AddComponent<CanvasGroup>(); _scrollbarInputGroup.blocksRaycasts = false; _scrollbarInputGroup.interactable = true; _listScroll = val.AddComponent<ScrollbarOnlyScrollRect>(); ((ScrollRect)_listScroll).viewport = val3; ((ScrollRect)_listScroll).content = _content; ((ScrollRect)_listScroll).horizontal = false; ((ScrollRect)_listScroll).vertical = true; ((ScrollRect)_listScroll).inertia = false; ((ScrollRect)_listScroll).movementType = (MovementType)2; ((ScrollRect)_listScroll).scrollSensitivity = 37f; ((UnityEvent<float>)(object)_listScrollbar.onValueChanged).AddListener((UnityAction<float>)delegate(float value) { if ((Object)(object)_listScroll == (Object)null || !_listIsScrollable) { Scrollbar listScrollbar2 = _listScrollbar; if (listScrollbar2 != null) { listScrollbar2.SetValueWithoutNotify(_rememberedScrollPosition); } } else { _rememberedScrollPosition = Mathf.Clamp01(value); ((ScrollRect)_listScroll).verticalNormalizedPosition = _rememberedScrollPosition; } }); _listScroll.WheelPositionChanged = delegate(float value) { if (_listIsScrollable) { _rememberedScrollPosition = Mathf.Clamp01(value); Scrollbar listScrollbar2 = _listScrollbar; if (listScrollbar2 != null) { listScrollbar2.SetValueWithoutNotify(_rememberedScrollPosition); } } }; WindowScrollForwarder windowScrollForwarder = _root.GetComponent<WindowScrollForwarder>(); if ((Object)(object)windowScrollForwarder == (Object)null) { windowScrollForwarder = _root.AddComponent<WindowScrollForwarder>(); } windowScrollForwarder.Target = (ScrollRect)(object)_listScroll; } private static void BuildFooter() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_0061: 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_0087: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Expected O, but got Unknown //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Expected O, but got Unknown //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0297: 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_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Expected O, but got Unknown //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Expected O, but got Unknown //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Expected O, but got Unknown //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Expected O, but got Unknown //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_04d4: Expected O, but got Unknown //IL_04f2: Unknown result type (might be due to invalid IL or missing references) GameObject val = CreateAnchoredPanel("Footer", new Vector2(0f, 0f), new Vector2(1f, 0f), new Vector2(7f, 7f), new Vector2(-7f, 41f)); _footerBackground = UiAssets.AddSlicedImage(val, UiAssets.ButtonSprite(), new Color(0.25f, 0.22f, 0.23f, 0.92f)); HorizontalLayoutGroup obj = val.AddComponent<HorizontalLayoutGroup>(); ((LayoutGroup)obj).padding = new RectOffset(9, 23, 4, 4); ((HorizontalOrVerticalLayoutGroup)obj).spacing = 2f; ((LayoutGroup)obj).childAlignment = (TextAnchor)3; ((HorizontalOrVerticalLayoutGroup)obj).childControlWidth = true; ((HorizontalOrVerticalLayoutGroup)obj).childControlHeight = true; ((HorizontalOrVerticalLayoutGroup)obj).childForceExpandWidth = false; ((HorizontalOrVerticalLayoutGroup)obj).childForceExpandHeight = false; GameObject val2 = new GameObject("Stats", new Type[1] { typeof(RectTransform) }); val2.transform.SetParent(val.transform, false); _statsLayout = val2.AddComponent<LayoutElement>(); _statsLayout.minWidth = 115f; _statsLayout.flexibleWidth = 1f; _statsLayout.preferredHeight = 24f; _stats = UiAssets.AddText(val2, string.Empty, 13f, (TextAlignmentOptions)4097); _stats.overflowMode = (TextOverflowModes)1; GameObject val3 = new GameObject("TransparencyLabel", new Type[1] { typeof(RectTransform) }); val3.transform.SetParent(val.transform, false); _transparencyLabelLayout = val3.AddComponent<LayoutElement>(); LayoutElement transparencyLabelLayout = _transparencyLabelLayout; float minWidth = (_transparencyLabelLayout.preferredWidth = 78f); transparencyLabelLayout.minWidth = minWidth; _transparencyLabelLayout.preferredHeight = 24f; _transparencyText = UiAssets.AddText(val3, string.Empty, 13f, (TextAlignmentOptions)4100); _transparencyText.margin = new Vector4(0f, 0f, 3f, 0f); NudgeTextVertically(_transparencyText, 1.5f); GameObject val4 = new GameObject("TransparencySlider", new Type[1] { typeof(RectTransform) }); val4.transform.SetParent(val.transform, false); LayoutElement obj2 = val4.AddComponent<LayoutElement>(); minWidth = (obj2.preferredWidth = 56f); obj2.minWidth = minWidth; minWidth = (obj2.preferredHeight = 22f); obj2.minHeight = minWidth; GameObject val5 = new GameObject("Track", new Type[1] { typeof(RectTransform) }); val5.transform.SetParent(val4.transform, false); RectTransform val6 = (RectTransform)val5.transform; val6.anchorMin = new Vector2(0f, 0.5f); val6.anchorMax = new Vector2(1f, 0.5f); val6.sizeDelta = new Vector2(0f, 10f); _sliderTrack = UiAssets.AddSlicedImage(val5, UiAssets.ButtonSprite(), new Color(0.19f, 0.17f, 0.19f, 0.76f)); GameObject val7 = new GameObject("SlidingArea", new Type[1] { typeof(RectTransform) }); val7.transform.SetParent(val4.transform, false); RectTransform val8 = (RectTransform)val7.transform; val8.anchorMin = Vector2.zero; val8.anchorMax = Vector2.one; val8.offsetMin = new Vector2(4f, 0f); val8.offsetMax = new Vector2(-4f, 0f); GameObject val9 = new GameObject("Handle", new Type[1] { typeof(RectTransform) }); val9.transform.SetParent(val7.transform, false); RectTransform val10 = (RectTransform)val9.transform; val10.sizeDelta = new Vector2(10f, 3f); _sliderHandle = UiAssets.AddSlicedImage(val9, UiAssets.ButtonSprite(), new Color(0.52f, 0.34f, 0.1f, 1f)); _transparencySlider = val4.AddComponent<Slider>(); _transparencySlider.minValue = 0f; _transparencySlider.maxValue = 85f; _transparencySlider.wholeNumbers = true; _transparencySlider.handleRect = val10; ((Selectable)_transparencySlider).targetGraphic = (Graphic)(object)_sliderHandle; _transparencySlider.direction = (Direction)0; ((UnityEvent<float>)(object)_transparencySlider.onValueChanged).AddListener((UnityAction<float>)delegate(float value) { ModSettings.WindowTransparency.Value = Mathf.Clamp(value, 0f, 85f) / 100f; ApplyTransparency(); }); GameObject val11 = new GameObject("TransparencyValue", new Type[1] { typeof(RectTransform) }); val11.transform.SetParent(val.transform, false); LayoutElement obj3 = val11.AddComponent<LayoutElement>(); minWidth = (obj3.preferredWidth = 18f); obj3.minWidth = minWidth; obj3.preferredHeight = 24f; _transparencyValue = UiAssets.AddText(val11, "0%", 13f, (TextAlignmentOptions)4097); _transparencyValue.margin = new Vector4(3f, 0f, 0f, 0f); NudgeTextVertically(_transparencyValue, 1f); } private static void BuildEditDragSurface() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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) _editDragSurface = new GameObject("EditDragSurface", new Type[1] { typeof(RectTransform) }); _editDragSurface.transform.SetParent(_root.transform, false); RectTransform val = (RectTransform)_editDragSurface.transform; val.anchorMin = Vector2.zero; val.anchorMax = Vector2.one; val.offsetMin = Vector2.zero; val.offsetMax = Vector2.zero; Image obj = _editDragSurface.AddComponent<Image>(); obj.sprite = null; ((Graphic)obj).color = Color.clear; ((Graphic)obj).raycastTarget = true; _drag = _editDragSurface.AddComponent<DragHandle>(); _drag.Target = _rootRect; _drag.Enabled = false; _editDragSurface.SetActive(false); } private static void BuildResizeHandle() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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_0068: 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_007d: 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_009c: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Resize", new Type[1] { typeof(RectTransform) }); val.transform.SetParent(_root.transform, false); RectTransform val2 = (RectTransform)val.transform; val2.anchorMin = new Vector2(1f, 0f); val2.anchorMax = new Vector2(1f, 0f); val2.pivot = new Vector2(1f, 0f); val2.sizeDelta = new Vector2(17f, 17f); val2.anchoredPosition = new Vector2(-7f, 7f); UiAssets.AddSlicedImage(val, UiAssets.ButtonSprite(), new Color(0.27f, 0.23f, 0.24f, 1f)); _resizeText = UiAssets.AddText(val, "↘", 11f, (TextAlignmentOptions)514); _resize = val.AddComponent<ResizeHandle>(); _resize.Target = _rootRect; _resize.MinimumSize = MinimumSize; _resize.Enabled = false; val.SetActive(false); } private static void BuildHeaderTooltip() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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_00aa: 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_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: 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_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Expected O, but got Unknown _headerTooltipRoot = new GameObject("HeaderTooltip", new Type[1] { typeof(RectTransform) }); _headerTooltipRoot.transform.SetParent(_root.transform, false); _headerTooltipRect = (RectTransform)_headerTooltipRoot.transform; _headerTooltipRect.anchorMin = new Vector2(0f, 0.5f); _headerTooltipRect.anchorMax = new Vector2(0f, 0.5f); _headerTooltipRect.pivot = new Vector2(0.5f, 1f); _headerTooltipRect.sizeDelta = new Vector2(1f, 27f); _headerTooltipBackground = UiAssets.AddSlicedImage(_headerTooltipRoot, UiAssets.ButtonSprite(), new Color(0.16f, 0.14f, 0.15f, 0.98f)); ((Graphic)_headerTooltipBackground).raycastTarget = false; GameObject val = new GameObject("Text", new Type[1] { typeof(RectTransform) }); val.transform.SetParent(_headerTooltipRoot.transform, false); RectTransform val2 = (RectTransform)val.transform; val2.anchorMin = Vector2.zero; val2.anchorMax = Vector2.one; val2.offsetMin = new Vector2(7f, 2f); val2.offsetMax = new Vector2(-7f, -2f); _headerTooltipText = UiAssets.AddText(val, string.Empty, 13f, (TextAlignmentOptions)514); ((Graphic)_headerTooltipText).raycastTarget = false; _headerTooltipRoot.SetActive(false); } internal static void ShowHeaderTooltip(RectTransform source, string localizationKey) { //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_root == (Object)null || (Object)(object)_headerTooltipRoot == (Object)null || (Object)(object)_headerTooltipRect == (Object)null || (Object)(object)source == (Object)null || string.IsNullOrWhiteSpace(localizationKey)) { return; } _activeHeaderTooltipSource = source; _activeHeaderTooltipKey = localizationKey; string text = Texts.Get(localizationKey); _headerTooltipText.text = text; _headerTooltipText.textWrappingMode = (TextWrappingModes)0; float num = UiAssets.PreferredWidth(_headerTooltipText, text, 13f); if (num <= 0f) { num = Mathf.Max(18f, (float)text.Length * 7f); } float num2 = Mathf.Ceil(num + 16f); float num3 = HeaderTooltipMaximumWidth(6f); float num4 = Mathf.Clamp(num2, 36f, num3); float num5 = 27f; if (num2 > num3 + 0.5f) { _headerTooltipText.textWrappingMode = (TextWrappingModes)1; float num6 = Mathf.Max(12f, num4 - 16f); try { Vector2 preferredValues = _headerTooltipText.GetPreferredValues(text, num6, 0f); if (preferredValues.y > 0f) { num5 = Mathf.Max(27f, Mathf.Ceil(preferredValues.y + 4f)); } } catch { } } _headerTooltipRect.sizeDelta = new Vector2(num4, num5); Rect rect = source.rect; Vector3 val = ((Transform)source).TransformPoint(Vector2.op_Implicit(((Rect)(ref rect)).center)); float x = ((Transform)_rootRect).InverseTransformPoint(val).x; rect = _rootRect.rect; float num7 = ((Rect)(ref rect)).height * 0.5f - 7f - 34f - 2f; _headerTooltipRect.anchoredPosition = new Vector2(x, num7); ClampHeaderTooltipInsideParent(6f); _headerTooltipRoot.transform.SetAsLastSibling(); _headerTooltipRoot.SetActive(true); ApplyTooltipTransparency(); } private static float HeaderTooltipMaximumWidth(float parentMargin) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) Rect rect; if (!((Object)(object)_rootRect == (Object)null)) { Transform parent = ((Transform)_rootRect).parent; RectTransform val = (RectTransform)(object)((parent is RectTransform) ? parent : null); if (val != null) { rect = val.rect; float num = Mathf.Max(36f, ((Rect)(ref rect)).width - 2f * parentMargin); float x = WindowBounds.LocalScale(_rootRect).x; return Mathf.Max(36f, num / x); } } float num2; if (!((Object)(object)_rootRect != (Object)null)) { num2 = 36f; } else { rect = _rootRect.rect; num2 = ((Rect)(ref rect)).width; } return Mathf.Max(36f, num2); } private static void ClampHeaderTooltipInsideParent(float parentMargin) { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0108: 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_011b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_headerTooltipRect == (Object)null || (Object)(object)_rootRect == (Object)null) { return; } Transform parent = ((Transform)_rootRect).parent; RectTransform val = (RectTransform)(object)((parent is RectTransform) ? parent : null); if (val != null) { _headerTooltipRect.GetWorldCorners(TooltipWorldCorners); float num = float.PositiveInfinity; float num2 = float.NegativeInfinity; for (int i = 0; i < TooltipWorldCorners.Length; i++) { float x = ((Transform)val).InverseTransformPoint(TooltipWorldCorners[i]).x; num = Mathf.Min(num, x); num2 = Mathf.Max(num2, x); } Rect rect = val.rect; float num3 = ((Rect)(ref rect)).xMin + parentMargin; rect = val.rect; float num4 = ((Rect)(ref rect)).xMax - parentMargin; float num5 = 0f; if (num < num3) { num5 = num3 - num; } else if (num2 > num4) { num5 = num4 - num2; } if (!(Mathf.Abs(num5) <= 0.001f)) { Vector3 val2 = ((Transform)val).TransformPoint(Vector3.zero); Vector3 val3 = ((Transform)val).TransformPoint(new Vector3(num5, 0f, 0f)); float x2 = ((Transform)_rootRect).InverseTransformPoint(val2).x; float x3 = ((Transform)_rootRect).InverseTransformPoint(val3).x; RectTransform headerTooltipRect = _headerTooltipRect; headerTooltipRect.anchoredPosition += new Vector2(x3 - x2, 0f); } } } internal static void HideHeaderTooltip() { _activeHeaderTooltipSource = null; _activeHeaderTooltipKey = string.Empty; if ((Object)(object)_headerTooltipRoot != (Object)null) { _headerTooltipRoot.SetActive(false); } } private static void RefreshHeaderFilters() { if (_worldFilter == null) { return; } MarkerCatalog.Refresh(); Sprite val = null; foreach (MarkerGroup group in MarkerCatalog.Groups) { if (group.Kind == MarkerGroupKind.World && (Object)(object)group.Icon != (Object)null) { val = group.Icon; break; } } float num = ForegroundOpacity(Mathf.Clamp(ModSettings.WindowTransparency.Value, 0f, 0.85f)); RefreshHeaderStateButton(_worldFilter, val ?? UiAssets.OwnerDotSprite(), FilterState.WorldMarkersVisible, num, "world_markers"); RefreshHeaderStateButton(_deathFilter, GameBridge.NativePinSprite("Death") ?? UiAssets.OwnerDotSprite(), FilterState.DeathMarkersVisible, num, "death_markers"); RefreshHeaderStateButton(_bossFilter, GameBridge.NativePinSprite("Boss") ?? UiAssets.OwnerDotSprite(), FilterState.BossMarkersVisible, num, "bosses"); RefreshHeaderStateButton(_playerPositionsFilter, GameBridge.PlayerPositionSprite() ?? UiAssets.DirectionArrowFallbackSprite(), FilterState.OtherPlayerPositionsVisible, num, "other_player_positions"); if (_recoveredDeathCleanupFilter != null) { bool value = ModSettings.RemoveRecoveredDeathMarkers.Value; string stateTooltip = Texts.GetStateTooltip("death_marker_cleanup", value); _recoveredDeathCleanupFilter.SetTooltipKey(stateTooltip); _recoveredDeathCleanupFilter.Refresh(UiAssets.TombstoneCleanupSprite() ?? UiAssets.OwnerDotSprite(), value, num); if ((Object)(object)_activeHeaderTooltipSource == (Object)(object)_recoveredDeathCleanupFilter.Rect) { ShowHeaderTooltip(_recoveredDeathCleanupFilter.Rect, stateTooltip); } } } private static void RefreshHeaderStateButton(HeaderFilterButton button, Sprite sprite, bool enabled, float opacity, string labelKey) { if (button != null) { string stateTooltip = Texts.GetStateTooltip(labelKey, enabled); button.SetTooltipKey(stateTooltip); button.Refresh(sprite, enabled, opacity); if ((Object)(object)_activeHeaderTooltipSource == (Object)(object)button.Rect) { ShowHeaderTooltip(button.Rect, stateTooltip); } } } private static void ApplyTooltipTransparency() { if (!((Object)(object)_headerTooltipRoot == (Object)null)) { float num = ForegroundOpacity(Mathf.Clamp(ModSettings.WindowTransparency.Value, 0f, 0.85f)); SetAlpha(_headerTooltipBackground, 0.98f * num); SetTextAlpha(_headerTooltipText, num); } } private static void RebuildRows() { if ((Object)(object)_content == (Object)null) { return; } for (int num = ((Transform)_content).childCount - 1; num >= 0; num--) { Object.Destroy((Object)(object)((Component)((Transform)_content).GetChild(num)).gameObject); } Rows.Clear(); foreach (MarkerGroup group in MarkerCatalog.Groups) { if (group.Kind == MarkerGroupKind.Owner) { Rows.Add(new MarkerRowView((Transform)(object)_content, group)); } } _renderedRevision = MarkerCatalog.Revision; RefreshLocalizedText(); ApplyTransparency(); Canvas.ForceUpdateCanvases(); LayoutRebuilder.ForceRebuildLayoutImmediate(_content); Canvas.ForceUpdateCanvases(); UpdateScrollbarState(); ManualLogSource log = Plugin.Log; if (log != null) { log.LogInfo((object)($"Marker list rebuilt: {Rows.Count} rows, " + $"{MarkerCatalog.PlayerOwnerCount()} player owner group(s).")); } } private static void ApplyConfigVisuals() { //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) if (!((Object)(object)_root == (Object)null)) { RefreshLocalizedText(); bool scaleChanged = ApplyUiScale(force: false); if ((Object)(object)_resize != (Object)null) { _resize.MinimumSize = MinimumSize; } ApplyWindowEditState(); if ((!((Object)(object)_drag != (Object)null) || !_drag.IsDragging) && (!((Object)(object)_resize != (Object)null) || !_resize.IsDragging)) { NormalizeConfiguredGeometry(scaleChanged); } ApplyWindowEditState(); UpdateScrollbarState(); ApplyTransparency(); } } private static void NormalizeConfiguredGeometry(bool scaleChanged) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_0092: Unknown result type (might be due to invalid IL or missing references) //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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_0082: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: 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_0124: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_rootRect == (Object)null || _normalizingConfiguredGeometry) { return; } _normalizingConfiguredGeometry = true; try { Vector2 value = ModSettings.WindowSize.Value; Vector2 value2 = ModSettings.WindowPosition.Value; bool flag = !Approximately(_lastObservedConfigSize, value); bool flag2 = !Approximately(_lastObservedConfigPosition, value2); bool flag3 = false; Vector2 val = WindowBounds.ClampSizeToParent(_rootRect, ClampSize(value), MinimumSize); if (flag && !Approximately(value, val)) { ModSettings.WindowSize.Value = val; value = val; flag3 = true; } Vector2 val2 = _rootRect.sizeDelta - val; if (((Vector2)(ref val2)).sqrMagnitude > 0.01f) { _rootRect.sizeDelta = val; } if (scaleChanged || flag2 || flag) { _rootRect.anchoredPosition = value2; } WindowBounds.ClampInsideParent(_rootRect); if ((flag2 || flag) && !Approximately(value2, _rootRect.anchoredPosition)) { ModSettings.WindowPosition.Value = _rootRect.anchoredPosition; value2 = _rootRect.anchoredPosition; flag3 = true; } _lastObservedConfigSize = ModSettings.WindowSize.Value; _lastObservedConfigPosition = ModSettings.WindowPosition.Value; if (flag3) { ModSettings.Save(); } } finally { _normalizingConfiguredGeometry = false; } } private static bool ApplyUiScale(bool force) { //IL_010f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_rootRect == (Object)null) { return false; } int num = Mathf.Max(1, Screen.width); int num2 = Mathf.Max(1, Screen.height); float num3 = ((ModSettings.UiScale != null) ? Mathf.Clamp(ModSettings.UiScale.Value, 0.75f, 1.5f) : 1f); float num4 = 1f; if ((float)num2 < 1440f) { num4 = Mathf.Min(1.5f, Mathf.Sqrt(1440f / (float)num2)); } float num5 = num4 * num3; if (!force && num == _lastScreenWidth && num2 == _lastScreenHeight && Mathf.Approximately(num5, _lastEffectiveUiScale)) { return false; } if (_lastEffectiveUiScale > 0f && _lastAutomaticUiScale > 0f && _lastManualUiScale > 0f && _lastScreenWidth > 0 && _lastScreenHeight > 0) { QueueUiScaleLog(_lastAutomaticUiScale, _lastManualUiScale, _lastEffectiveUiScale, _lastScreenWidth, _lastScreenHeight, num4, num3, num5, num, num2); } ((Transform)_rootRect).localScale = new Vector3(num5, num5, 1f); _lastAutomaticUiScale = num4; _lastManualUiScale = num3; _lastEffectiveUiScale = num5; _lastScreenWidth = num; _lastScreenHeight = num2; return true; } private static void QueueUiScaleLog(float fromAutomatic, float fromManual, float fromEffective, int fromWidth, int fromHeight, float toAutomatic, float toManual, float toEffective, int toWidth, int toHeight) { if (!_uiScaleLogPending) { _uiScaleLogStartedAutomatic = fromAutomatic; _uiScaleLogStartedManual = fromManual; _uiScaleLogStartedEffective = fromEffective; _uiScaleLogStartedWidth = fromWidth; _uiScaleLogStartedHeight = fromHeight; _uiScaleLogPending = true; } _uiScaleLogTargetAutomatic = toAutomatic; _uiScaleLogTargetManual = toManual; _uiScaleLogTargetEffective = toEffective; _uiScaleLogTargetWidth = toWidth; _uiScaleLogTargetHeight = toHeight; _uiScaleLogLastChangeTime = Time.realtimeSinceStartup; } private static void FlushPendingUiScaleLog(bool force) { if (_uiScaleLogPending && (force || !Input.GetMouseButton(0)) && (force || !(Time.realtimeSinceStartup - _uiScaleLogLastChangeTime < 0.35f))) { int num = Mathf.RoundToInt(_uiScaleLogStartedAutomatic * 100f); int num2 = Mathf.RoundToInt(_uiScaleLogStartedManual * 100f); int num3 = Mathf.RoundToInt(_uiScaleLogStartedEffective * 100f); int num4 = Mathf.RoundToInt(_uiScaleLogTargetAutomatic * 100f); int num5 = Mathf.RoundToInt(_uiScaleLogTargetManual * 100f); int num6 = Mathf.RoundToInt(_uiScaleLogTargetEffective * 100f); bool flag = _uiScaleLogStartedWidth != _uiScaleLogTargetWidth || _uiScaleLogStartedHeight != _uiScaleLogTargetHeight; bool flag2 = num != num4; bool flag3 = num2 != num5; string text = (flag ? $"{_uiScaleLogStartedWidth}x{_uiScaleLogStartedHeight} -> {_uiScaleLogTargetWidth}x{_uiScaleLogTargetHeight}" : $"{_uiScaleLogTargetWidth}x{_uiScaleLogTargetHeight}"); string text2 = ((flag3 && !flag2 && !flag) ? ($"UI scale changed: manual {num2}% -> {num5}%, " + $"effective {num3}% -> {num6}% " + $"(auto {num4}%, {text}).") : ((flag3 || !(flag2 || flag)) ? ($"UI scale changed: auto {num}% -> {num4}%, " + $"manual {num2}% -> {num5}%, " + $"effective {num3}% -> {num6}% ({text}).") : ($"UI scale changed: auto {num}% -> {num4}%, " + $"effective {num3}% -> {num6}% " + $"(manual {num5}%, {text})."))); ManualLogSource log = Plugin.Log; if (log != null) { log.LogInfo((object)text2); } _uiScaleLogPending = false; } } private static bool Approximately(Vector2 left, Vector2 right) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) if (float.IsNaN(left.x) || float.IsNaN(left.y)) { return false; } Vector2 val = left - right; return ((Vector2)(ref val)).sqrMagnitude <= 0.01f; } private static bool WindowEditShortcutPressed() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) if (ModSettings.WindowEditShortcut == null) { return false; } try { KeyboardShortcut value = ModSettings.WindowEditShortcut.Value; return ((KeyboardShortcut)(ref value)).IsPressed(); } catch { return false; } } private static void ApplyWindowEditState() { bool flag = (Object)(object)_root != (Object)null && _root.activeInHierarchy && WindowEditShortcutPressed(); if (_windowEditActive && !flag) { _drag?.StopAndPersist(); _resize?.StopAndPersist(); } _windowEditActive = flag; if (flag) { HideHeaderTooltip(); } if ((Object)(object)_drag != (Object)null) { _drag.Enabled = flag; if ((Object)(object)_editDragSurface != (Object)null && _editDragSurface.activeSelf != flag) { _editDragSurface.SetActive(flag); } } if ((Object)(object)_resize != (Object)null) { _resize.Enabled = flag; if (((Component)_resize).gameObject.activeSelf != flag) { ((Component)_resize).gameObject.SetActive(flag); } } if ((Object)(object)_scrollbarInputGroup != (Object)null) { _scrollbarInputGroup.blocksRaycasts = _listIsScrollable && !flag; } } private static void UpdateScrollbarState() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_listScrollbar == (Object)null || (Object)(object)_listScroll == (Object)null || (Object)(object)((ScrollRect)_listScroll).viewport == (Object)null || (Object)(object)_content == (Object)null || (Object)(object)_scrollbarSlidingRect == (Object)null) { return; } Rect rect = ((ScrollRect)_listScroll).viewport.rect; float num = Mathf.Max(0f, ((Rect)(ref rect)).height); rect = _content.rect; bool flag = (_listIsScrollable = Mathf.Max(0f, ((Rect)(ref rect)).height) > num + 0.5f); _listScroll.WheelScrollingEnabled = flag; if ((Object)(object)_scrollbarInputGroup != (Object)null) { _scrollbarInputGroup.blocksRaycasts = flag && !_windowEditActive; } rect = _scrollbarSlidingRect.rect; float height = ((Rect)(ref rect)).height; if (height > 1f) { float num2 = 170f - 10f; float num3 = Mathf.Max(1f, num2 - 2f); float num4 = num3 * 0.24f; float num5 = Mathf.Max(0f, height - num3); float num6 = Mathf.Clamp(Mathf.Min(84f, num4 + num5 * 0.0625f) / height, 0.02f, 1f); if (!Mathf.Approximately(_listScrollbar.size, num6)) { _listScrollbar.size = num6; } } float num7 = Mathf.Clamp01(_rememberedScrollPosition); _listScrollbar.SetValueWithoutNotify(num7); if (flag) { if (!Mathf.Approximately(((ScrollRect)_listScroll).verticalNormalizedPosition, num7)) { ((ScrollRect)_listScroll).verticalNormalizedPosition = num7; } } else if (!Mathf.Approximately(((ScrollRect)_listScroll).verticalNormalizedPosition, 1f)) { ((ScrollRect)_listScroll).verticalNormalizedPosition = 1f; } } private static void ApplyTransparency() { //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: 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_0102: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Clamp(ModSettings.WindowTransparency.Value, 0f, 0.85f); float num2 = 1f - num; SetAlpha(_panelBackground, 0.97f * num2); SetAlpha(_headerBackground, 0.94f * num2); SetAlpha(_listBackground, 0.88f * num2); SetAlpha(_footerBackground, 0.92f * num2); SetAlpha(_sliderTrack, 0.76f * num2); SetAlpha(_scrollbarTrack, 0.62f * num2); float num3 = ForegroundOpacity(num); SetAlpha(_sliderHandle, num3); SetAlpha(_scrollbarHandle, num3); if ((Object)(object)_panelOutline != (Object)null) { Color effectColor = ((Shadow)_panelOutline).effectColor; effectColor.a = 0.46f * num2; ((Shadow)_panelOutline).effectColor = effectColor; } if ((Object)(object)_panelShadow != (Object)null) { Color effectColor2 = _panelShadow.effectColor; effectColor2.a = 0.42f * num2; _panelShadow.effectColor = effectColor2; } if ((Object)(object)_resize != (Object)null) { _resize.SetVisualAlpha(num3); } SetTextAlpha(_title, num3); SetTextAlpha(_stats, num3); SetTextAlpha(_transparencyText, num3); SetTextAlpha(_transparencyValue, num3); SetTextAlpha(_resizeText, num3); foreach (MarkerRowView row in Rows) { row.SetTransparency(num); } ApplyWindowEditState(); RefreshHeaderFilters(); ApplyTooltipTransparency(); if ((Object)(object)_transparencySlider != (Object)null && !Mathf.Approximately(_transparencySlider.value, num * 100f)) { _transparencySlider.SetValueWithoutNotify(num * 100f); } if ((Object)(object)_transparencyValue != (Object)null) { _transparencyValue.text = Mathf.RoundToInt(num * 100f) + "%"; } } private static void RefreshLocalizedText() { if ((Object)(object)_title != (Object)null) { _title.text = Texts.Get("window_title"); } if ((Object)(object)_stats != (Object)null) { _stats.text = Texts.Get("players_with_markers", MarkerCatalog.PlayerOwnerCount()); } if ((Object)(object)_transparencyText != (Object)null) { _transparencyText.text = Texts.Get("transparency"); } if ((Object)(object)_headerTooltipRoot != (Object)null && _headerTooltipRoot.activeSelf && (Object)(object)_activeHeaderTooltipSource != (Object)null && !string.IsNullOrEmpty(_activeHeaderTooltipKey)) { ShowHeaderTooltip(_activeHeaderTooltipSource, _activeHeaderTooltipKey); } RefreshHeaderFilters(); UpdateAdaptiveLayout(); } private static void UpdateAdaptiveLayout() { //IL_00ef: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_rootRect == (Object)null) && !((Object)(object)_stats == (Object)null)) { float num = Mathf.Max(78f, Mathf.Ceil(UiAssets.PreferredWidth(_transparencyText, ((Object)(object)_transparencyText != (Object)null) ? _transparencyText.text : string.Empty, 13f) + 12f)); float num2 = Mathf.Max(115f, Mathf.Ceil(UiAssets.PreferredWidth(_stats, _stats.text, 13f) + 8f)); if ((Object)(object)_statsLayout != (Object)null) { _statsLayout.minWidth = num2; } if ((Object)(object)_transparencyLabelLayout != (Object)null) { LayoutElement transparencyLabelLayout = _transparencyLabelLayout; float minWidth = (_transparencyLabelLayout.preferredWidth = num); transparencyLabelLayout.minWidth = minWidth; } float num4 = (((Object)(object)_title != (Object)null) ? _title.GetPreferredValues(_title.text).x : 110f); float num5 = 27f + Mathf.Max(108f, num4) + 96f + 20f + 8f + 18f + 8f; float num6 = 52f + num2 + num + 56f + 18f + 8f; float num7 = 287f; _adaptiveMinimumWidth = Mathf.Max(340f, Mathf.Ceil(Mathf.Max(num5, Mathf.Max(num6, num7)))); } } private static GameObject CreateAnchoredPanel(string name, Vector2 anchorMin, Vector2 anchorMax, Vector2 offsetMin, Vector2 offsetMax) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002f: 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_003b: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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) //IL_004f: 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) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown GameObject val = new GameObject(name, new Type[1] { typeof(RectTransform) }); val.transform.SetParent(_root.transform, false); RectTransform val2 = (RectTransform)val.transform; val2.anchorMin = anchorMin; val2.anchorMax = anchorMax; val2.offsetMin = offsetMin; val2.offsetMax = offsetMax; ((Transform)val2).localScale = Vector3.one; return val; } private static void DestroyWindow() { //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0173: 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_0189: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_root != (Object)null) { Object.Destroy((Object)(object)_root); } _root = null; _rootRect = null; _content = null; _panelBackground = null; _headerBackground = null; _listBackground = null; _footerBackground = null; _sliderTrack = null; _sliderHandle = null; _panelOutline = null; _panelShadow = null; _title = null; _stats = null; _transparencyText = null; _transparencyValue = null; _transparencySlider = null; _listScrollbar = null; _listScroll = null; _scrollbarInputGroup = null; _listIsScrollable = false; _scrollbarTrack = null; _scrollbarHandle = null; _scrollbarSlidingRect = null; _editDragSurface = null; _drag = null; _resize = null; _resizeText = null; _statsLayout = null; _transparencyLabelLayout = null; _worldFilter = null; _deathFilter = null; _recoveredDeathCleanupFilter = null; _bossFilter = null; _playerPositionsFilter = null; _windowEditActive = false; _headerTooltipRoot = null; _headerTooltipRect = null; _headerTooltipBackground = null; _headerTooltipText = null; _activeHeaderTooltipSource = null; _activeHeaderTooltipKey = string.Empty; _adaptiveMinimumWidth = 340f; FlushPendingUiScaleLog(force: true); _lastEffectiveUiScale = -1f; _lastAutomaticUiScale = -1f; _lastManualUiScale = -1f; _lastScreenWidth = -1; _lastScreenHeight = -1; _uiScaleLogPending = false; _lastObservedConfigPosition = (Vector2)((ModSettings.WindowPosition != null) ? ModSettings.WindowPosition.Value : new Vector2(float.NaN, float.NaN)); _lastObservedConfigSize = (Vector2)((ModSettings.WindowSize != null) ? ModSettings.WindowSize.Value : new Vector2(float.NaN, float.NaN)); Rows.Clear(); _renderedRevision = -1; } private static void SetActive(bool active) { if (!active) { HideHeaderTooltip(); _windowEditActive = false; if ((Object)(object)_drag != (Object)null) { _drag.StopAndPersist(); _drag.Enabled = false; } if ((Object)(object)_editDragSurface != (Object)null && _editDragSurface.activeSelf) { _editDragSurface.SetActive(false); } if ((Object)(object)_resize != (Object)null) { _resize.StopAndPersist(); _resize.Enabled = false; if (((Component)_resize).gameObject.activeSelf) { ((Component)_resize).gameObject.SetActive(false); } } } if ((Object)(object)_root != (Object)null && _root.activeSelf != active) { _root.SetActive(active); } } private static Vector2 ClampSize(Vector2 size) { //IL_0000: 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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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) return new Vector2(Mathf.Max(MinimumSize.x, size.x), Mathf.Max(MinimumSize.y, size.y)); } private static void SetAlpha(Image image, float alpha) { //IL_000b: 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) //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)image == (Object)null)) { Color color = ((Graphic)image).color; color.a = Mathf.Clamp01(alpha); ((Graphic)image).color = color; } } private static float ForegroundOpacity(float transparency) { float num = Mathf.Clamp01(transparency / 0.85f); return Mathf.Lerp(1f, 0.4f, num); } private static void NudgeTextVertically(TMP_Text text, float pixels) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001e: 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) //IL_0036: 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_004d: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)text == (Object)null)) { RectTransform rectTransform = text.rectTransform; rectTransform.offsetMin = new Vector2(rectTransform.offsetMin.x, rectTransform.offsetMin.y + pixels); rectTransform.offsetMax = new Vector2(rectTransform.offsetMax.x, rectTransform.offsetMax.y + pixels); } } private static void SetTextAlpha(TMP_Text text, float alpha) { if (!((Object)(object)text == (Object)null)) { CanvasGroup val = ((Component)text).GetComponent<CanvasGroup>(); if ((Object)(object)val == (Object)null) { val = ((Component)text).gameObject.AddComponent<CanvasGroup>(); } val.alpha = Mathf.Clamp01(alpha); } } } internal sealed class MarkerRowInput : MonoBehaviour, IPointerClickHandler, IEventSystemHandler { internal MarkerGroup Group; internal RectTransform FastSoloRect; public void OnPointerClick(PointerEventData eventData) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Invalid comparison between Unknown and I4 //IL_006c: Unknown result type (might be due to invalid IL or missing references) if (eventData != null && Group != null) { if ((int)eventData.button == 0) { FilterState.Toggle(Group); } else if ((int)eventData.button == 1 && Group.Kind == MarkerGroupKind.Owner && Group.OwnerId != 0L && Group.OwnerId == GameBridge.LocalPlayerId() && !((Object)(object)FastSoloRect == (Object)null) && RectTransformUtility.RectangleContainsScreenPoint(FastSoloRect, eventData.position, eventData.pressEventCamera)) { FilterState.FastSolo(Group.OwnerId); } } } } internal sealed class MarkerRowView { private readonly MarkerGroup _group; private readonly Image _background; private readonly Image _icon; private readonly TMP_Text _label; private readonly TMP_Text _count; private readonly Image _statusIcon; private static readonly Lazy<ColorBlock> RowButtonColors = new Lazy<ColorBlock>((Func<ColorBlock>)delegate { //IL_0002: 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_002a: 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_006a: 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_00ac: Unknown result type (might be due to invalid IL or missing references) ColorBlock result = default(ColorBlock); ((ColorBlock)(ref result)).normalColor = Color.white; ((ColorBlock)(ref result)).highlightedColor = new Color(1f, 0.96f, 0.8f, 1f); ((ColorBlock)(ref result)).pressedColor = new Color(0.84f, 0.72f, 0.48f, 1f); ((ColorBlock)(ref result)).selectedColor = new Color(1f, 0.92f, 0.66f, 1f); ((ColorBlock)(ref result)).disabledColor = new Color(0.5f, 0.5f, 0.5f, 0.5f); ((ColorBlock)(ref result)).colorMultiplier = 1f; ((ColorBlock)(ref result)).fadeDuration = 0.08f; return result; }); internal GameObject Root { get;