예제 #1
0
void UIAggregatorControl::LoadFromYamlNode(YamlNode * node, UIYamlLoader * loader)
{
	UIControl::LoadFromYamlNode(node, loader);
	
	YamlNode * pathNode = node->Get(AGGREGATOR_PATH);
	if (pathNode)
	{
		aggregatorPath = pathNode->AsString();
		UIYamlLoader loader;
		loader.Load(this, aggregatorPath);
	}
}
예제 #2
0
    UIListCell::UIListCell(const Rect &rect, const String &cellIdentifier, const FilePath &aggregatorPath)
        :	UIButton(rect)
        ,	currentIndex(-1)
        ,	identifier(cellIdentifier)
        ,	cellStore(NULL)
    {
		if (!aggregatorPath.IsEmpty())
		{
			UIAggregatorControl *aggregator = new UIAggregatorControl();
			UIYamlLoader loader;
			loader.Load(aggregator, aggregatorPath);
			
			this->AddControl(aggregator);
		}
    }
void UIAggregatorControl::LoadFromYamlNode(YamlNode * node, UIYamlLoader * loader)
{
	UIControl::LoadFromYamlNode(node, loader);
	
	YamlNode * pathNode = node->Get(AGGREGATOR_PATH);
	if (pathNode)
	{
		aggregatorPath = FilePath(pathNode->AsString());
		String aggregatorFileName = aggregatorPath.GetFilename();

		aggregatorPath = loader->GetCurrentPath() + aggregatorFileName;

		UIYamlLoader loader;
		loader.Load(this, aggregatorPath);

		aggregatorPath = FilePath(aggregatorFileName);
	}
}