void CConfiguration::cfcbSearchPaths(NLMISC::CConfigFile::CVar &var) { uint varsize = var.size(); //CPath::clearMap(); for (uint i = 0; i < varsize; ++i) CPath::addSearchPath(var.asString(i), true, false); }
void CGraphicsConfig::cfcbGraphicsDrivers(NLMISC::CConfigFile::CVar &var) { while (m_Driver->count()) m_Driver->removeItem(0); for (uint i = 0; i < var.size(); ++i) m_Driver->addItem(var.asString(i).c_str()); cfcbGraphicsDriver(m_Configuration->getConfigFile().getVar("GraphicsDriver")); m_UndoStack->clear(); }
void CObjectViewer::cfcbGraphicsDriver(NLMISC::CConfigFile::CVar &var) { // Choose driver opengl to work correctly under Linux example _Direct3D = false; //_Driver = OpenGL; #ifdef NL_OS_WINDOWS std::string driver = var.asString(); if (driver == "Direct3D") _Direct3D = true; //m_Driver = Direct3D; else if (driver == "OpenGL") _Direct3D = false; //m_Driver = OpenGL; else nlwarning("Invalid driver specified, defaulting to OpenGL"); #endif }
void CGraphicsConfig::cfcbGraphicsDriver(NLMISC::CConfigFile::CVar &var) { QString value = var.asString().c_str(); QString dn = value.toLower(); for (sint i = 0; i < m_Driver->count(); ++i) { if (dn == m_Driver->itemText(i).toLower()) { m_Driver->setCurrentIndex(i); return; } } nlwarning("Unknown GraphicsDriver specified in config, skipping value."); }
void CGraphicsConfig::cfcbFontName(NLMISC::CConfigFile::CVar &var) { m_FontName->setText(var.asString().c_str()); }