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.
 
 
 
 

21 lines
668 B

#ifndef BUTTONCOMPONENT_H
#define BUTTONCOMPONENT_H
#include <GL/glew.h>
#include "BoxComponent.h"
#include "TextComponent.h"
#include "../opengl/Window.h"
// we may not need this if textComponent took a background color
// I guess we'll be inline for now
class ButtonComponent : public BoxComponent {
public:
ButtonComponent(const float rawX, const float rawY, const float rawWidth, const float rawHeight, const int passedWindowWidth, const int passedWindowHeight);
void render();
void resize(const int passedWindowWidth, const int passedWindowHeight);
void updateText();
std::string value="";
TextComponent *textLabel = nullptr;
};
#endif