2 Commits

3 changed files with 18 additions and 22 deletions

View File

@@ -261,11 +261,11 @@ namespace osu.Game.Overlays.Volume
if (displayVolume >= 0.995f) if (displayVolume >= 0.995f)
{ {
text.Text = "100"; text.Text = "100";
maxGlow.EffectColour = meterColour.Opacity(2f); maxGlow.EffectColour = meterColour.Opacity(5f);
} }
else else
{ {
maxGlow.EffectColour = Color4.Transparent; maxGlow.EffectColour = meterColour.Opacity((float)displayVolume * 3f);
text.Text = intValue.ToString(CultureInfo.CurrentCulture); text.Text = intValue.ToString(CultureInfo.CurrentCulture);
} }

View File

@@ -18,14 +18,12 @@ using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Graphics.UserInterfaceV2;
using osu.Game.Input.Bindings; using osu.Game.Input.Bindings;
using osuTK; using osuTK;
using osuTK.Graphics; using osuTK.Graphics;
using osu.Game.Localisation; using osu.Game.Localisation;
using osu.Game.Resources.Localisation.Web; using osu.Game.Resources.Localisation.Web;
using osu.Game.Utils; using osu.Game.Utils;
using System.Runtime.InteropServices;
namespace osu.Game.Screens.Play namespace osu.Game.Screens.Play
{ {
@@ -73,8 +71,6 @@ namespace osu.Game.Screens.Play
[Resolved] [Resolved]
private GlobalActionContainer globalAction { get; set; } = null!; private GlobalActionContainer globalAction { get; set; } = null!;
private ShearedButton saveReplay { get; set; } = null!;
protected GameplayMenuOverlay() protected GameplayMenuOverlay()
{ {
RelativeSizeAxes = Axes.Both; RelativeSizeAxes = Axes.Both;
@@ -124,15 +120,21 @@ namespace osu.Game.Screens.Play
Radius = 50 Radius = 50
}, },
}, },
saveReplay = new ShearedButton
{ // XXX: I have mixed feeling about this, but it works at least
Text = "Quit and save replay", // TODO: check if we're in the editor to avoid some... weird bugs on score import
Origin = Anchor.TopCentre, (OnQuitReplay != null)
Anchor = Anchor.TopCentre, ? new ShearedButton
Height = 32, {
Colour = colours.PurpleLight, Text = "Quit and save replay",
// Visibility = false Origin = Anchor.TopCentre,
}, Anchor = Anchor.TopCentre,
Height = 32,
Colour = colours.PurpleLight,
Action = () => OnQuitReplay.Invoke()
}
: [],
playInfoText = new OsuTextFlowContainer(cp => cp.Font = OsuFont.GetFont(size: 18)) playInfoText = new OsuTextFlowContainer(cp => cp.Font = OsuFont.GetFont(size: 18))
{ {
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
@@ -153,12 +155,6 @@ namespace osu.Game.Screens.Play
if (OnQuit != null) if (OnQuit != null)
AddButton(GameplayMenuOverlayStrings.Quit, new Color4(170, 27, 39, 255), () => OnQuit.Invoke()); AddButton(GameplayMenuOverlayStrings.Quit, new Color4(170, 27, 39, 255), () => OnQuit.Invoke());
if (OnQuitReplay != null)
{
// saveReplay.Visibility = true;
saveReplay.Action = () => OnQuitReplay.Invoke();
}
State.ValueChanged += _ => InternalButtons.Deselect(); State.ValueChanged += _ => InternalButtons.Deselect();
updateInfoText(); updateInfoText();

View File

@@ -519,7 +519,7 @@ namespace osu.Game.Screens.Play
Retries = RestartCount, Retries = RestartCount,
OnRetry = () => Restart(), OnRetry = () => Restart(),
OnQuit = () => PerformExitWithConfirmation(), OnQuit = () => PerformExitWithConfirmation(),
OnQuitReplay = () => PerformExitReplay() OnQuitReplay = (this is not SoloPlayer) ? null : PerformExitReplay
}, },
}, },
}; };