/src/RButton.h
#ifndef _RBUTTON_H
#define _RBUTTON_H

#include "RShader.h"
#include "misc.h"

#define PRESS_FADE 500

class RButton {
public:
	RShader* shader;

	RButton(int x, int y, int w, int h);
	~RButton(void);

	bool testHit(int x, int y);
	void press();
	void update(int t);
	void draw(int t);
	void setColor(float r, float g, float b);
	void setFadeColor(float r, float g, float b);
private:
	GLshort vertices[8];
	Color color;
	Color fadeColor;
	int lastPress;

	void setRect(int x, int y, int w, int h);
};

#endif //_RBUTTON_H