Small Cleanup

This commit is contained in:
Ne_Eo
2024-09-06 03:45:00 +02:00
parent c5dd3ad2a3
commit 7442f6ec91
5 changed files with 20 additions and 17 deletions
+5 -6
View File
@@ -111,10 +111,10 @@ class Charter extends UIState {
{
label: "File",
childs: [
{
/*{
label: "New"
},
null,
null,*/
{
label: "Save",
keybind: [CONTROL, S],
@@ -362,9 +362,9 @@ class Charter extends UIState {
onSelect: _playback_metronome,
icon: Options.charterMetronomeEnabled ? 1 : 0
},
{
/*{
label: "Visual metronome"
},
},*/
]
}
];
@@ -420,7 +420,7 @@ class Charter extends UIState {
};
uiGroup.add(scrollBar);
songPosInfo = new UIText(FlxG.width - 30 - 400, scrollBar.y + 10, 400, "00:00\nBeat: 0\nStep: 0\nMeasure: 0\nBPM: 0\nTime Signature: 4/4");
songPosInfo = new UIText(FlxG.width - 30 - 400, scrollBar.y + 10, 400, "00:00 / 00:00\nBeat: 0\nStep: 0\nMeasure: 0\nBPM: 0\nTime Signature: 4/4");
songPosInfo.alignment = RIGHT;
uiGroup.add(songPosInfo);
@@ -1164,7 +1164,6 @@ class Charter extends UIState {
var snapButton:UITopMenuButton = cast topMenuSpr.members[snapIndex];
var lastButtonX = playBackButton.x-10;
var buttonI:Int = 0;
for (button in quantButtons) {
button.visible = ((button.quant == quant) ||
(button.quant == quants[FlxMath.wrap(quants.indexOf(quant)-1, 0, quants.length-1)]) ||
+3 -2
View File
@@ -163,8 +163,9 @@ class CharterNote extends UISprite implements ICharterSelectable {
}
if (strumLine != null) {
sustainSpr.alpha = alpha = !strumLine.strumLine.visible ? (__passed ? 0.2 : 0.4) : (__passed ? 0.6 : 1);
typeAlpha = !strumLine.strumLine.visible ? (__passed ? 0.4 : 0.6) : (__passed ? 0.8 : 1);
var isVisible = strumLine.strumLine.visible;
sustainSpr.alpha = alpha = !isVisible ? (__passed ? 0.2 : 0.4) : (__passed ? 0.6 : 1);
typeAlpha = !isVisible ? (__passed ? 0.4 : 0.6) : (__passed ? 0.8 : 1);
}
colorTransform.redMultiplier = colorTransform.greenMultiplier = colorTransform.blueMultiplier = selected ? 0.75 : 1;
+3 -2
View File
@@ -100,8 +100,9 @@ class SplashGroup extends FlxTypedGroup<FunkinSprite> {
public function getSplashAnim(id:Int):String {
if (animationNames.length <= 0) return null;
id %= animationNames.length;
if (animationNames[id] == null || animationNames[id].length <= 0) return null;
return animationNames[id][FlxG.random.int(0, animationNames[id].length - 1)];
var animNames = animationNames[id];
if (animNames == null || animNames.length <= 0) return null;
return animNames[FlxG.random.int(0, animNames.length - 1)];
}
var __splash:FunkinSprite;
+1 -1
View File
@@ -80,7 +80,7 @@ class Strum extends FlxSprite {
super.draw();
}
@:noCompletion public static final PIX180:Float = 565.4866776461628; // 180 * Math.PI
@:noCompletion public static inline final PIX180:Float = 565.4866776461628; // 180 * Math.PI
@:noCompletion public static final N_WIDTHDIV2:Float = Note.swagWidth / 2;
public function updateNotePosition(daNote:Note) {
+8 -6
View File
@@ -281,12 +281,13 @@ class FreeplayState extends MusicBeatState
function updateCoopModes() {
__opponentMode = false;
__coopMode = false;
if (songs[curSelected].coopAllowed && songs[curSelected].opponentModeAllowed) {
var curSong = songs[curSelected];
if (curSong.coopAllowed && curSong.opponentModeAllowed) {
__opponentMode = curCoopMode % 2 == 1;
__coopMode = curCoopMode >= 2;
} else if (songs[curSelected].coopAllowed) {
} else if (curSong.coopAllowed) {
__coopMode = curCoopMode == 1;
} else if (songs[curSelected].opponentModeAllowed) {
} else if (curSong.opponentModeAllowed) {
__opponentMode = curCoopMode == 1;
}
}
@@ -315,9 +316,10 @@ class FreeplayState extends MusicBeatState
}
public function convertChart() {
trace('Converting ${songs[curSelected].name} (${songs[curSelected].difficulties[curDifficulty]}) to Codename format...');
var chart = Chart.parse(songs[curSelected].name, songs[curSelected].difficulties[curDifficulty]);
Chart.save('${Main.pathBack}assets/songs/${songs[curSelected].name}', chart, songs[curSelected].difficulties[curDifficulty].toLowerCase());
var curSong = songs[curSelected];
trace('Converting ${curSong.name} (${curSong.difficulties[curDifficulty]}) to Codename format...');
var chart = Chart.parse(curSong.name, curSong.difficulties[curDifficulty]);
Chart.save('${Main.pathBack}assets/songs/${curSong.name}', chart, curSong.difficulties[curDifficulty].toLowerCase());
}
/**