Jump to content

how do i can create InputField in phaser 3


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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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