InteractiveBool, Il2Cpp>Mono type dict cache, some UI fixes

This commit is contained in:
sinaioutlander
2020-11-16 00:50:06 +11:00
parent 41f0b0ed55
commit 8acc85061d
21 changed files with 323 additions and 234 deletions

View File

@ -25,6 +25,7 @@ namespace UnityExplorer.Inspectors.Reflection
public override IValueTypes IValueType => IValueTypes.Enumerable;
public override bool HasSubContent => true;
public override bool SubContentWanted => (RefIList?.Count ?? 1) > 0;
public override bool WantInspectBtn => false;
internal IEnumerable RefIEnumerable;
@ -137,7 +138,7 @@ namespace UnityExplorer.Inspectors.Reflection
entry.Enable();
}
UpdateSubcontentHeight();
//UpdateSubcontentHeight();
}
internal override void OnToggleSubcontent(bool active)
@ -154,36 +155,6 @@ namespace UnityExplorer.Inspectors.Reflection
RefreshDisplay();
}
public void UpdateSubcontentHeight()
{
Canvas.ForceUpdateCanvases();
float totalHeight = 0f;
if (m_subContentParent.activeSelf)
{
foreach (var itemIndex in m_pageHandler)
{
if (itemIndex >= m_entries.Count)
break;
var entry = m_entries[itemIndex];
LayoutRebuilder.ForceRebuildLayoutImmediate(entry.m_mainRect);
totalHeight += entry.m_mainRect.rect.height;
}
}
m_listLayout.minHeight = Mathf.Min(350f, totalHeight);
//m_mainLayout.minHeight = totalHeight;
LayoutRebuilder.ForceRebuildLayoutImmediate(OwnerCacheObject.m_mainRect);
if (OwnerCacheObject is INestedValue nestedValue)
{
// nested enumerable
nestedValue.UpdateSubcontentHeight();
}
}
#region UI CONSTRUCTION
internal GameObject m_listContent;