1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 11:53:21 +08:00

Rename PopupScreenTitle to ShearedOverlayHeader

This commit is contained in:
Dean Herbert 2022-04-20 15:50:57 +09:00
parent 8d31b0bc01
commit 1032dc235d
3 changed files with 11 additions and 11 deletions

View File

@ -10,19 +10,19 @@ using osu.Game.Overlays;
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public class TestScenePopupScreenTitle : OsuTestScene
public class TestSceneShearedOverlayHeader : OsuTestScene
{
[Cached]
private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Green);
[Test]
public void TestPopupScreenTitle()
public void TestShearedOverlayHeader()
{
AddStep("create content", () =>
{
Child = new PopupScreenTitle
Child = new ShearedOverlayHeader
{
Title = "Popup Screen Title",
Title = "Sheared overlay header",
Description = string.Join(" ", Enumerable.Repeat("This is a description.", 20)),
Close = () => { }
};
@ -34,9 +34,9 @@ namespace osu.Game.Tests.Visual.UserInterface
{
AddStep("create content", () =>
{
Child = new PopupScreenTitle
Child = new ShearedOverlayHeader
{
Title = "Popup Screen Title",
Title = "Sheared overlay header",
Description = "This is a description."
};
});

View File

@ -19,7 +19,7 @@ using osuTK;
namespace osu.Game.Graphics.UserInterface
{
public class PopupScreenTitle : CompositeDrawable
public class ShearedOverlayHeader : CompositeDrawable
{
public const float HEIGHT = main_area_height + 2 * corner_radius;
@ -50,7 +50,7 @@ namespace osu.Game.Graphics.UserInterface
private readonly OsuTextFlowContainer descriptionText;
private readonly IconButton closeButton;
public PopupScreenTitle()
public ShearedOverlayHeader()
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;

View File

@ -22,7 +22,7 @@ namespace osu.Game.Overlays.Mods
/// <summary>
/// The overlay's header.
/// </summary>
protected PopupScreenTitle Header { get; private set; }
protected ShearedOverlayHeader Header { get; private set; }
/// <summary>
/// The overlay's footer.
@ -68,7 +68,7 @@ namespace osu.Game.Overlays.Mods
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
Header = new PopupScreenTitle
Header = new ShearedOverlayHeader
{
Anchor = Anchor.TopCentre,
Depth = float.MinValue,
@ -82,7 +82,7 @@ namespace osu.Game.Overlays.Mods
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding
{
Top = PopupScreenTitle.HEIGHT,
Top = ShearedOverlayHeader.HEIGHT,
Bottom = footer_height,
}
},