View Single Post
  #19  
Old 06-17-2002, 09:16 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Let's see how'd I get the menu to pop up..

Well the menuSystem is more complex than a menu for just a single weapon with afew buttons. Hmm..


NPC Code:

if (mousedown){
if (leftmousebutton&&this.menu_on==false){
draw_menu();
this.menu_on=true;
}elseif(leftmousebutton){
click_check();
}
}

function draw_menu(){
menux = mousescreenx;
menuy = mousescreeny;
showimg 6000,menu_picture,menux,menuy;
showimg 6001,@ButtonText,menux,menuy;
}

function click_check(){
if (mousescreenx in |menux,menux+imglenth| &&
mousescreeny in |menuy,menuy+imgheight|){
// do something =/
}else{
hideimg 6000;
hideimg 6001;
}
}



very simple version of what I did.... I did that just now without testing so =/ don't recomend using or even trying to use.
I aways make 3 dumb mistakes when doing stuff.


AHJ GOnna be LAte laterz
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote