mirror of
https://github.com/ppy/osu
synced 2024-12-28 01:42:57 +00:00
Remove duplicate back button class
This commit is contained in:
parent
8b285f5b1e
commit
0a391d5c4e
@ -1,64 +0,0 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Localisation;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Footer
|
||||
{
|
||||
public partial class BackButtonV2 : 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 BackButtonV2()
|
||||
: base(BUTTON_WIDTH, 70)
|
||||
{
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
ButtonContent.Child = new FillFlowContainer
|
||||
{
|
||||
X = -10f,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(20f, 0f),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SpriteIcon
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(20f),
|
||||
Icon = FontAwesome.Solid.ChevronLeft,
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Font = OsuFont.TorusAlternate.With(size: 20 * torus_scale_factor),
|
||||
Text = CommonStrings.Back,
|
||||
UseFullGlyphHeight = false,
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
DarkerColour = Color4Extensions.FromHex("#DE31AE");
|
||||
LighterColour = Color4Extensions.FromHex("#FF86DD");
|
||||
TextColour = Color4.White;
|
||||
}
|
||||
}
|
||||
}
|
@ -28,7 +28,7 @@ namespace osu.Game.Screens.Footer
|
||||
|
||||
private readonly List<OverlayContainer> overlays = new List<OverlayContainer>();
|
||||
|
||||
private BackButtonV2 backButton = null!;
|
||||
private ScreenBackButton backButton = null!;
|
||||
private FillFlowContainer<ScreenFooterButton> buttonsFlow = null!;
|
||||
private Container<ScreenFooterButton> removedButtonsContainer = null!;
|
||||
private LogoTrackingContainer logoTrackingContainer = null!;
|
||||
@ -71,7 +71,7 @@ namespace osu.Game.Screens.Footer
|
||||
Spacing = new Vector2(7, 0),
|
||||
AutoSizeAxes = Axes.Both
|
||||
},
|
||||
backButton = new BackButtonV2
|
||||
backButton = new ScreenBackButton
|
||||
{
|
||||
Margin = new MarginPadding { Bottom = 10f, Left = 12f },
|
||||
Anchor = Anchor.BottomLeft,
|
||||
|
Loading…
Reference in New Issue
Block a user