You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
622 B

#ifndef __GLGUIBUTTON_H
#define __GLGUIBUTTON_H
#include <iostream>
#include <string>
#include <SDL/SDL.h>
#include <SDL/SDL_opengl.h>
#include "textlabel.h"
#define GLGUI_BUTTONDOWN SDL_USEREVENT+10
class GLGuiButton : public GLGuiTextLabel {
protected:
int eventid;
GLColor 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);
};
#endif