darts when you choose a function

Posts 1–9 of 9 · Page 1 of 1
darts when you choose a function
I can give the code to put the darts when you choose the function?
as this
Its in you menu void "%s" change it to "->"
I use the base hans ...
void menu and do not find "% s"
can you tell me where is it?
perhaps have is in D3Dmenu navigate?
Quote Originally Posted by IH-DjsantiX View Post
I use the base hans ...
void menu and do not find "% s"
can you tell me where is it?
perhaps have is in D3Dmenu navigate?
hans base as far as i remember its D3D8 (we are D3D9 now)
And it went patched over 1 year ago, i should recomment you to use 'KarrKa' or Another good base
I post it:
Code:
void D3DMenu::MenuShow(float x, float y,	ID3DXFont*  pFont1, LPDIRECT3DDEVICE9 pDevice)
{
  int i, val;
  DWORD color;
  char text[100];
  if (!Mvisible) return;
  Boarders(pDevice,pFont1);
  if (Mtitle[0]) {
	 
	y+=(Mysize+8);
  }
  for (i=0; i<Mmax; i++) {
	   val=(MENU[i]->var)?(*MENU[i]->var):0;
	   sprintf(text, "%s", MENU[i]->txt);
	   if (i==Mpos){
           color=MCOLOR_CURRENT;
		  sprintf(text, "->%s", MENU[i]->txt);}
       else if (MENU[i]->typ==MENUFOLDER)
           color=MCOLOR_FOLDER;
       else if (MENU[i]->typ==MENUTEXT)
           color=MCOLOR_TEXT;
       else
		   color=(val)?MCOLOR_ACTIVE:MCOLOR_INACTIVE;

	   if (MENU[i]->opt) 
	   {
		   if (MENU[i]->typ==MENUFOLDER){
				DrawTextL(x+3, y, color,text, pFont1);
				y = y + 2;
		   }else{
				DrawTextL(x+3, y, color,text, pFont1);
		   }
	   }

       if (MENU[i]->opt) {
		   if (MENU[i]->typ==MENUTEXT)
			   DrawTextR((x+Mxofs), y, color,(char *)MENU[i]->opt, pFont1);
		   else
			   DrawTextR((x+Mxofs), y, color,(char *)MENU[i]->opt[val], pFont1);
	   }

       y+=Mysize;
  }
  YPOS=y;

}

