[SOLVED] Loveframes SetUsable
Posted: Sat May 03, 2014 4:14 pm
Hi,
I'm using the awesome loveframes lib and am trying to restrict the user from entering anything but numbers in a textinput object.
So I've tried:
But still it was possible to insert tab characters. So then I tried to set the tab character as unusable:
That didn't help either. It was still possible to insert tab characters. Does anyone know how to do this?
Solution proposed by Nikolai Resokav:
I'm using the awesome loveframes lib and am trying to restrict the user from entering anything but numbers in a textinput object.
So I've tried:
Code: Select all
local textinput = loveframes.Create("textinput")
textinput:SetUsable({"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"})
Code: Select all
local textinput = loveframes.Create("textinput")
textinput:SetUsable({"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"})
textinput:SetUnusable({"\t"})
Solution proposed by Nikolai Resokav:
Code: Select all
textinput:SetTabReplacement("")