1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 22:43:05 +08:00

Few cleanups

This commit is contained in:
Salman Ahmed 2024-05-10 06:47:48 +03:00
parent c1ea9d2c9f
commit 6ddf8f8498
4 changed files with 10 additions and 12 deletions

View File

@ -20,7 +20,6 @@ namespace osu.Game.Screens.Play.HUD
/// </summary>
public partial class ModDisplay : CompositeDrawable, IHasCurrentValue<IReadOnlyList<Mod>>
{
private readonly bool showExtendedInformation;
private const int fade_duration = 1000;
public ExpansionMode ExpansionMode = ExpansionMode.ExpandOnHover;
@ -38,6 +37,7 @@ namespace osu.Game.Screens.Play.HUD
}
}
private readonly bool showExtendedInformation;
private readonly FillFlowContainer<ModIcon> iconsContainer;
public ModDisplay(bool showExtendedInformation = true)

View File

@ -16,7 +16,6 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Configuration;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Localisation;
using osu.Game.Overlays;
@ -61,7 +60,7 @@ namespace osu.Game.Screens.Select.FooterV2
{
const float bar_shear_width = 7f;
const float bar_height = 37f;
const float display_rel_width = 0.65f;
const float mod_display_portion = 0.65f;
var barShear = new Vector2(bar_shear_width / bar_height, 0);
@ -132,7 +131,7 @@ namespace osu.Game.Screens.Select.FooterV2
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
RelativeSizeAxes = Axes.Both,
Width = 1f - display_rel_width,
Width = 1f - mod_display_portion,
Masking = true,
Child = MultiplierText = new OsuSpriteText
{
@ -147,7 +146,7 @@ namespace osu.Game.Screens.Select.FooterV2
{
CornerRadius = CORNER_RADIUS,
RelativeSizeAxes = Axes.Both,
Width = display_rel_width,
Width = mod_display_portion,
Masking = true,
Children = new Drawable[]
{

View File

@ -27,15 +27,15 @@ namespace osu.Game.Screens.Select.FooterV2
private const int transition_length = 500;
// This should be 12 by design, but an extra allowance is added due to the corner radius specification.
public const float SHEAR_WIDTH = 13.5f;
private const float shear_width = 13.5f;
public const int CORNER_RADIUS = 10;
public const int BUTTON_HEIGHT = 90;
public const int BUTTON_WIDTH = 140;
protected const int CORNER_RADIUS = 10;
protected const int BUTTON_HEIGHT = 90;
protected const int BUTTON_WIDTH = 140;
public Bindable<Visibility> OverlayState = new Bindable<Visibility>();
protected static readonly Vector2 BUTTON_SHEAR = new Vector2(SHEAR_WIDTH / BUTTON_HEIGHT, 0);
protected static readonly Vector2 BUTTON_SHEAR = new Vector2(shear_width / BUTTON_HEIGHT, 0);
[Resolved]
private OverlayColourProvider colourProvider { get; set; } = null!;
@ -72,7 +72,6 @@ namespace osu.Game.Screens.Select.FooterV2
public FooterButtonV2()
{
Size = new Vector2(BUTTON_WIDTH, BUTTON_HEIGHT);
Margin = new MarginPadding { Horizontal = SHEAR_WIDTH / 2f };
Child = new Container
{

View File

@ -72,7 +72,7 @@ namespace osu.Game.Screens.Select.FooterV2
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(-FooterButtonV2.SHEAR_WIDTH + 7, 0),
Spacing = new Vector2(7, 0),
AutoSizeAxes = Axes.Both
}
};