4 Commits

6 changed files with 73 additions and 23 deletions

View File

@@ -44,7 +44,7 @@ namespace osu.Desktop
// While .NET 8 only supports Windows 10 and above, running on Windows 7/8.1 may still work. We are limited by realm currently, as they choose to only support 8.1 and higher.
// See https://www.mongodb.com/docs/realm/sdk/dotnet/compatibility/
if (windowsVersion.Major < 6 || (windowsVersion.Major == 6 && windowsVersion.Minor <= 2))
if (windowsVersion.Major < 6)
{
unsafe
{
@@ -53,13 +53,26 @@ namespace osu.Desktop
// We could also better detect compatibility mode if required:
// https://stackoverflow.com/questions/10744651/how-i-can-detect-if-my-application-is-running-under-compatibility-mode#comment58183249_10744730
SDL3.SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags.SDL_MESSAGEBOX_ERROR,
"Your operating system is too old to run osu!"u8,
"This version of osu! requires at least Windows 8.1 to run.\n"u8
+ "Please upgrade your operating system or consider using an older version of osu!.\n\n"u8
+ "If you are running a newer version of windows, please check you don't have \"Compatibility mode\" turned on for osu!"u8, null);
"Your operating system is too old to run this game!"u8,
"This version of the game requires at least Windows 8.1 to run reliably.\n"u8
+ "You may try to run it on Windows 8 or older, but it's not guaranteed to actually work.\n\n"u8
+ "Please upgrade your operating system or consider using an older game version.\n\n"u8
+ "If you are running a newer version of Windows, please check you don't have \"Compatibility mode\" turned on for the game's executable."u8, null);
return;
}
}
if (windowsVersion.Major == 6 && windowsVersion.Minor <= 2)
{
unsafe
{
SDL3.SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags.SDL_MESSAGEBOX_WARNING,
"Your operating system is too old to run this game!"u8,
"While the version of Windows you're using may be able to launch it, it's likely to work unreliably and crash.\n"u8
+ "Please upgrade your operating system or consider using an older game version.\n\n"u8
+ "If you are running a newer version of Windows, please check you don't have \"Compatibility mode\" turned on for the game's executable."u8, null);
}
}
}
// NVIDIA profiles are based on the executable name of a process.

View File

@@ -2,28 +2,33 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Screens.Play.HUD;
namespace osu.Game.Screens.Play.Break
{
public partial class RemainingTimeCounter : Counter
{
private readonly OsuSpriteText counter;
private readonly ArgonCounterTextComponent counter;
public RemainingTimeCounter()
{
AutoSizeAxes = Axes.Both;
InternalChild = counter = new OsuSpriteText
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Font = OsuFont.TorusAlternate.With(size: 64, weight: FontWeight.SemiBold),
};
InternalChild = counter = new ArgonCounterTextComponent(Anchor.Centre);
counter.Scale *= 1.25f; // this seems to be the only way to make the counter bigger, I hope I'm wrong
counter.WireframeOpacity.BindTo(new BindableFloat(0.125f));
}
private string lookup(char c)
{
return c.ToString();
}
protected override void OnCountChanged(double count)
{
string displayText = ((int)Math.Ceiling(count / 1000)).ToString();
counter.Text = displayText;
counter.WireframeTemplate = new string('#', displayText.Length);
}
protected override void OnCountChanged(double count) => counter.Text = ((int)Math.Ceiling(count / 1000)).ToString();
}
}

View File

@@ -2,6 +2,8 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Input;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
@@ -10,14 +12,35 @@ namespace osu.Game.Screens.Play.HUD
public partial class KeyCounterBindingTrigger<T> : InputTrigger, IKeyBindingHandler<T>
where T : struct
{
public IKeyBinding Key { get; }
public T Action { get; }
public KeyCounterBindingTrigger(IKeyBinding key, T action)
: base(key?.KeyCombination.Keys[0].ToString() ?? $"B{(int)(object)action + 1}")
[Resolved]
private ReadableKeyCombinationProvider keyCombinationProvider { get; set; } = null!;
[BackgroundDependencyLoader]
private void load(ReadableKeyCombinationProvider keys)
{
keyCombinationProvider = keys;
}
private string getName(IKeyBinding key, T action)
{
return keyCombinationProvider?.GetReadableString(key.KeyCombination) ?? $"B{(int)(object)action + 1}";
}
public KeyCounterBindingTrigger(IKeyBinding key, T action)
: base("")
{
Key = key;
Action = action;
}
protected override void LoadComplete()
{
base.LoadComplete();
Name = getName(Key, Action);
}
public bool OnPressed(KeyBindingPressEvent<T> e)
{
if (!EqualityComparer<T>.Default.Equals(e.Action, Action))

View File

@@ -14,6 +14,7 @@ using osu.Framework.Graphics.UserInterface;
using osu.Framework.Utils;
using osu.Game.Audio;
using osu.Game.Graphics;
using osu.Game.Online.Leaderboards;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
@@ -215,8 +216,10 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
this.ScaleTo(0).Then().ScaleTo(1, APPEAR_DURATION, Easing.OutQuint);
if (!withFlair)
accuracyCircle.Colour = OsuColour.ForRank(score.Rank);
accuracyCircle.Colour = DrawableRank.GetRankLetterColour(ScoreRank.F); // default for failed scores
if (!withFlair && score.Rank != ScoreRank.F)
accuracyCircle.Colour = OsuColour.ForRank(score.Rank).Lighten(0.125f);
if (withFlair)
{

View File

@@ -16,6 +16,7 @@ using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Framework.Utils;
using osu.Game.Graphics;
using osu.Game.Online.Leaderboards;
using osu.Game.Scoring;
using osu.Game.Screens.Ranking.Contracted;
using osu.Game.Screens.Ranking.Expanded;
@@ -248,10 +249,15 @@ namespace osu.Game.Screens.Ranking
ColourInfo getColour(ColourInfo info)
{
var ci = info.AverageColour;
(_, _, float v) = Color4Extensions.ToHSV(ci);
var rank = (ColourInfo)OsuColour.ForRank(Score.Rank);
(float _, float _, float v) = Color4Extensions.ToHSV(ci);
(float rh, float rs, _) = Color4Extensions.ToHSV(rank);
return Color4Extensions.FromHSV(rh, rs * 0.3f, v * 1.1f);
if (Score.Rank != ScoreRank.F)
return Color4Extensions.FromHSV(rh, rs * 0.3f, v * 1.1f);
else
return Color4Extensions.FromHSV(rh, rs, v * 0.45f);
}
topLayerContent?.FadeOut(content_fade_duration).Expire();

View File

@@ -177,7 +177,7 @@ namespace osu.Game.Seasonal
welcomeText.FadeIn().OnComplete(t => t.Text = "");
using (BeginDelayedSequence(getTimeForBeat(-10)))
welcomeText.FadeIn().OnComplete(t => t.Text = "merry osumas!");
welcomeText.FadeIn().OnComplete(t => t.Text = "and happy new year!");
using (BeginDelayedSequence(getTimeForBeat(-9)))
{