Refactor and remove prevent default keyboard
This commit is contained in:
parent
0d2893ec75
commit
942d2cbcef
3 changed files with 20 additions and 16 deletions
|
@ -10,8 +10,6 @@ export class TextInput extends Phaser.GameObjects.BitmapText {
|
|||
this.underLine = this.scene.add.text(x, y+1, '_______', { fontFamily: 'Arial', fontSize: "32px", color: '#ffffff'})
|
||||
|
||||
|
||||
const keySpace = this.scene.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE);
|
||||
const keyBackspace = this.scene.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.BACKSPACE);
|
||||
this.scene.input.keyboard.on('keydown', (event: KeyboardEvent) => {
|
||||
if (event.keyCode === 8 && this.text.length > 0) {
|
||||
this.deleteLetter();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue