azerion / phaser-input

Adds input boxes to Phaser like CanvasInput, but also works for WebGL and Mobile, made for Phaser only.
MIT License
203 stars 64 forks source link

Text goes to right after typing #67

Closed fmohamad closed 6 years ago

fmohamad commented 6 years ago

I'm using Phaser v2.6.2 and Phaser input v.2.0.5

My game initialisation script: var gameConfig = { "width": pallet.width, "height": pallet.height, "parent": 'game', "resolution": window.devicePixelRatio }; var game = new Phaser.Game(gameConfig)

My inputfield script: playerEmail = game.add.inputField(inputbox_x, inputbox_y), { font: 24 * ratio + 'px Raleway', fill: '#000000', width: (game.width / 540) * 300, height: (game.height / 960) * (14 * ratio), padding: 8 * ratio, borderWidth: 1, borderColor: '#000', borderRadius: 6 * ratio, placeHolder: 'Email', forceCase: 'lower' });

Screenshoot 1 (https://ibb.co/nQTDDy) is the initial display when the state is begin. Screenshoot 2 (https://ibb.co/gDYPLd) is when I typed less than 8 characters. Screenshoot 3 (https://ibb.co/myHjLd) is when I typed more than 7 characters.

The problem is the text is going to right if I typed more than 7 characters (https://ibb.co/dXHUmJ). Is there any solution to this problem? Thanks before