From bd89b6d126d7da686e7aa50a7497467d774d3ad8 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 2 Oct 2007 14:48:44 +0000 Subject: [PATCH] - removed incorrect information about DrawOption, renamed to DisplayOption - renamed DrawTitle to DisplayTitle --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401531 --- plugins/adminmenu.sp | 5 ++--- plugins/basecommands/cancelvote.sp | 13 +------------ plugins/basecommands/kick.sp | 2 +- plugins/basecommands/reloadadmins.sp | 2 +- plugins/include/topmenus.inc | 6 ++---- 5 files changed, 7 insertions(+), 21 deletions(-) diff --git a/plugins/adminmenu.sp b/plugins/adminmenu.sp index 3ace75be..e9796622 100644 --- a/plugins/adminmenu.sp +++ b/plugins/adminmenu.sp @@ -113,7 +113,7 @@ public CategoryHandler(Handle:topmenu, String:buffer[], maxlength) { - if (action == TopMenuAction_DrawTitle) + if (action == TopMenuAction_DisplayTitle) { if (object_id == INVALID_TOPMENUOBJECT) { @@ -132,7 +132,7 @@ public CategoryHandler(Handle:topmenu, Format(buffer, maxlength, "%T:", "Voting Commands", param); } } - else if (action == TopMenuAction_DrawOption) + else if (action == TopMenuAction_DisplayOption) { if (object_id == obj_playercmds) { @@ -146,7 +146,6 @@ public CategoryHandler(Handle:topmenu, { Format(buffer, maxlength, "%T", "Voting Commands", param); } - return ITEMDRAW_DEFAULT; } return 0; diff --git a/plugins/basecommands/cancelvote.sp b/plugins/basecommands/cancelvote.sp index be3dbb72..17f51572 100644 --- a/plugins/basecommands/cancelvote.sp +++ b/plugins/basecommands/cancelvote.sp @@ -19,26 +19,15 @@ public AdminMenu_CancelVote(Handle:topmenu, String:buffer[], maxlength) { - if (action == TopMenuAction_DrawOption) + if (action == TopMenuAction_DisplayOption) { 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) diff --git a/plugins/basecommands/kick.sp b/plugins/basecommands/kick.sp index b4b59743..35ae1363 100644 --- a/plugins/basecommands/kick.sp +++ b/plugins/basecommands/kick.sp @@ -39,7 +39,7 @@ public AdminMenu_Kick(Handle:topmenu, String:buffer[], maxlength) { - if (action == TopMenuAction_DrawOption) + if (action == TopMenuAction_DisplayOption) { Format(buffer, maxlength, "%T", "Kick player", param); } diff --git a/plugins/basecommands/reloadadmins.sp b/plugins/basecommands/reloadadmins.sp index 9daebbca..d52197b0 100644 --- a/plugins/basecommands/reloadadmins.sp +++ b/plugins/basecommands/reloadadmins.sp @@ -16,7 +16,7 @@ public AdminMenu_ReloadAdmins(Handle:topmenu, String:buffer[], maxlength) { - if (action == TopMenuAction_DrawOption) + if (action == TopMenuAction_DisplayOption) { Format(buffer, maxlength, "%T", "Reload admins", param); } diff --git a/plugins/include/topmenus.inc b/plugins/include/topmenus.inc index 713da262..a780c551 100644 --- a/plugins/include/topmenus.inc +++ b/plugins/include/topmenus.inc @@ -47,10 +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. The return value may be ignored - * if the item is simply being sorted into the menu. */ - TopMenuAction_DrawOption = 0, + TopMenuAction_DisplayOption = 0, /** * The title of a menu is being drawn for a given object. @@ -61,7 +59,7 @@ enum TopMenuAction * INPUT : TopMenu Handle, object ID, client index in extra parameter. * OUTPUT: Buffer for rendering, maxlength of buffer. */ - TopMenuAction_DrawTitle = 1, + TopMenuAction_DisplayTitle = 1, /** * A menu option has been selected.