mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Merge branch 'master' into fix-offset-seek-handling
This commit is contained in:
@ -63,6 +63,8 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
box = new Container
|
||||
{
|
||||
// box needs to be always present to ensure the button is always sized correctly for flow
|
||||
AlwaysPresent = true,
|
||||
Masking = true,
|
||||
MaskingSmoothness = 2,
|
||||
EdgeEffect = new EdgeEffectParameters
|
||||
|
@ -103,6 +103,9 @@ namespace osu.Game.Screens.Menu
|
||||
[Resolved(CanBeNull = true)]
|
||||
private NotificationOverlay notifications { get; set; }
|
||||
|
||||
[Resolved(CanBeNull = true)]
|
||||
private LoginOverlay loginOverlay { get; set; }
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(AudioManager audio, IdleTracker idleTracker, GameHost host)
|
||||
{
|
||||
@ -135,7 +138,12 @@ namespace osu.Game.Screens.Menu
|
||||
notifications?.Post(new SimpleNotification
|
||||
{
|
||||
Text = "You gotta be logged in to multi 'yo!",
|
||||
Icon = FontAwesome.Solid.Globe
|
||||
Icon = FontAwesome.Solid.Globe,
|
||||
Activated = () =>
|
||||
{
|
||||
loginOverlay?.Show();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
return;
|
||||
|
@ -6,7 +6,6 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Online.Chat;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
@ -60,7 +59,7 @@ namespace osu.Game.Screens.Multi.Components
|
||||
if (beatmap != null)
|
||||
{
|
||||
beatmapAuthor.AddText("mapped by ", s => s.Colour = OsuColour.Gray(0.8f));
|
||||
beatmapAuthor.AddLink(beatmap.Metadata.Author.Username, null, LinkAction.OpenUserProfile, beatmap.Metadata.Author.Id.ToString(), "View Profile");
|
||||
beatmapAuthor.AddUserLink(beatmap.Metadata.Author);
|
||||
}
|
||||
}, true);
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Online.Chat;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
|
||||
@ -95,8 +94,8 @@ namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
if (host.NewValue != null)
|
||||
{
|
||||
hostText.AddText("hosted by ");
|
||||
hostText.AddLink(host.NewValue.Username, null, LinkAction.OpenUserProfile, host.NewValue.Id.ToString(), "Open profile",
|
||||
s => s.Font = s.Font.With(Typeface.Exo, weight: FontWeight.Bold, italics: true));
|
||||
hostText.AddUserLink(host.NewValue, s => s.Font = s.Font.With(Typeface.Exo, weight: FontWeight.Bold, italics: true));
|
||||
|
||||
flagContainer.Child = new DrawableFlag(host.NewValue.Country) { RelativeSizeAxes = Axes.Both };
|
||||
}
|
||||
}, true);
|
||||
|
@ -6,7 +6,6 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Online.Chat;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
|
||||
@ -54,8 +53,7 @@ namespace osu.Game.Screens.Multi.Match.Components
|
||||
{
|
||||
linkContainer.AddText("hosted by");
|
||||
linkContainer.NewLine();
|
||||
linkContainer.AddLink(host.Username, null, LinkAction.OpenUserProfile, host.Id.ToString(), "View Profile",
|
||||
s => s.Font = s.Font.With(Typeface.Exo, weight: FontWeight.Bold, italics: true));
|
||||
linkContainer.AddUserLink(host, s => s.Font = s.Font.With(Typeface.Exo, weight: FontWeight.Bold, italics: true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -65,12 +65,12 @@ namespace osu.Game.Screens
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
{
|
||||
var deps = new OsuScreenDependencies(DisallowExternalBeatmapRulesetChanges, base.CreateChildDependencies(parent));
|
||||
var screenDependencies = new OsuScreenDependencies(DisallowExternalBeatmapRulesetChanges, parent);
|
||||
|
||||
Beatmap = deps.Beatmap;
|
||||
Ruleset = deps.Ruleset;
|
||||
Beatmap = screenDependencies.Beatmap;
|
||||
Ruleset = screenDependencies.Ruleset;
|
||||
|
||||
return deps;
|
||||
return base.CreateChildDependencies(screenDependencies);
|
||||
}
|
||||
|
||||
protected BackgroundScreen Background => backgroundStack?.CurrentScreen as BackgroundScreen;
|
||||
|
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
@ -168,15 +169,22 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
base.ApplyState();
|
||||
}
|
||||
|
||||
public MenuItem[] ContextMenuItems => new MenuItem[]
|
||||
public MenuItem[] ContextMenuItems
|
||||
{
|
||||
new OsuMenuItem("Play", MenuItemType.Highlighted, () => startRequested?.Invoke(beatmap)),
|
||||
new OsuMenuItem("Edit", MenuItemType.Standard, () => editRequested?.Invoke(beatmap)),
|
||||
new OsuMenuItem("Hide", MenuItemType.Destructive, () => hideRequested?.Invoke(beatmap)),
|
||||
new OsuMenuItem("Details", MenuItemType.Standard, () =>
|
||||
get
|
||||
{
|
||||
if (beatmap.OnlineBeatmapID.HasValue) beatmapOverlay?.FetchAndShowBeatmap(beatmap.OnlineBeatmapID.Value);
|
||||
}),
|
||||
};
|
||||
List<MenuItem> items = new List<MenuItem>
|
||||
{
|
||||
new OsuMenuItem("Play", MenuItemType.Highlighted, () => startRequested?.Invoke(beatmap)),
|
||||
new OsuMenuItem("Edit", MenuItemType.Standard, () => editRequested?.Invoke(beatmap)),
|
||||
new OsuMenuItem("Hide", MenuItemType.Destructive, () => hideRequested?.Invoke(beatmap)),
|
||||
};
|
||||
|
||||
if (beatmap.OnlineBeatmapID.HasValue)
|
||||
items.Add(new OsuMenuItem("Details", MenuItemType.Standard, () => beatmapOverlay?.FetchAndShowBeatmap(beatmap.OnlineBeatmapID.Value)));
|
||||
|
||||
return items.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
{
|
||||
if (Scope == BeatmapLeaderboardScope.Local)
|
||||
{
|
||||
Scores = scoreManager.QueryScores(s => !s.DeletePending && s.Beatmap.ID == Beatmap.ID).ToArray();
|
||||
Scores = scoreManager.QueryScores(s => !s.DeletePending && s.Beatmap.ID == Beatmap.ID).OrderByDescending(s => s.TotalScore).ToArray();
|
||||
PlaceholderState = Scores.Any() ? PlaceholderState.Successful : PlaceholderState.NoScores;
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user