1
0
Fork 0
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

30 Zeilen
645 B

#ifndef __GLGUIOBJECT_H
#define __GLGUIOBJECT_H
#include <iostream>
#include <string>
#include <SDL.h>
#include <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