Some progress on inspector rewrites, most of the framework figured out now.

This commit is contained in:
Sinai
2021-04-27 21:22:48 +10:00
parent 07ddba3c3d
commit a2ff37e36d
25 changed files with 1197 additions and 323 deletions

View File

@ -26,6 +26,7 @@ namespace UnityExplorer.UI.Panels
public GameObject NavbarHolder;
public GameObject ContentHolder;
public RectTransform ContentRect;
public static float CurrentPanelWidth => Instance.mainPanelRect.rect.width;
@ -38,12 +39,14 @@ namespace UnityExplorer.UI.Panels
{
base.OnFinishResize(panel);
InspectorManager.OnPanelResized();
InspectorManager.OnPanelResized(panel.rect.width);
}
public override void LoadSaveData()
{
ApplySaveData(ConfigManager.GameObjectInspectorData.Value);
InspectorManager.PanelWidth = this.mainPanelRect.rect.width;
}
public override void SaveToConfigManager()
@ -77,6 +80,7 @@ namespace UnityExplorer.UI.Panels
this.ContentHolder = UIFactory.CreateVerticalGroup(this.content, "ContentHolder", true, true, true, true, 0, default,
new Color(0.1f, 0.1f, 0.1f));
UIFactory.SetLayoutElement(ContentHolder, flexibleHeight: 9999);
ContentRect = ContentHolder.GetComponent<RectTransform>();
UIManager.SetPanelActive(PanelType, false);
}