Posted 19 July 2015 - 10:26 PM
I wrote this custom read function, but it doesn't really work right.
http://pastebin.com/sP85n651 (#EDIT: Because the code block indentation kinda sucks, the function is now on pastebin.)
Expected behavior: I can write text, and move the "cursor" around using the left and right arrow key. Also it should be able to delete the char the the current cursor position.
Actual Behavior: I can write text, and also can move the cursor around. Also I can delete the text, but then it freaks out. I'm not sure if it's a visual problem or if it really "blocks" some text though. When I delete text while the cursor is not at the end of the string, then I'm unable to move the cursor to the end.
I hope someone can help me :)/>
Greetings,
H4X0RZ
http://pastebin.com/sP85n651 (#EDIT: Because the code block indentation kinda sucks, the function is now on pastebin.)
Expected behavior: I can write text, and move the "cursor" around using the left and right arrow key. Also it should be able to delete the char the the current cursor position.
Actual Behavior: I can write text, and also can move the cursor around. Also I can delete the text, but then it freaks out. I'm not sure if it's a visual problem or if it really "blocks" some text though. When I delete text while the cursor is not at the end of the string, then I'm unable to move the cursor to the end.
I hope someone can help me :)/>
Greetings,
H4X0RZ
Edited on 19 July 2015 - 08:29 PM