Skip to content

Commit

Permalink
waltuh
Browse files Browse the repository at this point in the history
  • Loading branch information
Joalor64GH authored Jun 18, 2024
1 parent b143094 commit 0793ded
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
9 changes: 2 additions & 7 deletions source/meta/state/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class FreeplayState extends MusicBeatState

var scoreBG:FlxSprite;
var scoreText:FlxText;
var searchText:FlxText;
var diffText:FlxText;
var lerpScore:Int = 0;
var lerpRating:Float = 0;
Expand Down Expand Up @@ -219,7 +218,7 @@ class FreeplayState extends MusicBeatState
songSearchText.x = FlxG.width - songSearchText.width;
add(songSearchText);

var buttonTop:FlxButton = new FlxButton(0, songSearchText.y + songSearchText.height + 5, "", function() {
var buttonTop:FlxButton = new FlxButton(0, songSearchText.y + songSearchText.height + 5, "Search", function() {
checkForSongsThatMatch(songSearchText.text);
});
buttonTop.setGraphicSize(Std.int(songSearchText.width), 50);
Expand All @@ -228,10 +227,6 @@ class FreeplayState extends MusicBeatState
buttonTop.x = FlxG.width - buttonTop.width;
add(buttonTop);

searchText = new FlxText(975, 110, 100, "Search", 24);
searchText.setFormat(Paths.font("vcr.ttf"), 24, FlxColor.BLACK);
add(searchText);

uneccessarilyLongVariable = new FlxText(0, 0, 0, "+" + PlayState.gainedCredit + " SOCIAL CREDIT", 12);
uneccessarilyLongVariable.setFormat(Paths.font("vcr.ttf"), 48, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
uneccessarilyLongVariable.scrollFactor.set();
Expand Down Expand Up @@ -426,7 +421,7 @@ class FreeplayState extends MusicBeatState

var upP = controls.UI_UP_P || FlxG.mouse.wheel == 1;
var downP = controls.UI_DOWN_P || FlxG.mouse.wheel == -1;
var accepted = controls.ACCEPT || FlxG.mouse.justPressed;
var accepted = controls.ACCEPT;
var space = FlxG.keys.justPressed.SPACE;
var ctrl = FlxG.keys.justPressed.CONTROL;
var alt = FlxG.keys.justPressed.ALT;
Expand Down
15 changes: 6 additions & 9 deletions source/meta/state/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -4713,8 +4713,7 @@ class PlayState extends MusicBeatState
funnyColor = CoolUtil.getColor(gf.healthColorArray);
useIco = true;
}
var val3:Int = Std.parseInt(split[1]);
if (Math.isNaN(val3) || val3 <= 0) val3 = 1;
var val3:Null<Float> = Std.parseFloat(split[1]);
var sub:FlxText = new FlxText(0, ClientPrefs.downScroll ? healthBar.y + 90 : healthBar.y - 90, 0, value1, 32);
sub.scrollFactor.set();
sub.cameras = [camHUD];
Expand All @@ -4726,17 +4725,15 @@ class PlayState extends MusicBeatState
subBG.screenCenter(X);
sub.screenCenter(X);
sub.y += 5;
sub.active = false;
subBG.active = false;
add(subBG);
add(sub);
new FlxTimer(stateTimers).start(stepsToSecs(val3), function(timer:FlxTimer) {
FlxTween.tween(sub, {alpha: 0}, stepsToSecs(1), {ease: FlxEase.quadInOut, onComplete: _ -> {
remove(sub, true);
var tmr:FlxTimer = new FlxTimer().start(val3 / playbackRate, function(timer:FlxTimer) {
FlxTween.tween(sub, {alpha: 0}, 0.25 / playbackRate, {ease: FlxEase.quadInOut, onComplete: function(twn:FlxTween) {
sub.kill();
sub.destroy();
}});
FlxTween.tween(subBG, {alpha: 0}, stepsToSecs(1), {ease: FlxEase.quadInOut, onComplete: _ -> {
remove(subBG, true);
FlxTween.tween(subBG, {alpha: 0}, 0.25 / playbackRate, {ease: FlxEase.quadInOut, onComplete: function(twn:FlxTween) {
subBG.kill();
subBG.destroy();
}});
});
Expand Down

0 comments on commit 0793ded

Please sign in to comment.