本文整理汇总了C++中MenuBar::setItemDescription方法的典型用法代码示例。如果您正苦于以下问题:C++ MenuBar::setItemDescription方法的具体用法?C++ MenuBar::setItemDescription怎么用?C++ MenuBar::setItemDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MenuBar
的用法示例。
在下文中一共展示了MenuBar::setItemDescription方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
//------------------------------------------------------------------------------------
FrameStatsConfigTool::FrameStatsConfigTool()
{
MenuBar* mb = MenuBarList::getSingleton().getMenuBar("EditorMenuBar");
mb->insertItem("Settings", MenuItemType::Popup, "#{Settings}");
mb->insertItem("FrameStatsConfig", MenuItemType::Normal, "#{FrameStatsConfig}", "Settings");
mb->setItemDescription("FrameStatsConfig", "#{FrameStatsConfig_Desc}");
mb->attachTool("FrameStatsConfig", this);
}
示例2:
//------------------------------------------------------------------------------------
QuitTool::QuitTool()
{
MenuBar* mb = MenuBarList::getSingleton().getMenuBar("EditorMenuBar");
mb->insertItem("File", MenuItemType::Popup, "#{File}");
mb->insertItem("QuitSep", MenuItemType::Separator, "", "File");
mb->insertItem("Quit", MenuItemType::Normal, "#{Quit}", "File");
mb->setItemDescription("Quit", "#{Quit_Desc}");
mb->attachTool("Quit", this);
}
示例3: showUI
//------------------------------------------------------------------------------------
void EnvironmentTool::showUI()
{
MenuBar* mb = MenuBarList::getSingleton().getMenuBar("EditorMenuBar");
mb->insertItem("Sky", MenuItemType::POPUP, "#{Sky}");
mb->insertItem("EnvironmentParams", MenuItemType::NORMAL, "#{Environment}", "Sky");
mb->setItemDescription("EnvironmentParams", "#{Environment_Desc}");
mb->attachTool("EnvironmentParams", this);
}
示例4: showUI
//------------------------------------------------------------------------------------
void TimeStateTool::showUI()
{
MenuBar* mb = MenuBarList::getSingleton().getMenuBar("EditorMenuBar");
mb->insertItem("Sky", MenuItemType::POPUP, "#{Sky}");
mb->insertItem("TimeState", MenuItemType::NORMAL, "#{TimeState}", "Sky");
mb->setItemDescription("TimeState", "#{TimeState_Desc}");
mb->attachTool("TimeState", this);
setStateVisible(false);
}
示例5:
WorldObjectPropertiesTool::WorldObjectPropertiesTool()
{
MenuBar* mb = MenuBarList::getSingleton().getMenuBar("EditorMenuBar");
mb->insertItem("Windows", MenuItemType::Popup, "#{Windows}");
mb->insertItem("WorldObjectProperties", MenuItemType::Normal, "", "Windows");
mb->setItemDescription("WorldObjectProperties", "#{WorldObjectProperties_Desc}");
mb->attachTool("WorldObjectProperties", this);
registerUISettingsListener();
}
示例6:
//------------------------------------------------------------------------------------
CameraPositionTool::CameraPositionTool()
{
initConstants();
MenuBar* mb = MenuBarList::getSingleton().getMenuBar( "EditorMenuBar" );
mb->insertItem( ROOT_MENU_ID, MenuItemType::Popup, ROOT_MENU_CAPTION );
mb->insertItem( MENU_SEPARATOR_ID[0], MenuItemType::Separator, StringUtil::BLANK, ROOT_MENU_ID );
mb->insertItem( POPUP_MENU_ID, MenuItemType::Popup, POPUP_MENU_CAPTION, ROOT_MENU_ID );
size_t i;
for(i = 0; i != NUM_POSITIONS; ++i)
{
mb->insertItem( STORE_MENU_ITEM_ID[i], MenuItemType::Normal, STORE_MENU_ITEM_CAPTION[i], POPUP_MENU_ID );
mb->insertHotkey( STORE_MENU_ITEM_ID[i], STORE_HOTKEY_CONFIG_KEY_NAME[i], "Editor", DEFAULT_STORE_HOTKEY[i] );
mb->setItemDescription( STORE_MENU_ITEM_ID[i], STORE_MENU_ITEM_DESC );
ToolParam tp;
tp.store = true;
tp.index = i;
mb->attachTool( STORE_MENU_ITEM_ID[i], this, (AnyLite) tp );
}
mb->insertItem( MENU_SEPARATOR_ID[1], MenuItemType::Separator, StringUtil::BLANK, POPUP_MENU_ID );
for(i = 0; i != NUM_POSITIONS; ++i)
{
mb->insertItem( RESTORE_MENU_ITEM_ID[i], MenuItemType::Normal, RESTORE_MENU_ITEM_CAPTION[i], POPUP_MENU_ID );
mb->insertHotkey( RESTORE_MENU_ITEM_ID[i], RESTORE_HOTKEY_CONFIG_KEY_NAME[i], "Editor", DEFAULT_RESTORE_HOTKEY[i]);
mb->setItemDescription( RESTORE_MENU_ITEM_ID[i], RESTORE_MENU_ITEM_DESC );
ToolParam tp;
tp.store = false;
tp.index = i;
mb->attachTool(RESTORE_MENU_ITEM_ID[i], this, (AnyLite) tp);
}
updateMenuItems();
registerWorldListener();
}