From 5827cd2527144db1711ca807e018a405743e3e5f Mon Sep 17 00:00:00 2001 From: hryx Date: Mon, 25 Mar 2013 23:49:17 -0700 Subject: Only show Input cursor when selected Previously all Inputs would show the text cursor, which looks odd and makes it harder for the user to see which one is selected. --- style-default.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/style-default.lua b/style-default.lua index 91cbd84..529c4a2 100644 --- a/style-default.lua +++ b/style-default.lua @@ -129,8 +129,10 @@ local function Input(state, text, cursor, x,y,w,h) love.graphics.setLine(1, 'rough') love.graphics.setColor(color.normal.fg) love.graphics.print(text, x+2,y+(h-th)/2) - love.graphics.setColor(color.active.fg) - love.graphics.line(cursorPos, y+4, cursorPos, y+h-4) + if state ~= 'normal' then + love.graphics.setColor(color.active.fg) + love.graphics.line(cursorPos, y+4, cursorPos, y+h-4) + end end local function Checkbox(state, checked, label, align, x,y,w,h) -- cgit v1.2.3-70-g09d2