Jump to content

[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 :)

Link to post
Share on other sites
  • 3 weeks later...

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
Link to post
Share on other sites
  • 4 months later...

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 :)

Link to post
Share on other sites
  • 1 year later...
  • 4 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.

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

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...