2024-01-28 18:37:24 +07:00
|
|
|
|
using Content.Shared._White.Jukebox;
|
2023-05-04 13:43:03 +06:00
|
|
|
|
using Robust.Client.AutoGenerated;
|
|
|
|
|
|
using Robust.Client.UserInterface;
|
|
|
|
|
|
using Robust.Client.UserInterface.XAML;
|
|
|
|
|
|
|
2024-01-28 17:32:55 +07:00
|
|
|
|
namespace Content.Client._White.Jukebox;
|
2023-05-04 13:43:03 +06:00
|
|
|
|
|
|
|
|
|
|
[GenerateTypedNameReferences]
|
|
|
|
|
|
public sealed partial class JukeboxSongEntry : Control
|
|
|
|
|
|
{
|
|
|
|
|
|
public JukeboxSong? Song { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
private JukeboxSongEntry()
|
|
|
|
|
|
{
|
|
|
|
|
|
RobustXamlLoader.Load(this);
|
|
|
|
|
|
IoCManager.InjectDependencies(this);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public JukeboxSongEntry(JukeboxSong song, Action<JukeboxSong> callback) : this()
|
|
|
|
|
|
{
|
|
|
|
|
|
Song = song;
|
|
|
|
|
|
SongNameLabel.Text = Song.SongName;
|
|
|
|
|
|
PlaySongButton.OnPressed += _ => callback.Invoke(Song);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|