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

Moved title and description to each class

This commit is contained in:
Andrey Zavadskiy 2017-04-01 21:42:12 +03:00
parent bd123fa906
commit f70de7439b
5 changed files with 16 additions and 24 deletions

View File

@ -26,8 +26,6 @@ namespace osu.Desktop.VisualTests.Tests
OnResume = () => Logger.Log(@"Resume"),
OnRetry = () => Logger.Log(@"Retry"),
OnQuit = () => Logger.Log(@"Quit"),
Title = @"paused",
Description = @"you're not going to do what i think you're going to do, are ya?",
};
failOverlay = new FailOverlay
@ -35,8 +33,6 @@ namespace osu.Desktop.VisualTests.Tests
Depth = -1,
OnRetry = () => Logger.Log(@"Retry"),
OnQuit = () => Logger.Log(@"Quit"),
Title = @"failed",
Description = @"you're dead, try again?",
};
Add(pauseOverlay);

View File

@ -28,5 +28,11 @@ namespace osu.Game.Screens.Play
AddButton(@"Retry", colours.YellowDark, OnRetry);
AddButton(@"Quit to Main Menu", new Color4(170, 27, 39, 255), OnQuit);
}
public FailOverlay()
{
title = @"failed";
description = @"you're dead, try again?";
}
}
}

View File

@ -27,20 +27,8 @@ namespace osu.Game.Screens.Play
public Action OnRetry;
public Action OnQuit;
private string title;
private string description;
public string Title
{
get { return title; }
set { title = value; }
}
public string Description
{
get { return description; }
set { description = value; }
}
protected string title;
protected string description;
private FillFlowContainer buttons;
@ -143,7 +131,7 @@ namespace osu.Game.Screens.Play
{
new OsuSpriteText
{
Text = Title,
Text = title,
Font = @"Exo2.0-Medium",
Spacing = new Vector2(5, 0),
Origin = Anchor.TopCentre,
@ -155,7 +143,7 @@ namespace osu.Game.Screens.Play
},
new OsuSpriteText
{
Text = Description,
Text = description,
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
Shadow = true,

View File

@ -32,6 +32,12 @@ namespace osu.Game.Screens.Play
AddButton(@"Retry", colours.YellowDark, OnRetry);
AddButton(@"Quit to Main Menu", new Color4(170, 27, 39, 255), OnQuit);
}
public PauseOverlay()
{
title = @"paused";
description = @"you're not going to do what i think you're going to do, are ya?";
}
}
}

View File

@ -131,8 +131,6 @@ namespace osu.Game.Screens.Play
},
OnRetry = Restart,
OnQuit = Exit,
Title = @"paused",
Description = @"you're not going to do what i think you're going to do, are ya?",
};
failOverlay = new FailOverlay
@ -140,8 +138,6 @@ namespace osu.Game.Screens.Play
Depth = -1,
OnRetry = Restart,
OnQuit = Exit,
Title = @"failed",
Description = @"you're dead, try again?",
};