experimental changes to topmenu api -- drawing/displaying is now properly abstracted

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401532
This commit is contained in:
David Anderson
2007-10-02 15:13:13 +00:00
parent bd89b6d126
commit 5fa3cbf134
6 changed files with 95 additions and 24 deletions
+4
View File
@@ -28,6 +28,10 @@ public AdminMenu_CancelVote(Handle:topmenu,
PerformCancelVote(param);
RedisplayAdminMenu(topmenu, param);
}
else if (action == TopMenuAction_DrawOption)
{
buffer[0] = IsVoteInProgress() ? ITEMDRAW_DEFAULT : ITEMDRAW_IGNORE;
}
}
public Action:Command_CancelVote(client, args)
+13 -3
View File
@@ -45,7 +45,7 @@ enum TopMenuAction
/**
* An option is being drawn for a menu (or for sorting purposes).
*
* INPUT : TopMenu Handle, object ID, client index in extra parameter.
* INPUT : TopMenu Handle, object ID, client index.
* OUTPUT: Buffer for rendering, maxlength of buffer.
*/
TopMenuAction_DisplayOption = 0,
@@ -56,7 +56,7 @@ enum TopMenuAction
* Note: The Object ID will be INVALID_TOPMENUOBJECT if drawing the
* root title. Otherwise, the Object ID is a category.
*
* INPUT : TopMenu Handle, object ID, client index in extra parameter.
* INPUT : TopMenu Handle, object ID, client index.
* OUTPUT: Buffer for rendering, maxlength of buffer.
*/
TopMenuAction_DisplayTitle = 1,
@@ -66,9 +66,19 @@ enum TopMenuAction
*
* The Object ID will always be an item (not a category).
*
* INPUT : TopMenu Handle, object ID, client index in extra parameter.
* INPUT : TopMenu Handle, object ID, client index.
*/
TopMenuAction_SelectOption = 2,
/**
* A menu option is being drawn and its flags can be overridden.
*
* INPUT : TopMenu Handle, object ID, client index.
* OUTPUT: The first byte of the 'buffer' string should be set
* to the desired flags. By default, it will contain
* ITEMDRAW_DEFAULT.
*/
TopMenuAction_DrawOption = 3,
};
/**