예제 #1
0
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);
}
예제 #2
0
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();
}
예제 #3
0
	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
	}
예제 #4
0
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.");
}
예제 #5
0
void CGraphicsConfig::cfcbFontShadow(NLMISC::CConfigFile::CVar &var)
{
	m_FontShadow->setChecked(var.asBool());
	emit onFontShadow(getFontShadow());
}
예제 #6
0
void CGraphicsConfig::cfcbBackgroundColor(NLMISC::CConfigFile::CVar &var)
{
	m_BackgroundColor->setCurrentColor(QColor(var.asInt(0), var.asInt(1), var.asInt(2)));
	emit onBackgroundColor(getBackgroundColor());
}
예제 #7
0
void CGraphicsConfig::cfcbFontName(NLMISC::CConfigFile::CVar &var)
{
	m_FontName->setText(var.asString().c_str());
}
예제 #8
0
void CGraphicsConfig::cfcbGraphicsEnabled(NLMISC::CConfigFile::CVar &var)
{
	m_Enabled->setChecked(var.asBool());
}
예제 #9
0
	void CObjectViewer::cfcbBackgroundColor(NLMISC::CConfigFile::CVar &var)
	{
		// read variable from config file
		_BackgroundColor = CRGBA(var.asInt(0), var.asInt(1), var.asInt(2));
	}