diff options
author | hryx <codroid@gmail.com> | 2013-03-25 23:49:17 -0700 |
---|---|---|
committer | hryx <codroid@gmail.com> | 2013-03-25 23:49:17 -0700 |
commit | 5827cd2527144db1711ca807e018a405743e3e5f (patch) | |
tree | 100947e17ad0f8f5820673d7c46d71832eb41724 /style-default.lua | |
parent | c911165c4111536d4c0c42724b07572a7adfa097 (diff) | |
download | Quickie-5827cd2527144db1711ca807e018a405743e3e5f.tar.gz Quickie-5827cd2527144db1711ca807e018a405743e3e5f.tar.bz2 Quickie-5827cd2527144db1711ca807e018a405743e3e5f.tar.xz Quickie-5827cd2527144db1711ca807e018a405743e3e5f.zip |
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.
Diffstat (limited to 'style-default.lua')
-rw-r--r-- | style-default.lua | 6 |
1 files 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) |