From 27d827b8b04ffaeddc82a17f6a7bc475d67604c7 Mon Sep 17 00:00:00 2001 From: Joalor64 Date: Thu, 6 Jun 2024 14:45:23 -0400 Subject: [PATCH] revert, will fix later --- source/meta/data/options/NoteOffsetState.hx | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/source/meta/data/options/NoteOffsetState.hx b/source/meta/data/options/NoteOffsetState.hx index 9d7c2fcd..6191f43e 100644 --- a/source/meta/data/options/NoteOffsetState.hx +++ b/source/meta/data/options/NoteOffsetState.hx @@ -1,7 +1,8 @@ package meta.data.options; +import flixel.ui.FlxBar; + import objects.userinterface.menu.*; -import objects.userinterface.Bar; import objects.background.*; class NoteOffsetState extends MusicBeatState @@ -22,6 +23,7 @@ class NoteOffsetState extends MusicBeatState var barPercent:Float = 0; var delayMin:Int = 0; var delayMax:Int = 500; + var timeBarBG:FlxSprite; var timeBar:FlxBar; var timeTxt:FlxText; var beatText:Alphabet; @@ -48,7 +50,6 @@ class NoteOffsetState extends MusicBeatState persistentUpdate = true; FlxG.sound.pause(); - // Stage var bg:BGSprite = new BGSprite('stages/stage/stageback', -600, -200, 0.9, 0.9); add(bg); @@ -158,13 +159,22 @@ class NoteOffsetState extends MusicBeatState barPercent = ClientPrefs.noteOffset; updateNoteDelay(); - timeBar = new Bar(0, timeTxt.y + (timeTxt.height / 3), 'healthBar', function() return barPercent, delayMin, delayMax); + timeBarBG = new FlxSprite(0, timeTxt.y + 8).loadGraphic(Paths.image('timeBar')); + timeBarBG.setGraphicSize(Std.int(timeBarBG.width * 1.2)); + timeBarBG.updateHitbox(); + timeBarBG.cameras = [camHUD]; + timeBarBG.screenCenter(X); + timeBarBG.visible = false; + + timeBar = new FlxBar(0, timeBarBG.y + 4, LEFT_TO_RIGHT, Std.int(timeBarBG.width - 8), Std.int(timeBarBG.height - 8), this, 'barPercent', delayMin, delayMax); timeBar.scrollFactor.set(); timeBar.screenCenter(X); + timeBar.createFilledBar(0xFF000000, 0xFFFFFFFF); + timeBar.numDivisions = 800; //How much lag this causes?? Should i tone it down to idk, 400 or 200? timeBar.visible = false; timeBar.cameras = [camHUD]; - timeBar.leftBar.color = FlxColor.LIME; + add(timeBarBG); add(timeBar); add(timeTxt); @@ -486,6 +496,7 @@ class NoteOffsetState extends MusicBeatState comboNums.visible = onComboMenu; dumbTexts.visible = onComboMenu; + timeBarBG.visible = !onComboMenu; timeBar.visible = !onComboMenu; timeTxt.visible = !onComboMenu; beatText.visible = !onComboMenu; @@ -498,4 +509,4 @@ class NoteOffsetState extends MusicBeatState changeModeText.text = changeModeText.text.toUpperCase(); FlxG.mouse.visible = onComboMenu; } -} \ No newline at end of file +}