Faizy Posted May 14, 2017 Share Posted May 14, 2017 Hey, I have a very simple state: var menu = { preload: function() { console.log("Starting menu.js") game.load.image('buttonPlay', 'assets/buttonPlay.png') game.load.image('buttonScores', 'assets/buttonScores.png') game.load.image('buttonNewGame', 'assets/buttonNewGame.png') game.load.image('buttonQuit', 'assets/buttonQuit.png') }, create: function(){ this.stage.backgroundColor = '#4A4A4A' this.buttonPlay = this.add.button(game.width/2 - 100, 50, 'buttonPlay', this.play); this.buttonScores = this.add.button(game.width/2 - 100, 120, 'buttonScores', this.scores); this.buttonNewGame = this.add.button(game.width/2 - 100, 190, 'buttonNewGame', this.newGame); this.buttonQuit = this.add.button(game.width/2 - 100, 260, 'buttonQuit', this.quit); }, play: function() { console.log("play") game.state.start("Main"); }, scores: function() { console.log("scores") }, newGame: function() { console.log("newGame") }, quit: function() { console.log("quit") } } Now I want to create some kind of an inputfield(similar to HTML inputfields) so a user can type in his name. Is it possible to create fields inside(onside the) states? What would be a good solution? Thanks Link to comment Share on other sites More sharing options...
Recommended Posts