mirror of
https://github.com/ppy/osu.git
synced 2025-03-18 23:57:22 +08:00
Move out create room button to separate class
This commit is contained in:
parent
3087aba5bc
commit
05d9f23762
31
osu.Game/Screens/Multi/CreateRoomButton.cs
Normal file
31
osu.Game/Screens/Multi/CreateRoomButton.cs
Normal file
@ -0,0 +1,31 @@
|
||||
// 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.Graphics;
|
||||
using osu.Game.Screens.Multi.Match.Components;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi
|
||||
{
|
||||
public class CreateRoomButton : PurpleTriangleButton
|
||||
{
|
||||
public CreateRoomButton()
|
||||
{
|
||||
Size = new Vector2(150, Header.HEIGHT - 20);
|
||||
Margin = new MarginPadding
|
||||
{
|
||||
Top = 10,
|
||||
Right = 10 + OsuScreen.HORIZONTAL_OVERFLOW_PADDING,
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Triangles.TriangleScale = 1.5f;
|
||||
|
||||
Text = "Create room";
|
||||
}
|
||||
}
|
||||
}
|
@ -21,9 +21,7 @@ using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Screens.Multi.Lounge;
|
||||
using osu.Game.Screens.Multi.Lounge.Components;
|
||||
using osu.Game.Screens.Multi.Match;
|
||||
using osu.Game.Screens.Multi.Match.Components;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi
|
||||
{
|
||||
@ -332,26 +330,5 @@ namespace osu.Game.Screens.Multi
|
||||
protected override double TransformDuration => 200;
|
||||
}
|
||||
}
|
||||
|
||||
public class CreateRoomButton : PurpleTriangleButton
|
||||
{
|
||||
public CreateRoomButton()
|
||||
{
|
||||
Size = new Vector2(150, Header.HEIGHT - 20);
|
||||
Margin = new MarginPadding
|
||||
{
|
||||
Top = 10,
|
||||
Right = 10 + HORIZONTAL_OVERFLOW_PADDING,
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Triangles.TriangleScale = 1.5f;
|
||||
|
||||
Text = "Create room";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user