Пример #1
0
        new public void Update(GameTime gameTime)
        {
            if (Input.DisplayHUD)
            {
                if (BackgroundRectangle.Contains(Input.GesturePosition))
                {
                    if (BackgroundRectangle.Contains(Input.Tap))
                    {
                        foreach (LayerWindowButton button in layerIndexButtons)
                        {
                            if (button.Rect.Contains(Input.Tap))
                            {
                                // We have to set the slider's position to the saved position for this layer.
                                SelectedLayer = button.ID;
                                sliderButton.ChangeXPosition(button.SliderValue - sliderButton.Rect.Location.X);
                            }
                        }
                    }

                    if (Input.Drag.X != 0)
                    {
                        // Change the position of the slider, and then save its position for this layer.
                        ChangeSliderPosition((int)Input.Drag.X);
                        layerIndexButtons[SelectedLayer].SliderValue = sliderButton.Rect.Location.X;
                    }
                }
            }

            base.Update(gameTime);
        }
Пример #2
0
        public void Update(GameTime gameTime)
        {
            if (BackgroundRectangle.Contains(Input.Tap))
            {
                System.Diagnostics.Debug.WriteLine("Exporting.");
                FileExporter.ExportCanvas();
            }

            base.Update(gameTime);
        }
Пример #3
0
        new public void Update(GameTime gameTime)
        {
            if (Input.DisplayHUD)
            {
                if (BackgroundRectangle.Contains(Input.GesturePosition))
                {
                    if (Input.Tap != new Vector2(-1, -1) && BackgroundRectangle.Contains(Input.Tap))
                    {
                        SelectedTile = SelectNewTile(Input.Tap);
                    }

                    if (Input.Drag.Y != 0)
                    {
                        Slide((int)Input.Drag.Y);
                    }
                }
            }

            base.Update(gameTime);
        }