Skip to content

Commit

Permalink
Remove unnecessary code.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Sep 25, 2024
1 parent b4f24b1 commit 55aba1c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,5 @@ public LabelledSingerList()

public BindableList<Singer> Singers => Component.Singers;

public string SingerNamePrefix
{
get => Component.SingerNamePrefix;
set => Component.SingerNamePrefix = value;
}

protected override SingerList CreateComponent() => new();
}
32 changes: 0 additions & 32 deletions osu.Game.Rulesets.Karaoke/Edit/Setup/Components/SingerList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,8 @@ public partial class SingerList : CompositeDrawable
{
public BindableList<Singer> Singers { get; } = new();

private string singerNamePrefix = "Singer";

public string SingerNamePrefix
{
get => singerNamePrefix;
set
{
if (singerNamePrefix == value)
return;

singerNamePrefix = value;

if (IsLoaded)
reindexItems();
}
}

private FillFlowContainer singers = null!;

private IEnumerable<SingerDisplay> singerDisplays => singers.OfType<SingerDisplay>();

[BackgroundDependencyLoader]
private void load()
{
Expand Down Expand Up @@ -107,24 +88,11 @@ private void updateSingers()
Name = "New singer",
}),
});

reindexItems();
}

// todo : might have dialog to ask should delete singer or not if contains lyric.
private void singerDeletionRequested(Singer singer) => Singers.Remove(singer);

private void reindexItems()
{
int index = 1;

foreach (var singerDisplay in singerDisplays)
{
// todo : might call singer manager to update singer id?
index += 1;
}
}

/// <summary>
/// A component which displays a singer along with related description text.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ private void load()
Label = "Singer list",
Description = "All the singers in beatmap.",
FixedLabelWidth = LABEL_WIDTH,
SingerNamePrefix = "#",
},
};

Expand Down

0 comments on commit 55aba1c

Please sign in to comment.