added two new tests to the menu test suite

This commit is contained in:
David Anderson 2006-10-21 21:13:57 +00:00
parent a60e9d205b
commit a63c728471

View File

@ -6,6 +6,7 @@ public plugin_init()
register_clcmd("menu_test1", "Test_Menu1")
register_clcmd("menu_test2", "Test_Menu2")
register_clcmd("menu_test3", "Test_Menu3")
}
public Test_Menu1(id, level, cid)
@ -54,3 +55,38 @@ public Test_Menu1_Handler(id, menu, item)
return PLUGIN_HANDLED
}
public Test_Menu3(id)
{
new mHandleID = menu_create("Test Menu 3", "Test_Menu3_Handler")
menu_additem(mHandleID, "test1", "1", 0)
menu_additem(mHandleID, "test2", "2", 0)
menu_additem(mHandleID, "test3", "3", 0)
menu_additem(mHandleID, "test4", "4", 0)
menu_additem(mHandleID, "test5", "5", 0)
menu_additem(mHandleID, "test6", "6", 0)
menu_additem(mHandleID, "test7", "7", 0)
menu_additem(mHandleID, "test8", "8", 0)
menu_additem(mHandleID, "test9", "9", 0)
menu_additem(mHandleID, "test10", "10", 0)
menu_additem(mHandleID, "test11", "11", 0)
menu_addblank(mHandleID, 1) // add blank got problem
menu_display(id, mHandleID, 0)
return PLUGIN_HANDLED
}
public Test_Menu3_Handler(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
client_print(id, print_chat, "item = %d", item)
menu_destroy(menu)
return PLUGIN_HANDLED
}