existenzial

Members
  • Content Count

    2
  • Joined

  • Last visited

About existenzial

  • Rank
    Newbie

Contact Methods

  • Website URL
    http://github.com/existenzial

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

543 profile views
  1. Wonderful work and delivered quickly! Thank you ALex!!
  2. My menu backgrounds and text are being sized abnormally small but the game is being resized properly. The game is instantiated on the index.html with the following code: var width = window.innerWidth * window.devicePixelRatio; var height = window.innerHeight * window.devicePixelRatio; var game = new Phaser.Game(width, height, Phaser.CANVAS, 'game');and the main resize behavior is defined in the init function of my Boot state: if (this.game.device.desktop) { this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.scale.setMinMax(400, 300, 1400, 1050); this.scale.pageAlignHorizontally = true; this.scale.pageAlignVertically = true; this.scale.updateLayout(true); var ow = parseInt(this.game.canvas.style.width, 10); var oh = parseInt(this.game.canvas.style.height, 10); var r = Math.max(window.innerWidth/ow, window.innerHeight/oh); var nw = ow*r; var nh = oh*r; this.game.canvas.style.width = nw + 'px'; this.game.canvas.style.height = nh + 'px'; this.game.canvas.style.marginLeft = (window.innerWidth/2 - nw/2) + 'px'; this.game.canvas.style.marginTop = (window.innerHeight/2 - nh/2) + 'px'; document.getElementById('game').style.width = window.innerWidth + 'px'; document.getElementById('game').style.height = window.innerHeight - 1 + 'px'; //css for body includes 1px top margin that we want to eliminate document.getElementById('game').style.overflow = 'hidden'; } else { this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.scale.setMinMax(480, 260, 1400, 1050); this.scale.pageAlignHorizontally = true; this.scale.pageAlignVertically = true; this.scale.forceOrientation(true, false); this.scale.setResizeCallback(this.gameResized, this); this.scale.enterIncorrectOrientation.add(this.enterIncorrectOrientation, this); this.scale.leaveIncorrectOrientation.add(this.leaveIncorrectOrientation, this); this.scale.updateLayout(true); } I'm not sure how to get the menus to sync up with the sizing/scaling of the game itself. After several iterations of attempts, I'm at a loss of what to try. Any ideas?