mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-24 07:05:39 +00:00
42a39c52e6
Added text rendering to Renderer, which uses SDL_ttf. Using LinLibertine_R.ttf font (GPL). A lot more - soon I should have the "skeleton" done.
25 lines
583 B
C++
25 lines
583 B
C++
#ifndef _GUICOMPONENT_H_
|
|
#define _GUICOMPONENT_H_
|
|
|
|
#include <vector>
|
|
#include "Renderer.h"
|
|
#include "InputManager.h"
|
|
|
|
class GuiComponent
|
|
{
|
|
public:
|
|
void render();
|
|
virtual void onRender() { };
|
|
virtual void onInput(InputManager::InputButton button, bool keyDown) { };
|
|
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;
|
|
};
|
|
|
|
#endif
|