2007-06-26 15:38:58 +03:00
|
|
|
#ifndef CMESSAGE_H
|
|
|
|
#define CMESSAGE_H
|
|
|
|
|
2007-08-12 20:48:05 +03:00
|
|
|
#include "global.h"
|
2007-06-12 12:33:20 +03:00
|
|
|
#include "SDL_TTF.h"
|
2007-07-29 02:01:25 +03:00
|
|
|
#include "SDL.h"
|
2007-08-30 13:11:53 +03:00
|
|
|
#include "hch\CSemiDefHandler.h"
|
|
|
|
#include "hch\CDefHandler.h"
|
2007-07-28 12:44:10 +03:00
|
|
|
#include "CGameInterface.h"
|
2007-07-29 02:01:25 +03:00
|
|
|
#include "CGameInfo.h"
|
|
|
|
#include "SDL_Extensions.h"
|
2007-06-12 12:33:20 +03:00
|
|
|
enum EWindowType {infoOnly, infoOK, yesOrNO};
|
2007-06-19 18:25:42 +03:00
|
|
|
class CPreGame;
|
2007-06-28 13:47:28 +03:00
|
|
|
class MapSel;
|
|
|
|
|
2007-07-29 02:01:25 +03:00
|
|
|
namespace NMessage
|
|
|
|
{
|
|
|
|
extern std::vector<std::vector<SDL_Surface*> > piecesOfBox; //in colors of all players
|
|
|
|
extern SDL_Surface * background ;
|
|
|
|
}
|
|
|
|
|
2007-06-12 12:33:20 +03:00
|
|
|
class CMessage
|
|
|
|
{
|
|
|
|
public:
|
2007-07-29 02:01:25 +03:00
|
|
|
static SDL_Surface * genMessage(std::string title, std::string text, EWindowType type=infoOnly,
|
2007-07-11 15:08:42 +03:00
|
|
|
std::vector<CDefHandler*> *addPics=NULL, void * cb=NULL);
|
2007-07-29 02:01:25 +03:00
|
|
|
static SDL_Surface * drawBox1(int w, int h, int playerColor=1);
|
|
|
|
static std::vector<std::string> * breakText(std::string text, int line=30, bool userBreak=true); //line - chars per line
|
2007-06-12 12:33:20 +03:00
|
|
|
CMessage();
|
2007-08-04 00:47:34 +03:00
|
|
|
static void init();
|
|
|
|
static void dispose();
|
2007-06-19 18:25:42 +03:00
|
|
|
};
|
|
|
|
//
|
2007-06-26 15:38:58 +03:00
|
|
|
|
|
|
|
#endif //CMESSAGE_H
|