how do i work out the center of the screen so i can space those cordinates for the vertexbuffer,etc these values so this button will be center of the screen and how would i give some control to this button such as mouse clicking on it,thanks if you can help...
the below code is for directx 9
// create the vertices using the CUSTOMVERTEX struct
CUSTOMVERTEX vertices[] =
{
//Triangle 1
{ 150.0f, 400.5f, -5.5f, //xyz screenspace
0, 1, //textures coords
1.0f }, //rhw
// D3DCOLOR_XRGB(0, 0, 255), }, //diffuse blue
{ 325.0f, 500.0f, -5.5f, //xyz screenspace
1, 1, //textures coords
1.0f }, //rhw
//D3DCOLOR_XRGB(0, 255, 0), }, //diffuse green
{ 150.0f, 500.0f, -5.5f, //xyz screenspace
1, 0, //textures coords
1.0f }, //rhw
//D3DCOLOR_XRGB(255, 0, 0), }, //diffuse red
//Triangle 2
{ 325.0f, 500.0f, -5.5f, //xyz screenspace
1, 0, //textures coords
1.0f }, //rhw
//D3DCOLOR_XRGB(0, 255, 0), }, //diffuse green
{ 150.0f, 400.5f, -5.5f, //xyz screenspace
0, 0, //textures coords
1.0f }, //rhw
//D3DCOLOR_XRGB(0, 0, 255), }, //diffuse blue
{ 325.0f, 400.5f, -5.5f, //xyz screenspace
0, 1, //textures coords
1.0f }, //rhw
//D3DCOLOR_XRGB(255, 0, 0), }, //diffuse red
};