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)
{
text.Text = "100";
maxGlow.EffectColour = meterColour.Opacity(2f);
maxGlow.EffectColour = meterColour.Opacity(5f);
}
else
{
maxGlow.EffectColour = Color4.Transparent;
maxGlow.EffectColour = meterColour.Opacity((float)displayVolume * 3f);
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.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Graphics.UserInterfaceV2;
using osu.Game.Input.Bindings;
using osuTK;
using osuTK.Graphics;
using osu.Game.Localisation;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Utils;
using System.Runtime.InteropServices;
namespace osu.Game.Screens.Play
{
@@ -73,8 +71,6 @@ namespace osu.Game.Screens.Play
[Resolved]
private GlobalActionContainer globalAction { get; set; } = null!;
private ShearedButton saveReplay { get; set; } = null!;
protected GameplayMenuOverlay()
{
RelativeSizeAxes = Axes.Both;
@@ -124,15 +120,21 @@ namespace osu.Game.Screens.Play
Radius = 50
},
},
saveReplay = new ShearedButton
{
Text = "Quit and save replay",
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
Height = 32,
Colour = colours.PurpleLight,
// Visibility = false
},
// XXX: I have mixed feeling about this, but it works at least
// TODO: check if we're in the editor to avoid some... weird bugs on score import
(OnQuitReplay != null)
? new ShearedButton
{
Text = "Quit and save replay",
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
Height = 32,
Colour = colours.PurpleLight,
Action = () => OnQuitReplay.Invoke()
}
: [],
playInfoText = new OsuTextFlowContainer(cp => cp.Font = OsuFont.GetFont(size: 18))
{
Origin = Anchor.TopCentre,
@@ -153,12 +155,6 @@ namespace osu.Game.Screens.Play
if (OnQuit != null)
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();
updateInfoText();

View File

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