RTS2D
include/gui/Gui.h
00001 #ifndef GUI_H
00002 #include <cstdio>
00003 #include "allegro5/allegro.h"
00004 #include "allegro5/allegro_font.h"
00005 #include "allegro5/allegro_image.h"
00006 #include "allegro5/allegro_ttf.h"
00007 #include <allegro5/allegro_primitives.h>
00008 #include "Game.h"
00009 #include "nihgui.h"
00010 #include "Mymath.h"
00011 #define GUI_H
00012 
00013 enum ACTION_STATE {IDLE, SELECT_UNIT, SELECT_BUILDING, TARGET};
00014 
00018 class Gui {
00019 public:
00020     Gui(const Theme & theme, ALLEGRO_DISPLAY *display);
00021     virtual ~Gui();
00022     float getPx();
00023     void setPx(float px);
00024     float getPy();
00025     void setPy(float py);
00026     float getWidth();
00027     void setWidth(float width);
00028     float getHeight();
00029     void setHeight(float height);
00030     std::string getAction();
00031     void setRectangle(float px, float py, float width, float height);
00032     void setGame(Game* game);
00033     void setSelect(std::vector<Unit*> select);
00034     void setSelectBuilding(Building* selectBuilding);
00035     void update(int aState);
00036     void render();
00037 
00038 protected:
00039 private:
00040     float px_;
00041     float py_;
00042     float width_;
00043     float height_;
00044     int aState_;
00045     Dialog* d;
00046     Button** button;
00047     std::vector<Unit*> select_;
00048     Building* selectBuilding_;
00049     Game* game_;
00050     void renderUnit();
00051     void renderBuilding();
00052     void renderStatus();
00053 };
00054 
00055 #endif // GUI_H
 Todos Classes Funções