Code:
//Circle Crosshair with out an Action Button
void DrawCircle(int X, int Y, int radius, int numSides, DWORD Color)
{
DrawCircle(CenterX,CenterY,8,8,Red);
D3DXVECTOR2 Line[128];
float Step = PI * 2.0 / numSides;
int Count = 0;
for (float a=0; a < PI*2.0; a += Step)
{
float X1 = radius * cos(a) + X;
float Y1 = radius * sin(a) + Y;
float X2 = radius * cos(a+Step) + X;
float Y2 = radius * sin(a+Step) + Y;
Line[Count].x = X1;
Line[Count].y = Y1;
Line[Count+1].x = X2;
Line[Count+1].y = Y2;
Count += 2;
}
pLine->Begin();
pLine->Draw(Line,Count,Color);
pLine->End();
}
I've had to rearrange the code a little for it to work with it but, I can't seem to find out how to make it show the crosshair when I turn test1 on...
I've tried,
Code:
//Circle Crosshair with out an Action Button
void DrawCircle(int X, int Y, int radius, int numSides, DWORD Color)
{
if (test1 == 1)
DrawCircle(CenterX,CenterY,8,8,Red);
D3DXVECTOR2 Line[128];
float Step = PI * 2.0 / numSides;
int Count = 0;
for (float a=0; a < PI*2.0; a += Step)
{
float X1 = radius * cos(a) + X;
float Y1 = radius * sin(a) + Y;
float X2 = radius * cos(a+Step) + X;
float Y2 = radius * sin(a+Step) + Y;
Line[Count].x = X1;
Line[Count].y = Y1;
Line[Count+1].x = X2;
Line[Count+1].y = Y2;
Count += 2;
}
pLine->Begin();
pLine->Draw(Line,Count,Color);
pLine->End();
}
But still nothing, I know this might be a dumb question but I don't care can someone care to help me?