new menu API
This commit is contained in:
parent
2ab9fce457
commit
af939f4e8d
|
@ -295,4 +295,15 @@ enum {
|
|||
#define FP_CELL 0
|
||||
#define FP_FLOAT 1
|
||||
#define FP_STRING 2
|
||||
#define FP_ARRAY 4
|
||||
#define FP_ARRAY 4
|
||||
|
||||
#define MPROP_PERPAGE 1 //NUM - items per page. 0=no paginating, 7=default
|
||||
#define MPROP_BACKNAME 2 //STRING - name of "back" button
|
||||
#define MPROP_NEXTNAME 3 //STRING - name of "more" button
|
||||
#define MPROP_EXITNAME 4 //STRING - name of "exit" button
|
||||
#define MPROP_TITLE 5 //STRING - sets menu title
|
||||
#define MPROP_EXITALL 6 //NUM - sets if "exit" appears on every page
|
||||
#define MPROP_ORDER 7 //Sets the back/next/exit order
|
||||
//Send an 3-cell array with MENU_EXIT etc in the order
|
||||
//(from 0-2), 0 being first
|
||||
#define MPROP_NOCOLORS 8 //NUM - sets whether colors are not auto (0=default)
|
||||
|
|
|
@ -784,6 +784,15 @@ native menu_item_setname(menu, item, name[]);
|
|||
native menu_item_setcmd(menu, item, cmd[]);
|
||||
native menu_item_setcall(menu, item, callback=-1);
|
||||
|
||||
//Destroys a menu - invalidates the handle
|
||||
//This is safe, as it will go through the players and make
|
||||
// sure they don't have this menu set anymore.
|
||||
native menu_destroy(menu);
|
||||
|
||||
//Sets a menu property. See amxconst.inc for various menu properties.
|
||||
//The third value depends on the property
|
||||
native menu_setprop(menu, prop, ...);
|
||||
|
||||
// Gets distance between two origins (float)
|
||||
native Float:get_distance_f( Float:Origin1[3], Float:Origin2[3] );
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user