mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-16 00:07:52 +08:00
Misc cleanups and adjustments
This commit is contained in:
@ -15,7 +15,7 @@ namespace UnityExplorer.UI.Panels
|
||||
{
|
||||
public override string Name => "C# Console";
|
||||
public override UIManager.Panels PanelType => UIManager.Panels.CSConsole;
|
||||
public override int MinWidth => 740;
|
||||
public override int MinWidth => 750;
|
||||
public override int MinHeight => 300;
|
||||
|
||||
public InputFieldScroller InputScroll { get; private set; }
|
||||
|
@ -44,13 +44,6 @@ namespace UnityExplorer.UI.Panels
|
||||
|
||||
public override string GetSaveDataFromConfigManager() => ConfigManager.InspectorData.Value;
|
||||
|
||||
//public override void LoadSaveData()
|
||||
//{
|
||||
// ApplySaveData(ConfigManager.InspectorData.Value);
|
||||
//
|
||||
// InspectorManager.PanelWidth = this.mainPanelRect.rect.width;
|
||||
//}
|
||||
|
||||
public override void DoSaveToConfigElement()
|
||||
{
|
||||
ConfigManager.InspectorData.Value = this.ToSaveData();
|
||||
@ -66,6 +59,14 @@ namespace UnityExplorer.UI.Panels
|
||||
|
||||
public override void ConstructPanelContent()
|
||||
{
|
||||
// add close all button to titlebar
|
||||
|
||||
var closeAllBtn = UIFactory.CreateButton(this.titleBar.transform.Find("CloseHolder").gameObject, "CloseAllBtn", "Close All",
|
||||
new Color(0.3f, 0.2f, 0.2f));
|
||||
UIFactory.SetLayoutElement(closeAllBtn.Component.gameObject, minHeight: 25, minWidth: 80);
|
||||
closeAllBtn.Component.transform.SetSiblingIndex(closeAllBtn.Component.transform.GetSiblingIndex() - 1);
|
||||
closeAllBtn.OnClick += InspectorManager.CloseAllTabs;
|
||||
|
||||
// this.UIRoot.GetComponent<Mask>().enabled = false;
|
||||
|
||||
UIFactory.SetLayoutGroup<VerticalLayoutGroup>(this.content, true, true, true, true, 4, padLeft: 5, padRight: 5);
|
||||
|
@ -29,7 +29,7 @@ namespace UnityExplorer.UI.Panels
|
||||
public override string Name => "Log";
|
||||
public override UIManager.Panels PanelType => UIManager.Panels.ConsoleLog;
|
||||
|
||||
public override int MinWidth => 300;
|
||||
public override int MinWidth => 350;
|
||||
public override int MinHeight => 75;
|
||||
public override bool ShouldSaveActiveState => true;
|
||||
public override bool ShowByDefault => true;
|
||||
|
@ -188,13 +188,13 @@ namespace UnityExplorer.UI.Panels
|
||||
// Title text
|
||||
|
||||
var titleTxt = UIFactory.CreateLabel(titleBar, "TitleBar", Name, TextAnchor.MiddleLeft);
|
||||
UIFactory.SetLayoutElement(titleTxt.gameObject, minWidth: 250, minHeight: 25, flexibleHeight: 0, flexibleWidth: 0);
|
||||
UIFactory.SetLayoutElement(titleTxt.gameObject, minWidth: 250, minHeight: 25, flexibleHeight: 0);
|
||||
|
||||
// close button
|
||||
|
||||
var closeHolder = UIFactory.CreateUIObject("CloseHolder", titleBar);
|
||||
UIFactory.SetLayoutElement(closeHolder, minHeight: 25, flexibleHeight: 0, minWidth: 30, flexibleWidth: 9999);
|
||||
UIFactory.SetLayoutGroup<HorizontalLayoutGroup>(closeHolder, false, false, true, true, 0, childAlignment: TextAnchor.MiddleRight);
|
||||
UIFactory.SetLayoutGroup<HorizontalLayoutGroup>(closeHolder, false, false, true, true, 3, childAlignment: TextAnchor.MiddleRight);
|
||||
var closeBtn = UIFactory.CreateButton(closeHolder, "CloseButton", "—");
|
||||
UIFactory.SetLayoutElement(closeBtn.Component.gameObject, minHeight: 25, minWidth: 25, flexibleWidth: 0);
|
||||
RuntimeProvider.Instance.SetColorBlock(closeBtn.Component, new Color(0.33f, 0.32f, 0.31f));
|
||||
|
Reference in New Issue
Block a user