void toggleCameraFpsMode() { ICameraSceneNode * cam = irrDevice->getSceneManager()->getActiveCamera(); if (cam) { cam->setInputReceiverEnabled( !cam->isInputReceiverEnabled()); } }
// ---------------------------------------------------------------------------- void Editor::initAfterDataDirKnown() { m_rcs = RoadCrossSectionWndw::get(); // fonts IGUISkin* skin = m_gui_env->getSkin(); m_font = m_gui_env->getFont(m_data_loc + L"editor/font/font.xml"); skin->setFont(m_font); // removing gui transparency for (s32 i = 0; i < EGDC_COUNT; ++i) { video::SColor col = skin->getColor((EGUI_DEFAULT_COLOR)i); col.setAlpha(255); skin->setColor((EGUI_DEFAULT_COLOR)i, col); } // free camera ICameraSceneNode* cam; cam = m_scene_manager->addCameraSceneNodeMaya(); cam->setID(1); cam->setFarValue(20000.f); cam->setTarget(vector3df(0, 0, 0)); cam->setInputReceiverEnabled(false); // viewport init ICameraSceneNode* norm_cam; norm_cam = m_scene_manager->addCameraSceneNode(0, vector3df(25, 50, 30), vector3df(5, 10, 6)); norm_cam->setID(2); m_viewport = Viewport::get(norm_cam, &m_mouse, &m_keys); m_viewport->setFreeCamera(cam); m_indicator = m_viewport->getIndicator(); m_scene_manager->setActiveCamera(norm_cam); m_msg_wndw = MsgWndw::get(); m_toolbar = ToolBar::getToolBar(); m_new_dialog_wndw = NewDialogWndw::get(); m_new_dialog_wndw->hide(); m_welcome_screen = WelcomeScreen::get(); } // initAfterDataDirKnown