Hello guys,
Im sorry for bothering.
But im
tryingto code D3D9.
now im trying to put a drawbox with rectangle around my menu.
Now i use the follow code to do that ->
Code:
DrawBox(x-3,((y-2)+(titleheight)),totwidth+6,((totheight+4)-(titleheight)),D3DCOLOR_ARGB(125,183,0,0),D3DCOLOR_ARGB(255, 255, 0,0),pDev);
Now if i compile this into my base i got the following errors:
Code:
1>.\d3dmenu.cpp(115) : error C2065: 'titleheight' : undeclared identifier
1>.\d3dmenu.cpp(115) : error C2065: 'totwidth' : undeclared identifier
1>.\d3dmenu.cpp(115) : error C2065: 'totheight' : undeclared identifier
1>.\d3dmenu.cpp(115) : error C2065: 'titleheight' : undeclared identifier
Im using this Menu:
Code:
class D3D9Menu
{
public:
D3D9Menu(char *Title = 0)
{
Mtitle=Title;
Mpos=0;
Mmax=0;
Mxofs =150.0f;
Mysize=15.0f;
Mvisible=1;
MENU=(tMENU **)malloc(4*MENUMAXITEMS);
for (int i=0; i<MENUMAXITEMS; i++) MENU[i]=(tMENU *)malloc(sizeof(tMENU));
}
~D3D9Menu() {
for (int i=0; i<MENUMAXITEMS; i++) free(MENU[i]);
free(MENU);
}
int Mmax;
tMENU **MENU;
void AddItem(char *txt, char **opt, int *var, int maxvalue);
void AddFolder(char *txt, char **opt, int *var, int maxvalue);
void AddCategory(char *txt, char **opt, int *var, int maxvalue);
void MenuShow(float x, float y, ID3DXFont* pFont1, LPDIRECT3DDEVICE9 pDevice);
void AddText (char *txt, char *opt="");
void MenuNav(void);
void DrawTextR(int x,int y,DWORD color,char *text, ID3DXFont* pFont1);
void DrawTextL(int x,int y,DWORD color,char *text, ID3DXFont* pFont1);
void DrawTextC(int x,int y,DWORD color,char *text, ID3DXFont* pFont1);
private:
char *Mtitle;
int Mpos;
float Mxofs;
float Mysize;
int Mvisible;
int YPOS;
};
#endif
ive been trying to fix this for hours, but i cant seem to figure out wich of those ones i should replace with "'totwidth","'totheight",..
Thanks for helping.