Added visible and float booleans
This commit is contained in:
BIN
G3DTest.suo
BIN
G3DTest.suo
Binary file not shown.
@@ -16,9 +16,11 @@ Color4 boxColorDn;
|
|||||||
Color4 boxOutlineColorDn;
|
Color4 boxOutlineColorDn;
|
||||||
bool centeredWithinBox;
|
bool centeredWithinBox;
|
||||||
std::string title;
|
std::string title;
|
||||||
G3D::GFontRef font;
|
G3D::GFontRef* font;
|
||||||
int textSize;
|
int textSize;
|
||||||
|
bool floatBottom;
|
||||||
|
bool floatRight;
|
||||||
|
bool visible;
|
||||||
|
|
||||||
TextButtonInstance::TextButtonInstance(void)
|
TextButtonInstance::TextButtonInstance(void)
|
||||||
{
|
{
|
||||||
@@ -32,6 +34,9 @@ TextButtonInstance::TextButtonInstance(void)
|
|||||||
boxColor = Color4(0.6F,0.6F,0.6F,0.4F);
|
boxColor = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||||
boxOutlineColor = Color4(0, 0, 0, 0);
|
boxOutlineColor = Color4(0, 0, 0, 0);
|
||||||
textSize = 12;
|
textSize = 12;
|
||||||
|
floatBottom = false;
|
||||||
|
floatRight = false;
|
||||||
|
visible = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,4 +25,8 @@ public:
|
|||||||
bool centeredWithinBox;
|
bool centeredWithinBox;
|
||||||
std::string title;
|
std::string title;
|
||||||
G3D::GFontRef font;
|
G3D::GFontRef font;
|
||||||
|
bool floatBottom;
|
||||||
|
bool floatRight;
|
||||||
|
bool visible;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
10
main.cpp
10
main.cpp
@@ -14,6 +14,7 @@
|
|||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "Instance.h"
|
#include "Instance.h"
|
||||||
#include "PhysicalInstance.h"
|
#include "PhysicalInstance.h"
|
||||||
|
#include "TextButtonInstance.h"
|
||||||
|
|
||||||
#if G3D_VER < 61000
|
#if G3D_VER < 61000
|
||||||
#error Requires G3D 6.10
|
#error Requires G3D 6.10
|
||||||
@@ -22,6 +23,7 @@ static const float VNUM = 0.01F;
|
|||||||
static std::string title = "";
|
static std::string title = "";
|
||||||
static const std::string VERSION = "PRE-ALPHA ";
|
static const std::string VERSION = "PRE-ALPHA ";
|
||||||
static std::vector<Instance*> instances;
|
static std::vector<Instance*> instances;
|
||||||
|
static std::vector<Instance*> instances_2D;
|
||||||
static Instance* dataModel;
|
static Instance* dataModel;
|
||||||
static GFontRef fntdominant = NULL;
|
static GFontRef fntdominant = NULL;
|
||||||
static GFontRef fntlighttrek = NULL;
|
static GFontRef fntlighttrek = NULL;
|
||||||
@@ -102,6 +104,14 @@ PhysicalInstance* makePart()
|
|||||||
return part;
|
return part;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextButtonInstance* makeTextButton()
|
||||||
|
{
|
||||||
|
TextButtonInstance* part = new TextButtonInstance();
|
||||||
|
instances.push_back(part);
|
||||||
|
instances_2D.push_back(part);
|
||||||
|
return part;
|
||||||
|
}
|
||||||
|
|
||||||
void Demo::onInit() {
|
void Demo::onInit() {
|
||||||
|
|
||||||
// Called before Demo::run() beings
|
// Called before Demo::run() beings
|
||||||
|
|||||||
Reference in New Issue
Block a user