Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit 5b94e31

Browse files
committed
1.6.0
* Fix for failed unstrip with RectOffset(int, int, int, int) ctor * Cleanups
1 parent 692a376 commit 5b94e31

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

src/CachedObjects/Object/CacheDictionary.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ private IDictionary Il2CppDictionaryToMono()
5555

5656
// make generic dictionary from key and value type
5757
var dict = (IDictionary)Activator.CreateInstance(typeof(Dictionary<,>)
58-
.MakeGenericType(TypeOfKeys, TypeOfValues));
58+
.MakeGenericType(TypeOfKeys, TypeOfValues));
5959

6060
// get keys and values
6161
var keys = ValueType.GetProperty("Keys") .GetValue(Value);
6262
var values = ValueType.GetProperty("Values").GetValue(Value);
6363

64-
// create a list to hold them
65-
var keyList = new List<object>();
64+
// create lists to hold them
65+
var keyList = new List<object>();
6666
var valueList = new List<object>();
6767

6868
// get keys enumerator and store keys

src/CachedObjects/Other/CacheMethod.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ private void Evaluate()
212212
cacheList.WhiteSpace = 0f;
213213
cacheList.ButtonWidthOffset += 70f;
214214
}
215+
else if (m_cachedReturnValue is CacheDictionary cacheDict)
216+
{
217+
cacheDict.WhiteSpace = 0f;
218+
cacheDict.ButtonWidthOffset += 70f;
219+
}
215220
m_cachedReturnValue.UpdateValue();
216221
}
217222
else

src/Helpers/UIStyles.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ private static GUIStyle HorizontalBar
5656
{
5757
_horizBarStyle = new GUIStyle();
5858
_horizBarStyle.normal.background = Texture2D.whiteTexture;
59-
_horizBarStyle.margin = new RectOffset(0, 0, 4, 4);
59+
var rectOffset = new RectOffset();
60+
rectOffset.top = 4;
61+
rectOffset.bottom = 4;
62+
_horizBarStyle.margin = rectOffset;
6063
_horizBarStyle.fixedHeight = 2;
6164
}
6265

@@ -73,7 +76,10 @@ private static GUIStyle HorizontalBarSmall
7376
{
7477
_horizBarSmallStyle = new GUIStyle();
7578
_horizBarSmallStyle.normal.background = Texture2D.whiteTexture;
76-
_horizBarSmallStyle.margin = new RectOffset(0, 0, 2, 2);
79+
var rectOffset = new RectOffset();
80+
rectOffset.top = 2;
81+
rectOffset.bottom = 2;
82+
_horizBarSmallStyle.margin = rectOffset;
7783
_horizBarSmallStyle.fixedHeight = 1;
7884
}
7985

0 commit comments

Comments
 (0)