Grey83
не пишу плагины с весны 2022
- Сообщения
- 8,569
- Реакции
- 5,071
Только тогда я не знаю как словить момент когда это меню закрывается
scripting/include/menus.inc:
/**
* Different actions for the menu "pump" callback
*/
enum MenuAction
{
MenuAction_Start = (1<<0), /**< A menu has been started (nothing passed) */
MenuAction_Display = (1<<1), /**< A menu is about to be displayed (param1=client, param2=MenuPanel Handle) */
MenuAction_Select = (1<<2), /**< An item was selected (param1=client, param2=item) */
MenuAction_Cancel = (1<<3), /**< The menu was cancelled (param1=client, param2=reason) */
MenuAction_End = (1<<4), /**< A menu display has fully ended.
param1 is the MenuEnd reason, and if it's MenuEnd_Cancelled, then
param2 is the MenuCancel reason from MenuAction_Cancel.
...
/**
* Reasons a menu can be cancelled (MenuAction_Cancel).
*/
enum
{
MenuCancel_Disconnected = -1, /**< Client dropped from the server */
MenuCancel_Interrupted = -2, /**< Client was interrupted with another menu */
MenuCancel_Exit = -3, /**< Client exited via "exit" */
MenuCancel_NoDisplay = -4, /**< Menu could not be displayed to the client */
MenuCancel_Timeout = -5, /**< Menu timed out */
MenuCancel_ExitBack = -6, /**< Client selected "exit back" on a paginated menu */
};
...
/**
* Reasons a menu ended (MenuAction_End).
*/
enum
{
MenuEnd_Selected = 0, /**< Menu item was selected */
MenuEnd_VotingDone = -1, /**< Voting finished */
MenuEnd_VotingCancelled = -2, /**< Voting was cancelled */
MenuEnd_Cancelled = -3, /**< Menu was cancelled (reason in param2) */
MenuEnd_Exit = -4, /**< Menu was cleanly exited via "exit" */
MenuEnd_ExitBack = -5, /**< Menu was cleanly exited via "back" */
};