From cf4383240224e64d872d05fe9f142fce4e1f5850 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Fri, 21 Nov 2014 15:40:20 +0000 Subject: [PATCH] Fixed grid lines drawing over title bar --- Assets/Fungus/FungusScript/Editor/FungusScriptWindow.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Assets/Fungus/FungusScript/Editor/FungusScriptWindow.cs b/Assets/Fungus/FungusScript/Editor/FungusScriptWindow.cs index fb1f06c7..bd40ea9c 100755 --- a/Assets/Fungus/FungusScript/Editor/FungusScriptWindow.cs +++ b/Assets/Fungus/FungusScript/Editor/FungusScriptWindow.cs @@ -304,10 +304,13 @@ namespace Fungus x += gridSize; } - float y = fungusScript.scrollPos.y % gridSize; + float y = (fungusScript.scrollPos.y % gridSize); while (y < height) { - GLDraw.DrawLine(new Vector2(0, y), new Vector2(width, y), color, 1f); + if (y >= 0) + { + GLDraw.DrawLine(new Vector2(0, y), new Vector2(width, y), color, 1f); + } y += gridSize; } }