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.
33 Zeilen
648 B
33 Zeilen
648 B
#ifndef __GLGUIBUTTON_H
|
|
#define __GLGUIBUTTON_H
|
|
|
|
#include <iostream>
|
|
#include <string>
|
|
#include <SDL.h>
|
|
#include <SDL_opengl.h>
|
|
|
|
#include "textlabel.h"
|
|
|
|
#define GLGUI_BUTTONDOWN SDL_USEREVENT+10
|
|
|
|
namespace segl {
|
|
|
|
class GLGuiButton : public GLGuiTextLabel {
|
|
protected:
|
|
int eventid;
|
|
Color highlightcol;
|
|
|
|
public:
|
|
GLGuiButton(int _eventid, int _x, int _y, bool _center=false, int _wrap=0);
|
|
GLGuiButton(int _eventid, std::string str, int _x, int _y, bool _center=false, int _wrap=0);
|
|
|
|
void setHighlightColor();
|
|
|
|
void onMouseOver(int m_x, int m_y);
|
|
void onMouseClick(int m_x, int m_y, int m_button);
|
|
};
|
|
|
|
} // namespace {
|
|
|
|
#endif
|