Huge bug fixed

This commit is contained in:
Ne_Eo
2025-04-04 22:57:09 +02:00
parent de406ff3cc
commit d96aff2556
2 changed files with 7 additions and 6 deletions
@@ -105,7 +105,7 @@ class CharterAutoSaveUI extends UISliceSprite {
bar.follow(this, 10, bHeight-20);
bar.alpha = alpha;
}
progressBar.clipRect = progressBar.clipRect.set(0, 0, progressBar.width*progress,progressBar.height);
progressBar.rawClipRect = progressBar.rawClipRect.set(0, 0, progressBar.frameWidth*progress,progressBar.frameHeight);
}
public function appearAnimation() {
+6 -5
View File
@@ -54,6 +54,7 @@ class UIAudioPlayer extends UIButton {
timeBarPlayer = new FlxSprite(timeBar.x, timeBar.y).loadGraphic(Paths.image('editors/ui/audio-time-empty'));
timeBarPlayer.colorTransform.color = 0x440364;
timeBarPlayer.scale.y = (timeBarPlayer.frameHeight + 2) / timeBarPlayer.frameHeight;
timeBarPlayer.pixelPerfectRender = true;
members.push(timeBarPlayer);
timeBarSpr = cast new UISprite(timeBar.x, timeBar.y).makeSolid(timeBar.barWidth, timeBar.barHeight, 0x00FFFFFF);
@@ -87,13 +88,13 @@ class UIAudioPlayer extends UIButton {
playingSprite.animation.play(sound.playing ? "playing" : "paused");
timeText.text = '${FlxStringUtil.formatTime(sound.time/1000, true)} / ${FlxStringUtil.formatTime(sound.length/1000)}';
if(timeBarPlayer.clipRect == null)
timeBarPlayer.clipRect = new FlxRect(0, 0, timeBarPlayer.frameWidth, timeBarPlayer.frameHeight);
if(timeBarPlayer.rawClipRect == null)
timeBarPlayer.rawClipRect = new FlxRect(0, 0, timeBarPlayer.frameWidth, timeBarPlayer.frameHeight);
timeBarPlayer.clipRect.x = timeBarPlayer.frameWidth * (sound.time/sound.length);
timeBarPlayer.clipRect.width = 2;
timeBarPlayer.rawClipRect.x = timeBarPlayer.frameWidth * (sound.time/sound.length);
timeBarPlayer.rawClipRect.width = 2;
timeBarPlayer.clipRect = timeBarPlayer.clipRect;
timeBarPlayer.rawClipRect = timeBarPlayer.rawClipRect;
nextPlayerColor = sound.playing ? 0x732D95 : 0x440364;
timeBarPlayer.colorTransform.color = FlxColor.interpolate(timeBarPlayer.colorTransform.color, nextPlayerColor, 1/14);