-
-
Notifications
You must be signed in to change notification settings - Fork 464
Closed
Description
MenuAction not firing on MenuHandler when a key is pressed on undraw [1-7] options
Environment
- Operating System version: Windows OS
- Game/AppID (with version if applicable): L4D2
- Current SourceMod version: 1.10.0.6499
- Current MetaMod version: Source version 1.10.7-dev
Description
[L4D2] Basically when I display a menu through a sourcemod plugin and a user press a key from an undraw option, the menu closes, but the MenuHandler is not triggered.
This also happens if the menu has pagination and a user selects next/back, but in this case I would suggest to return a new MenuAction.
Problematic Code
public void OnPluginStart()
{
RegConsoleCmd("sm_testmenu", CmdTestMenu, "");
}
public Action CmdTestMenu(int client, int args)
{
Menu menu = new Menu(HandleMenu);
menu.SetTitle("Test");
menu.AddItem("Test 1", "Test 1");
menu.Display(client, MENU_TIME_FOREVER);
}
public int HandleMenu(Menu menu, MenuAction action, int client, int args)
{
PrintToChatAll("action fired");
}
Steps to Reproduce
- In-game type !testmenu in the chat.
- Press the key "2".
- No output to the chat.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels