diff --git a/lib/display/display.js b/lib/display/display.js index da09649..83a032a 100644 --- a/lib/display/display.js +++ b/lib/display/display.js @@ -7,6 +7,7 @@ var scaleX = 0; var scaleY = 0; export class Draw { game + selectY = 250 constructor(Game){ this.game = Game } @@ -42,7 +43,8 @@ export class Draw { this.DrawStroked(`New Style : ${this.game.Style}`, 260, 250) this.DrawStroked(`Coin Collect Growth? : ${this.game.Grow}`, 260, 350) - this.DrawStroked("==> <==", 110, 250 + (100*this.game.SettingSelect)) + this.selectY = ((this.selectY * 10)+((250 + (100*this.game.SettingSelect))))/11 + this.DrawStroked("==> <==", 110,this.selectY ) this.DrawStroked(`Speed : ${speed_option_eng}`, 260, 450) diff --git a/main.js b/main.js index 3f18fbe..b96861e 100644 --- a/main.js +++ b/main.js @@ -21,9 +21,14 @@ var game = new Game() }else if(game.keyMan.wasKeyJustPressed("KeyS") && game.MainMenu && game.MenuState == "settings"){ game.MenuState = "main" }else if(game.keyMan.wasKeyJustPressed("ArrowUp") && game.MainMenu && game.MenuState == "settings"){ - game.SettingSelect -= 1 + if(game.SettingSelect > 0){ + game.SettingSelect -= 1 + } }else if(game.keyMan.wasKeyJustPressed("ArrowDown") && game.MainMenu && game.MenuState == "settings"){ - game.SettingSelect += 1 + + if(game.SettingSelect < 2){ + game.SettingSelect += 1 + } }else if(game.keyMan.wasKeyJustPressed("ArrowLeft") && game.MainMenu && game.MenuState == "settings"){ if(game.SettingSelect == 0){ game.Style = !game.Style