NewCories (03-12-2011),rodolfgonzales4 (11-30-2010),the grim reaper (11-30-2010),ultahackers (11-29-2010)
Information ==========
- This menu click is mostly for Hans+Gellins Base in which Whit made!
- I haven't released much so here is something.
- This is for advanced coders only
Source =============
Menu.cpp
- We are going to use isMouseinRegion thanks to IcySeal
[php]bool isMouseinRegion(POINT cPos, int x1, int y1, int x2, int y2)
{
if(cPos.x > x1 && cPos.x < x2 && cPos.y > y1 && cPos.y < y2){
return true;
} else {
return false;
}
}[/php]
- Now we use this MenuClick made by me
[php]bool cMenu::MenuClick(int x, int y, int width, POINT loc)
{
int i;
if (Mtitle[0]) {
y+=(Mysize*2);
}
for (i=0; i<Mmax; i++) {
int val=(MENU[i].var)?(*MENU[i].var):0;
if (isMouseinRegion(loc, x, y, x+width, y+Mysize)) {
// do operation
Mpos = i;
if (*MENU[Mpos].var < (MENU[Mpos].maxvalue-1)) {
*MENU[Mpos].var += 1;
} else {
*MENU[Mpos].var = 0;
}
if (MENU[Mpos].typ == MENUFOLDER) { // menu tab
if (*MENU[Mpos].var > 0)
Mpos++;
Mmax=0;
}
Sleep(100);
return true;
}
y += Mysize;
}
return false;
}[/php]
Menu.h
- Were it says ( Red = add to the code )
class cMenu{
public:
void RenderMenu(void);
void MenuNav(void);
void MenuShow(int x, int y, ID3DXFont *pFont);
Add this ----> bool MenuClick(int x, int y, int width, POINT loc);
private:
void AddItem(char *txt, char **opt, int *var, int maxvalue, int typ);
}
A good coder would get this!
Last edited by NOOBJr; 11-30-2010 at 03:05 PM.
NewCories (03-12-2011),rodolfgonzales4 (11-30-2010),the grim reaper (11-30-2010),ultahackers (11-29-2010)
TY, this will help me my new hack nubz.. helped me on..... TY dude
Ty bro good luck
Im asuming this is for my combined base..
where did you leech this one from eh zane? Like you leeched my sig, my base, and seals menu moving mouse function all into the crossfire section on the same exact forum its posted on.
looks n2b actually O.o
CodeDemon i didn't leech this! If you check google over 100 times you won't find it! Your my inspiration CodeDemon. You once told me to stop leeching and taking people's work. I decided to follow that. Every day from then i tried learning C++ the REAL way books and shit and it helped. Thanks and if it really bugs you i will make a new sig!
- Peace
Last edited by NOOBJr; 11-29-2010 at 07:55 PM.
I don't know why he needs help this isn't noob proof!