From 155eb193b53791aee95853475ae3c793c03b712d Mon Sep 17 00:00:00 2001 From: Whitecl4ws Date: Sat, 28 Jan 2017 11:34:02 -0500 Subject: [PATCH] Update theme.lua --- theme.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/theme.lua b/theme.lua index fe8b416..4c423df 100644 --- a/theme.lua +++ b/theme.lua @@ -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