All pastes #765477 Raw Edit

Untitled

public cpp v1 · immutable
·published 2007-11-08 01:49 UTC
rendered paste body
	void HandleWindowMovement( void )	{		if( !m_bIsActive )return;		if( m_mouse.m_bIsRightClicked )		{			for( int i = 0; i < ( int )vGuiWindows.size( ); i++ )			{				if( m_bIsDraggingWindow && m_iDraggingWindow != i )					continue;				if( m_mouse.x >= vGuiWindows[ i ].entire_window.left_x		&&					m_mouse.x <= vGuiWindows[ i ].entire_window.right_x		&&										m_mouse.y <= vGuiWindows[ i ].entire_window.bottom_y	&&					m_mouse.y >= vGuiWindows[ i ].entire_window.top_y )				{					m_bIsDraggingWindow = true;					m_iDraggingWindow = i;					vGuiWindows[ i ].x = ( m_mouse.x - 20 );					vGuiWindows[ i ].y = ( m_mouse.y - 20 );					vGuiWindows[ i ].entire_window.left_x =	vGuiWindows[ i ].x;					vGuiWindows[ i ].entire_window.right_x = ( vGuiWindows[ i ].x + vGuiWindows[ i ].width );					vGuiWindows[ i ].entire_window.top_y = vGuiWindows[ i ].y;					vGuiWindows[ i ].entire_window.bottom_y = ( vGuiWindows[ i ].y + vGuiWindows[ i ].height );				}			}		}		m_bIsDraggingWindow = false;	}