All pastes #994066 Raw Edit

Someone

public text v1 · immutable
#994066 ·published 2008-04-23 02:32 UTC
rendered paste body
//Globals For Moving
float Radar_X_Diff, Radar_Y_Diff, x, y, w, h;
bool IsRadarMoving		= false;
bool GotRadarCoords		= false;


VOID DrawRadar( )
{
	//Radar Coords
	if( !GotRadarCoords )
	{
		x = ( ScreenW / 6.0f ) * 4.75f;
		y = ( ScreenH / 6.0f ) / 3.0f;

		GotRadarCoords = true;
	}
	w = ( ScreenW / 5.0f );
	h = ( ScreenH / 4.5f );

	//If It's Not Moving, Get The Coords
	if( IsRadarMoving )
	{
		x = CursorX - Radar_X_Diff;
		y = CursorY - Radar_Y_Diff;
	}


//DO YOUR RADAR CODE HERE

//AFTER RADAR CODE

        //Set It To Not Moving
	IsRadarMoving = false;

	//Is The Radar Clicked on
	if( CursorOnButton( CursorX, CursorY, x, y, w, h ) && GetAsyncKeyState( VK_LBUTTON ) )
	{
		Radar_X_Diff = CursorX - x;
		Radar_Y_Diff = CursorY - y;

		IsRadarMoving = true;
	}
}