#include "MenuMessenger.h"
MB_PLUGIN(
"MenuMessenger",
"Sample plugin adds menu items",
"Autodesk",
"http://www.mudbox3d.com", MenuMessenger::Initializer );
MenuMessenger g_MenuMessengerInstance;
MenuMessenger::MenuMessenger( void ) : CurrentMenu( this )
{
}
void MenuMessenger::Initializer()
{
g_MenuMessengerInstance.CurrentMenu.Connect(
Kernel()->Interface()->CurrentMenu );
}
void MenuMessenger::ShowMessage1(){
Kernel()->Interface()->HUDMessageShow(
"Menu Message #1" );
}
void MenuMessenger::ShowMessage2(){
QString message(
QString(
"You are running Mudbox from this folder:<p>%1").arg(
Kernel()->ApplicationDirectory()));
Kernel()->Interface()->HUDMessageShow( message );
}
void MenuMessenger::ShowMessage3(){
Kernel()->Interface()->HUDMessageShow(
"Menu Message #3" );
}
void MenuMessenger::ShowMessage4(){
Kernel()->Interface()->HUDMessageShow(
"Menu Message #4 demonstrates <b>bold</b> text" );
}
void MenuMessenger::ShowMessage5(){
Kernel()->Interface()->HUDMessageShow(
"Menu Message #5 demonstrates <i>italic</i>text" );
}
void MenuMessenger::ShowMessage6(){
Kernel()->Interface()->HUDMessageShow(
"Menu Message #6" );
}
void MenuMessenger::ShowMessage7(){
}
void MenuMessenger::ShowMessage8(){
Kernel()->Interface()->HUDMessageHide();
}
if ( CurrentMenu && CurrentMenu->Type() == Interface::ddmLayerContext )
CurrentMenu->AddMenuItem( "Menu Messenger #7", 0 );
}
}