mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 18:52:55 +08:00
Merge branch 'master' into beatmap-decoder-ruleset-store
This commit is contained in:
commit
3e0e77394b
@ -264,32 +264,58 @@ namespace osu.Game.Graphics
|
||||
public readonly Color4 GrayE = Color4Extensions.FromHex(@"eee");
|
||||
public readonly Color4 GrayF = Color4Extensions.FromHex(@"fff");
|
||||
|
||||
/// <summary>
|
||||
/// Equivalent to <see cref="OverlayColourProvider.Pink"/>'s <see cref="OverlayColourProvider.Colour3"/>.
|
||||
/// </summary>
|
||||
public readonly Color4 Pink3 = Color4Extensions.FromHex(@"cc3378");
|
||||
#region "Basic" colour theme
|
||||
|
||||
/// <summary>
|
||||
/// Equivalent to <see cref="OverlayColourProvider.Blue"/>'s <see cref="OverlayColourProvider.Colour3"/>.
|
||||
/// </summary>
|
||||
// Reference: https://www.figma.com/file/VIkXMYNPMtQem2RJg9k2iQ/Asset%2FColours?node-id=1838%3A3
|
||||
|
||||
// Note that the colours in this region are also defined in `OverlayColourProvider` as `Colour{0,1,2,3,4}`.
|
||||
// The difference as to which should be used where comes down to context.
|
||||
// If the colour in question is supposed to always match the view in which it is displayed theme-wise, use `OverlayColourProvider`.
|
||||
// If the colour usage is special and in general differs from the surrounding view in choice of hue, use the `OsuColour` constants.
|
||||
|
||||
public readonly Color4 Pink0 = Color4Extensions.FromHex(@"ff99c7");
|
||||
public readonly Color4 Pink1 = Color4Extensions.FromHex(@"ff66ab");
|
||||
public readonly Color4 Pink2 = Color4Extensions.FromHex(@"eb4791");
|
||||
public readonly Color4 Pink3 = Color4Extensions.FromHex(@"cc3378");
|
||||
public readonly Color4 Pink4 = Color4Extensions.FromHex(@"6b2e49");
|
||||
|
||||
public readonly Color4 Purple0 = Color4Extensions.FromHex(@"b299ff");
|
||||
public readonly Color4 Purple1 = Color4Extensions.FromHex(@"8c66ff");
|
||||
public readonly Color4 Purple2 = Color4Extensions.FromHex(@"7047eb");
|
||||
public readonly Color4 Purple3 = Color4Extensions.FromHex(@"5933cc");
|
||||
public readonly Color4 Purple4 = Color4Extensions.FromHex(@"3d2e6b");
|
||||
|
||||
public readonly Color4 Blue0 = Color4Extensions.FromHex(@"99ddff");
|
||||
public readonly Color4 Blue1 = Color4Extensions.FromHex(@"66ccff");
|
||||
public readonly Color4 Blue2 = Color4Extensions.FromHex(@"47b4eb");
|
||||
public readonly Color4 Blue3 = Color4Extensions.FromHex(@"3399cc");
|
||||
public readonly Color4 Blue4 = Color4Extensions.FromHex(@"2e576b");
|
||||
|
||||
public readonly Color4 Green0 = Color4Extensions.FromHex(@"99ffa2");
|
||||
public readonly Color4 Green1 = Color4Extensions.FromHex(@"66ff73");
|
||||
public readonly Color4 Green2 = Color4Extensions.FromHex(@"47eb55");
|
||||
public readonly Color4 Green3 = Color4Extensions.FromHex(@"33cc40");
|
||||
public readonly Color4 Green4 = Color4Extensions.FromHex(@"2e6b33");
|
||||
|
||||
public readonly Color4 Lime0 = Color4Extensions.FromHex(@"ccff99");
|
||||
|
||||
/// <summary>
|
||||
/// Equivalent to <see cref="OverlayColourProvider.Lime"/>'s <see cref="OverlayColourProvider.Colour1"/>.
|
||||
/// </summary>
|
||||
public readonly Color4 Lime1 = Color4Extensions.FromHex(@"b2ff66");
|
||||
|
||||
/// <summary>
|
||||
/// Equivalent to <see cref="OverlayColourProvider.Lime"/>'s <see cref="OverlayColourProvider.Colour3"/>.
|
||||
/// </summary>
|
||||
public readonly Color4 Lime2 = Color4Extensions.FromHex(@"99eb47");
|
||||
public readonly Color4 Lime3 = Color4Extensions.FromHex(@"7fcc33");
|
||||
public readonly Color4 Lime4 = Color4Extensions.FromHex(@"4c6b2e");
|
||||
|
||||
/// <summary>
|
||||
/// Equivalent to <see cref="OverlayColourProvider.Orange"/>'s <see cref="OverlayColourProvider.Colour1"/>.
|
||||
/// </summary>
|
||||
public readonly Color4 Orange0 = Color4Extensions.FromHex(@"ffe699");
|
||||
public readonly Color4 Orange1 = Color4Extensions.FromHex(@"ffd966");
|
||||
public readonly Color4 Orange2 = Color4Extensions.FromHex(@"ebc247");
|
||||
public readonly Color4 Orange3 = Color4Extensions.FromHex(@"cca633");
|
||||
public readonly Color4 Orange4 = Color4Extensions.FromHex(@"6b5c2e");
|
||||
|
||||
public readonly Color4 Red0 = Color4Extensions.FromHex(@"ff9b9b");
|
||||
public readonly Color4 Red1 = Color4Extensions.FromHex(@"ff6666");
|
||||
public readonly Color4 Red2 = Color4Extensions.FromHex(@"eb4747");
|
||||
public readonly Color4 Red3 = Color4Extensions.FromHex(@"cc3333");
|
||||
public readonly Color4 Red4 = Color4Extensions.FromHex(@"6b2e2e");
|
||||
|
||||
#endregion
|
||||
|
||||
// Content Background
|
||||
public readonly Color4 B5 = Color4Extensions.FromHex(@"222a28");
|
||||
|
@ -168,8 +168,7 @@ namespace osu.Game.Online.Rooms
|
||||
RoomID.Value = other.RoomID.Value;
|
||||
Name.Value = other.Name.Value;
|
||||
|
||||
if (other.Category.Value != RoomCategory.Spotlight)
|
||||
Category.Value = other.Category.Value;
|
||||
Category.Value = other.Category.Value;
|
||||
|
||||
if (other.Host.Value != null && Host.Value?.Id != other.Host.Value.Id)
|
||||
Host.Value = other.Host.Value;
|
||||
|
@ -1,6 +1,8 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
using osuTK.Graphics;
|
||||
|
||||
@ -33,7 +35,10 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
{
|
||||
}
|
||||
|
||||
protected override Color4 GetStateColour() => OverlayColourProvider.Orange.Colour1;
|
||||
[Resolved]
|
||||
private OsuColour colours { get; set; }
|
||||
|
||||
protected override Color4 GetStateColour() => colours.Orange1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,14 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
});
|
||||
|
||||
Enabled.Value = true;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
updateState();
|
||||
FinishTransforms(true);
|
||||
}
|
||||
|
||||
protected override bool OnHover(HoverEvent e)
|
||||
|
@ -38,7 +38,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Margin = new MarginPadding { Horizontal = 10f, Vertical = 2f },
|
||||
Text = BeatmapsetsStrings.NsfwBadgeLabel.ToUpper(),
|
||||
Font = OsuFont.GetFont(size: 10, weight: FontWeight.SemiBold),
|
||||
Colour = OverlayColourProvider.Orange.Colour2,
|
||||
Colour = colours.Orange2
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Margin = new MarginPadding { Horizontal = 10f, Vertical = 2f },
|
||||
Text = BeatmapsetsStrings.FeaturedArtistBadgeLabel.ToUpper(),
|
||||
Font = OsuFont.GetFont(size: 10, weight: FontWeight.SemiBold),
|
||||
Colour = OverlayColourProvider.Blue.Colour1,
|
||||
Colour = colours.Blue1
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -11,20 +11,16 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
private readonly OverlayColourScheme colourScheme;
|
||||
|
||||
public static OverlayColourProvider Red { get; } = new OverlayColourProvider(OverlayColourScheme.Red);
|
||||
public static OverlayColourProvider Pink { get; } = new OverlayColourProvider(OverlayColourScheme.Pink);
|
||||
public static OverlayColourProvider Orange { get; } = new OverlayColourProvider(OverlayColourScheme.Orange);
|
||||
public static OverlayColourProvider Lime { get; } = new OverlayColourProvider(OverlayColourScheme.Lime);
|
||||
public static OverlayColourProvider Green { get; } = new OverlayColourProvider(OverlayColourScheme.Green);
|
||||
public static OverlayColourProvider Purple { get; } = new OverlayColourProvider(OverlayColourScheme.Purple);
|
||||
public static OverlayColourProvider Blue { get; } = new OverlayColourProvider(OverlayColourScheme.Blue);
|
||||
public static OverlayColourProvider Plum { get; } = new OverlayColourProvider(OverlayColourScheme.Plum);
|
||||
|
||||
public OverlayColourProvider(OverlayColourScheme colourScheme)
|
||||
{
|
||||
this.colourScheme = colourScheme;
|
||||
}
|
||||
|
||||
// Note that the following five colours are also defined in `OsuColour` as `{colourScheme}{0,1,2,3,4}`.
|
||||
// The difference as to which should be used where comes down to context.
|
||||
// If the colour in question is supposed to always match the view in which it is displayed theme-wise, use `OverlayColourProvider`.
|
||||
// If the colour usage is special and in general differs from the surrounding view in choice of hue, use the `OsuColour` constants.
|
||||
public Color4 Colour0 => getColour(1, 0.8f);
|
||||
public Color4 Colour1 => getColour(1, 0.7f);
|
||||
public Color4 Colour2 => getColour(0.8f, 0.6f);
|
||||
public Color4 Colour3 => getColour(0.6f, 0.5f);
|
||||
|
@ -19,6 +19,7 @@ using osu.Game.Database;
|
||||
using osu.Game.IO.Archives;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.Notifications;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
@ -71,6 +72,9 @@ namespace osu.Game.Screens.Menu
|
||||
[CanBeNull]
|
||||
private readonly Func<OsuScreen> createNextScreen;
|
||||
|
||||
[Resolved]
|
||||
private RulesetStore rulesets { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the <see cref="Track"/> is provided by osu! resources, rather than a user beatmap.
|
||||
/// Only valid during or after <see cref="LogoArriving"/>.
|
||||
@ -117,7 +121,11 @@ namespace osu.Game.Screens.Menu
|
||||
// we generally want a song to be playing on startup, so use the intro music even if a user has specified not to if no other track is available.
|
||||
if (initialBeatmap == null)
|
||||
{
|
||||
if (!loadThemedIntro())
|
||||
// Intro beatmaps are generally made using the osu! ruleset.
|
||||
// It might not be present in test projects for other rulesets.
|
||||
bool osuRulesetPresent = rulesets.GetRuleset(0) != null;
|
||||
|
||||
if (!loadThemedIntro() && osuRulesetPresent)
|
||||
{
|
||||
// if we detect that the theme track or beatmap is unavailable this is either first startup or things are in a bad state.
|
||||
// this could happen if a user has nuked their files store. for now, reimport to repair this.
|
||||
|
@ -78,7 +78,7 @@ namespace osu.Game.Storyboards
|
||||
{
|
||||
get
|
||||
{
|
||||
string backgroundPath = BeatmapInfo.BeatmapSet?.Metadata.BackgroundFile;
|
||||
string backgroundPath = BeatmapInfo.Metadata.BackgroundFile;
|
||||
|
||||
if (string.IsNullOrEmpty(backgroundPath))
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user