diff --git a/src/CachedObjects/Object/CacheDictionary.cs b/src/CachedObjects/Object/CacheDictionary.cs index 64baddcf..3abb6a76 100644 --- a/src/CachedObjects/Object/CacheDictionary.cs +++ b/src/CachedObjects/Object/CacheDictionary.cs @@ -55,14 +55,14 @@ private IDictionary Il2CppDictionaryToMono() // make generic dictionary from key and value type var dict = (IDictionary)Activator.CreateInstance(typeof(Dictionary<,>) - .MakeGenericType(TypeOfKeys, TypeOfValues)); + .MakeGenericType(TypeOfKeys, TypeOfValues)); // get keys and values var keys = ValueType.GetProperty("Keys") .GetValue(Value); var values = ValueType.GetProperty("Values").GetValue(Value); - // create a list to hold them - var keyList = new List(); + // create lists to hold them + var keyList = new List(); var valueList = new List(); // get keys enumerator and store keys diff --git a/src/CachedObjects/Other/CacheMethod.cs b/src/CachedObjects/Other/CacheMethod.cs index 2e580ee3..9dcf3012 100644 --- a/src/CachedObjects/Other/CacheMethod.cs +++ b/src/CachedObjects/Other/CacheMethod.cs @@ -212,6 +212,11 @@ private void Evaluate() cacheList.WhiteSpace = 0f; cacheList.ButtonWidthOffset += 70f; } + else if (m_cachedReturnValue is CacheDictionary cacheDict) + { + cacheDict.WhiteSpace = 0f; + cacheDict.ButtonWidthOffset += 70f; + } m_cachedReturnValue.UpdateValue(); } else diff --git a/src/Helpers/UIStyles.cs b/src/Helpers/UIStyles.cs index 5ee9fef1..4af7df48 100644 --- a/src/Helpers/UIStyles.cs +++ b/src/Helpers/UIStyles.cs @@ -56,7 +56,10 @@ private static GUIStyle HorizontalBar { _horizBarStyle = new GUIStyle(); _horizBarStyle.normal.background = Texture2D.whiteTexture; - _horizBarStyle.margin = new RectOffset(0, 0, 4, 4); + var rectOffset = new RectOffset(); + rectOffset.top = 4; + rectOffset.bottom = 4; + _horizBarStyle.margin = rectOffset; _horizBarStyle.fixedHeight = 2; } @@ -73,7 +76,10 @@ private static GUIStyle HorizontalBarSmall { _horizBarSmallStyle = new GUIStyle(); _horizBarSmallStyle.normal.background = Texture2D.whiteTexture; - _horizBarSmallStyle.margin = new RectOffset(0, 0, 2, 2); + var rectOffset = new RectOffset(); + rectOffset.top = 2; + rectOffset.bottom = 2; + _horizBarSmallStyle.margin = rectOffset; _horizBarSmallStyle.fixedHeight = 1; }