void ShowMenu(LPDIRECT3DDEVICE9 pDevice);
bool MouseRegion(int x1, int y1, int x2, int y2);
void MenuItem(int i, char text[], int MX, int MY, LPDIRECT3DDEVICE9 pDevice);
void ArrowMenuItem(int i, char **text, int MX, int MY, int choices, LPDIRECT3DDEVICE9 pDevice);
};
[highlight=cpp]
void cDirectx::PrintText(LPD3DXFONT Font, long x, long y, D3DCOLOR fontColor, char *text, ...)//Draw Text Function
{
RECT rct;
rct.left = x - 1;
rct.right = x + 1;
rct.top = y - 1 ;
rct.bottom = y + 1;
[highlight=cpp]
void cDirectx::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 cDirectx:rawBorder(float x, float y, float w, float h, int thick, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice)
{
Directx.FillRGB( x, (y + h - thick), w, thick, BorderColor, pDevice);
Directx.FillRGB( x, y, thick, h, BorderColor, pDevice);
Directx.FillRGB( x, y, w, thick, BorderColor, pDevice);
Directx.FillRGB( (x + w - thick), y, thick, h, BorderColor, pDevice);
}
void cDirectx:rawBox( int x, int y, int w, int h, D3DCOLOR BoxColor, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
{
Directx.FillRGB( x, y, w, h, BoxColor, pDevice );
Directx.DrawBorder( x, y, w, h, 1, BorderColor, pDevice );
}
[/highlight]
Items in examples in Main.cpp (Must be called in Present / EndScene):