mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-08 12:46:02 +00:00
Music visualizer resource
This commit is contained in:
parent
34ed3bbc9a
commit
e8b884f54b
10 changed files with 82 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue