mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 09:42:54 +08:00
Adjust footer design to display well with the rest of the game
This commit is contained in:
parent
c6c75ae48d
commit
892659de0f
@ -17,13 +17,10 @@ namespace osu.Game.Screens.Footer
|
||||
{
|
||||
public partial class ScreenBackButton : ShearedButton
|
||||
{
|
||||
// todo: see https://github.com/ppy/osu-framework/issues/3271
|
||||
private const float torus_scale_factor = 1.2f;
|
||||
|
||||
public const float BUTTON_WIDTH = 240;
|
||||
|
||||
public ScreenBackButton()
|
||||
: base(BUTTON_WIDTH, 70)
|
||||
: base(BUTTON_WIDTH)
|
||||
{
|
||||
}
|
||||
|
||||
@ -42,14 +39,14 @@ namespace osu.Game.Screens.Footer
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(20f),
|
||||
Size = new Vector2(17f),
|
||||
Icon = FontAwesome.Solid.ChevronLeft,
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Font = OsuFont.TorusAlternate.With(size: 20 * torus_scale_factor),
|
||||
Font = OsuFont.TorusAlternate.With(size: 17),
|
||||
Text = CommonStrings.Back,
|
||||
UseFullGlyphHeight = false,
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Screens.Footer
|
||||
private const int padding = 60;
|
||||
private const float delay_per_button = 30;
|
||||
|
||||
public const int HEIGHT = 60;
|
||||
public const int HEIGHT = 50;
|
||||
|
||||
private readonly List<OverlayContainer> overlays = new List<OverlayContainer>();
|
||||
|
||||
@ -73,7 +73,7 @@ namespace osu.Game.Screens.Footer
|
||||
},
|
||||
backButton = new ScreenBackButton
|
||||
{
|
||||
Margin = new MarginPadding { Bottom = 10f, Left = 12f },
|
||||
Margin = new MarginPadding { Bottom = 15f, Left = 12f },
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Action = () => OnBack?.Invoke(),
|
||||
|
@ -28,8 +28,8 @@ namespace osu.Game.Screens.Footer
|
||||
private const float shear = OsuGame.SHEAR;
|
||||
|
||||
protected const int CORNER_RADIUS = 10;
|
||||
protected const int BUTTON_HEIGHT = 90;
|
||||
protected const int BUTTON_WIDTH = 140;
|
||||
protected const int BUTTON_HEIGHT = 75;
|
||||
protected const int BUTTON_WIDTH = 116;
|
||||
|
||||
public Bindable<Visibility> OverlayState = new Bindable<Visibility>();
|
||||
|
||||
@ -116,19 +116,18 @@ namespace osu.Game.Screens.Footer
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Y = 42,
|
||||
Y = 35,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Child = text = new OsuSpriteText
|
||||
{
|
||||
// figma design says the size is 16, but due to the issues with font sizes 19 matches better
|
||||
Font = OsuFont.TorusAlternate.With(size: 19),
|
||||
Font = OsuFont.TorusAlternate.With(size: 16),
|
||||
AlwaysPresent = true
|
||||
}
|
||||
},
|
||||
icon = new SpriteIcon
|
||||
{
|
||||
Y = 12,
|
||||
Size = new Vector2(20),
|
||||
Y = 10,
|
||||
Size = new Vector2(16),
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre
|
||||
},
|
||||
@ -140,7 +139,7 @@ namespace osu.Game.Screens.Footer
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Origin = Anchor.Centre,
|
||||
Y = -CORNER_RADIUS,
|
||||
Size = new Vector2(120, 6),
|
||||
Size = new Vector2(100, 5),
|
||||
Masking = true,
|
||||
CornerRadius = 3,
|
||||
Child = bar = new Box
|
||||
|
@ -32,9 +32,7 @@ namespace osu.Game.Screens.SelectV2.Footer
|
||||
{
|
||||
public partial class ScreenFooterButtonMods : ScreenFooterButton, IHasCurrentValue<IReadOnlyList<Mod>>
|
||||
{
|
||||
// todo: see https://github.com/ppy/osu-framework/issues/3271
|
||||
private const float torus_scale_factor = 1.2f;
|
||||
private const float bar_height = 37f;
|
||||
private const float bar_height = 30f;
|
||||
private const float mod_display_portion = 0.65f;
|
||||
|
||||
private readonly BindableWithCurrent<IReadOnlyList<Mod>> current = new BindableWithCurrent<IReadOnlyList<Mod>>(Array.Empty<Mod>());
|
||||
@ -112,7 +110,7 @@ namespace osu.Game.Screens.SelectV2.Footer
|
||||
Origin = Anchor.Centre,
|
||||
Shear = -BUTTON_SHEAR,
|
||||
UseFullGlyphHeight = false,
|
||||
Font = OsuFont.Torus.With(size: 14 * torus_scale_factor, weight: FontWeight.Bold)
|
||||
Font = OsuFont.Torus.With(size: 14f, weight: FontWeight.Bold)
|
||||
}
|
||||
},
|
||||
new Container
|
||||
@ -133,7 +131,7 @@ namespace osu.Game.Screens.SelectV2.Footer
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Shear = -BUTTON_SHEAR,
|
||||
Scale = new Vector2(0.6f),
|
||||
Scale = new Vector2(0.5f),
|
||||
Current = { BindTarget = Current },
|
||||
ExpansionMode = ExpansionMode.AlwaysContracted,
|
||||
},
|
||||
@ -142,7 +140,7 @@ namespace osu.Game.Screens.SelectV2.Footer
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Shear = -BUTTON_SHEAR,
|
||||
Font = OsuFont.Torus.With(size: 14 * torus_scale_factor, weight: FontWeight.Bold),
|
||||
Font = OsuFont.Torus.With(size: 14f, weight: FontWeight.Bold),
|
||||
Mods = { BindTarget = Current },
|
||||
}
|
||||
}
|
||||
@ -335,7 +333,7 @@ namespace osu.Game.Screens.SelectV2.Footer
|
||||
Text = ModSelectOverlayStrings.Unranked.ToUpper(),
|
||||
Margin = new MarginPadding { Horizontal = 15 },
|
||||
UseFullGlyphHeight = false,
|
||||
Font = OsuFont.Torus.With(size: 14 * torus_scale_factor, weight: FontWeight.Bold),
|
||||
Font = OsuFont.Torus.With(size: 14f, weight: FontWeight.Bold),
|
||||
Colour = Color4.Black,
|
||||
}
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ namespace osu.Game.Screens.SelectV2.Footer
|
||||
{
|
||||
randomSpriteText = new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.TorusAlternate.With(size: 19),
|
||||
Font = OsuFont.TorusAlternate.With(size: 16),
|
||||
AlwaysPresent = true,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
@ -50,7 +50,7 @@ namespace osu.Game.Screens.SelectV2.Footer
|
||||
},
|
||||
rewindSpriteText = new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.TorusAlternate.With(size: 19),
|
||||
Font = OsuFont.TorusAlternate.With(size: 16),
|
||||
AlwaysPresent = true,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
@ -75,7 +75,7 @@ namespace osu.Game.Screens.SelectV2.Footer
|
||||
AlwaysPresent = true, // make sure the button is sized large enough to always show this
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
Font = OsuFont.TorusAlternate.With(size: 19),
|
||||
Font = OsuFont.TorusAlternate.With(size: 16),
|
||||
});
|
||||
|
||||
fallingRewind.FadeOutFromOne(fade_time, Easing.In);
|
||||
|
Loading…
Reference in New Issue
Block a user