Beispiel #1
0
 public OngoingOperation(OngoingOperationTracker tracker, LeasedBindable <bool> lease)
 {
     this.tracker = tracker;
     this.lease   = lease;
 }
Beispiel #2
0
        protected OnlinePlayScreen()
        {
            Anchor           = Anchor.Centre;
            Origin           = Anchor.Centre;
            RelativeSizeAxes = Axes.Both;
            Padding          = new MarginPadding {
                Horizontal = -HORIZONTAL_OVERFLOW_PADDING
            };

            var backgroundColour = Color4Extensions.FromHex(@"3e3a44");

            InternalChild = waves = new MultiplayerWaveContainer
            {
                RelativeSizeAxes = Axes.Both,
                Children         = new Drawable[]
                {
                    new Box
                    {
                        RelativeSizeAxes = Axes.Both,
                        Colour           = backgroundColour,
                    },
                    new Container
                    {
                        RelativeSizeAxes = Axes.Both,
                        Padding          = new MarginPadding {
                            Top = Header.HEIGHT
                        },
                        Children = new[]
                        {
                            header = new Container
                            {
                                RelativeSizeAxes = Axes.X,
                                Height           = 400,
                                Children         = new[]
                                {
                                    headerBackground = new Container
                                    {
                                        RelativeSizeAxes = Axes.Both,
                                        Width            = 1.25f,
                                        Masking          = true,
                                        Children         = new Drawable[]
                                        {
                                            new HeaderBackgroundSprite
                                            {
                                                RelativeSizeAxes = Axes.X,
                                                Height           = 400 // Keep a static height so the header doesn't change as it's resized between subscreens
                                            },
                                        }
                                    },
                                    new Container
                                    {
                                        RelativeSizeAxes = Axes.Both,
                                        Padding          = new MarginPadding {
                                            Bottom = -1
                                        },                                           // 1px padding to avoid a 1px gap due to masking
                                        Child = new Box
                                        {
                                            RelativeSizeAxes = Axes.Both,
                                            Colour           = ColourInfo.GradientVertical(backgroundColour.Opacity(0.5f), backgroundColour)
                                        },
                                    }
                                }
                            },
                            screenStack = new OnlinePlaySubScreenStack {
                                RelativeSizeAxes = Axes.Both
                            }
                        }
                    },
                    new Header(ScreenTitle, screenStack),
                    createButton = CreateNewMultiplayerGameButton().With(button =>
                    {
                        button.Anchor = Anchor.TopRight;
                        button.Origin = Anchor.TopRight;
                        button.Size   = new Vector2(150, Header.HEIGHT - 20);
                        button.Margin = new MarginPadding
                        {
                            Top   = 10,
                            Right = 10 + HORIZONTAL_OVERFLOW_PADDING,
                        };
                        button.Action = () => OpenNewRoom();
                    }),
                    RoomManager             = CreateRoomManager(),
                    ongoingOperationTracker = new OngoingOperationTracker()
                }
            };

            screenStack.ScreenPushed += screenPushed;
            screenStack.ScreenExited += screenExited;

            screenStack.Push(loungeSubScreen = CreateLounge());
        }