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

View File

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

View File

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