This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Taminus's profile picture

Creating Startup Password With Background

Started by Taminus, 05 January 2013 - 05:47 PM
Taminus #1
Posted 05 January 2013 - 06:47 PM

while true do
term.clear()
term.setCursorPos(2, 2)
print ("000000000000000000000000000000000000000000000000")
term.setCursorPos(2, 3)
print ("0#--------------------------------------------#0")
term.setCursorPos(2, 4)
print ("0|  Lonely Virgin's Club Activation Terminal  |0")
term.setCursorPos(2, 5)
print ("0#--------------------------------------------#0")
term.setCursorPos(2, 6)
print ("0|		  #----------------------#		  |0")
term.setCursorPos(2, 7)
print ("0|		  |	   Password	   |		  |0")
term.setCursorPos(2, 8)
print ("0|		  #----------------------#		  |0")
term.setCursorPos(2, 9)
print ("0|		  |					  |		  |0")
term.setCursorPos(2, 10)
print ("0|		  |					  |		  |0")	<- Area that disappears when the password is being typed in.
term.setCursorPos(2, 11)
print ("0|		  |					  |		  |0")
term.setCursorPos(2, 12)
print ("0|		  #----------------------#		  |0")
term.setCursorPos(2, 13)
print ("0#--------------------------------------------#0")
term.setCursorPos(2, 14)
print ("000000000000000000000000000000000000000000000000")
term.setCursorPos(2, 15)
print ("000000000000000000000000000000000000000000000000")
term.setCursorPos(2, 16)
print ("000000000000000000000000000000000000000000000000")
term.setCursorPos(2, 17)
print ("000000000000000000000000000000000000000000000000")
term.setCursorPos(16, 10)
input = read("*")
if input == "lvc4lyfe" then
term.clear()
else
os.reboot()
end
end

This is what I have so far but when I go to type the password the text to the right of where I'm typing on line 10 moves to the right and disappears. Is there any way that I can type in that middle area under password without it interfering with the borders? Any help is greatly appreciated.
remiX #2
Posted 05 January 2013 - 11:31 PM
You can either make your own read function, or just print the border again after the the read (but of course, it won't show during the read and would be pointless because you restart it after the password)

So I'd suggest make your custom read function, not sure why read does it anyway (looks like it clears the line)
Taminus #3
Posted 06 January 2013 - 08:35 AM
Pretty new to lua so I don't really know how to do that but at least I have something better to g off of haha. Thanks!