Jump to content




Help with login screen gui.


  • You cannot reply to this topic
2 replies to this topic

#1 diegodan1893

  • Members
  • 164 posts
  • LocationSpain

Posted 14 July 2012 - 03:19 PM

I'm doing a login screen (temporally very similar to MysticOS) but when the user writes a character in the user or password it deletes all the line.

This is how it is before write:

Spoiler

And this is after write (it happens even with only one character)
Spoiler

I tried with io.read() and read() but it's the same.
How can I fix it?

Sorry for my bad English.

#2 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 14 July 2012 - 05:30 PM

The problem is that read() deletes the line from the cursor position to the end each time it redraws, so you'll have to make your own function to read.
Take a look at the read function in bios.lua (inside .minecraft/mods/ComputerCraft/lua) to see how it works.

#3 diegodan1893

  • Members
  • 164 posts
  • LocationSpain

Posted 15 July 2012 - 10:46 AM

View PostMysticT, on 14 July 2012 - 05:30 PM, said:

The problem is that read() deletes the line from the cursor position to the end each time it redraws, so you'll have to make your own function to read. Take a look at the read function in bios.lua (inside .minecraft/mods/ComputerCraft/lua) to see how it works.

Thanks, I make a new api with the new read() function and it works.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users