2012-07-19 01:14:17 +00:00
|
|
|
#ifndef _GUICOMPONENT_H_
|
|
|
|
#define _GUICOMPONENT_H_
|
|
|
|
|
2012-07-19 16:13:27 +00:00
|
|
|
#include <vector>
|
|
|
|
#include "Renderer.h"
|
|
|
|
|
2012-07-19 01:14:17 +00:00
|
|
|
class GuiComponent
|
|
|
|
{
|
|
|
|
public:
|
2012-07-19 16:13:27 +00:00
|
|
|
void render();
|
|
|
|
virtual void onRender() { };
|
|
|
|
virtual unsigned int getLayer() { return BIT(0); };
|
|
|
|
|
|
|
|
void addChild(GuiComponent* comp);
|
|
|
|
void removeChild(GuiComponent* comp);
|
|
|
|
unsigned int getChildCount() { return mChildren.size(); }
|
|
|
|
GuiComponent* getChild(unsigned int i) { return mChildren.at(i); }
|
|
|
|
private:
|
|
|
|
std::vector<GuiComponent*> mChildren;
|
2012-07-19 01:14:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|