- [NEW] Convertit a mini v1.0 RC2
This commit is contained in:
@@ -15,25 +15,25 @@ textbox={
|
||||
end,
|
||||
|
||||
update=function()
|
||||
rectfill(20,50, 140, 90,6)
|
||||
rect(20,50, 140, 90,8)
|
||||
if textbox.title then prnt(textbox.title,30,55) end
|
||||
rect(40,70, 120, 80,8)
|
||||
draw.rectf(20,50, 120, 40,6)
|
||||
draw.rect(20,50, 120, 40,8)
|
||||
if textbox.title then draw.text(textbox.title,30,55,8) end
|
||||
draw.rect(40,70, 80, 11,8)
|
||||
if textbox.value then
|
||||
prnt(textbox.value,43,73)
|
||||
if (math.floor(time()*4)%2)==0 then
|
||||
prnt("_",43+#textbox.value*4,73)
|
||||
draw.text(textbox.value,43,73,8)
|
||||
if (math.floor(sys.time()*4)%2)==0 then
|
||||
draw.text("_",43+#textbox.value*4,73,8)
|
||||
end
|
||||
end
|
||||
|
||||
local tecla=btnp()
|
||||
local tecla=key.press()
|
||||
if tecla>=4 and tecla<=39 then
|
||||
textbox.value=textbox.value..string.sub(keyvalues,tecla,tecla)
|
||||
elseif tecla==KEY_PERIOD then
|
||||
elseif tecla==key.PERIOD then
|
||||
textbox.value=textbox.value.."."
|
||||
elseif tecla==KEY_BACKSPACE then
|
||||
elseif tecla==key.BACKSPACE then
|
||||
textbox.value=string.sub(textbox.value,1,-2)
|
||||
elseif tecla==KEY_RETURN then
|
||||
elseif tecla==key.RETURN then
|
||||
update=textbox.old_update
|
||||
textbox.return_function(textbox.value)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user