Added properties to TextButtonInstance
Why wont the go button become textured aaaaaaaaaaaaaaaa
This commit is contained in:
@@ -1,9 +1,27 @@
|
||||
#include "TextButtonInstance.h"
|
||||
|
||||
Vector2 boxBegin;
|
||||
Vector2 boxEnd;
|
||||
Vector2 fontLocationRelativeTo;
|
||||
Color4 textColor;
|
||||
Color4 textOutlineColor;
|
||||
Color4 boxColor;
|
||||
Color4 boxOutlineColor;
|
||||
bool centeredWithinBox;
|
||||
std::string title;
|
||||
G3D::GFontRef font;
|
||||
|
||||
|
||||
TextButtonInstance::TextButtonInstance(void)
|
||||
{
|
||||
boxBegin = Vector2(0,0);
|
||||
boxEnd = Vector2(0,0);
|
||||
fontLocationRelativeTo = Vector2(0,0);
|
||||
centeredWithinBox = false;
|
||||
title = "TextBox";
|
||||
textColor = Color4(1, 1, 1, 1);
|
||||
textOutlineColor = Color4(0, 0, 0, 0);
|
||||
boxColor = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||
boxOutlineColor = Color4(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
TextButtonInstance::~TextButtonInstance(void)
|
||||
|
||||
@@ -7,4 +7,9 @@ class TextButtonInstance :
|
||||
public:
|
||||
TextButtonInstance(void);
|
||||
~TextButtonInstance(void);
|
||||
Vector2 boxBegin;
|
||||
Vector2 boxEnd;
|
||||
Vector2 fontLocationRelativeTo;
|
||||
bool centeredWithinBox;
|
||||
std::string title;
|
||||
};
|
||||
|
||||
8
main.cpp
8
main.cpp
@@ -455,12 +455,12 @@ void Demo::onGraphics(RenderDevice* rd) {
|
||||
|
||||
|
||||
|
||||
//rd->pushState();
|
||||
rd->pushState();
|
||||
|
||||
//rd->setTexture(0, go);
|
||||
rd->setTexture(0, go);
|
||||
|
||||
|
||||
/*rd->enableAlphaWrite();
|
||||
rd->enableAlphaWrite();
|
||||
rd->setTexCoord(0, Vector2(0.0F, 0.0F));
|
||||
rd->setTexCoord(0, Vector2(1.0F, 0.0F));
|
||||
rd->setTexCoord(0, Vector2(0.0F, 1.0F));
|
||||
@@ -473,7 +473,7 @@ void Demo::onGraphics(RenderDevice* rd) {
|
||||
rd->sendVertex(Vector2(10,85));
|
||||
rd->endPrimitive();
|
||||
rd->setTexture(0, NULL);
|
||||
//rd->popState();*/
|
||||
rd->popState();
|
||||
|
||||
|
||||
app->renderDevice->pop2D();
|
||||
|
||||
Reference in New Issue
Block a user