Skip to content

Commit

Permalink
revert, will fix later
Browse files Browse the repository at this point in the history
  • Loading branch information
Joalor64GH authored Jun 6, 2024
1 parent d8bcad9 commit 27d827b
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions source/meta/data/options/NoteOffsetState.hx
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand All @@ -498,4 +509,4 @@ class NoteOffsetState extends MusicBeatState
changeModeText.text = changeModeText.text.toUpperCase();
FlxG.mouse.visible = onComboMenu;
}
}
}

0 comments on commit 27d827b

Please sign in to comment.