mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-01-03 16:13:25 +08:00
Fix UI mouse inspector results panel not always coming to front
This commit is contained in:
parent
4fdb2aacd8
commit
b5c69fc1ea
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@ -8,6 +9,7 @@ using UnityEngine.UI;
|
||||
using UnityExplorer.UI;
|
||||
using UnityExplorer.UI.Panels;
|
||||
using UniverseLib;
|
||||
using UniverseLib.Input;
|
||||
|
||||
namespace UnityExplorer.Inspectors.MouseInspectors
|
||||
{
|
||||
@ -38,6 +40,12 @@ namespace UnityExplorer.Inspectors.MouseInspectors
|
||||
{
|
||||
LastHitObjects.Clear();
|
||||
LastHitObjects.AddRange(currentHitObjects);
|
||||
RuntimeHelper.StartCoroutine(SetPanelActiveCoro());
|
||||
}
|
||||
|
||||
IEnumerator SetPanelActiveCoro()
|
||||
{
|
||||
yield return null;
|
||||
var panel = UIManager.GetPanel<UiInspectorResultsPanel>(UIManager.Panels.UIInspectorResults);
|
||||
panel.SetActive(true);
|
||||
panel.ShowResults();
|
||||
|
@ -108,9 +108,8 @@ namespace UnityExplorer.UI.Panels
|
||||
|
||||
public override void SetActive(bool active)
|
||||
{
|
||||
if (this.Enabled == active)
|
||||
return;
|
||||
|
||||
if (this.Enabled != active)
|
||||
{
|
||||
base.SetActive(active);
|
||||
|
||||
if (!ApplyingSaveData)
|
||||
@ -121,6 +120,7 @@ namespace UnityExplorer.UI.Panels
|
||||
var color = active ? UniversalUI.EnabledButtonColor : UniversalUI.DisabledButtonColor;
|
||||
RuntimeHelper.SetColorBlock(NavButton.Component, color, color * 1.2f);
|
||||
}
|
||||
}
|
||||
|
||||
if (!active)
|
||||
this.Dragger.WasDragging = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user