Skip to content

Commit

Permalink
settings look better
Browse files Browse the repository at this point in the history
  • Loading branch information
loglot committed Sep 7, 2024
1 parent 7b9909c commit 521b6b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/display/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ var scaleX = 0;
var scaleY = 0;
export class Draw {
game
selectY = 250
constructor(Game){
this.game = Game
}
Expand Down Expand Up @@ -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)


Expand Down
9 changes: 7 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 521b6b2

Please sign in to comment.