Browse Source

Button now can take a color

Odilitime 5 years ago
parent
commit
1bfe5a6542
  1. 2
      src/graphics/components/ButtonComponent.cpp
  2. 2
      src/graphics/components/ButtonComponent.h

2
src/graphics/components/ButtonComponent.cpp

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
extern TextRasterizerCache *rasterizerCache;
ButtonComponent::ButtonComponent(const float rawX, const float rawY, const float rawWidth, const float rawHeight, const int passedWindowWidth, const int passedWindowHeight) : BoxComponent(rawX, rawY, rawWidth, rawHeight, 0xA0A0A0FF, passedWindowWidth, passedWindowHeight) {
ButtonComponent::ButtonComponent(const float rawX, const float rawY, const float rawWidth, const float rawHeight, const unsigned int hexColor, const int passedWindowWidth, const int passedWindowHeight) : BoxComponent(rawX, rawY, rawWidth, rawHeight, hexColor, passedWindowWidth, passedWindowHeight) {
// BoxComponent should set up everything we need
//std::cout << "ButtonComponent::ButtonComponent - boxShader " << this->useBoxShader << std::endl;
// looks like it is

2
src/graphics/components/ButtonComponent.h

@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
// 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);
ButtonComponent(const float rawX, const float rawY, const float rawWidth, const float rawHeight, const unsigned int hexColor, const int passedWindowWidth, const int passedWindowHeight);
void render();
void resize(const int passedWindowWidth, const int passedWindowHeight);
void resizeToTextSize();

Loading…
Cancel
Save