diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 6157d353..fa1366df 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -853,6 +853,16 @@ class Charter extends UIState { public override function update(elapsed:Float) { updateNoteLogic(elapsed); + if (FlxG.sound.music.playing) { + gridBackdrops.conductorSprY = curStepFloat * 40; + } else { + gridBackdrops.conductorSprY = lerp(gridBackdrops.conductorSprY, curStepFloat * 40, 1/3); + } + charterCamera.scroll.set( + ((((40*4) * gridBackdrops.strumlinesAmount) - FlxG.width) / 2), + gridBackdrops.conductorSprY - (FlxG.height * 0.5) + ); + super.update(elapsed); scrollBar.size = (FlxG.height / 40 / charterCamera.zoom); @@ -895,16 +905,6 @@ class Charter extends UIState { + '\nBPM: ${Conductor.bpm}' + '\nTime Signature: ${Conductor.beatsPerMesure}/${Conductor.stepsPerBeat}'; - if (FlxG.sound.music.playing) { - gridBackdrops.conductorSprY = curStepFloat * 40; - } else { - gridBackdrops.conductorSprY = lerp(gridBackdrops.conductorSprY, curStepFloat * 40, 1/3); - } - charterCamera.scroll.set( - ((((40*4) * gridBackdrops.strumlinesAmount) - FlxG.width) / 2), - gridBackdrops.conductorSprY - (FlxG.height * 0.5) - ); - if (charterCamera.zoom != (charterCamera.zoom = lerp(charterCamera.zoom, __camZoom, 0.125))) updateDisplaySprites(); diff --git a/source/funkin/editors/charter/CharterBackdropGroup.hx b/source/funkin/editors/charter/CharterBackdropGroup.hx index 3934f73c..62324276 100644 --- a/source/funkin/editors/charter/CharterBackdropGroup.hx +++ b/source/funkin/editors/charter/CharterBackdropGroup.hx @@ -48,6 +48,8 @@ class CharterBackdropGroup extends FlxTypedGroup { for (grid in members) grid.active = grid.visible = false; + super.update(elapsed); + for (i => strumLine in strumLineGroup.members) { if (strumLine == null) continue; @@ -73,8 +75,7 @@ class CharterBackdropGroup extends FlxTypedGroup { grid.active = grid.visible = true; grid.updateSprites(); } - - super.update(elapsed); + } public var draggingObj:CharterBackdrop = null; diff --git a/source/funkin/editors/charter/CharterEvent.hx b/source/funkin/editors/charter/CharterEvent.hx index 1e6cab0c..ff62f465 100644 --- a/source/funkin/editors/charter/CharterEvent.hx +++ b/source/funkin/editors/charter/CharterEvent.hx @@ -47,12 +47,12 @@ class CharterEvent extends UISliceSprite implements ICharterSelectable { private static function generateDefaultIcon(name:String) { var isBase64:Bool = false; var path:String = Paths.image('editors/charter/event-icons/$name'); - if (!Assets.exists(path) && Assets.exists(Paths.pack('events/$name'))) { - path = Assets.getText(Paths.pack('events/$name')).split('________PACKSEP________')[3]; - isBase64 = true; + if (!Assets.exists(path)) path = Paths.image('editors/charter/event-icons/Unknown'); + if (Assets.exists(Paths.pack('events/$name'))) { + var packimg = Assets.getText(Paths.pack('events/$name')).split('________PACKSEP________')[3]; + if (isBase64 = (packimg != null)) + path = Assets.getText(Paths.pack('events/$name')).split('________PACKSEP________')[3]; } - else if (!Assets.exists(path)) path = Paths.image('editors/charter/event-icons/Unknown'); - var spr = new FlxSprite().loadGraphic(isBase64 ? openfl.display.BitmapData.fromBase64(path.trim(), 'UTF8') : path); return spr; }