diff --git a/src/Inspectors/Reflection/InstanceInspector.cs b/src/Inspectors/Reflection/InstanceInspector.cs index 73a61af..f129dee 100644 --- a/src/Inspectors/Reflection/InstanceInspector.cs +++ b/src/Inspectors/Reflection/InstanceInspector.cs @@ -45,25 +45,110 @@ namespace UnityExplorer.Inspectors.Reflection public void ConstructInstanceHelpers() { - // On second thought, I'm not sure about this, seems unnecessary (and bloaty) - // I might do the Texture2D helper (view/save image) but idk about anything else. + // WIP + + //if (m_targetType == typeof(Texture2D)) + // ConstructTextureHelper(); + + // todo other helpers //if (typeof(Component).IsAssignableFrom(m_targetType)) //{ - // // component helpers (ref GO) - // var tempObj = UIFactory.CreateLabel(Content, TextAnchor.MiddleLeft); - // var text = tempObj.GetComponent(); - // text.text = "TODO comp helpers"; //} //else if (typeof(UnityEngine.Object).IsAssignableFrom(m_targetType)) //{ - // // unityengine.object helpers (name, instantiate, destroy?) - // var tempObj = UIFactory.CreateLabel(Content, TextAnchor.MiddleLeft); - // var text = tempObj.GetComponent(); - // text.text = "TODO unity object helpers"; //} } + //internal bool showingTextureHelper; + //internal bool constructedTextureViewer; + + //internal void ConstructTextureHelper() + //{ + // var rowObj = UIFactory.CreateHorizontalGroup(Content, new Color(0.1f, 0.1f, 0.1f)); + // var rowLayout = rowObj.AddComponent(); + // rowLayout.minHeight = 25; + // rowLayout.flexibleHeight = 0; + // var rowGroup = rowObj.GetComponent(); + // rowGroup.childForceExpandHeight = true; + // rowGroup.childForceExpandWidth = false; + // rowGroup.padding.top = 3; + // rowGroup.padding.left = 3; + // rowGroup.padding.bottom = 3; + // rowGroup.padding.right = 3; + // rowGroup.spacing = 5; + + // var showBtnObj = UIFactory.CreateButton(rowObj, new Color(0.2f, 0.2f, 0.2f)); + // var showBtnLayout = showBtnObj.AddComponent(); + // showBtnLayout.minWidth = 50; + // showBtnLayout.flexibleWidth = 0; + // var showText = showBtnObj.GetComponentInChildren(); + // showText.text = "Show"; + // var showBtn = showBtnObj.GetComponent