Exemplo n.º 1
0
        protected override void pointerPressed(int x, int y)
        {
            if (uiDialog.Visible)
            {
                uiDialog.TestHit(x, y);
                return;
            }

            switch (State)
            {
            case LeaderboardState.Fill:
                if (btnSubmit.TestHit(x, y))
                {
                    return;
                }

                if (recUsername.Contains(x, y))
                {
                    if (!Guide.IsVisible)
                    {
                        Guide.BeginShowKeyboardInput(PlayerIndex.One,
                                                     Localize.Instance.NameEntry,
                                                     Localize.Instance.EnterName,
                                                     (_username != DEFAULT_NAME) ? _username : "",
                                                     new AsyncCallback(gotName),
                                                     this);
                    }

                    return;
                }
                break;

            case LeaderboardState.View:
                if (y > 134)
                {
                    if (x < 400 && allowLeftTouch)
                    {
                        leftTouching = true;
                        vOffset      = y - (int)vtView7.Y;
                    }
                    else if (allowRightTouch)
                    {
                        rightTouching = true;
                        vOffset       = y - (int)vtViewAll.Y;
                    }
                }
                break;
            }
        }
Exemplo n.º 2
0
        protected override void pointerPressed(int x, int y)
        {
            if (confirmDialog.Visible)
            {
                confirmDialog.TestHit(x, y);
                return;
            }

            if (_state != MenuState.Active)
            {
                return;
            }

            foreach (MenuItem menuItem in menuItems)
            {
                menuItem.TestHit(x, y);
            }
        }
Exemplo n.º 3
0
        protected override void pointerPressed(int x, int y)
        {
            if (uiDialog.Visible)
            {
                uiDialog.TestHit(x, y);
                return;
            }

#if !WP7
            if (!Main.IsPremium && recVersion.Contains(x, y))
            {
                uiDialog.Title       = Localize.Instance.Disclaimer;
                uiDialog.Content     = Localize.Instance.DisclaimerDescription;
                uiDialog.CommandCode = COMMAND_BUY;
                uiDialog.FadeIn(UIDialogType.Message);
                return;
            }
#endif
        }
Exemplo n.º 4
0
        public void TestHit(int x, int y)
        {
            if (confirmDialog.Visible)
            {
                confirmDialog.TestHit(x, y);
                return;
            }

            if (_state != QuickMenuState.Show)
            {
                return;
            }
            btnReset.TestHit(x, y);
            btnSolution.TestHit(x, y);
            btnAbandon.TestHit(x, y);
            btnMain.TestHit(x, y);
        }