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

Some code for town hall screen.

This commit is contained in:
Michał W. Urbańczyk
2008-03-09 23:06:35 +00:00
parent 0379fbfc1d
commit c3249d3fd7
11 changed files with 264 additions and 35 deletions

View File

@@ -50,8 +50,50 @@ public:
void townChange();
void show(SDL_Surface * to=NULL);
void showAll(SDL_Surface * to=NULL);
void buildingClicked(int building);
void enterHall();
void close();
void splitF();
void activate();
void deactivate();
};
class CHallInterface : public IShowable, public IActivable
{
public:
class CResDataBar : public IShowable, public CIntObject
{
public:
SDL_Surface *bg;
void show(SDL_Surface * to=NULL);
CResDataBar();
~CResDataBar();
} resdatabar;
class CBuildingBox : public Hoverable, public ClickableL, public ClickableR
{
public:
int ID;
int state;//(-1) - forbidden in this town, 0 - possible, 1 - lack of res, 2 - requirements/buildings per turn limit, (3) - already exists
void hover(bool on);
void clickLeft (tribool down);
void clickRight (tribool down);
void activate();
void deactivate();
~CBuildingBox();
};
std::vector<CBuildingBox*> boxes[5];
AdventureMapButton<CHallInterface> * exit;
SDL_Surface * bg;
CHallInterface(CCastleInterface * owner);
~CHallInterface();
void close();
void show(SDL_Surface * to=NULL);
void activate();
void deactivate();
};