We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3586b97 commit 368e1bdCopy full SHA for 368e1bd
1 file changed
Assets/Scripts/GLDrawing/GridLineRenderer.cs
@@ -88,8 +88,8 @@ void Awake()
88
}
89
90
91
- // Highlighting closest line to mouse pointer
92
- if (NoteCanvas.IsMouseOverNotesRegion.Value)
+ // Highlighting closest line to mouse pointer
+ if (NoteCanvas.IsMouseOverNotesRegion.Value)
93
{
94
var mouseX = Input.mousePosition.x;
95
var closestLineIndex = GetClosestLineIndex(beatLines, c => Mathf.Abs(c.start.x - mouseX));
@@ -119,7 +119,15 @@ void Awake()
119
120
121
122
- GLLineDrawer.Draw(beatLines);
+ var screenWidth = Screen.width;
123
+ for (int i = 0, l = beatLines.Length; i < l && beatLines[i].start.x < screenWidth; i++)
124
+ {
125
+ if (beatLines[i].start.x > 0)
126
127
+ GLLineDrawer.Draw(beatLines[i]);
128
+ }
129
130
+
131
GLLineDrawer.Draw(blockLines);
132
});
133
0 commit comments