This repository was archived by the owner on May 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +18
-10
lines changed
Inspectors/MouseInspectors Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
+ using System . Collections ;
2
3
using System . Collections . Generic ;
3
4
using System . Linq ;
4
5
using System . Text ;
8
9
using UnityExplorer . UI ;
9
10
using UnityExplorer . UI . Panels ;
10
11
using UniverseLib ;
12
+ using UniverseLib . Input ;
11
13
12
14
namespace UnityExplorer . Inspectors . MouseInspectors
13
15
{
@@ -38,6 +40,12 @@ public override void OnSelectMouseInspect()
38
40
{
39
41
LastHitObjects . Clear ( ) ;
40
42
LastHitObjects . AddRange ( currentHitObjects ) ;
43
+ RuntimeHelper . StartCoroutine ( SetPanelActiveCoro ( ) ) ;
44
+ }
45
+
46
+ IEnumerator SetPanelActiveCoro ( )
47
+ {
48
+ yield return null ;
41
49
var panel = UIManager . GetPanel < UiInspectorResultsPanel > ( UIManager . Panels . UIInspectorResults ) ;
42
50
panel . SetActive ( true ) ;
43
51
panel . ShowResults ( ) ;
Original file line number Diff line number Diff line change @@ -108,18 +108,18 @@ public virtual void OnFinishDrag(RectTransform panel)
108
108
109
109
public override void SetActive ( bool active )
110
110
{
111
- if ( this . Enabled == active )
112
- return ;
113
-
114
- base . SetActive ( active ) ;
111
+ if ( this . Enabled != active )
112
+ {
113
+ base . SetActive ( active ) ;
115
114
116
- if ( ! ApplyingSaveData )
117
- SaveInternalData ( ) ;
115
+ if ( ! ApplyingSaveData )
116
+ SaveInternalData ( ) ;
118
117
119
- if ( NavButtonWanted )
120
- {
121
- var color = active ? UniversalUI . EnabledButtonColor : UniversalUI . DisabledButtonColor ;
122
- RuntimeHelper . SetColorBlock ( NavButton . Component , color , color * 1.2f ) ;
118
+ if ( NavButtonWanted )
119
+ {
120
+ var color = active ? UniversalUI . EnabledButtonColor : UniversalUI . DisabledButtonColor ;
121
+ RuntimeHelper . SetColorBlock ( NavButton . Component , color , color * 1.2f ) ;
122
+ }
123
123
}
124
124
125
125
if ( ! active )
You can’t perform that action at this time.
0 commit comments