void D3DMenu::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;

		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;
			if (MENU[Mpos]->typ==MENUCAT)		Mmax=0;  
		}
  }
}
still can not find it xD
now I put the code and see if you find it xD
[php]
void D3DMenu::Show(ID3DXFont *pFont,LPDIRECT3DDEVICE9 pDevice)
{
int i,val,cy;
DWORD color;
DWORD ColorQ;

if (!visible)
return;

max_x=x+143;
max_y=y+totheight;
cy=y;

if (title)
{
DrawTextC((int)(x+totwidth/3) - 31, (int)cy - 4, col_title, title, pFont);
cy+=titleheight;
}

for(i=0; i<noitems; i++)
{
if(MENU[i]->typ==MENUTEXT)
{
DrawTextL(x, cy, White,MENU[i]->txt, pFont);
if(MENU[i]->opt)
{
DrawTextR((int)(x+ofs), (int)cy, color,(char *)MENU[i]->opt, pFont);
}
}else{
val=(MENU[i]->var)?(*MENU[i]->var):0;

if (m_x>=x && m_x<max_x && m_y>=cy && m_y<(cy+height))
color = Orange;
else
if (i==cur)
color = col_current;
else
if (MENU[i]->typ==MENUFOLDER)
color=col_group;
else
if (MENU[i]->typ==SUBFOLDER)
color=(val)?col_on:col_off;
else
color=(val)?col_on:col_off;

if(val>0)
{
ColorQ = Green;
}else{
ColorQ = Red;
}

DrawTextL((int)x,(int)cy, color,MENU[i]->txt, pFont);
if (MENU[i]->opt)
{
/*DrawBox((float)17,(float)cy + 4.5,7,7,ColorQ,pDevice);
DrawRectangle((float)17,(float)cy + 4.5,7,7,1,White,pDevice);*/
DrawTextR((int)(x+143),(int)cy, color,(char *)MENU[i]->opt[val], pFont);
}
}
cy+=height;
}
}
[/php]
Quote Originally Posted by IH-DjsantiX View Post
still can not find it xD
now I put the code and see if you find it xD
[php]
void D3DMenu::Show(ID3DXFont *pFont,LPDIRECT3DDEVICE9 pDevice)
{
int i,val,cy;
DWORD color;
DWORD ColorQ;

if (!visible)
return;

max_x=x+143;
max_y=y+totheight;
cy=y;

if (title)
{
DrawTextC((int)(x+totwidth/3) - 31, (int)cy - 4, col_title, title, pFont);
cy+=titleheight;
}

for(i=0; i<noitems; i++)
{
if(MENU[i]->typ==MENUTEXT)
{
DrawTextL(x, cy, White,MENU[i]->txt, pFont);
if(MENU[i]->opt)
{
DrawTextR((int)(x+ofs), (int)cy, color,(char *)MENU[i]->opt, pFont);
}
}else{
val=(MENU[i]->var)?(*MENU[i]->var):0;

if (m_x>=x && m_x<max_x && m_y>=cy && m_y<(cy+height))
color = Orange;
else
if (i==cur)
color = col_current;
else
if (MENU[i]->typ==MENUFOLDER)
color=col_group;
else
if (MENU[i]->typ==SUBFOLDER)
color=(val)?col_on:col_off;
else
color=(val)?col_on:col_off;

if(val>0)
{
ColorQ = Green;
}else{
ColorQ = Red;
}

DrawTextL((int)x,(int)cy, color,MENU[i]->txt, pFont);
if (MENU[i]->opt)
{
/*DrawBox((float)17,(float)cy + 4.5,7,7,ColorQ,pDevice);
DrawRectangle((float)17,(float)cy + 4.5,7,7,1,White,pDevice);*/
DrawTextR((int)(x+143),(int)cy, color,(char *)MENU[i]->opt[val], pFont);
}
}
cy+=height;
}
}
[/php]
noo
Not the draw functions, get unther it, to your menu navigation
aaaa xD sry
[php]void D3DMenu::Nav(void)
{
if (GetAsyncKeyState(VK_INSERT)&1) visible=(!visible);

if (!visible)
return;

if(WH_MoveMenu==1 && GetAsyncKeyState(VK_DELETE)) {
if (GetAsyncKeyState(VK_UP) &1) y-=10;
if (GetAsyncKeyState(VK_DOWN) &1) y+=10;
if (GetAsyncKeyState(VK_LEFT) &1) x-=10;
if (GetAsyncKeyState(VK_RIGHT)&1) x+=10;
} else {
if (GetAsyncKeyState(VK_UP)&1) {
do {
cur--;
if (cur<0) cur=noitems-1;
} while (MENU[cur]->typ==MENUTEXT);
} else if (GetAsyncKeyState(VK_DOWN)&1) {
do {
cur++;
if (cur==noitems) cur=0;
} while (MENU[cur]->typ==MENUTEXT);
} else {
POINT mpos;
GetCursorPos(&mpos);
ScreenToClient(GetForegroundWindow(),&mpos);
int pos=cur;
int dir=0;

if (GetAsyncKeyState(VK_LEFT )&1 && MENU[cur]->var && *MENU[cur]->var > 0 ) dir=-1;
if (GetAsyncKeyState(VK_RIGHT)&1 && MENU[cur]->var && *MENU[cur]->var < (MENU[cur]->maxval-1) ) dir=1;
if(WH_MoveMenu==2)
{
x =mpos.x;
y =mpos.y;
}

if (dir==0 && (mouse_enabled==1)) {
m_x=mpos.x;
m_y=mpos.y;
m_lm = GetAsyncKeyState(VK_LBUTTON )&1;
m_rm = GetAsyncKeyState(VK_RBUTTON )&1;

if((m_lm || m_rm) && (pos=FindItem())!= -1)
{
if (pos!=999) {
if (m_rm && *MENU[pos]->var>0) dir=-1;
if (m_lm && *MENU[pos]->var<(MENU[pos]->maxval-1)) dir=1;
} else if (m_rm) {
moving=(!moving);
dx=m_x - x;
dy=m_y - y;
}
}
}
if (dir) {
*MENU[pos]->var += dir;
if (MENU[pos]->typ==MENUFOLDER) noitems=0;
if (MENU[pos]->typ==SUBFOLDER) noitems=0;
}
}
}
[/php]
Quote Originally Posted by IH-DjsantiX View Post
aaaa xD sry
[php]void D3DMenu::Nav(void)
{
if (GetAsyncKeyState(VK_INSERT)&1) visible=(!visible);

if (!visible)
return;

if(WH_MoveMenu==1 && GetAsyncKeyState(VK_DELETE)) {
if (GetAsyncKeyState(VK_UP) &1) y-=10;
if (GetAsyncKeyState(VK_DOWN) &1) y+=10;
if (GetAsyncKeyState(VK_LEFT) &1) x-=10;
if (GetAsyncKeyState(VK_RIGHT)&1) x+=10;
} else {
if (GetAsyncKeyState(VK_UP)&1) {
do {
cur--;
if (cur<0) cur=noitems-1;
} while (MENU[cur]->typ==MENUTEXT);
} else if (GetAsyncKeyState(VK_DOWN)&1) {
do {
cur++;
if (cur==noitems) cur=0;
} while (MENU[cur]->typ==MENUTEXT);
} else {
POINT mpos;
GetCursorPos(&mpos);
ScreenToClient(GetForegroundWindow(),&mpos);
int pos=cur;
int dir=0;

if (GetAsyncKeyState(VK_LEFT )&1 && MENU[cur]->var && *MENU[cur]->var > 0 ) dir=-1;
if (GetAsyncKeyState(VK_RIGHT)&1 && MENU[cur]->var && *MENU[cur]->var < (MENU[cur]->maxval-1) ) dir=1;
if(WH_MoveMenu==2)
{
x =mpos.x;
y =mpos.y;
}

if (dir==0 && (mouse_enabled==1)) {
m_x=mpos.x;
m_y=mpos.y;
m_lm = GetAsyncKeyState(VK_LBUTTON )&1;
m_rm = GetAsyncKeyState(VK_RBUTTON )&1;

if((m_lm || m_rm) && (pos=FindItem())!= -1)
{
if (pos!=999) {
if (m_rm && *MENU[pos]->var>0) dir=-1;
if (m_lm && *MENU[pos]->var<(MENU[pos]->maxval-1)) dir=1;
} else if (m_rm) {
moving=(!moving);
dx=m_x - x;
dy=m_y - y;
}
}
}
if (dir) {
*MENU[pos]->var += dir;
if (MENU[pos]->typ==MENUFOLDER) noitems=0;
if (MENU[pos]->typ==SUBFOLDER) noitems=0;
}
}
}
[/php]
MenuShow to plz
Quote Originally Posted by AeroMan View Post
MenuShow to plz
but you already gave him the post of first menushow ..
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us