plugins/include/menus.inc
changeset 885 7767bebc6262
parent 878 967a6613eb7e
child 891 30343d215489
     1.1 --- a/plugins/include/menus.inc	Wed Jun 06 06:27:47 2007 +0000
     1.2 +++ b/plugins/include/menus.inc	Wed Jun 06 06:33:57 2007 +0000
     1.3 @@ -37,9 +37,10 @@
     1.4  	MenuAction_Display = (1<<1),	/**< A menu is about to be displayed (param1=client, param2=MenuPanel Handle) */
     1.5  	MenuAction_Select = (1<<2),		/**< An item was selected (param1=client, param2=item) */
     1.6  	MenuAction_Cancel = (1<<3),		/**< The menu was cancelled (param1=client, param2=reason) */
     1.7 -	MenuAction_End = (1<<4),		/**< A menu's display/selection cycle is complete (nothing passed). */
     1.8 -	MenuAction_VoteEnd = (1<<5),	/**< (VOTE ONLY): A vote sequence has ended (param1=chosen item) */
     1.9 -	MenuAction_VoteStart = (1<<6), 	/**< (VOTE ONLY): A vote sequence has started */
    1.10 +	MenuAction_End = (1<<4),		/**< A menu's display/selection cycle is complete (nothing passed) */
    1.11 +	MenuAction_VoteEnd = (1<<5),	/**< (VOTE ONLY): A vote sequence has succeeded (param1=chosen item) */
    1.12 +	MenuAction_VoteStart = (1<<6), 	/**< (VOTE ONLY): A vote sequence has started (nothing passed) */
    1.13 +	MenuAction_VoteCancel = (1<<7),	/**< (VOTE ONLY): A vote sequence has been cancelled (nothing passed) */
    1.14  };
    1.15  
    1.16  /** Default menu actions */
    1.17 @@ -268,6 +269,8 @@
    1.18   * The menu may still exist on the client's screen after this command.
    1.19   * This simply verifies that the menu is not being used anywhere.
    1.20   *
    1.21 + * If any vote is in progress on a menu, it will be cancelled.
    1.22 + *
    1.23   * @param menu				Menu Handle.
    1.24   * @noreturn
    1.25   * @error					Invalid Handle.
    1.26 @@ -275,6 +278,14 @@
    1.27  native CancelMenu(Handle:menu);
    1.28  
    1.29  /**
    1.30 + * Returns whether a vote is in progress on the given menu.
    1.31 + *
    1.32 + * @param menu				Menu Handle.
    1.33 + * @return					True if a vote is in progress, false otherwise.
    1.34 + */
    1.35 +native bool:IsVoteInProgress(Handle:menu);
    1.36 +
    1.37 +/**
    1.38   * Broadcasts a menu to a list of clients.  The most selected item will be 
    1.39   * returned through MenuAction_End.  On a tie, a random item will be returned 
    1.40   * from a list of the tied items.