❓ [Help] background in gellins base ?

Posts 1–7 of 7 · Page 1 of 1
❓ [Help] background in gellins base ?
Hi
how to add background in gellins base ?
tank for help
DrawBox((this->mSet.x - 5), (this->mSet.y - 10), 154, 356, D3DCOLOR_ARGB(255,0,0,0), D3DCOLOR_ARGB(255,0,255,0), pDevice);
idk if he want a picture background or not. if not use DrawBox

if you want picture use Sprites
:s errors please help my
#include "Menu.h"

#define Red D3DCOLOR_ARGB (255 , 255 , 0 , 0 )
#define Yellow D3DCOLOR_ARGB (255 , 255 , 255 , 0 )
#define Green D3DCOLOR_ARGB (255 , 0 , 255 , 0 )
#define Blue D3DCOLOR_ARGB (255 , 0 , 0 , 255 )
#define Purple D3DCOLOR_ARGB (255 , 102 , 0 , 153 )
#define Pink D3DCOLOR_ARGB (255 , 255 , 20 , 147 )
#define Orange D3DCOLOR_ARGB (255 , 255 , 165 , 0 )
#define Black D3DCOLOR_ARGB (255 , 0 , 0 , 0 )
#define White D3DCOLOR_ARGB (255 , 255 , 255 , 255 )

char Mtitle[81]="EasyCheat by Azerty54";
int Mpos=0;
int Mmax=0;
int Mxofs =160;
int Mysize=14;
int Mvisible=0;
int whatever;


char *Opt_Folder[] = { "-" , "+" };
char *Opt_on_off[] = { "Off","On" };


RECT rect;
RECT rect2;
RECT rect3;
struct {
int typ;
char *txt;
char **opt;
int *var;
int maxvalue;
} MENU[MENUMAXITEMS];

cMenu Menu;

void cMenu::AddItem(char *txt, char **opt, int *var, int maxvalue, int typ)
{
MENU[Mmax].typ=typ;
MENU[Mmax].txt=txt;
MENU[Mmax].opt=opt;
MENU[Mmax].var=var;
MENU[Mmax].maxvalue=maxvalue;
Mmax++;
whatever=(Mmax*Mysize);
}

DrawBox(20,200,170,whatever,D3D color,pDevice);





void cMenu::MenuShow(int x, int y, ID3DXFont *pFont)
{

int i, val;
DWORD color;
SetRect( &rect, x+Mxofs/2, y, x+Mxofs /2 , y );
if (!Mvisible) return;

if (Mtitle[0]) {

pFont->DrawTextA(NULL,Mtitle,-1,&rect,DT_NOCLIP | DT_CENTER, MCOLOR_TITLE);

y+=Mysize;
}
for (i=0; i<Mmax; i++) {
val=(MENU[i].var)?(*MENU[i].var):0;

if (i==Mpos)
color=Green;
else if (MENU[i].typ==MENUFOLDER)
color=Blue;
else if (MENU[i].typ==MENUTEXT)
color=Black;
else
color=(val)?Orange:MCOLOR_INACTIVE;
SetRect( &rect3, x, y, x , y );
SetRect( &rect2, x+Mxofs, y, x+Mxofs , y );
pFont->DrawText(NULL,MENU[i].txt,-1,&rect3, DT_NOCLIP,color);
if (MENU[i].opt) {
if (MENU[i].typ==MENUTEXT)
pFont->DrawText(NULL,(char *)MENU[i].opt,-1,&rect2, DT_NOCLIP | DT_RIGHT, color);
else
pFont->DrawText(NULL,(char *)MENU[i].opt[val],-1,&rect2, DT_NOCLIP | DT_RIGHT, color);
}
y+=Mysize;
}
}

void cMenu::MenuNav(void)
{
if (GetAsyncKeyState(VK_INSERT)&1) Mvisible=(!Mvisible);
if (!Mvisible) return;

if (GetAsyncKeyState(VK_UP)&1) {
do {
Mpos--;
if (Mpos<0) Mpos=Mmax-1;
} while (MENU[Mpos].typ==MENUTEXT);
} else if (GetAsyncKeyState(VK_DOWN)&1) {
do {
Mpos++;
if (Mpos==Mmax) Mpos=0;
} while (MENU[Mpos].typ==MENUTEXT);
} else if (MENU[Mpos].var) {
int dir=0;
// bugfix: thx to ***-Wieter20
if (GetAsyncKeyState(VK_LEFT )&1 && *MENU[Mpos].var > 0 ) dir=-1;
if (GetAsyncKeyState(VK_RIGHT)&1 && *MENU[Mpos].var < (MENU[Mpos].maxvalue-1)) dir=1;
if (dir) {
*MENU[Mpos].var += dir;
if (MENU[Mpos].typ==MENUFOLDER) Mmax=0;
}
}
}
Error = Drawbox
1> Menu.cpp (20): error C2086: 'int whatever': redefinition
1> c: \ users \ fortdur \ Desktop \ hans & Gellin combined basis \ basket \ Menu.h (16): see declaration of 'whatever'
1> Menu.cpp (52): error C2065: 'd3d': undeclared identifier
1> Menu.cpp (52): error C2146: syntax error: missing ')' before identifier 'color'
1> Menu.cpp (52): error C4430: missing type specifier - int is taken into account by default. Note: C + + does not support default int
1> Menu.cpp (52): error C2078: too many initializers
1> Menu.cpp (52): error C2059: syntax error: ')'
========== Build: 0 succeeded, 1 failed, 0 updated, 0 skipped ==========
Quote Originally Posted by azerty54 View Post
:s errors please help my


Error = Drawbox
your supposed to be able to fix these on your own.
lol, you just threw in the call for DrawBox under a random void function.
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us