Go to the documentation of this file.00001 #pragma once
00002 #include "constants.h"
00003 #include "ggraphicsobject.h"
00004 #include "GShaderManager.h"
00005 #include "GSceneManager.h"
00006
00007 class GHudElement : public GGraphicsObject
00008 {
00009 public:
00010 float x;
00011 float y;
00012 float height;
00013 float width;
00014 int TextureId;
00015 int AlphaId;
00016
00017 double ActivationTime;
00018 double LifeTime;
00019
00020 bool active;
00021 std::string name;
00022
00023 float vertices[8];
00024 float texcoords[8];
00025 unsigned short indices[6];
00026 unsigned int vboId[2];
00027
00028 GHudElement(std::string name, float x, float y, float width, float height, int texId, int alphaId);
00029 ~GHudElement(void);
00030 int SetupVBO(void);
00031 int Draw(double time, double dtime, GMatrix16 *viewmatrix, GMatrix16 *worldmatrix, int FLAGS);
00032 int DrawSprites(double time, double dtime, GMatrix16 *viewmatrix, GMatrix16 *worldmatrix, int FLAGS);
00033
00034 std::string GetName(void);
00035 int ToggleActive(void);
00036 void SetActive(bool);
00037 void SetTemporary(double time, float lifetime);
00038 };