button, text is placed in middle of button, plane is placed behind text

This commit is contained in:
Remco
2016-06-20 12:38:16 +02:00
parent 6cf9437620
commit 8dcee70324
7 changed files with 53 additions and 26 deletions
+6 -7
View File
@@ -1,18 +1,17 @@
#pragma once
#include "MenuElement.h"
#include "Text.h"
class Button : public MenuElement
class Button : public Text
{
private:
std::string text;
float width, height;
Vec3f foreground;
private:
float width, height;
Vec3f background;
Vec2f planePosition;
public:
Button(const std::string &text, Vec2f position, float width, float height);
~Button();
void draw(void);
void draw();
void update(int x, int y);
void setForeground(Vec3f color);