Skip to main content
Topic: Custom popup menu in main menu (Read 2583 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Custom popup menu in main menu

Hi!
Does anybody know how to create custom popup menu in the main menu? Do I have to do anything with mainmenu_group, mainmenu_group_popup or mainmenu_group_popup_impl?

Custom popup menu in main menu

Reply #1
i did this with a mainmenu_group_popup:
the group and each command in it need to have a GUID

you basically derive from mainmenu_commands and return the guid of the group in get_parent and the guids of the commands in get_command
then you have to instanciate the commands and the group with

Code: [Select]
static mainmenu_commands_factory_t<derived_from_mainmenu_commands> foo;
static mainmenu_group_popup_factory mainmenu_group(guid_menu_group, mainmenu_groups::playback, mainmenu_commands::sort_priority_dontcare, "name_of_group");

where mainmenu_groups::playback is, where you want to see the menu group

Custom popup menu in main menu

Reply #2
i did this with a mainmenu_group_popup:
the group and each command in it need to have a GUID

you basically derive from mainmenu_commands and return the guid of the group in get_parent and the guids of the commands in get_command
then you have to instanciate the commands and the group with

Code: [Select]
static mainmenu_commands_factory_t<derived_from_mainmenu_commands> foo;
static mainmenu_group_popup_factory mainmenu_group(guid_menu_group, mainmenu_groups::playback, mainmenu_commands::sort_priority_dontcare, "name_of_group");

where mainmenu_groups::playback is, where you want to see the menu group


Thanks!

 
SimplePortal 1.0.0 RC1 © 2008-2019