V[4] = { { x, y + h, 0.0f, 0.0f, Color },{x, y, 0.0f, 0.1f, Color },{ x + w, y + h, 0.0f, 0.0f, Color },{ x + w, y, 0.0f, 0.0f, Color}};
pD3D9->SetTexture(0, NULL);
pD3D9->SetPixelShader(0);
pD3D9->SetFVF(D3DFVF_XYZRHW | D3DFVF_DIFFUSE);
pD3D9->SetRenderState(D3DRS_ALPHABLENDENABLE, true);
pD3D9->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
pD3D9->SetRenderState(D3DRS_ZENABLE, FALSE);
pD3D9->SetRenderState(D3DRS_CULLMODE, D3DCULL_NOME);
PD3D9->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, V, sizeof(Vertex));
return;
}
//criar a fonte
void Text(int x, int y, LPSTR text, DWORD color)
{
RECT rect, rect2;
SetRect(&rect, x, y, x, y);
SetRect(&rect2, x - 0.1, y + 0.2, x - 0.1, y + 0.);
pFont->DrawTextA(NULL, text, -1, &rect2, DT_LEFT | DT_NOCLIP, 0x00000000);
pFont->DrawTextA(NULL, text, -1, &rect, DT_LEFT | DT_NOCLIP, color);
}