1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

* CPreGame's buttons less ugly

* fixed sorting maps
* minor stuff
This commit is contained in:
Michał W. Urbańczyk
2007-07-28 23:01:25 +00:00
parent 060dc4c785
commit b38a8c9557
8 changed files with 116 additions and 53 deletions

View File

@@ -2,26 +2,34 @@
#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 std::vector<std::string> * breakText(std::string text, int line=30, bool userBreak=true); //line - chars per line
CDefHandler * piecesOfBox;
SDL_Surface * background;
SDL_Surface * genMessage(std::string title, std::string text, EWindowType type=infoOnly,
static SDL_Surface * genMessage(std::string title, std::string text, EWindowType type=infoOnly,
std::vector<CDefHandler*> *addPics=NULL, void * cb=NULL);
SDL_Surface * drawBox1(int w, int h, int playerColor=1);
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();
~CMessage();
void init();
void dispose();
};
//
#endif //CMESSAGE_H