Code:
void FillRGB( int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* pDevice )
{
D3DRECT rec = { x, y, x + w, y + h };
pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
}
void DrawBorder( int x, int y, int w, int h, int px, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
{
FillRGB( x, (y + h - px), w, px, BorderColor, pDevice );
FillRGB( x, y, px, h, BorderColor, pDevice );
FillRGB( x, y, w, px, BorderColor, pDevice );
FillRGB( (x + w - px), y, px, h, BorderColor, pDevice );
}
void DrawBox( int x, int y, int w, int h,int px, D3DCOLOR BoxColor, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
{
FillRGB( x, y, w, h, BoxColor, pDevice );
DrawBorder( x, y, w, h, px, BorderColor, pDevice );
}
VOID DrawText(LPDIRECT3DDEVICE9 pDevice, INT x, INT y, DWORD color, CHAR *text)
{
RECT rect;
SetRect(&rect, x, y, x, y);
Directx_Font->DrawText(NULL, text, -1, &rect, DT_LEFT | DT_NOCLIP, color);
}
Then This:
Code:
int MenuX = 200;
int MenuY = 200;
int MenuH = 200;
int MenuW = 200;
#define White D3DCOLOR_ARGB (255,255,255,255)
#define Black D3DCOLOR_ARGB (255,0,0,0)
#define Red D3DCOLOR_ARGB (255,255,0,0)
if(menu){//Might have to change this.
DrawBox(MenuX, MenuY, MenuH, MenuW, White, Black, pDevice)//White is the box fill, Black is the Border Color
DrawText(pDevice, MenuX + 10, MenuY + 10, Red, "OBrozz Hack")
}