Merge pull request #890 from Lucky-56/patch-2

all the little things
This commit is contained in:
Kade M 2021-06-19 20:34:43 -07:00 committed by GitHub
commit 074e08650f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 3826 additions and 3842 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -6,11 +6,11 @@ using StringTools;
class CoolUtil class CoolUtil
{ {
public static var difficultyArray:Array<String> = ['EASY', "NORMAL", "HARD"]; public static var difficultyArray:Array<String> = ['Easy', "Normal", "Hard"];
public static function difficultyString():String public static function difficultyFromInt(difficulty:Int):String
{ {
return difficultyArray[PlayState.storyDifficulty]; return difficultyArray[difficulty];
} }
public static function coolTextFile(path:String):Array<String> public static function coolTextFile(path:String):Array<String>

View File

@ -252,15 +252,7 @@ class FreeplayState extends MusicBeatState
combo = Highscore.getCombo(songHighscore, curDifficulty); combo = Highscore.getCombo(songHighscore, curDifficulty);
#end #end
switch (curDifficulty) diffText.text = CoolUtil.difficultyFromInt(curDifficulty).toUpperCase();
{
case 0:
diffText.text = "EASY";
case 1:
diffText.text = 'NORMAL';
case 2:
diffText.text = "HARD";
}
} }
function changeSelection(change:Int = 0) function changeSelection(change:Int = 0)

View File

@ -54,7 +54,7 @@ class LoadReplayState extends MusicBeatState
var string:String = controlsStrings[i]; var string:String = controlsStrings[i];
actualNames[i] = string; actualNames[i] = string;
var rep:Replay = Replay.LoadReplay(string); var rep:Replay = Replay.LoadReplay(string);
controlsStrings[i] = string.split("time")[0] + " " + (rep.replay.songDiff == 2 ? "HARD" : rep.replay.songDiff == 1 ? "EASY" : "NORMAL"); controlsStrings[i] = string.split("time")[0] + " " + CoolUtil.difficultyFromInt(rep.replay.songDiff).toUpperCase();
} }
if (controlsStrings.length == 0) if (controlsStrings.length == 0)

View File

@ -59,7 +59,7 @@ class PauseSubState extends MusicBeatSubstate
add(levelInfo); add(levelInfo);
var levelDifficulty:FlxText = new FlxText(20, 15 + 32, 0, "", 32); var levelDifficulty:FlxText = new FlxText(20, 15 + 32, 0, "", 32);
levelDifficulty.text += CoolUtil.difficultyString(); levelDifficulty.text += CoolUtil.difficultyFromInt(PlayState.storyDifficulty).toUpperCase();
levelDifficulty.scrollFactor.set(); levelDifficulty.scrollFactor.set();
levelDifficulty.setFormat(Paths.font('vcr.ttf'), 32); levelDifficulty.setFormat(Paths.font('vcr.ttf'), 32);
levelDifficulty.updateHitbox(); levelDifficulty.updateHitbox();

View File

@ -272,15 +272,7 @@ class PlayState extends MusicBeatState
#if windows #if windows
// Making difficulty text for Discord Rich Presence. // Making difficulty text for Discord Rich Presence.
switch (storyDifficulty) storyDifficultyText = CoolUtil.difficultyFromInt(storyDifficulty);
{
case 0:
storyDifficultyText = "Easy";
case 1:
storyDifficultyText = "Normal";
case 2:
storyDifficultyText = "Hard";
}
iconRPC = SONG.player2; iconRPC = SONG.player2;
@ -962,7 +954,7 @@ class PlayState extends MusicBeatState
songPosBar.createFilledBar(FlxColor.GRAY, FlxColor.LIME); songPosBar.createFilledBar(FlxColor.GRAY, FlxColor.LIME);
add(songPosBar); 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) if (PlayStateChangeables.useDownscroll)
songName.y -= 3; songName.y -= 3;
songName.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE,FlxColor.BLACK); songName.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE,FlxColor.BLACK);
@ -986,7 +978,7 @@ class PlayState extends MusicBeatState
add(healthBar); add(healthBar);
// Add Kade Engine watermark // 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.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE,FlxColor.BLACK);
kadeEngineWatermark.scrollFactor.set(); kadeEngineWatermark.scrollFactor.set();
add(kadeEngineWatermark); add(kadeEngineWatermark);
@ -1381,7 +1373,7 @@ class PlayState extends MusicBeatState
songPosBar.createFilledBar(FlxColor.GRAY, FlxColor.LIME); songPosBar.createFilledBar(FlxColor.GRAY, FlxColor.LIME);
add(songPosBar); 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) if (PlayStateChangeables.useDownscroll)
songName.y -= 3; songName.y -= 3;
songName.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE,FlxColor.BLACK); songName.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE,FlxColor.BLACK);