EDIT: Not sure if "Drop Box" is what they are called. I think it might be "Menu Boxes"? Like when you right-click.
Edited by The Legend, 30 March 2012 - 07:56 PM.
Posted 30 March 2012 - 07:40 PM
Edited by The Legend, 30 March 2012 - 07:56 PM.
Posted 30 March 2012 - 08:19 PM
Posted 30 March 2012 - 08:21 PM
Posted 30 March 2012 - 08:46 PM
instance_create(mouse_x, mouse_y, obj_contextMenu)The right click menu is actually called a Context Menu.
Posted 30 March 2012 - 08:51 PM
show_menu(str,def)
Shows a popup menu. str indicates the menu text. This consists of the different menu items with a vertical bar between them. For example, str = 'menu0|menu1|menu2'. When the first item is selected a 0 is returned, etc. When the player selects no item, the default value def is returned.
show_menu_pos(x,y,str,def)
Shows a popup menu as in the previous function but at position x,y on the screen.
var ii;
ii=show_menu("Buy Gun|Buy Knife|Buy flower",-1);
if (ii==0)
{
show_message("You bought a gun");
}
else
if (ii==1)
{
show_message("You bought a Knife");
}
else
if (ii==2)
{
show_message("You bought a flower");
}
else
{
show_message("You buy nothing?!");
}
Edited by Desert Dog, 30 March 2012 - 08:51 PM.
Posted 30 March 2012 - 08:52 PM
0 members, 0 guests, 0 anonymous users