Code:
void cDirectx::FillRGB( int x, int y, int w, int h, DWORD color, IDirect3DDevice9* pDevice )
{
if( w < 0 )w = 1;
if( h < 0 )h = 1;
if( x < 0 )x = 1;
if( y < 0 )y = 1;
D3DRECT rec = { x, y, x + w, y + h };
pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
}
void cDirectx::DrawBorder( int x, int y, int w, int h, int px, DWORD 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 cDirectx::DrawBox( int x, int y, int w, int h, DWORD BoxColor, DWORD BorderColor, IDirect3DDevice9* pDevice )
{
FillRGB( x, y, w, h, BoxColor, pDevice );
DrawBorder( x, y, w, h, 1, BorderColor, pDevice );
}
put that in Globals under DirectX.cpp
Code:
LPD3DXFONT pFont;
LPDIRECT3DDEVICE9 pDevice;
void Hook(void);
void DrawTri(LPDIRECT3DDEVICE9 dev, int x, int y, int w, int h, DWORD Color);
void DrawString( int x, int y, DWORD color, LPD3DXFONT g_pFont, const char *fmt, ...);
void FillRGB( int x, int y, int w, int h, DWORD color, IDirect3DDevice9* pDevice );
void DrawBorder( int x, int y, int w, int h, int px, DWORD BorderColor, IDirect3DDevice9* pDevice );
void DrawBox( int x, int y, int w, int h, DWORD BoxColor, DWORD BorderColor, IDirect3DDevice9* pDevice );
HRESULT GenerateTexture(IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32);
thats basically all the code from the cDirectX class under DirectX.h
Code:
Directx.DrawBox((this->mSet.x),(this->mSet.y),50,100,0xFFBF3EFF,0xFFFF6103,Directx.pDevice);
put that under RenderMenu in Menu.cpp to appear if the menu hotkey is pressed
the numbers for the DrawBox position are basically random since the box never actually appeared CA just crashed