plugins/include/menus.inc
changeset 1484 8e3b343cbfaa
parent 1361 591f6d2fd11d
child 1594 10ed42f305e1
     1.1 --- a/plugins/include/menus.inc	Wed Sep 26 04:03:22 2007 +0000
     1.2 +++ b/plugins/include/menus.inc	Wed Sep 26 13:12:37 2007 +0000
     1.3 @@ -60,7 +60,7 @@
     1.4  	MenuAction_VoteStart = (1<<6), 	/**< (VOTE ONLY): A vote sequence has started (nothing passed) */
     1.5  	MenuAction_VoteCancel = (1<<7),	/**< (VOTE ONLY): A vote sequence has been cancelled (param1=reason) */
     1.6  	MenuAction_DrawItem = (1<<8),	/**< An item is being drawn; return the new style (param1=client, param2=item) */
     1.7 -	MenuAction_DisplayItem = (1<<9) /**< Item text is being drawn to the display (param1=client, param2=item)
     1.8 +	MenuAction_DisplayItem = (1<<9),/**< Item text is being drawn to the display (param1=client, param2=item)
     1.9  										  To change the text, use RedrawMenuItem().
    1.10  										  If you do so, return its return value.  Otherwise, return 0.
    1.11  										  */
    1.12 @@ -172,6 +172,18 @@
    1.13  native bool:DisplayMenu(Handle:menu, client, time);
    1.14  
    1.15  /**
    1.16 + * Displays a menu to a client, starting from the given item.
    1.17 + *
    1.18 + * @param menu				Menu Handle.
    1.19 + * @param client			Client index.
    1.20 + * @param first_item		First item to begin drawing from.
    1.21 + * @param time				Maximum time to leave menu on the screen.
    1.22 + * @return					True on success, false on failure.
    1.23 + * @error					Invalid Handle or client not in game.
    1.24 + */
    1.25 +native bool:DisplayMenuAtItem(Handle:menu, client, first_item, time);
    1.26 +
    1.27 +/**
    1.28   * Appends a new item to the end of a menu.
    1.29   *
    1.30   * @param menu				Menu Handle.
    1.31 @@ -238,7 +250,26 @@
    1.32   * @return					True on success, false if position is invalid.
    1.33   * @error					Invalid Handle.
    1.34   */
    1.35 -native bool:GetMenuItem(Handle:menu, position, String:infoBuf[], infoBufLen, &style=0, String:dispBuf[]="", dispBufLen=0);
    1.36 +native bool:GetMenuItem(Handle:menu, 
    1.37 +						position, 
    1.38 +						String:infoBuf[], 
    1.39 +						infoBufLen, 
    1.40 +						&style=0, 
    1.41 +						String:dispBuf[]="",
    1.42 +						dispBufLen=0);
    1.43 +						
    1.44 +/**
    1.45 + * Returns the first item on the page of a currently selected menu.
    1.46 + *
    1.47 + * This is only valid inside a MenuAction_Select callback.
    1.48 + *
    1.49 + * @return					First item number on the page the client was viewing 
    1.50 + *							before selecting the item in the callback.  This can 
    1.51 + *							be used to re-display the menu from the original 
    1.52 + *							position.
    1.53 + * @error					Not called from inside a MenuAction_Select callback.
    1.54 + */
    1.55 +native GetMenuSelectionPosition();
    1.56  
    1.57  /**
    1.58   * Returns the number of items in a menu.