From 208a57eaf896a482cd562606bfda427a434e19fc Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 6 Feb 2006 15:27:02 +0000 Subject: [PATCH] added menu padding --- plugins/include/amxconst.inc | 5 +++++ plugins/include/amxmodx.inc | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/plugins/include/amxconst.inc b/plugins/include/amxconst.inc index 26dfbd4f..70e96427 100755 --- a/plugins/include/amxconst.inc +++ b/plugins/include/amxconst.inc @@ -301,6 +301,9 @@ enum { #define MEXIT_NORMAL 0 #define MEXIT_NEVER -1 +#define MENUPAD_NONE 0 //no padding (default) +#define MENUPAD_PAGE 1 //pads based on items per page + #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 @@ -311,3 +314,5 @@ enum { //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) +#define MPROP_PADMENU 9 //NUM - sets how the ending portions of a menu are padded + //i.e. 2 items, 7 per page, with endings at slots 5/6/7. \ No newline at end of file diff --git a/plugins/include/amxmodx.inc b/plugins/include/amxmodx.inc index 554bc13f..e56d7e7c 100755 --- a/plugins/include/amxmodx.inc +++ b/plugins/include/amxmodx.inc @@ -793,8 +793,14 @@ native menu_item_setcall(menu, item, callback=-1); native menu_destroy(menu); //Gets info about a player's menu. Returns 1 if the player is viewing a menu. +//menu will be >0 for a valid oldmenu. newmenu will be != -1 for a valid newmenu. native player_menu_info(id, &menu, &newmenu); +//adds a blank line to a menu. +//if slot is nonzero (default), the blank line will increase +//the numbering rather than just shifting down. +native menu_addblank(menu, slot=1); + //Sets a menu property. See amxconst.inc for various menu properties. //The third value depends on the property native menu_setprop(menu, prop, ...);