Пример #1
0
void LLUICtrlFactory::loadWidgetTemplate(const std::string& widget_tag, LLInitParam::BaseBlock& block)
{
	std::string filename = std::string("widgets") + gDirUtilp->getDirDelimiter() + widget_tag + ".xml";
	LLXMLNodePtr root_node;

	std::string full_filename = gDirUtilp->findSkinnedFilename(LLUI::getXUIPaths().front(), filename);
	if (!full_filename.empty())
	{
		LLUICtrlFactory::instance().pushFileName(full_filename);
		LLSimpleXUIParser parser;
		parser.readXUI(full_filename, block);
		LLUICtrlFactory::instance().popFileName();
	}
}
Пример #2
0
void LLUICtrlFactory::loadWidgetTemplate(const std::string& widget_tag, LLInitParam::BaseBlock& block)
{
	std::string filename = gDirUtilp->add("widgets", widget_tag + ".xml");
	LLXMLNodePtr root_node;

	// Here we're looking for the "en" version, the default-language version
	// of the file, rather than the localized version.
	std::string full_filename = gDirUtilp->findSkinnedFilenameBaseLang(LLDir::XUI, filename);
	if (!full_filename.empty())
	{
		LLUICtrlFactory::instance().pushFileName(full_filename);
		LLSimpleXUIParser parser;
		parser.readXUI(full_filename, block);
		LLUICtrlFactory::instance().popFileName();
	}
}