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. // 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/ // 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 unsafe
{ {
@@ -53,13 +53,26 @@ namespace osu.Desktop
// We could also better detect compatibility mode if required: // 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 // 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, SDL3.SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags.SDL_MESSAGEBOX_ERROR,
"Your operating system is too old to run osu!"u8, "Your operating system is too old to run this game!"u8,
"This version of osu! requires at least Windows 8.1 to run.\n"u8 "This version of the game requires at least Windows 8.1 to run reliably.\n"u8
+ "Please upgrade your operating system or consider using an older version of osu!.\n\n"u8 + "You may try to run it on Windows 8 or older, but it's not guaranteed to actually work.\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); + "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; 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. // 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. // See the LICENCE file in the repository root for full licence text.
using System; using System;
using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics; using osu.Game.Screens.Play.HUD;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Screens.Play.Break namespace osu.Game.Screens.Play.Break
{ {
public partial class RemainingTimeCounter : Counter public partial class RemainingTimeCounter : Counter
{ {
private readonly OsuSpriteText counter; private readonly ArgonCounterTextComponent counter;
public RemainingTimeCounter() public RemainingTimeCounter()
{ {
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
InternalChild = counter = new OsuSpriteText 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)
{ {
Anchor = Anchor.Centre, return c.ToString();
Origin = Anchor.Centre, }
Font = OsuFont.TorusAlternate.With(size: 64, weight: FontWeight.SemiBold), 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. // See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic; using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Input;
using osu.Framework.Input.Bindings; using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
@@ -10,14 +12,35 @@ namespace osu.Game.Screens.Play.HUD
public partial class KeyCounterBindingTrigger<T> : InputTrigger, IKeyBindingHandler<T> public partial class KeyCounterBindingTrigger<T> : InputTrigger, IKeyBindingHandler<T>
where T : struct where T : struct
{ {
public IKeyBinding Key { get; }
public T Action { get; } public T Action { get; }
public KeyCounterBindingTrigger(IKeyBinding key, T action) [Resolved]
: base(key?.KeyCombination.Keys[0].ToString() ?? $"B{(int)(object)action + 1}") 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; Action = action;
} }
protected override void LoadComplete()
{
base.LoadComplete();
Name = getName(Key, Action);
}
public bool OnPressed(KeyBindingPressEvent<T> e) public bool OnPressed(KeyBindingPressEvent<T> e)
{ {
if (!EqualityComparer<T>.Default.Equals(e.Action, Action)) 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.Framework.Utils;
using osu.Game.Audio; using osu.Game.Audio;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Online.Leaderboards;
using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.Scoring;
using osu.Game.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); this.ScaleTo(0).Then().ScaleTo(1, APPEAR_DURATION, Easing.OutQuint);
if (!withFlair) accuracyCircle.Colour = DrawableRank.GetRankLetterColour(ScoreRank.F); // default for failed scores
accuracyCircle.Colour = OsuColour.ForRank(score.Rank);
if (!withFlair && score.Rank != ScoreRank.F)
accuracyCircle.Colour = OsuColour.ForRank(score.Rank).Lighten(0.125f);
if (withFlair) if (withFlair)
{ {

View File

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

View File

@@ -177,7 +177,7 @@ namespace osu.Game.Seasonal
welcomeText.FadeIn().OnComplete(t => t.Text = ""); welcomeText.FadeIn().OnComplete(t => t.Text = "");
using (BeginDelayedSequence(getTimeForBeat(-10))) 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))) using (BeginDelayedSequence(getTimeForBeat(-9)))
{ {