mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-13 15:26:36 +08:00
Use UniverseLib PanelBase/PanelDragger
This commit is contained in:
39
src/UI/UEPanelManager.cs
Normal file
39
src/UI/UEPanelManager.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityExplorer.UI.Panels;
|
||||
using UniverseLib.UI;
|
||||
using UniverseLib.UI.Panels;
|
||||
|
||||
namespace UnityExplorer.UI
|
||||
{
|
||||
public class UEPanelManager : PanelManager
|
||||
{
|
||||
public UEPanelManager(UIBase owner) : base(owner) { }
|
||||
|
||||
protected override Vector3 MousePosition => DisplayManager.MousePosition;
|
||||
|
||||
protected override Vector2 ScreenDimensions => new(DisplayManager.Width, DisplayManager.Height);
|
||||
|
||||
protected override bool MouseInTargetDisplay => DisplayManager.MouseInTargetDisplay;
|
||||
|
||||
internal void DoInvokeOnPanelsReordered()
|
||||
{
|
||||
InvokeOnPanelsReordered();
|
||||
}
|
||||
|
||||
protected override void SortDraggerHeirarchy()
|
||||
{
|
||||
base.SortDraggerHeirarchy();
|
||||
|
||||
// move AutoCompleter to first update
|
||||
if (!UIManager.Initializing && AutoCompleteModal.Instance != null)
|
||||
{
|
||||
this.draggerInstances.Remove(AutoCompleteModal.Instance.Dragger);
|
||||
this.draggerInstances.Insert(0, AutoCompleteModal.Instance.Dragger);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user