alphabet!!
This commit is contained in:
@@ -743,7 +743,9 @@ class PlayState extends MusicBeatState
|
||||
#end
|
||||
}
|
||||
if (FlxG.keys.justPressed.F5) {
|
||||
Logs.trace('Reloading scripts...', WARNING, YELLOW);
|
||||
scripts.reload();
|
||||
Logs.trace('Song scripts successfully reloaded.', WARNING, GREEN);
|
||||
}
|
||||
|
||||
// FlxG.watch.addQuick('VOL', vocals.amplitudeLeft);
|
||||
|
||||
@@ -32,6 +32,7 @@ class StoryMenuState extends MusicBeatState {
|
||||
|
||||
persistentUpdate = persistentDraw = true;
|
||||
|
||||
// WEEK INFO
|
||||
scoreText = new FunkinText(10, 10, 0, "SCORE: -", 36);
|
||||
scoreText.setFormat(Paths.font("vcr.ttf"), 32);
|
||||
|
||||
@@ -46,6 +47,25 @@ class StoryMenuState extends MusicBeatState {
|
||||
|
||||
for(e in [scoreText, weekTitle, weekBG])
|
||||
add(e);
|
||||
|
||||
// DUMBASS ARROWS
|
||||
var assets = Paths.getSparrowAtlas('menus/storymenu/assets');
|
||||
|
||||
var directions = ["left", "right"];
|
||||
|
||||
leftArrow = new FlxSprite((FlxG.width + 400) / 2, weekBG.y + weekBG.height + 10 + 10);
|
||||
rightArrow = new FlxSprite(FlxG.width - 10, weekBG.y + weekBG.height + 10 + 10);
|
||||
for(k=>arrow in [leftArrow, rightArrow]) {
|
||||
var dir = directions[k];
|
||||
|
||||
arrow.frames = assets;
|
||||
arrow.animation.addByPrefix('idle', 'arrow $dir');
|
||||
arrow.animation.addByPrefix('press', 'arrow push $dir', 24, false);
|
||||
arrow.animation.play('idle');
|
||||
add(arrow);
|
||||
}
|
||||
rightArrow.x -= rightArrow.width;
|
||||
|
||||
}
|
||||
|
||||
public function loadXMLs() {
|
||||
@@ -110,9 +130,18 @@ class StoryMenuState extends MusicBeatState {
|
||||
}
|
||||
}
|
||||
}
|
||||
trace(weeks);
|
||||
} catch(e) {
|
||||
Logs.trace('Failed to parse data/weeks.xml: $e', ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
public override function update(elapsed:Float) {
|
||||
super.update(elapsed);
|
||||
leftArrow.animation.play(controls.LEFT ? 'press' : 'idle');
|
||||
rightArrow.animation.play(controls.RIGHT ? 'press' : 'idle');
|
||||
|
||||
if (controls.BACK) {
|
||||
FlxG.switchState(new MainMenuState());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,10 +79,16 @@ class KeybindSetting extends FlxTypedSpriteGroup<FlxSprite> {
|
||||
}
|
||||
|
||||
public function changeKeybind(callback:Void->Void, cancelCallback:Void->Void, p2:Bool = false) {
|
||||
|
||||
var flicker = FlxFlicker.flicker(this, 0, Options.flashingMenu ? 0.06 : 0.15, true, false, function(t) {
|
||||
});
|
||||
|
||||
KeybindsOptions.instance.persistentDraw = true;
|
||||
KeybindsOptions.instance.persistentUpdate = false;
|
||||
|
||||
KeybindsOptions.instance.openSubState(new ChangeKeybindSubState(function(key:FlxKey) {
|
||||
flicker.stop();
|
||||
flicker.destroy();
|
||||
if (p2)
|
||||
Reflect.setField(Options, 'P2_$value', [option2 = key]);
|
||||
else
|
||||
@@ -90,6 +96,8 @@ class KeybindSetting extends FlxTypedSpriteGroup<FlxSprite> {
|
||||
updateText();
|
||||
callback();
|
||||
}, function() {
|
||||
flicker.stop();
|
||||
flicker.destroy();
|
||||
if (p2)
|
||||
Reflect.setField(Options, 'P2_$value', [option2 = 0]);
|
||||
else
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package funkin.options.keybinds;
|
||||
|
||||
import flixel.FlxCamera;
|
||||
import flixel.effects.FlxFlicker;
|
||||
import funkin.system.Controls;
|
||||
import funkin.options.Options;
|
||||
import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup;
|
||||
@@ -217,13 +216,11 @@ class KeybindsOptions extends MusicBeatSubstate {
|
||||
if (alphabets.members[curSelected] != null) {
|
||||
canSelect = false;
|
||||
CoolUtil.playMenuSFX(1);
|
||||
FlxFlicker.flicker(alphabets.members[curSelected], 0.4, Options.flashingMenu ? 0.06 : 0.15, true, false, function(t) {
|
||||
alphabets.members[curSelected].changeKeybind(function() {
|
||||
canSelect = true;
|
||||
}, function() {
|
||||
canSelect = true;
|
||||
}, p2Selected);
|
||||
});
|
||||
alphabets.members[curSelected].changeKeybind(function() {
|
||||
canSelect = true;
|
||||
}, function() {
|
||||
canSelect = true;
|
||||
}, p2Selected);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package funkin.system;
|
||||
|
||||
import flixel.system.debug.log.LogStyle;
|
||||
import flixel.system.frontEnds.LogFrontEnd;
|
||||
import haxe.Log;
|
||||
import funkin.windows.WindowsAPI;
|
||||
import funkin.windows.WindowsAPI.ConsoleColor;
|
||||
@@ -18,6 +20,26 @@ class Logs {
|
||||
logText(Std.string(v))
|
||||
], TRACE));
|
||||
};
|
||||
|
||||
LogFrontEnd.onLogs = function(Data, Style, FireOnce) {
|
||||
var prefix = "[FLIXEL]";
|
||||
var color:ConsoleColor = LIGHTGRAY;
|
||||
var level:Level = INFO;
|
||||
if (Style == LogStyle.CONSOLE) {prefix = "> "; color = WHITE; level = INFO; }
|
||||
if (Style == LogStyle.ERROR) {prefix = "[FLIXEL ERROR]"; color = RED; level = ERROR; }
|
||||
if (Style == LogStyle.NORMAL) {prefix = "[FLIXEL]"; color = WHITE; level = INFO; }
|
||||
if (Style == LogStyle.NOTICE) {prefix = "[FLIXEL NOTICE]"; color = GREEN; level = WARNING;}
|
||||
if (Style == LogStyle.WARNING) {prefix = "[FLIXEL WARNING]"; color = YELLOW; level = WARNING;}
|
||||
|
||||
var d:Dynamic = Data;
|
||||
if (!(d is Array))
|
||||
d = [d];
|
||||
var a:Array<Dynamic> = d;
|
||||
var strs = [for(e in a) Std.string(e)];
|
||||
for(e in strs) {
|
||||
Logs.trace('$prefix $e', level, color);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static function prepareColoredTrace(text:Array<LogText>, level:Level = INFO) {
|
||||
|
||||
Reference in New Issue
Block a user