mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-16 00:07:52 +08:00
use UniverseLib
This commit is contained in:
@ -9,6 +9,9 @@ using UnityEngine.UI;
|
||||
using UnityExplorer.Core.Config;
|
||||
using UnityExplorer.CSConsole;
|
||||
using UnityExplorer.UI.Widgets;
|
||||
using UniverseLib;
|
||||
using UniverseLib.UI;
|
||||
using UniverseLib.UI.Widgets;
|
||||
|
||||
namespace UnityExplorer.UI.Panels
|
||||
{
|
||||
@ -39,8 +42,8 @@ namespace UnityExplorer.UI.Panels
|
||||
|
||||
private void InvokeOnValueChanged(string value)
|
||||
{
|
||||
if (value.Length == UIManager.MAX_INPUTFIELD_CHARS)
|
||||
ExplorerCore.LogWarning($"Reached maximum InputField character length! ({UIManager.MAX_INPUTFIELD_CHARS})");
|
||||
if (value.Length == UniversalUI.MAX_INPUTFIELD_CHARS)
|
||||
ExplorerCore.LogWarning($"Reached maximum InputField character length! ({UniversalUI.MAX_INPUTFIELD_CHARS})");
|
||||
|
||||
OnInputChanged?.Invoke(value);
|
||||
}
|
||||
@ -148,7 +151,7 @@ namespace UnityExplorer.UI.Panels
|
||||
UIFactory.SetLayoutGroup<VerticalLayoutGroup>(linesHolder, true, true, true, true);
|
||||
|
||||
LineNumberText = UIFactory.CreateLabel(linesHolder, "LineNumbers", "1", TextAnchor.UpperCenter, Color.grey, fontSize: 16);
|
||||
LineNumberText.font = UIManager.ConsoleFont;
|
||||
LineNumberText.font = UniversalUI.ConsoleFont;
|
||||
|
||||
// input field
|
||||
|
||||
@ -192,9 +195,9 @@ namespace UnityExplorer.UI.Panels
|
||||
HighlightText.fontSize = fontSize;
|
||||
|
||||
// Set fonts
|
||||
InputText.font = UIManager.ConsoleFont;
|
||||
Input.PlaceholderText.font = UIManager.ConsoleFont;
|
||||
HighlightText.font = UIManager.ConsoleFont;
|
||||
InputText.font = UniversalUI.ConsoleFont;
|
||||
Input.PlaceholderText.font = UniversalUI.ConsoleFont;
|
||||
HighlightText.font = UniversalUI.ConsoleFont;
|
||||
|
||||
RuntimeProvider.Instance.StartCoroutine(DelayedLayoutSetup());
|
||||
}
|
||||
|
@ -8,6 +8,8 @@ using UnityExplorer.Core.Config;
|
||||
using UnityExplorer.Hooks;
|
||||
using UnityExplorer.UI.Widgets;
|
||||
using UnityExplorer.UI.Widgets.AutoComplete;
|
||||
using UniverseLib.UI;
|
||||
using UniverseLib.UI.Widgets;
|
||||
|
||||
namespace UnityExplorer.UI.Panels
|
||||
{
|
||||
@ -185,9 +187,9 @@ namespace UnityExplorer.UI.Panels
|
||||
EditorHighlightText.fontSize = fontSize;
|
||||
|
||||
// Set fonts
|
||||
EditorInputText.font = UIManager.ConsoleFont;
|
||||
EditorInput.PlaceholderText.font = UIManager.ConsoleFont;
|
||||
EditorHighlightText.font = UIManager.ConsoleFont;
|
||||
EditorInputText.font = UniversalUI.ConsoleFont;
|
||||
EditorInput.PlaceholderText.font = UniversalUI.ConsoleFont;
|
||||
EditorHighlightText.font = UniversalUI.ConsoleFont;
|
||||
|
||||
editorPanel.SetActive(false);
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityExplorer.Core.Config;
|
||||
using UnityExplorer.Inspectors;
|
||||
using UniverseLib.UI;
|
||||
|
||||
namespace UnityExplorer.UI.Panels
|
||||
{
|
||||
|
@ -8,6 +8,9 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityExplorer.Core.Config;
|
||||
using UnityExplorer.UI.Widgets;
|
||||
using UniverseLib;
|
||||
using UniverseLib.UI;
|
||||
using UniverseLib.UI.Widgets;
|
||||
|
||||
namespace UnityExplorer.UI.Panels
|
||||
{
|
||||
@ -233,8 +236,8 @@ namespace UnityExplorer.UI.Panels
|
||||
Input.Component.readOnly = true;
|
||||
Input.Component.textComponent.supportRichText = true;
|
||||
Input.Component.lineType = InputField.LineType.MultiLineNewline;
|
||||
Input.Component.textComponent.font = UIManager.ConsoleFont;
|
||||
Input.PlaceholderText.font = UIManager.ConsoleFont;
|
||||
Input.Component.textComponent.font = UniversalUI.ConsoleFont;
|
||||
Input.PlaceholderText.font = UniversalUI.ConsoleFont;
|
||||
|
||||
return UIRoot;
|
||||
}
|
||||
|
@ -10,9 +10,11 @@ using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
using UnityExplorer.Core;
|
||||
using UnityExplorer.Core.Config;
|
||||
using UnityExplorer.UI.Models;
|
||||
using UniverseLib.UI.Models;
|
||||
using UnityExplorer.ObjectExplorer;
|
||||
using UnityExplorer.UI.Widgets;
|
||||
using UniverseLib.UI;
|
||||
using UniverseLib;
|
||||
|
||||
namespace UnityExplorer.UI.Panels
|
||||
{
|
||||
@ -42,7 +44,7 @@ namespace UnityExplorer.UI.Panels
|
||||
content.SetActive(true);
|
||||
|
||||
var button = tabButtons[tabIndex];
|
||||
RuntimeProvider.Instance.SetColorBlock(button.Component, UIManager.enabledButtonColor, UIManager.enabledButtonColor * 1.2f);
|
||||
RuntimeProvider.Instance.SetColorBlock(button.Component, UniversalUI.enabledButtonColor, UniversalUI.enabledButtonColor * 1.2f);
|
||||
|
||||
SelectedTab = tabIndex;
|
||||
SaveToConfigManager();
|
||||
@ -51,7 +53,7 @@ namespace UnityExplorer.UI.Panels
|
||||
private void DisableTab(int tabIndex)
|
||||
{
|
||||
tabPages[tabIndex].SetActive(false);
|
||||
RuntimeProvider.Instance.SetColorBlock(tabButtons[tabIndex].Component, UIManager.disabledButtonColor, UIManager.disabledButtonColor * 1.2f);
|
||||
RuntimeProvider.Instance.SetColorBlock(tabButtons[tabIndex].Component, UniversalUI.disabledButtonColor, UniversalUI.disabledButtonColor * 1.2f);
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
|
@ -8,6 +8,8 @@ using UnityExplorer.Core.Config;
|
||||
using UnityExplorer.CacheObject;
|
||||
using UnityExplorer.CacheObject.Views;
|
||||
using UnityExplorer.UI.Widgets;
|
||||
using UniverseLib.UI.Widgets;
|
||||
using UniverseLib.UI;
|
||||
|
||||
namespace UnityExplorer.UI.Panels
|
||||
{
|
||||
|
@ -5,9 +5,11 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityExplorer.Core.Input;
|
||||
using UnityExplorer.UI.Models;
|
||||
using UniverseLib.Input;
|
||||
using UniverseLib.UI.Models;
|
||||
using UnityExplorer.UI.Widgets.AutoComplete;
|
||||
using UniverseLib.UI;
|
||||
using UniverseLib;
|
||||
|
||||
namespace UnityExplorer.UI.Panels
|
||||
{
|
||||
@ -472,7 +474,7 @@ namespace UnityExplorer.UI.Panels
|
||||
{
|
||||
try
|
||||
{
|
||||
var text = UIFactory.CreateLabel(UIManager.CanvasRoot, "ResizeCursor", "↔", TextAnchor.MiddleCenter, Color.white, true, 35);
|
||||
var text = UIFactory.CreateLabel(UIManager.UIRoot, "ResizeCursor", "↔", TextAnchor.MiddleCenter, Color.white, true, 35);
|
||||
s_resizeCursorObj = text.gameObject;
|
||||
|
||||
RectTransform rect = s_resizeCursorObj.GetComponent<RectTransform>();
|
||||
|
@ -6,9 +6,11 @@ using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityExplorer.Core.Config;
|
||||
using UnityExplorer.Core.Input;
|
||||
using UnityExplorer.UI.Models;
|
||||
using UniverseLib.Input;
|
||||
using UnityExplorer.UI.Widgets;
|
||||
using UniverseLib.UI.Models;
|
||||
using UniverseLib.UI;
|
||||
using UniverseLib;
|
||||
|
||||
namespace UnityExplorer.UI.Panels
|
||||
{
|
||||
@ -35,6 +37,7 @@ namespace UnityExplorer.UI.Panels
|
||||
int count = UIManager.PanelHolder.transform.childCount;
|
||||
var mousePos = InputManager.MousePosition;
|
||||
bool clickedInAny = false;
|
||||
|
||||
for (int i = count - 1; i >= 0; i--)
|
||||
{
|
||||
// make sure this is a real recognized panel
|
||||
@ -106,7 +109,7 @@ namespace UnityExplorer.UI.Panels
|
||||
|
||||
public override void SetActive(bool active)
|
||||
{
|
||||
if (this.Enabled.Equals(active))
|
||||
if (this.Enabled == active)
|
||||
return;
|
||||
|
||||
base.SetActive(active);
|
||||
@ -116,7 +119,7 @@ namespace UnityExplorer.UI.Panels
|
||||
|
||||
if (NavButtonWanted)
|
||||
{
|
||||
var color = active ? UIManager.enabledButtonColor : UIManager.disabledButtonColor;
|
||||
var color = active ? UniversalUI.enabledButtonColor : UniversalUI.disabledButtonColor;
|
||||
RuntimeProvider.Instance.SetColorBlock(NavButton.Component, color, color * 1.2f);
|
||||
}
|
||||
|
||||
@ -232,7 +235,7 @@ namespace UnityExplorer.UI.Panels
|
||||
UIFactory.SetLayoutGroup<HorizontalLayoutGroup>(navBtn, false, true, true, true, 0, 0, 0, 5, 5, TextAnchor.MiddleCenter);
|
||||
UIFactory.SetLayoutElement(navBtn, minWidth: 80);
|
||||
|
||||
RuntimeProvider.Instance.SetColorBlock(NavButton.Component, UIManager.disabledButtonColor, UIManager.disabledButtonColor * 1.2f);
|
||||
RuntimeProvider.Instance.SetColorBlock(NavButton.Component, UniversalUI.disabledButtonColor, UniversalUI.disabledButtonColor * 1.2f);
|
||||
NavButton.OnClick += () => { UIManager.TogglePanel(PanelType); };
|
||||
|
||||
var txtObj = navBtn.transform.Find("Text").gameObject;
|
||||
@ -240,7 +243,7 @@ namespace UnityExplorer.UI.Panels
|
||||
}
|
||||
|
||||
// create core canvas
|
||||
uiRoot = UIFactory.CreatePanel(Name, out GameObject panelContent);
|
||||
uiRoot = UIFactory.CreatePanel(Name, UIManager.PanelHolder, out GameObject panelContent);
|
||||
Rect = this.uiRoot.GetComponent<RectTransform>();
|
||||
UIFactory.SetLayoutGroup<VerticalLayoutGroup>(this.uiRoot, false, false, true, true, 0, 2, 2, 2, 2, TextAnchor.UpperLeft);
|
||||
|
||||
|
@ -5,6 +5,9 @@ using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityExplorer.Inspectors.MouseInspectors;
|
||||
using UnityExplorer.UI.Widgets;
|
||||
using UniverseLib;
|
||||
using UniverseLib.UI;
|
||||
using UniverseLib.UI.Widgets;
|
||||
|
||||
namespace UnityExplorer.UI.Panels
|
||||
{
|
||||
|
Reference in New Issue
Block a user