Added visible and float booleans

This commit is contained in:
andreja6
2018-04-13 20:09:20 -07:00
parent 7d623bb99d
commit b12c753179
4 changed files with 21 additions and 2 deletions

Binary file not shown.

View File

@@ -16,9 +16,11 @@ Color4 boxColorDn;
Color4 boxOutlineColorDn;
bool centeredWithinBox;
std::string title;
G3D::GFontRef font;
G3D::GFontRef* font;
int textSize;
bool floatBottom;
bool floatRight;
bool visible;
TextButtonInstance::TextButtonInstance(void)
{
@@ -32,6 +34,9 @@ TextButtonInstance::TextButtonInstance(void)
boxColor = Color4(0.6F,0.6F,0.6F,0.4F);
boxOutlineColor = Color4(0, 0, 0, 0);
textSize = 12;
floatBottom = false;
floatRight = false;
visible = true;
}

View File

@@ -25,4 +25,8 @@ public:
bool centeredWithinBox;
std::string title;
G3D::GFontRef font;
bool floatBottom;
bool floatRight;
bool visible;
};

View File

@@ -14,6 +14,7 @@
#include "resource.h"
#include "Instance.h"
#include "PhysicalInstance.h"
#include "TextButtonInstance.h"
#if G3D_VER < 61000
#error Requires G3D 6.10
@@ -22,6 +23,7 @@ static const float VNUM = 0.01F;
static std::string title = "";
static const std::string VERSION = "PRE-ALPHA ";
static std::vector<Instance*> instances;
static std::vector<Instance*> instances_2D;
static Instance* dataModel;
static GFontRef fntdominant = NULL;
static GFontRef fntlighttrek = NULL;
@@ -102,6 +104,14 @@ PhysicalInstance* makePart()
return part;
}
TextButtonInstance* makeTextButton()
{
TextButtonInstance* part = new TextButtonInstance();
instances.push_back(part);
instances_2D.push_back(part);
return part;
}
void Demo::onInit() {
// Called before Demo::run() beings