Ejemplo n.º 1
0
        public override bool OnBackButton()
        {
            if (client.Room == null)
            {
                // room has not been created yet; exit immediately.
                return(base.OnBackButton());
            }

            if (settingsOverlay.State.Value == Visibility.Visible)
            {
                settingsOverlay.Hide();
                return(true);
            }

            if (!exitConfirmed && dialogOverlay != null)
            {
                dialogOverlay.Push(new ConfirmDialog("Are you sure you want to leave this multiplayer match?", () =>
                {
                    exitConfirmed = true;
                    this.Exit();
                }));

                return(true);
            }

            return(base.OnBackButton());
        }
Ejemplo n.º 2
0
        public override bool OnBackButton()
        {
            if (client.Room != null && settingsOverlay.State.Value == Visibility.Visible)
            {
                settingsOverlay.Hide();
                return(true);
            }

            return(base.OnBackButton());
        }
Ejemplo n.º 3
0
        public override bool OnBackButton()
        {
            if (client.Room == null)
            {
                // room has not been created yet; exit immediately.
                return(base.OnBackButton());
            }

            if (settingsOverlay.State.Value == Visibility.Visible)
            {
                settingsOverlay.Hide();
                return(true);
            }

            return(base.OnBackButton());
        }