All pastes #742104 Raw Edit

Mine

public text v1 · immutable
·published 2007-10-19 06:59 UTC
rendered paste body
if( Widgets.Count > 0 )
            {
                for( int i = 0; i < Widgets.Count; i++ )
                {
                    Widgets[ i ].UpdateMouse( new Vector2( Frame.X, Frame.Y ), Game.InputManager.MousePositionInGame );
                }
            }

            if
                (
                IsDraggableFrom( Game.InputManager.MouseDownFromInGame ) &&
                IsDraggableFrom( Game.InputManager.MousePositionInGame ) &&
                Game.InputManager.MouseButtonsDown == System.Windows.Forms.MouseButtons.Left
                )

                IsDragging = true;

            MouseDelta = Game.InputManager.MousePositionInGame - MousePreviousPosition;

            //  We don't want to be able to drag the window while click close or minimize.
            for( int i = 0; i < Widgets.Count; i++ )
            {
                if(
                    Widgets[ i ].IsMouseOver
                  )
                    IsDragging = false;
            }