Skip to content

Instantly share code, notes, and snippets.

@0x61726b
Created October 7, 2018 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0x61726b/e33b71ccd9714bbaa20f8d45f4aa8463 to your computer and use it in GitHub Desktop.
Save 0x61726b/e33b71ccd9714bbaa20f8d45f4aa8463 to your computer and use it in GitHub Desktop.
#include "Button.h"
#include "ColorBox.h"
Button::Button(const ColorBox& box)
{
this->box = box;
}
Button::~Button()
= default;
void Button::Draw()
{
}
void Button::Update()
{
}
#pragma once
#include <string>
#include "ColorBox.h"
//attach rect body to text
class Button
{
public:
Button(const ColorBox& box /*sf::Font font, std::string string, sf::Color text_color, int char_size*/);
~Button();
void Draw();
void Update();
private:
std::string string;
ColorBox box;
};
#pragma once
class ColorBox
{
public:
ColorBox(int stuff) { };
ColorBox() = default;;
~ColorBox() = default;;
void Update();
void ChangeColor();
/*sf::Vector2f GetPosition() { return body.getPosition(); }*/
private:
void Draw() {}
bool isCursorOver() { return false; }
bool isClickedOn() { return false; }
void isDragged() {};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment