From 30b48b1f1f19b4fc4e19fe2b25a449f8eca5f8bc Mon Sep 17 00:00:00 2001 From: sinaioutlander <49360850+sinaioutlander@users.noreply.github.com> Date: Mon, 31 Aug 2020 16:27:14 +1000 Subject: [PATCH] 1.4.6 * Fix a bug with the Scene Explorer Search feature (not Object search) * Simplified parsing of primitive values to a better method --- README.md | 2 +- src/CachedObjects/CachePrimitive.cs | 16 +--------------- src/CppExplorer.cs | 2 +- src/MainMenu/Pages/ScenePage.cs | 17 +++++++++++++++-- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 130ed53..997232a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# CppExplorer [![Version](https://img.shields.io/badge/MelonLoader-0.2.7-green.svg)]() +# CppExplorer [![Version](https://img.shields.io/badge/MelonLoader-0.2.7.1-green.svg)]()
diff --git a/src/CachedObjects/CachePrimitive.cs b/src/CachedObjects/CachePrimitive.cs
index 7b3190a..b18384b 100644
--- a/src/CachedObjects/CachePrimitive.cs
+++ b/src/CachedObjects/CachePrimitive.cs
@@ -28,21 +28,7 @@ namespace Explorer
{
if (m_parseMethod == null)
{
- Type t = null;
- switch (PrimitiveType)
- {
- case PrimitiveTypes.Bool:
- t = typeof(bool); break;
- case PrimitiveTypes.Double:
- t = typeof(double); break;
- case PrimitiveTypes.Float:
- t = typeof(float); break;
- case PrimitiveTypes.Int:
- t = typeof(int); break;
- case PrimitiveTypes.Char:
- t = typeof(char); break;
- }
- m_parseMethod = t?.GetMethod("Parse", new Type[] { typeof(string) });
+ m_parseMethod = Value.GetType().GetMethod("Parse", new Type[] { typeof(string) });
}
return m_parseMethod;
}
diff --git a/src/CppExplorer.cs b/src/CppExplorer.cs
index fa24cc6..6ed4fa1 100644
--- a/src/CppExplorer.cs
+++ b/src/CppExplorer.cs
@@ -12,7 +12,7 @@ namespace Explorer
public class CppExplorer : MelonMod
{
public const string GUID = "com.sinai.cppexplorer";
- public const string VERSION = "1.4.5";
+ public const string VERSION = "1.4.6";
public const string AUTHOR = "Sinai";
public const string NAME = "CppExplorer"
diff --git a/src/MainMenu/Pages/ScenePage.cs b/src/MainMenu/Pages/ScenePage.cs
index 8166b4c..437e80b 100644
--- a/src/MainMenu/Pages/ScenePage.cs
+++ b/src/MainMenu/Pages/ScenePage.cs
@@ -350,11 +350,24 @@ namespace Explorer
m_pageOffset = 0;
}
- for (int i = offset; i < offset + m_limit && offset < m_searchResults.Count; i++)
+ for (int i = offset; i < offset + m_limit && i < m_searchResults.Count; i++)
{
var obj = m_searchResults[i];
- UIHelpers.FastGameobjButton(obj.RefGameObject, obj.EnabledColor, obj.Label, obj.RefGameObject.activeSelf, SetTransformTarget, true, MainMenu.MainRect.width - 170);
+ if (obj.RefGameObject)
+ {
+ UIHelpers.FastGameobjButton(obj.RefGameObject,
+ obj.EnabledColor,
+ obj.Label,
+ obj.RefGameObject.activeSelf,
+ SetTransformTarget,
+ true,
+ MainMenu.MainRect.width - 170);
+ }
+ else
+ {
+ GUILayout.Label("