//------------------------------------------------------------------------------------ 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); }
//------------------------------------------------------------------------------------ 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); }
//------------------------------------------------------------------------------------ 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); }
//------------------------------------------------------------------------------------ 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); }
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(); }
//------------------------------------------------------------------------------------ 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(); }