Closed pakeke-constructor closed 1 year ago
Here's a WIP for now that's usable :) Will improve soon after refactorization from megagrump
local str = "sample pw"
local pw_char = "*"
local show_pw = true
function love.update(dt)
Slab.Update(dt)
Slab.BeginWindow("sample", {Title = "Sample"})
Slab.Text("Password")
Slab.SameLine()
if Slab.Input("pw", {Text = str, IsPassword = show_pw, PasswordChar = pw_char}) then
str = Slab.GetInputText()
end
Slab.Text("Password Char Mask")
Slab.SameLine()
if Slab.Input("pw_char", {Text = pw_char}) then
pw_char = Slab.GetInputText()
end
if Slab.CheckBox(show_pw, "show pw") then
show_pw = not show_pw
end
Slab.EndWindow()
end
Wiki is updated
Awesome!! This looks great- I’m really appreciative of the fast response, and all the effort you guys put in to this library. Feel free to close this whenever you are happy with it
Not yet complete though. I still have to mask the text when the user selected it and is typing on it
I still have to mask the text when the user selected it and is typing on it
Is implemented for v1.0.0
(6ad832659dabf744212ad3baafddeb6cc4f14b96)
Currently, if you type in an
Input
box, the string is shown, no matter what. This is bad for stuff like passwords!A good feature to have would be to add some options to obscure text.
Proposed example: