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:
commit
5d103a0088
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user