1.1 --- a/plugins/include/menus.inc Tue Jul 24 22:20:58 2007 +0000
1.2 +++ b/plugins/include/menus.inc Wed Jul 25 01:18:11 2007 +0000
1.3 @@ -42,6 +42,10 @@
1.4 MenuAction_VoteStart = (1<<6), /**< (VOTE ONLY): A vote sequence has started (nothing passed) */
1.5 MenuAction_VoteCancel = (1<<7), /**< (VOTE ONLY): A vote sequence has been cancelled (nothing passed) */
1.6 MenuAction_DrawItem = (1<<8), /**< An item is being drawn; return the new style (param1=client, param2=item) */
1.7 + MenuAction_DisplayItem = (1<<9) /**< Item text is being drawn to the display (param1=client, param2=item)
1.8 + To change the text, use RedrawMenuItem().
1.9 + If you do so, return its return value. Otherwise, return 0.
1.10 + */
1.11 };
1.12
1.13 /** Default menu actions */
1.14 @@ -475,7 +479,8 @@
1.15 /**
1.16 * Draws a raw line of text on a panel, without any markup other than a newline.
1.17 *
1.18 - * @param panel A MenuPanel Handle.
1.19 + * @param panel A MenuPanel Handle, or INVALID_HANDLE if inside a
1.20 + * MenuAction_DisplayItem callback.
1.21 * @param text Display text to use.
1.22 * @return True on success, false if raw lines are not supported.
1.23 * @error Invalid Handle.
1.24 @@ -546,6 +551,14 @@
1.25 native bool:SetPanelCurrentKey(Handle:panel, key);
1.26
1.27 /**
1.28 + * @brief Redraws menu text from inside a MenuAction_DisplayItem callback.
1.29 + *
1.30 + * @param text Menu text to draw.
1.31 + * @return Item position; must be returned via the callback.
1.32 + */
1.33 +native RedrawMenuItem(const String:text[]);
1.34 +
1.35 +/**
1.36 * Retrieves voting information from MenuAction_VoteEnd.
1.37 *
1.38 * @param param2 Second parameter of MenuAction_VoteEnd.