Ejemplo n.º 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);
}
Ejemplo n.º 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();
}
Ejemplo n.º 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
	}
Ejemplo n.º 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.");
}
Ejemplo n.º 5
0
void CGraphicsConfig::cfcbFontShadow(NLMISC::CConfigFile::CVar &var)
{
	m_FontShadow->setChecked(var.asBool());
	emit onFontShadow(getFontShadow());
}
Ejemplo n.º 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());
}
Ejemplo n.º 7
0
void CGraphicsConfig::cfcbFontName(NLMISC::CConfigFile::CVar &var)
{
	m_FontName->setText(var.asString().c_str());
}
Ejemplo n.º 8
0
void CGraphicsConfig::cfcbGraphicsEnabled(NLMISC::CConfigFile::CVar &var)
{
	m_Enabled->setChecked(var.asBool());
}
Ejemplo n.º 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));
	}