mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-16 22:27:45 +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;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -8,6 +9,7 @@ using UnityEngine.UI;
|
|||||||
using UnityExplorer.UI;
|
using UnityExplorer.UI;
|
||||||
using UnityExplorer.UI.Panels;
|
using UnityExplorer.UI.Panels;
|
||||||
using UniverseLib;
|
using UniverseLib;
|
||||||
|
using UniverseLib.Input;
|
||||||
|
|
||||||
namespace UnityExplorer.Inspectors.MouseInspectors
|
namespace UnityExplorer.Inspectors.MouseInspectors
|
||||||
{
|
{
|
||||||
@ -38,6 +40,12 @@ namespace UnityExplorer.Inspectors.MouseInspectors
|
|||||||
{
|
{
|
||||||
LastHitObjects.Clear();
|
LastHitObjects.Clear();
|
||||||
LastHitObjects.AddRange(currentHitObjects);
|
LastHitObjects.AddRange(currentHitObjects);
|
||||||
|
RuntimeHelper.StartCoroutine(SetPanelActiveCoro());
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator SetPanelActiveCoro()
|
||||||
|
{
|
||||||
|
yield return null;
|
||||||
var panel = UIManager.GetPanel<UiInspectorResultsPanel>(UIManager.Panels.UIInspectorResults);
|
var panel = UIManager.GetPanel<UiInspectorResultsPanel>(UIManager.Panels.UIInspectorResults);
|
||||||
panel.SetActive(true);
|
panel.SetActive(true);
|
||||||
panel.ShowResults();
|
panel.ShowResults();
|
||||||
|
@ -108,18 +108,18 @@ namespace UnityExplorer.UI.Panels
|
|||||||
|
|
||||||
public override void SetActive(bool active)
|
public override void SetActive(bool active)
|
||||||
{
|
{
|
||||||
if (this.Enabled == active)
|
if (this.Enabled != active)
|
||||||
return;
|
|
||||||
|
|
||||||
base.SetActive(active);
|
|
||||||
|
|
||||||
if (!ApplyingSaveData)
|
|
||||||
SaveInternalData();
|
|
||||||
|
|
||||||
if (NavButtonWanted)
|
|
||||||
{
|
{
|
||||||
var color = active ? UniversalUI.EnabledButtonColor : UniversalUI.DisabledButtonColor;
|
base.SetActive(active);
|
||||||
RuntimeHelper.SetColorBlock(NavButton.Component, color, color * 1.2f);
|
|
||||||
|
if (!ApplyingSaveData)
|
||||||
|
SaveInternalData();
|
||||||
|
|
||||||
|
if (NavButtonWanted)
|
||||||
|
{
|
||||||
|
var color = active ? UniversalUI.EnabledButtonColor : UniversalUI.DisabledButtonColor;
|
||||||
|
RuntimeHelper.SetColorBlock(NavButton.Component, color, color * 1.2f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!active)
|
if (!active)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user