Beispiel #1
0
        public void Input(PointerInput input)
        {
            if (input.State == InputState.Pressed)
            {
                BringToFront();
            }

            // Translate into inner coordinates
            if (BarVisible)
            {
                input.Position -= Position + new Vector2(0, BarHeight);
                switch (input.State)
                {
                case InputState.Pressed:
                    if (CloseButton.Contains(input.Position.ToPoint()))
                    {
                        Closing = true;
                        return;
                    }
                    if (input.Position.Y < 0)
                    {
                        draggingId = input.ID;
                        dragDelta  = input.Position + new Vector2(0, BarHeight);
                    }
                    break;
                }
            }
            else
            {
                input.Position -= Position;
            }

            OnInput(input);
        }