CMessage.h 961 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef CMESSAGE_H
  2. #define CMESSAGE_H
  3. #include "SDL_TTF.h"
  4. #include "SDL.h"
  5. #include "CSemiDefHandler.h"
  6. #include "CDefHandler.h"
  7. #include "CGameInterface.h"
  8. #include "CGameInfo.h"
  9. #include "SDL_Extensions.h"
  10. #define CGI (CGameInfo::mainObj)
  11. enum EWindowType {infoOnly, infoOK, yesOrNO};
  12. class CPreGame;
  13. class MapSel;
  14. namespace NMessage
  15. {
  16. extern std::vector<std::vector<SDL_Surface*> > piecesOfBox; //in colors of all players
  17. extern SDL_Surface * background ;
  18. }
  19. class CMessage
  20. {
  21. public:
  22. static SDL_Surface * genMessage(std::string title, std::string text, EWindowType type=infoOnly,
  23. std::vector<CDefHandler*> *addPics=NULL, void * cb=NULL);
  24. static SDL_Surface * drawBox1(int w, int h, int playerColor=1);
  25. static std::vector<std::string> * breakText(std::string text, int line=30, bool userBreak=true); //line - chars per line
  26. CMessage();
  27. static void init();
  28. static void dispose();
  29. };
  30. //
  31. #endif //CMESSAGE_H