1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-24 16:07:25 +08:00
osu-lazer/osu.Game/Screens/Multi/RealtimeMultiplayer/CreateRealtimeMatchButton.cs
Bartłomiej Dach 414f886b02 Split timeshift & multiplayer "create" buttons
Multiplayer button gets new, different "Create match" text, and disable
logic in case of a dropped connection to the multiplayer server.
2020-12-23 22:03:57 +01:00

24 lines
726 B
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Online.RealtimeMultiplayer;
using osu.Game.Screens.Multi.Match.Components;
namespace osu.Game.Screens.Multi.RealtimeMultiplayer
{
public class CreateRealtimeMatchButton : PurpleTriangleButton
{
[BackgroundDependencyLoader]
private void load(StatefulMultiplayerClient multiplayerClient)
{
Triangles.TriangleScale = 1.5f;
Text = "Create match";
((IBindable<bool>)Enabled).BindTo(multiplayerClient.IsConnected);
}
}
}