Add new-style API compatibility for VoteHandler.
This commit is contained in:
parent
e250eb66d1
commit
844fad263a
@ -810,7 +810,10 @@ stock bool VoteMenuToAll(Handle menu, int time, int flags=0)
|
|||||||
* @param item_info Array of items, sorted by count. Use VOTEINFO_ITEM
|
* @param item_info Array of items, sorted by count. Use VOTEINFO_ITEM
|
||||||
* defines.
|
* defines.
|
||||||
*/
|
*/
|
||||||
typedef VoteHandler = function void (
|
typeset VoteHandler
|
||||||
|
{
|
||||||
|
// old style
|
||||||
|
function void(
|
||||||
Menu menu,
|
Menu menu,
|
||||||
int num_votes,
|
int num_votes,
|
||||||
int num_clients,
|
int num_clients,
|
||||||
@ -819,6 +822,17 @@ typedef VoteHandler = function void (
|
|||||||
const int item_info[][2]
|
const int item_info[][2]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// new style
|
||||||
|
function void(
|
||||||
|
Menu menu,
|
||||||
|
int num_votes,
|
||||||
|
int num_clients,
|
||||||
|
const int[][] client_info,
|
||||||
|
int num_items,
|
||||||
|
const int[][] item_info
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets an advanced vote handling callback. If this callback is set,
|
* Sets an advanced vote handling callback. If this callback is set,
|
||||||
* MenuAction_VoteEnd will not be called.
|
* MenuAction_VoteEnd will not be called.
|
||||||
|
Loading…
Reference in New Issue
Block a user