I'm trying to create menus using the new menu natives and pad "exit" to 0, no matter how many items there are.
After trying all possible combinations of
menu_setprops and studying the includes I wonder if there's even a way to force back/forward/exit to use slot 8/9/0.
According to the includes it would assume the following code should work
Code:
public show(id){
new menu = menu_create("Test","handler")
menu_additem(menu,"First")
menu_additem(menu,"Second")
// variable number of items here
menu_setprop(menu,MPROP_PERPAGE,7) // make sure we have a maximum of 7 items per page (default anyway)
menu_setprop(menu,MRROP_EXIT,MEXIT_ALL) // always display "exit"
menu_setprop(menu,MPROP_PADMENU,MENUPAD_PAGE) // pad special items to end of the page
menu_display(id,menu,0)
}
Should look like this:
Quote:
Test
1. First
2. Second
0. Exit
|
Actually looks like this:
Quote:
Test
1. First
2. Second
7. Exit
|
Looks like I'd have to force 10 items per page, but
menu_setprop(menu,MPROP_PERPAGE,...) throws a native error if supplied with anything bigger than 7.
Thanks in advance.
(And no, using old style menus is not an option)
__________________