added note about TopMenuAction_DrawOption
Cancel vote option now only appears if a vote is in progress --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401530
This commit is contained in:
parent
ee90188103
commit
a130fede3a
@ -22,12 +22,23 @@ public AdminMenu_CancelVote(Handle:topmenu,
|
||||
if (action == TopMenuAction_DrawOption)
|
||||
{
|
||||
Format(buffer, maxlength, "%T", "Cancel vote", param);
|
||||
|
||||
if (IsVoteInProgress())
|
||||
{
|
||||
return ITEMDRAW_DEFAULT;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ITEMDRAW_IGNORE;
|
||||
}
|
||||
}
|
||||
else if (action == TopMenuAction_SelectOption)
|
||||
{
|
||||
PerformCancelVote(param);
|
||||
RedisplayAdminMenu(topmenu, param);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action:Command_CancelVote(client, args)
|
||||
|
@ -47,7 +47,8 @@ enum TopMenuAction
|
||||
*
|
||||
* INPUT : TopMenu Handle, object ID, client index in extra parameter.
|
||||
* OUTPUT: Buffer for rendering, maxlength of buffer.
|
||||
* OUTPUT: Must return an ITEMDRAW constant.
|
||||
* OUTPUT: Must return an ITEMDRAW constant. The return value may be ignored
|
||||
* if the item is simply being sorted into the menu.
|
||||
*/
|
||||
TopMenuAction_DrawOption = 0,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user