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.
This commit is contained in:
parent
c911165c41
commit
5827cd2527
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue