mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Merge remote-tracking branch 'origin/master' into disallow-beatmap-change
# Conflicts: # osu.Game/Overlays/Music/PlaylistOverlay.cs # osu.Game/Screens/OsuScreen.cs
This commit is contained in:
@ -11,6 +11,7 @@ using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Drawables;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Overlays.BeatmapSet.Buttons;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
@ -93,6 +94,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
public Header()
|
||||
{
|
||||
ExternalLinkButton externalLink;
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Height = 400;
|
||||
Masking = true;
|
||||
@ -160,10 +162,24 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Height = 113,
|
||||
Child = Picker = new BeatmapPicker(),
|
||||
},
|
||||
title = new OsuSpriteText
|
||||
new FillFlowContainer
|
||||
{
|
||||
Font = @"Exo2.0-BoldItalic",
|
||||
TextSize = 37,
|
||||
Direction = FillDirection.Horizontal,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
title = new OsuSpriteText
|
||||
{
|
||||
Font = @"Exo2.0-BoldItalic",
|
||||
TextSize = 37,
|
||||
},
|
||||
externalLink = new ExternalLinkButton
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Margin = new MarginPadding { Left = 3, Bottom = 4 }, //To better lineup with the font
|
||||
},
|
||||
}
|
||||
},
|
||||
artist = new OsuSpriteText
|
||||
{
|
||||
@ -247,6 +263,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
};
|
||||
|
||||
Picker.Beatmap.ValueChanged += b => Details.Beatmap = b;
|
||||
Picker.Beatmap.ValueChanged += b => externalLink.Link = $@"https://osu.ppy.sh/beatmapsets/{BeatmapSet?.OnlineBeatmapSetID}#{b?.Ruleset.ShortName}/{b?.OnlineBeatmapID}";
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
@ -101,7 +101,7 @@ namespace osu.Game.Overlays.Music
|
||||
private void updateSelectedSet()
|
||||
{
|
||||
foreach (PlaylistItem s in items.Children)
|
||||
s.Selected = s.BeatmapSetInfo.ID == beatmapBacking.Value.BeatmapSetInfo.ID;
|
||||
s.Selected = s.BeatmapSetInfo.ID == beatmapBacking.Value.BeatmapSetInfo?.ID;
|
||||
}
|
||||
|
||||
public string SearchTerm
|
||||
|
@ -81,7 +81,10 @@ namespace osu.Game.Overlays.Music
|
||||
{
|
||||
BeatmapInfo toSelect = list.FirstVisibleSet?.Beatmaps?.FirstOrDefault();
|
||||
if (toSelect != null)
|
||||
{
|
||||
beatmap.Value = beatmaps.GetWorkingBeatmap(toSelect);
|
||||
beatmap.Value.Track.Restart();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -111,6 +114,7 @@ namespace osu.Game.Overlays.Music
|
||||
}
|
||||
|
||||
beatmap.Value = beatmaps.GetWorkingBeatmap(set.Beatmaps.First());
|
||||
beatmap.Value.Track.Restart();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
@ -10,13 +9,13 @@ using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Overlays.Profile.Header;
|
||||
using osu.Game.Users;
|
||||
|
||||
@ -105,11 +104,28 @@ namespace osu.Game.Overlays.Profile
|
||||
Y = -75,
|
||||
Size = new Vector2(25, 25)
|
||||
},
|
||||
new ProfileLink(user)
|
||||
new FillFlowContainer
|
||||
{
|
||||
Direction = FillDirection.Horizontal,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Y = -48,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = user.Username,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
TextSize = 30,
|
||||
},
|
||||
new ExternalLinkButton($@"https://osu.ppy.sh/users/{user.Id}")
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Margin = new MarginPadding { Left = 3, Bottom = 3 }, //To better lineup with the font
|
||||
},
|
||||
}
|
||||
},
|
||||
countryFlag = new DrawableFlag(user.Country)
|
||||
{
|
||||
@ -455,28 +471,6 @@ namespace osu.Game.Overlays.Profile
|
||||
infoTextRight.NewLine();
|
||||
}
|
||||
|
||||
private class ProfileLink : OsuHoverContainer, IHasTooltip
|
||||
{
|
||||
public string TooltipText => "View Profile in Browser";
|
||||
|
||||
public override bool HandleMouseInput => true;
|
||||
|
||||
public ProfileLink(User user)
|
||||
{
|
||||
Action = () => Process.Start($@"https://osu.ppy.sh/users/{user.Id}");
|
||||
|
||||
AutoSizeAxes = Axes.Both;
|
||||
|
||||
Child = new OsuSpriteText
|
||||
{
|
||||
Text = user.Username,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
TextSize = 30,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private class GradeBadge : Container
|
||||
{
|
||||
private const float width = 50;
|
||||
|
Reference in New Issue
Block a user