From b7d848a28f402ffc0c51c99a4edf6366dc1aa98e Mon Sep 17 00:00:00 2001 From: Lucky56 <55949451+Lucky-56@users.noreply.github.com> Date: Mon, 21 Jun 2021 09:01:50 +0200 Subject: [PATCH] revert (unintentional) reverts --- source/PlayState.hx | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index eea9212..f380d32 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -273,15 +273,7 @@ class PlayState extends MusicBeatState #if windows // Making difficulty text for Discord Rich Presence. - switch (storyDifficulty) - { - case 0: - storyDifficultyText = "Easy"; - case 1: - storyDifficultyText = "Normal"; - case 2: - storyDifficultyText = "Hard"; - } + storyDifficultyText = CoolUtil.difficultyFromInt(storyDifficulty); iconRPC = SONG.player2; @@ -963,7 +955,7 @@ class PlayState extends MusicBeatState songPosBar.createFilledBar(FlxColor.GRAY, FlxColor.LIME); add(songPosBar); - var songName = new FlxText(songPosBG.x + (songPosBG.width / 2) - 20,songPosBG.y,0,SONG.song, 16); + var songName = new FlxText(songPosBG.x + (songPosBG.width / 2) - (SONG.song.length * 5),songPosBG.y,0,SONG.song, 16); if (PlayStateChangeables.useDownscroll) songName.y -= 3; songName.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE,FlxColor.BLACK); @@ -987,7 +979,7 @@ class PlayState extends MusicBeatState add(healthBar); // Add Kade Engine watermark - kadeEngineWatermark = new FlxText(4,healthBarBG.y + 50,0,SONG.song + " " + (storyDifficulty == 2 ? "Hard" : storyDifficulty == 1 ? "Normal" : "Easy") + (Main.watermarks ? " - KE " + MainMenuState.kadeEngineVer : ""), 16); + kadeEngineWatermark = new FlxText(4,healthBarBG.y + 50,0,SONG.song + " " + CoolUtil.difficultyFromInt(storyDifficulty) + (Main.watermarks ? " - KE " + MainMenuState.kadeEngineVer : ""), 16); kadeEngineWatermark.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE,FlxColor.BLACK); kadeEngineWatermark.scrollFactor.set(); add(kadeEngineWatermark); @@ -1382,7 +1374,7 @@ class PlayState extends MusicBeatState songPosBar.createFilledBar(FlxColor.GRAY, FlxColor.LIME); add(songPosBar); - var songName = new FlxText(songPosBG.x + (songPosBG.width / 2) - 20,songPosBG.y,0,SONG.song, 16); + var songName = new FlxText(songPosBG.x + (songPosBG.width / 2) - (SONG.song.length * 5),songPosBG.y,0,SONG.song, 16); if (PlayStateChangeables.useDownscroll) songName.y -= 3; songName.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE,FlxColor.BLACK); @@ -2706,7 +2698,7 @@ class PlayState extends MusicBeatState if (FlxG.save.data.scoreScreen) openSubState(new ResultsScreen()); else - FlxG.switchState(new PlayState()); + FlxG.switchState(new FreeplayState()); } } }