From ce38d7f01b5f575a1712799c51953cc9333c9f36 Mon Sep 17 00:00:00 2001 From: Kara Date: Thu, 4 Aug 2022 19:48:15 -0700 Subject: [PATCH] Fixes for previous commit --- src/Main.as | 2 ++ src/game/menus/MainMenu.as | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Main.as b/src/Main.as index 1c488bf..448f42e 100644 --- a/src/Main.as +++ b/src/Main.as @@ -78,12 +78,14 @@ package public static const DEPTH_SPEECH:int = -7; + public static var instance:Main; private var focus:Boolean = true; public function Main() { super(320,240,60,true); + instance = this; FP.screen.scale = 2; FP.screen.color = 0; Input.define("right",Key.RIGHT); diff --git a/src/game/menus/MainMenu.as b/src/game/menus/MainMenu.as index 0bd3c6a..9903e78 100644 --- a/src/game/menus/MainMenu.as +++ b/src/game/menus/MainMenu.as @@ -102,7 +102,7 @@ package game.menus } if(this.credits && Input.pressed(Key.INSERT) && Input.check(Key.CONTROL) && CustomStage.customStage == null) { - Assets.SndMenuSelect.play(); + Assets.instance.SndMenuSelect.play(); FP.stage.addChild(new CustomStage(this)); this.deactivateAllButtons(); } @@ -294,13 +294,13 @@ package game.menus Assets.setMusic(Assets.MusMenu); this.clearButtons(); this.addButton(new MenuButton(160,225,"Back",this.gotoMain,Assets.SndMenuCancel)); - this.addButton(new MenuButton(80,80,"Show Coins: " + this.getBoolName(Options.showCoins),this.toggleShowCoins,Assets.instance.SndMenuSelect)); - this.addButton(new MenuButton(80,100,"Show Time: " + this.getBoolName(Options.showTime),this.toggleShowTime,Assets.instance.SndMenuSelect)); - this.addButton(new MenuButton(80,120,"UP to Jump: " + this.getBoolName(Options.upToJump),this.toggleUpToJump,Assets.instance.SndMenuSelect)); - this.addButton(new MenuButton(80,140,"Robot Voice: " + this.getBoolName(Options.voices),this.toggleVoice,Assets.instance.SndMenuSelect)); - this.addButton(new MenuButton(80,160,"Audio: " + this.getVolumeName(),this.switchVolume,Assets.instance.SndMenuSelect)); - this.addButton(new MenuButton(80,180,"Particles: " + this.getBoolName(Options.particles),this.toggleParticles,Assets.instance.SndMenuSelect)); - this.addButton(new MenuButton(80,200,"Fullscreen: " + this.getBoolName(Options.fullscreen),this.toggleFullscreen,Assets.instance.SndMenuSelect)); + this.addButton(new MenuButton(160,80,"Show Coins: " + this.getBoolName(Options.showCoins),this.toggleShowCoins,Assets.instance.SndMenuSelect)); + this.addButton(new MenuButton(160,100,"Show Time: " + this.getBoolName(Options.showTime),this.toggleShowTime,Assets.instance.SndMenuSelect)); + this.addButton(new MenuButton(160,120,"UP to Jump: " + this.getBoolName(Options.upToJump),this.toggleUpToJump,Assets.instance.SndMenuSelect)); + this.addButton(new MenuButton(160,140,"Robot Voice: " + this.getBoolName(Options.voices),this.toggleVoice,Assets.instance.SndMenuSelect)); + this.addButton(new MenuButton(160,160,"Audio: " + this.getVolumeName(),this.switchVolume,Assets.instance.SndMenuSelect)); + this.addButton(new MenuButton(160,180,"Particles: " + this.getBoolName(Options.particles),this.toggleParticles,Assets.instance.SndMenuSelect)); + this.addButton(new MenuButton(160,200,"Fullscreen: " + this.getBoolName(Options.fullscreen),this.toggleFullscreen,Assets.instance.SndMenuSelect)); } private function gotoStats(m:MenuButton = null) : void