Jump to content

how do i can create InputField in phaser 3


NgL
 Share

Recommended Posts

There's no native Phaser input box. You've got two options:

1. Create an input box from scratch in Phaser. That means drawing the box, listening to keyboard and mouse events on it, updating the box when the user adds or removes characters, knowing if the box has focus, etch.

Which is a lot of work. Instead, you are probably better off overlaying some HTML on top of your game with an regular old <input type="text" /> HTML input in it. Here's a tutorial that uses that concept, but isn't quite what you are looking for: https://www.joshmorony.com/creating-a-shop-with-purchasable-items-in-a-phaser-game/

Link to comment
Share on other sites

  • 6 months later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...