Im working on a drawtab function to speed things up a little when i'm making my hack
Ive got this:
Code:
void Drawtab( bool selected, int x, int y, int w, int h, D3DCOLOR tabcolor, D3DCOLOR Borderoff, D3DCOLOR Borderon, IDirect3DDevice9* pDevice )
{
POINT cPos;
GetCursorPos(&cPos);
if(cPos.x > x && cPos.x < w && cPos.y > y && cPos.y < h)
{
if(GetAsyncKeyState(VK_LBUTTON)<0)
{
selected = true;
}
if(GetAsyncKeyState(VK_RBUTTON)<0)
{
selected = false;
}
}
if(selected)
{
DrawBox(x,y,w,h,tabcolor ,Borderon,pDevice);
}
else
{
DrawBox(x,y,w,h,tabcolor ,Borderoff,pDevice);
}
}
Im using it like this:
Code:
if(menu)
{
Drawtab(false, 60,80,76,56,Orange ,White, Green, pDevice);
}
When i click it, the border doesn't change colors...
I know i screwed up somewhere obvious, dont tell me the code i need to change, just tell me where i went wrong...
Thanks in advance.