//-----------------------------------------------------------------------------
// popup.m
//
// Popup Menu's Made Easier
// created by Whatsitsname
//
// Referenced from one of the scripts by FrisbeeMonkey
//
//-----------------------------------------------------------------------------
// USING THIS SCRIPT:
//*****************************************************************************
// 1.Define in you xml
//
//
// 2.See Special instructions in MAKI below
//
// 3.Compile and put this in your "popbut" group
//
//*****************************************************************************
#include "../../../lib/std.mi"
Global Button pla;
Global PopupMenu NewMenu;
System.onScriptLoaded() {
//This gets the group and object that we want
Group newGroup = getScriptGroup();
pla = newGroup.getObject("popbut");
//This Creates a New Popup Menu
NewMenu = new PopupMenu;
//This Adds the Choices for the Menu
NewMenu.addCommand("Your Choie Here)",1,0,0);
NewMenu.addCommand("...)",2,0,0);
NewMenu.addCommand("...)",3,0,0);
//This adds a seperator bar
NewMenu.addSeparator();
NewMenu.addCommand("Disable",4,0,0);
}
pla.onRightClick(){
//This Opens the Menu
int Choice = NewMenu.popAtMouse();
if (Choice==1) {
// Things you want the choices to do go here
} else if (Choice == 2) {
} else if (Choice == 3) {
} else if (Choice == 4) {
}
complete;
}