mirror of
https://github.com/osukey/osukey.git
synced 2025-05-12 00:57:21 +09:00
Merge remote-tracking branch 'upstream/master' into no-more-colourinfo
This commit is contained in:
commit
3c7546e2c1
@ -73,6 +73,17 @@ namespace osu.Game.Overlays.Music
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AddBeatmapSet(BeatmapSetInfo beatmapSet)
|
||||||
|
{
|
||||||
|
items.Add(new PlaylistItem(beatmapSet) { OnSelect = itemSelected });
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveBeatmapSet(BeatmapSetInfo beatmapSet)
|
||||||
|
{
|
||||||
|
PlaylistItem itemToRemove = items.Children.FirstOrDefault(item => item.BeatmapSetInfo == beatmapSet);
|
||||||
|
if (itemToRemove != null) items.Remove(itemToRemove);
|
||||||
|
}
|
||||||
|
|
||||||
private class ItemSearchContainer : FillFlowContainer<PlaylistItem>, IHasFilterableChildren
|
private class ItemSearchContainer : FillFlowContainer<PlaylistItem>, IHasFilterableChildren
|
||||||
{
|
{
|
||||||
public string[] FilterTerms => new string[] { };
|
public string[] FilterTerms => new string[] { };
|
||||||
|
@ -80,6 +80,9 @@ namespace osu.Game.Overlays.Music
|
|||||||
|
|
||||||
list.BeatmapSets = BeatmapSets = beatmaps.GetAllWithChildren<BeatmapSetInfo>(b => !b.DeletePending).ToList();
|
list.BeatmapSets = BeatmapSets = beatmaps.GetAllWithChildren<BeatmapSetInfo>(b => !b.DeletePending).ToList();
|
||||||
|
|
||||||
|
beatmaps.BeatmapSetAdded += s => list.AddBeatmapSet(s);
|
||||||
|
beatmaps.BeatmapSetRemoved += s => list.RemoveBeatmapSet(s);
|
||||||
|
|
||||||
beatmapBacking.BindTo(game.Beatmap);
|
beatmapBacking.BindTo(game.Beatmap);
|
||||||
|
|
||||||
filter.Search.OnCommit = (sender, newText) =>
|
filter.Search.OnCommit = (sender, newText) =>
|
||||||
|
@ -129,7 +129,7 @@ namespace osu.Game.Overlays.Profile
|
|||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
Y = -48
|
Y = -48
|
||||||
},
|
},
|
||||||
countryFlag = new DrawableFlag(user.Country?.FlagName ?? "__")
|
countryFlag = new DrawableFlag(user.Country?.FlagName)
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Screens.Multiplayer
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
host.Text = value.Username;
|
host.Text = value.Username;
|
||||||
flagContainer.Children = new[] { new DrawableFlag(value.Country?.FlagName ?? @"__") { RelativeSizeAxes = Axes.Both } };
|
flagContainer.Children = new[] { new DrawableFlag(value.Country?.FlagName) { RelativeSizeAxes = Axes.Both } };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,10 +18,11 @@ using System.Threading.Tasks;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Threading;
|
using osu.Framework.Threading;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Select
|
namespace osu.Game.Screens.Select
|
||||||
{
|
{
|
||||||
internal class BeatmapCarousel : ScrollContainer
|
internal class BeatmapCarousel : OsuScrollContainer
|
||||||
{
|
{
|
||||||
public BeatmapInfo SelectedBeatmap => selectedPanel?.Beatmap;
|
public BeatmapInfo SelectedBeatmap => selectedPanel?.Beatmap;
|
||||||
|
|
||||||
@ -177,6 +178,9 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
public void SelectNextRandom()
|
public void SelectNextRandom()
|
||||||
{
|
{
|
||||||
|
if (groups.Count == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
randomSelectedBeatmaps.Push(new KeyValuePair<BeatmapGroup, BeatmapPanel>(selectedGroup, selectedGroup.SelectedPanel));
|
randomSelectedBeatmaps.Push(new KeyValuePair<BeatmapGroup, BeatmapPanel>(selectedGroup, selectedGroup.SelectedPanel));
|
||||||
|
|
||||||
var visibleGroups = getVisibleGroups();
|
var visibleGroups = getVisibleGroups();
|
||||||
@ -310,6 +314,9 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
private void removeGroup(BeatmapGroup group)
|
private void removeGroup(BeatmapGroup group)
|
||||||
{
|
{
|
||||||
|
if (group == null)
|
||||||
|
return;
|
||||||
|
|
||||||
groups.Remove(group);
|
groups.Remove(group);
|
||||||
panels.Remove(group.Header);
|
panels.Remove(group.Header);
|
||||||
foreach (var p in group.BeatmapPanels)
|
foreach (var p in group.BeatmapPanels)
|
||||||
|
@ -191,7 +191,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
Masking = true,
|
Masking = true,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new DrawableFlag(Score.User?.Country?.FlagName ?? "__")
|
new DrawableFlag(Score.User?.Country?.FlagName)
|
||||||
{
|
{
|
||||||
Width = 30,
|
Width = 30,
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
@ -384,7 +384,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
private void promptDelete()
|
private void promptDelete()
|
||||||
{
|
{
|
||||||
if (Beatmap != null)
|
if (Beatmap != null && !Beatmap.IsDefault)
|
||||||
dialogOverlay?.Push(new BeatmapDeleteDialog(Beatmap));
|
dialogOverlay?.Push(new BeatmapDeleteDialog(Beatmap));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,9 +49,9 @@ namespace osu.Game.Users
|
|||||||
sprite.Texture = textures.Get($@"Flags/{flagName}");
|
sprite.Texture = textures.Get($@"Flags/{flagName}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public DrawableFlag(string name = @"__")
|
public DrawableFlag(string name = null)
|
||||||
{
|
{
|
||||||
flagName = name;
|
flagName = name ?? @"__";
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
|
@ -102,7 +102,7 @@ namespace osu.Game.Users
|
|||||||
Spacing = new Vector2(5f, 0f),
|
Spacing = new Vector2(5f, 0f),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new DrawableFlag(user.Country?.FlagName ?? @"__")
|
new DrawableFlag(user.Country?.FlagName)
|
||||||
{
|
{
|
||||||
Width = 30f,
|
Width = 30f,
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user