Code:
if(isMouseinRegion(200,300,200+50,300+25)){
if(GetAsyncKeyState(VK_LBUTTON)&1){
Close = false;
Tab1 = false;
Tab2 = false;
Tab3 = false;
Tab4 = true;
}
}
Code:
//Tab4 Box / Tab
DrawBox(menux+150,menuy,70,25,Black,White,pDevice) ;
DrawText(menux+165,menuy+5,White,"Tab3", pDevice);
I recomend you increase the x coord by 50 after adding new tab since the box sizes won't effect it. like it won't overlay another tab.
Code:
if(Tab4 == true)
{
DrawBox(menux+50,menuy,50,25,Black,Cyan,pDevice);
DrawText(menux+65,menuy+5,Cyan,"Tab4", pDevice);
DrawBox(menux,menuy+26,170,100,Black,White,pDevice );//Main box with hacks
DrawBox(menux+5,menuy+40,10,10,Black,White,pDevice );//hack2 box
DrawText(menux+20,menuy+37,White,"Hack4",pDevice);//hack2 text
//This checks if The checkbox is checked
if(isMouseinRegion(55,340,55+7,340+7)){
if(GetAsyncKeyState(VK_LBUTTON)&1){
hack4 =! hack4;
}
}
//If checkbox is checked then the hack will be activated and the checkbox will be filled/checked/whatever
if(hack4) {
DrawBox(menux+5,menuy+40,10,10,Black,Cyan,pDevice) ;//hack4 box turns it cyan
DrawText(menux+20,menuy+37,Cyan,"Hack4",pDevice);//hack4 text turns it cyan
DrawBox(menux+7,menuy+42,7,7,White,White,pDevice);//hack4
checkbox fills the checkbox white. inside
}
}
For the checkboxes the ismouseinregion is same as the tabs.