public Multiplayer() { Anchor = Anchor.Centre; Origin = Anchor.Centre; RelativeSizeAxes = Axes.Both; InternalChild = waves = new MultiplayerWaveContainer { RelativeSizeAxes = Axes.Both, }; screenStack = new ScreenStack(loungeSubScreen = new LoungeSubScreen(pushGameplayScreen)) { RelativeSizeAxes = Axes.Both }; Padding = new MarginPadding { Horizontal = -OsuScreen.HORIZONTAL_OVERFLOW_PADDING }; waves.AddRange(new Drawable[] { new Container { RelativeSizeAxes = Axes.Both, Masking = true, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = OsuColour.FromHex(@"3e3a44"), }, new Triangles { RelativeSizeAxes = Axes.Both, ColourLight = OsuColour.FromHex(@"3c3842"), ColourDark = OsuColour.FromHex(@"393540"), TriangleScale = 5, }, }, }, new Container { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Top = Header.HEIGHT }, Child = screenStack }, new Header(screenStack), createButton = new HeaderButton { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, RelativeSizeAxes = Axes.None, Size = new Vector2(150, Header.HEIGHT - 20), Margin = new MarginPadding { Top = 10, Right = 10 + OsuScreen.HORIZONTAL_OVERFLOW_PADDING, }, Text = "Create room", Action = () => loungeSubScreen.Open(new Room { Name = { Value = $"{api.LocalUser}'s awesome room" } }), }, roomManager = new RoomManager() }); screenStack.ScreenPushed += screenPushed; screenStack.ScreenExited += screenExited; }
public Multiplayer() { Child = waves = new MultiplayerWaveContainer { RelativeSizeAxes = Axes.Both, }; Padding = new MarginPadding { Horizontal = -HORIZONTAL_OVERFLOW_PADDING }; waves.AddRange(new Drawable[] { new Container { RelativeSizeAxes = Axes.Both, Masking = true, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = OsuColour.FromHex(@"3e3a44"), }, new Triangles { RelativeSizeAxes = Axes.Both, ColourLight = OsuColour.FromHex(@"3c3842"), ColourDark = OsuColour.FromHex(@"393540"), TriangleScale = 5, }, }, }, new Container { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Top = Header.HEIGHT }, Child = loungeSubScreen = new LoungeSubScreen(Push), }, new Header(loungeSubScreen), createButton = new HeaderButton { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, RelativeSizeAxes = Axes.None, Size = new Vector2(150, Header.HEIGHT - 20), Margin = new MarginPadding { Top = 10, Right = 10 + HORIZONTAL_OVERFLOW_PADDING, }, Text = "Create room", Action = () => loungeSubScreen.Push(new Room { Name = { Value = $"{api.LocalUser}'s awesome room" } }), }, roomManager = new RoomManager() }); screenAdded(loungeSubScreen); loungeSubScreen.Exited += _ => Exit(); }