mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Split class out
This commit is contained in:
@ -9,6 +9,7 @@ using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Multiplayer.GameTypes;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osuTK;
|
||||
|
||||
|
@ -10,6 +10,7 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Multiplayer.GameTypes;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Screens.Multi.Match.Components;
|
||||
@ -22,7 +23,7 @@ namespace osu.Game.Screens.Multi.Match
|
||||
public class MatchScreen : MultiplayerScreen
|
||||
{
|
||||
public override bool AllowBeatmapRulesetChange => false;
|
||||
public override string Title => room.Name.Value;
|
||||
public override string Title => room.RoomID.Value == null ? "New room" : room.Name.Value;
|
||||
public override string ShortTitle => "room";
|
||||
|
||||
private readonly RoomBindings bindings = new RoomBindings();
|
||||
|
@ -10,6 +10,7 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Backgrounds;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Overlays.BeatmapSet.Buttons;
|
||||
using osu.Game.Screens.Menu;
|
||||
@ -34,6 +35,9 @@ namespace osu.Game.Screens.Multi
|
||||
[Cached(Type = typeof(IRoomManager))]
|
||||
private RoomManager roomManager;
|
||||
|
||||
[Resolved]
|
||||
private APIAccess api { get; set; }
|
||||
|
||||
public Multiplayer()
|
||||
{
|
||||
Child = waves = new MultiplayerWaveContainer
|
||||
@ -82,13 +86,14 @@ namespace osu.Game.Screens.Multi
|
||||
Right = 10,
|
||||
},
|
||||
Text = "Create room",
|
||||
Action = () => loungeScreen.Open(new Room())
|
||||
Action = () => loungeScreen.Open(new Room
|
||||
{
|
||||
Name = { Value = $"{api.LocalUser}'s awesome room" }
|
||||
}),
|
||||
},
|
||||
roomManager = new RoomManager()
|
||||
});
|
||||
|
||||
screenAdded(loungeScreen);
|
||||
|
||||
loungeScreen.Exited += s => Exit();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user