Update theme.lua

This commit is contained in:
Whitecl4ws 2017-01-28 11:34:02 -05:00 committed by GitHub
parent 8404c2ff79
commit 155eb193b5

View file

@ -121,7 +121,12 @@ function theme.Input(input, opt, x,y,w,h)
-- text
love.graphics.setColor((opt.color and opt.color.normal and opt.color.normal.fg) or theme.color.normal.fg)
love.graphics.setFont(opt.font)
love.graphics.print(input.text, x, y+(h-th)/2)
if not input.password then love.graphics.print(input.text, x, y+(h-th)/2) end
if input.password and input.text ~= input.label then
love.graphics.print(string.rep("*", string.len(input.text)), x, y+(h-th)/2)
else
love.graphics.print(input.text, x, y+(h-th)/2)
end
-- cursor
if opt.hasKeyboardFocus and (love.timer.getTime() % 1) > .5 then