Move out sizing logic to multiplayer screen

This commit is contained in:
Bartłomiej Dach 2020-12-23 21:50:29 +01:00
parent 05d9f23762
commit c13acb609a
2 changed files with 7 additions and 12 deletions

View File

@ -2,24 +2,12 @@
// 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()
{

View File

@ -22,6 +22,7 @@ using osu.Game.Screens.Multi.Lounge;
using osu.Game.Screens.Multi.Lounge.Components;
using osu.Game.Screens.Multi.Match;
using osu.Game.Users;
using osuTK;
namespace osu.Game.Screens.Multi
{
@ -131,6 +132,12 @@ namespace osu.Game.Screens.Multi
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
Size = new Vector2(150, Header.HEIGHT - 20),
Margin = new MarginPadding
{
Top = 10,
Right = 10 + HORIZONTAL_OVERFLOW_PADDING,
},
Action = () => OpenNewRoom()
},
RoomManager = CreateRoomManager()