diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 910d7cb..d9b4dfa 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -103,7 +103,7 @@ class FreeplayState extends MusicBeatState bg = new FlxSprite().loadGraphic(Paths.image('menuDesat')); bg.antialiasing = ClientPrefs.globalAntialiasing; - bg.setGraphicSize(Std.int(bg.width * 1.1)); + bg.setGraphicSize(Std.int(bg.width * 1.1)); bg.updateHitbox(); bg.screenCenter(); add(bg); @@ -247,14 +247,12 @@ class FreeplayState extends MusicBeatState { if (FlxG.sound.music != null) Conductor.songPosition = FlxG.sound.music.time; + if(FlxG.keys.justPressed.F11) - { - FlxG.fullscreen = !FlxG.fullscreen; - } - if (FlxG.sound.music.volume < 0.7) - { + FlxG.fullscreen = !FlxG.fullscreen; + + if (FlxG.sound.music.volume < 0.7) FlxG.sound.music.volume += 0.5 * FlxG.elapsed; - } lerpScore = Math.floor(FlxMath.lerp(lerpScore, intendedScore, CoolUtil.boundTo(elapsed * 24, 0, 1))); lerpRating = FlxMath.lerp(lerpRating, intendedRating, CoolUtil.boundTo(elapsed * 12, 0, 1)); @@ -314,6 +312,13 @@ class FreeplayState extends MusicBeatState } } + if(FlxG.mouse.wheel != 0) + { + FlxG.sound.play(Paths.sound('scrollMenu'), 0.2); + changeSelection(-shiftMult * FlxG.mouse.wheel, false); + changeDiff(); + } + if (controls.UI_LEFT_P) changeDiff(-1); else if (controls.UI_RIGHT_P) @@ -347,7 +352,7 @@ class FreeplayState extends MusicBeatState vocals = new FlxSound().loadEmbedded(Paths.voices(PlayState.SONG.song)); else vocals = new FlxSound(); - FlxG.sound.list.add(vocals); + FlxG.sound.list.add(vocals); FlxG.sound.playMusic(Paths.inst(PlayState.SONG.song), 0.7); vocals.play(); vocals.persist = true; @@ -359,7 +364,7 @@ class FreeplayState extends MusicBeatState } } - else if (accepted) + else if (accepted || FlxG.mouse.justPressed) { persistentUpdate = false; var songLowercase:String = Paths.formatToSongPath(songs[curSelected].songName); @@ -411,7 +416,7 @@ class FreeplayState extends MusicBeatState if (FlxG.camera.zoom < 1.35 && ClientPrefs.camZooms && curBeat % 2 == 0) FlxG.camera.zoom += 0.015; } -public static function destroyFreeplayVocals() { + public static function destroyFreeplayVocals() { if(vocals != null) { vocals.stop(); vocals.destroy(); diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index cc8d6f3..849d3f3 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -80,7 +80,7 @@ class MainMenuState extends MusicBeatState } FlxG.mouse.visible = false; - FlxG.mouse.useSystemCursor = true; + //FlxG.mouse.useSystemCursor = true; Application.current.window.title = Main.appTitle + ' - Main Menu'; @@ -166,7 +166,7 @@ class MainMenuState extends MusicBeatState else menuItem.x= 50; } - firstStart = false; + firstStart = false; FlxG.camera.follow(camFollowPos, null, 1); @@ -211,6 +211,12 @@ class MainMenuState extends MusicBeatState if (!selectedSomethin) { + if(FlxG.mouse.wheel != 0) + { + FlxG.sound.play(Paths.sound('scrollMenu'), 0.4); + changeItem(-FlxG.mouse.wheel); + } + if (controls.UI_UP_P) { FlxG.sound.play(Paths.sound('scrollMenu')); @@ -231,7 +237,7 @@ class MainMenuState extends MusicBeatState TitleState.fromMainMenu = true; } - if (controls.ACCEPT) + if (controls.ACCEPT || FlxG.mouse.justPressed) { select(); } diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index 0eb14eb..a9ca19a 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -249,6 +249,13 @@ class StoryMenuState extends MusicBeatState else if (upP || downP) changeDifficulty(); + if(FlxG.mouse.wheel != 0) + { + FlxG.sound.play(Paths.sound('scrollMenu'), 0.4); + changeWeek(-FlxG.mouse.wheel); + changeDifficulty(); + } + if(FlxG.keys.justPressed.CONTROL) { persistentUpdate = false; @@ -260,7 +267,7 @@ class StoryMenuState extends MusicBeatState openSubState(new ResetScoreSubState('', curDifficulty, '', curWeek)); //FlxG.sound.play(Paths.sound('scrollMenu')); } - else if (controls.ACCEPT) + else if (controls.ACCEPT || FlxG.mouse.justPressed) { selectWeek(); }