Is there any prebuilt classes that will aid me in making a text input field?



  • I'm trying to convert my text adventure game into a game with some 2D splash screens.I wrote it in c# as a console app but wanted to learn haxe I always see it when I google for 2D cross platform engines. As far as 2D is it really simple, it will just be still art images in place of "look" commands that show the room, maybe with some removable objects (like a Hidden Object Game I guess, though I loath to use the term HoG!).

    Anyway, I would like to have a way to display text as the player types, like you see in the old sierra games. So if I press a key, it opens a dialogue box and displays that key.. more pressing and it typed what you say... enter and it captures the string for processing. I would also like some basic editing capacity.. like enter if the box is not open opens the box and immediately displays the last line, and left/right allows you to move the cursor back and forth to change a spelling error or something.

    Anyway, I am find it hard to work out how to actually make the input box, let alone the more complex editing thing. Maybe someone would have the time to point me in the correct direction?

    Thanks!



  • Hey @Adventure4Life wow I'm surprised your question hasn't been answered sooner. Not sure if you've found a fix to your problem yet.

    This is not something I have personally done before but I think flixel-ui is something you should look into https://github.com/HaxeFlixel/flixel-ui

    Also, there seems to be somewhat of an example here, but it seems quite buggy :( https://haxeflixel.com/demos/Calculator/


Log in to reply
 

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.