Str1ngS

[Plugin] phaser-input

Recommended Posts

Hey all,

Just wanted to let you know that I created a phaser text input plugin. Should work like a normal input text box, and unlike CanvasInput it also works in WebGL renderer.

It's also tested on iOS9 and mobile Chrome.

There are some limitations right now for using it, but the basic concept works.

Head on to github to check it out :)

Share this post


Link to post
Share on other sites

Pushed a big update a couple of days ago, following things are fixed/added:

  • Added masking for texts so they don't overflow the box anymore
  • Combined max/maxLength
  • Moved dom manipulation to seperate class
  • Added option for aligning texts
  • Keyboard can now be used to update caret position
  • Clicking in the input field now changes the caret position
  • ctrl+a can be used to select text

Share this post


Link to post
Share on other sites

If you are not using TypeScript, you can call startFocus() and endFocus() on the inputField object. But this will not work for mobile devices, as getting focus on an element is touch required.

If you are using TypeScript: For the moment startFocus() and endFocus() are private methods, I'll be making them public soon, but they still won't work on mobile devices :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.