Str1ngS Posted February 11, 2016 Share Posted February 11, 2016 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 comment Share on other sites More sharing options...
Zeterain Posted February 11, 2016 Share Posted February 11, 2016 Nice, I'll have to take a look. We were looking to do something similar in our game, so I might just use this plugin! Link to comment Share on other sites More sharing options...
Str1ngS Posted March 4, 2016 Author Share Posted March 4, 2016 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 comment Share on other sites More sharing options...
majormoise Posted July 22, 2016 Share Posted July 22, 2016 Your text input plugin works very well - thanks! I would like to set focus to the textbox when the page has finished loading, but did not see a method for doing that. Any suggestions? Link to comment Share on other sites More sharing options...
Str1ngS Posted July 25, 2016 Author Share Posted July 25, 2016 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 comment Share on other sites More sharing options...
majormoise Posted July 27, 2016 Share Posted July 27, 2016 Works like a charm! Thanks Link to comment Share on other sites More sharing options...
Teena_m Posted September 21, 2017 Share Posted September 21, 2017 This phaser input plugin is not working on mobile devices. Link to comment Share on other sites More sharing options...
vastron Posted February 15, 2018 Share Posted February 15, 2018 It works if you put this meta tag <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, width=device-width" /> on your html file! Link to comment Share on other sites More sharing options...
Recommended Posts