#pragma once

#include <vector>
#include "xmllayout.h"

class CXmlTexCoords : public IXmlBase
{
public:    
	CXmlTexCoords();
	virtual	bool				LoadFromDOMNode(const DOMNode* node);

public:
	float						m_left, m_top, m_right, m_bottom;
};

class CXmlTexture : public CXmlLayout
{
public:
	CXmlTexture(CXmlUi* pXmlUi=NULL, CXmlLayout* pParent=NULL);
	virtual ~CXmlTexture();

	enum {
		eAlphaMode_Disable		= 0,
		eAlphaMode_Blend,
		eAlphaMode_Add
	};

	int							XmlValueToAlphaMode(const char* valueStr);
	
	virtual	void				LoadNodeAttribute(const DOMNamedNodeMap* nodeMap);
	virtual	void				LoadNodeElement(const DOMNode* node, const char* nodeName);
	virtual	void				Inherit(CXmlLayout* pXmlLayout);

public:
	string						m_file;
	vector<CXmlTexCoords>		m_texCoords;			// tu,tv¶b®y¼Ð
	CXmlColor					m_color;
	int							m_alphaMode;
	float						m_animationSpeed;
};