8 posts
Location
'murica
Posted 16 June 2015 - 05:53 PM
Any of you guys know how to make a basic text field? read() dosen't work out quite well…
160 posts
Location
Probably within 2 metres of my laptop.
Posted 16 June 2015 - 06:04 PM
For that, I'm afraid you might have to make your own "read" function, since that one might not allow you to. You could try redirecting the terminal to a window whose borders match that of the text field and run the "read" function. However, I don't think you can avoid writing a new function for multiline text fields. You should probably take a look at the edit program (/rom/programs/edit) if you need a functional example.
57 posts
Location
Universe:C:/MilkyWay/Sol/Earth/Europe/Germany
Posted 16 June 2015 - 06:28 PM
That would be complex. You'd need line-shifting, and a typing/rendering engine, where line-shifting would be the hardest part.
You can show us some code if you got any so far, then we can help you.
2679 posts
Location
You will never find me, muhahahahahaha
Posted 16 June 2015 - 09:47 PM
Really look at the edit program. It might help.
1220 posts
Location
Earth orbit
Posted 16 June 2015 - 11:47 PM
thenextntnick,
What are you trying to do? Why doesn't read() do what you want? What you need could be very simple or quite complex, but without more information all we can do is guess at what you're trying to accomplish.
If you're trying to make a text field that allows for multiple lines and arrow navigation, etc. then the above recommendations are pretty spot on. If you're just looking for a way to allow users to input simple data or answers to questions, that's a fair bit easier.
Let us know what you want and please post any code you've already written so we can help you out further.