Music visualizer resource

This commit is contained in:
Maddo 2025-02-27 09:14:00 +01:00
commit e8b884f54b
10 changed files with 82 additions and 19 deletions

View file

@ -18,7 +18,7 @@ public partial class MusicVisualizerCanvas : CanvasLayer
private void ResetLabel(string trackName, string authorName)
{
_nameLabel.Text = $"{trackName} ({authorName})";
_nameLabel.Text = string.IsNullOrWhiteSpace(authorName) ? authorName : $"{trackName} ({authorName})";
_nameLabel.SetAnchorsAndOffsetsPreset(Control.LayoutPreset.BottomRight, margin: 0);
_nameLabel.Modulate = Colors.White;
_nameLabel.Hide();
@ -30,7 +30,7 @@ public partial class MusicVisualizerCanvas : CanvasLayer
//_tween?.Complete();
ResetLabel(trackName, authorName);
_nameLabel.Show();
_tween = GTweenSequenceBuilder.New()
.Append(_nameLabel.TweenPositionX(_nameLabel.Position.X + 32, 0f)) // Add offset
.Join(_nameLabel.TweenModulateAlpha(0, 0f)) // Invisibilify