How to draw a text box?

Hey everyone!

Is there any way to draw a text box with a specific padding, font, etc?

All 2 Comments


By text box you mean a box where the user can type some text, or do you just want to display some text? What platforms do you need to support with your project?

I'm asking because for a truly multiplatform input box, that works with mouse and keyboard but also the on-screen keyboards of Android, iOS, etc... by far the easiest way is to do it in HTML and overlay it on top of your wade project. Positioning it correctly may sound complicated, but it's much simpler than any alternative.

If you don't need it to work everywhere, but just in some limited scenarios (e.g. you only care about physical keyboards, you don't need copy/pasting, you don't want to support text selections that can be dragged around, etc) then it's something you can do as a set of sprites. But it really depends on how much functionality you need.

If you do want to do it in canvas (though I personally wouldn't) there's this project on GitHub that should be fairly easy to integrate with wade. Let me know if you need assistance with that, I can help.


That is what I did, HTML was the easiest way!


Post a reply
Add Attachment
Submit Reply
Login to Reply