1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
vcmi/CMessage.h
Michał W. Urbańczyk 0ea7a46309 * new files (CAdvmapInterface.h and CAdvmapInterface.cpp)
* more player interface (but it's still beginning)
* int3 members public
* more usage of int3
* adjusted animation speed
* reversed changes from rev.165 in CPreGame - it wasn't bug, it just works so. That change was breaking a few things in CPreGame and was needless - Player ID == Player's Color. I thought it was obvious.
* minor stuff
2007-08-03 21:47:34 +00:00

35 lines
961 B
C++

#ifndef CMESSAGE_H
#define CMESSAGE_H
#include "SDL_TTF.h"
#include "SDL.h"
#include "CSemiDefHandler.h"
#include "CDefHandler.h"
#include "CGameInterface.h"
#include "CGameInfo.h"
#include "SDL_Extensions.h"
#define CGI (CGameInfo::mainObj)
enum EWindowType {infoOnly, infoOK, yesOrNO};
class CPreGame;
class MapSel;
namespace NMessage
{
extern std::vector<std::vector<SDL_Surface*> > piecesOfBox; //in colors of all players
extern SDL_Surface * background ;
}
class CMessage
{
public:
static SDL_Surface * genMessage(std::string title, std::string text, EWindowType type=infoOnly,
std::vector<CDefHandler*> *addPics=NULL, void * cb=NULL);
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
CMessage();
static void init();
static void dispose();
};
//
#endif //CMESSAGE_H