libsegl/glgui/object.h

30 lines
645 B
C
Raw Normal View History

2008-02-09 13:43:23 +01:00
#ifndef __GLGUIOBJECT_H
#define __GLGUIOBJECT_H
#include <iostream>
#include <string>
2008-09-19 17:34:01 +02:00
#include <SDL.h>
#include <SDL_opengl.h>
2008-02-09 13:43:23 +01:00
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