This repository was archived by the owner on May 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ public static class DisplayManager
19
19
public static int Height => ActiveDisplay . renderingHeight ;
20
20
21
21
public static Vector3 MousePosition => Display . RelativeMouseAt ( InputManager . MousePosition ) ;
22
+ public static bool MouseInTargetDisplay => MousePosition . z == ActiveDisplayIndex ;
22
23
23
24
private static Camera canvasCamera ;
24
25
Original file line number Diff line number Diff line change @@ -67,6 +67,9 @@ public static void OnPanelsReordered()
67
67
68
68
public static void UpdateInstances ( )
69
69
{
70
+ if ( ! DisplayManager . MouseInTargetDisplay )
71
+ return ;
72
+
70
73
if ( ! resizeCursorObj )
71
74
CreateCursorUI ( ) ;
72
75
Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ public static void UpdateFocus()
33
33
return ;
34
34
35
35
// if the user is clicking
36
- if ( InputManager . GetMouseButtonDown ( 0 ) || InputManager . GetMouseButtonDown ( 1 ) )
36
+ if ( DisplayManager . MouseInTargetDisplay
37
+ && ( InputManager . GetMouseButtonDown ( 0 ) || InputManager . GetMouseButtonDown ( 1 ) ) )
37
38
{
38
39
int count = UIManager . PanelHolder . transform . childCount ;
39
40
var mousePos = DisplayManager . MousePosition ;
You can’t perform that action at this time.
0 commit comments