30 lines
653 B
C
30 lines
653 B
C
|
#ifndef __GLGUIOBJECT_H
|
||
|
#define __GLGUIOBJECT_H
|
||
|
|
||
|
#include <iostream>
|
||
|
#include <string>
|
||
|
#include <SDL/SDL.h>
|
||
|
#include <SDL/SDL_opengl.h>
|
||
|
|
||
|
class GLGuiObject {
|
||
|
protected:
|
||
|
SDL_Rect pos;
|
||
|
bool highlightable, clickable, keyboardable;
|
||
|
public:
|
||
|
GLGuiObject();
|
||
|
virtual ~GLGuiObject() { };
|
||
|
|
||
|
virtual void render()=0;
|
||
|
|
||
|
// Optionen
|
||
|
bool isHighlightable() { return highlightable; };
|
||
|
bool isClickable() { return clickable; };
|
||
|
bool isKeyboardable() { return keyboardable; };
|
||
|
|
||
|
virtual void onMouseOver(int m_x, int m_y) { };
|
||
|
virtual void onMouseClick(int m_x, int m_y, int m_button) { };
|
||
|
virtual void onKeyboardInput(char c) { };
|
||
|
};
|
||
|
|
||
|
#endif
|