Skip to content

Instantly share code, notes, and snippets.

@Neill3d
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Neill3d/10538444 to your computer and use it in GitHub Desktop.
Save Neill3d/10538444 to your computer and use it in GitHub Desktop.
OR SDK (MoBu) Popup a generic menu from button click
// declare a generic menu
FBGenericMenu mPopupMenu;
// populate the menu
mPopupMenu.InsertLast( "Menu Item 1", 0 );
mPopupMenu.InsertLast( "Menu Item 2", 1 );
mPopupMenu.InsertLast( "Menu Item 3", 2 );
mPopupMenu.InsertLast( "Menu Item 4", 3 );
// Lets popup the menu on ui button click
void ORToolViewTextures::EventButtonMenuClick( HISender pSender, HKEvent pEvent )
{
POINT p;
if (GetCursorPos(&p))
{
mPopupMenu.Execute(p.x, p.y);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment