diff --git a/G3DTest.suo b/G3DTest.suo index 5408154..f7e4e0c 100644 Binary files a/G3DTest.suo and b/G3DTest.suo differ diff --git a/TextButtonInstance.cpp b/TextButtonInstance.cpp index 69b405b..b388b17 100644 --- a/TextButtonInstance.cpp +++ b/TextButtonInstance.cpp @@ -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; } diff --git a/TextButtonInstance.h b/TextButtonInstance.h index f606862..1ac5ed1 100644 --- a/TextButtonInstance.h +++ b/TextButtonInstance.h @@ -25,4 +25,8 @@ public: bool centeredWithinBox; std::string title; G3D::GFontRef font; + bool floatBottom; + bool floatRight; + bool visible; + }; diff --git a/main.cpp b/main.cpp index 23aa7dc..6ec16b6 100644 --- a/main.cpp +++ b/main.cpp @@ -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 instances; +static std::vector 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