1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 05:52:54 +08:00

Merge pull request #2672 from DrabWeb/multiplayer-screen-type

Add Type property to MultiplayerScreen
This commit is contained in:
Dean Herbert 2018-05-31 11:42:33 +09:00 committed by GitHub
commit 5d103a0088
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 5 deletions

View File

@ -20,7 +20,7 @@ namespace osu.Game.Screens.Multi
{
public const float HEIGHT = 121;
private readonly OsuSpriteText screenTitle;
private readonly OsuSpriteText screenType;
private readonly HeaderBreadcrumbControl breadcrumbs;
public Header(Screen initialScreen)
@ -67,7 +67,7 @@ namespace osu.Game.Screens.Multi
Text = "multiplayer ",
TextSize = 25,
},
screenTitle = new OsuSpriteText
screenType = new OsuSpriteText
{
TextSize = 25,
Font = @"Exo2.0-Light",
@ -86,14 +86,14 @@ namespace osu.Game.Screens.Multi
},
};
breadcrumbs.Current.ValueChanged += s => screenTitle.Text = ((MultiplayerScreen)s).Title;
breadcrumbs.Current.ValueChanged += s => screenType.Text = ((MultiplayerScreen)s).Type.ToLower();
breadcrumbs.Current.TriggerChange();
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
screenTitle.Colour = colours.Yellow;
screenType.Colour = colours.Yellow;
breadcrumbs.StripColour = colours.Green;
}

View File

@ -25,7 +25,7 @@ namespace osu.Game.Screens.Multi.Screens.Lounge
protected readonly FillFlowContainer<DrawableRoom> RoomsContainer;
protected readonly RoomInspector Inspector;
public override string Title => "lounge";
public override string Title => "Lounge";
protected override Container<Drawable> TransitionContent => content;

View File

@ -15,6 +15,11 @@ namespace osu.Game.Screens.Multi.Screens
protected virtual Container<Drawable> TransitionContent => Content;
/// <summary>
/// The type to display in the title of the <see cref="Header"/>.
/// </summary>
public virtual string Type => Title;
protected override void OnEntering(Screen last)
{
base.OnEntering(last);