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

Commit

Permalink
1.6.0
Browse files Browse the repository at this point in the history
* Fix for failed unstrip with RectOffset(int, int, int, int) ctor
* Cleanups
  • Loading branch information
sinai-dev committed Sep 6, 2020
1 parent 692a376 commit 5b94e31
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/CachedObjects/Object/CacheDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<object>();
// create lists to hold them
var keyList = new List<object>();
var valueList = new List<object>();

// get keys enumerator and store keys
Expand Down
5 changes: 5 additions & 0 deletions src/CachedObjects/Other/CacheMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions src/Helpers/UIStyles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down

0 comments on commit 5b94e31

Please sign in to comment.