00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #import <vector>
00027 #import <string>
00028
00029 #import "sgTexture.h"
00030 #import "sgMaterial.h"
00031 #import "sgMesh.h"
00032 #import "sgVector2.h"
00033
00037 class sgDisplayString
00038 {
00039 public:
00044 void translate();
00045
00050 std::string str;
00051
00052 std::vector<unsigned int> translatedx;
00053 std::vector<unsigned int> translatedy;
00054 };
00055
00059 class sgPanelElement
00060 {
00061 public:
00066 unsigned int type;
00067
00072 sgVector2 pos;
00073
00078 sgVector2 size;
00079
00084 sgMaterial *mat;
00085 };
00086
00090 class sgImage : public sgPanelElement
00091 {
00092 public:
00097 float ang;
00098 };
00099
00103 class sgText : public sgPanelElement
00104 {
00105 public:
00110 sgDisplayString str;
00111
00116 sgVector2 charsize;
00117 };
00118
00122 class sgPanel
00123 {
00124 public:
00131 sgPanel(sgPanel* p, sgPanel *n);
00132
00137 ~sgPanel();
00138
00144 sgPanel *createPanel();
00145
00155 void addImage(const char *imgtexfile, const sgVector2 &pos, const sgVector2 &size, const char *vs = NULL, const char *fs = NULL);
00156
00168 void addText(const char *str, const sgVector2 &charsize, const sgVector2 &pos, const sgVector2 &size, const char *fonttexfile, const char *vs = NULL, const char *fs = NULL);
00169
00174 void destroy();
00175
00180 void destroyAll();
00181
00186 sgVector2 pos;
00187
00192 std::vector<sgPanelElement*> elements;
00193
00198 sgPanel *prev;
00199
00204 sgPanel *next;
00205 };