2009-04-04 22:26:41 +03:00
|
|
|
#ifndef __CHEROWINDOW_H__
|
|
|
|
#define __CHEROWINDOW_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include "CPlayerInterface.h"
|
|
|
|
|
2009-04-15 17:03:31 +03:00
|
|
|
/*
|
|
|
|
* CHeroWindow.h, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2009-04-04 22:26:41 +03:00
|
|
|
class AdventureMapButton;
|
|
|
|
struct SDL_Surface;
|
|
|
|
class CGHeroInstance;
|
|
|
|
class CDefHandler;
|
|
|
|
class CArtifact;
|
|
|
|
class CHeroWindow;
|
2009-06-18 18:05:00 +03:00
|
|
|
class LClickableAreaHero;
|
|
|
|
class LRClickableAreaWText;
|
|
|
|
class LRClickableAreaWTextComp;
|
|
|
|
class CArtifactsOfHero;
|
2009-04-04 22:26:41 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
2009-08-11 19:05:33 +03:00
|
|
|
class CHeroWindow: public CWindowWithGarrison
|
2009-04-04 22:26:41 +03:00
|
|
|
{
|
|
|
|
SDL_Surface * background, * curBack;
|
|
|
|
CStatusBar * ourBar; //heroWindow's statusBar
|
|
|
|
|
|
|
|
//general graphics
|
2009-06-17 19:46:16 +03:00
|
|
|
CDefEssential *flags;
|
2009-04-04 22:26:41 +03:00
|
|
|
|
|
|
|
//buttons
|
|
|
|
AdventureMapButton * gar4button; //splitting
|
|
|
|
std::vector<LClickableAreaHero *> heroListMi; //new better list of heroes
|
|
|
|
|
2009-06-18 18:05:00 +03:00
|
|
|
CArtifactsOfHero * artifs;
|
|
|
|
|
2009-04-04 22:26:41 +03:00
|
|
|
//clickable areas
|
|
|
|
LRClickableAreaWText * portraitArea;
|
|
|
|
std::vector<LRClickableAreaWTextComp *> primSkillAreas;
|
|
|
|
LRClickableAreaWText * expArea;
|
|
|
|
LRClickableAreaWText * spellPointsArea;
|
|
|
|
LRClickableAreaWTextComp * luck;
|
|
|
|
LRClickableAreaWTextComp * morale;
|
|
|
|
std::vector<LRClickableAreaWTextComp *> secSkillAreas;
|
|
|
|
public:
|
2009-04-14 15:47:09 +03:00
|
|
|
const CGHeroInstance * curHero;
|
2009-06-19 15:10:36 +03:00
|
|
|
AdventureMapButton * quitButton, * dismissButton, * questlogButton; //general
|
|
|
|
|
2009-04-04 22:26:41 +03:00
|
|
|
CHighlightableButton *gar2button; //garrison / formation handling;
|
|
|
|
CHighlightableButtonsGroup *formations;
|
|
|
|
int player;
|
|
|
|
CHeroWindow(int playerColor); //c-tor
|
|
|
|
~CHeroWindow(); //d-tor
|
2009-06-19 15:10:36 +03:00
|
|
|
void setHero(const CGHeroInstance * hero); //sets main displayed hero
|
2009-04-04 22:26:41 +03:00
|
|
|
void activate(); //activates hero window;
|
|
|
|
void deactivate(); //activates hero window;
|
2009-04-14 15:47:09 +03:00
|
|
|
virtual void show(SDL_Surface * to); //shows hero window
|
2009-04-04 22:26:41 +03:00
|
|
|
void redrawCurBack(); //redraws curBAck from scratch
|
2009-06-10 23:48:55 +03:00
|
|
|
void dispose(); //free resources not needed after closing windows and reset state
|
|
|
|
void quit(); //stops displaying hero window and disposes
|
2009-04-04 22:26:41 +03:00
|
|
|
void dismissCurrent(); //dissmissed currently displayed hero (curHero)
|
2009-04-04 01:34:31 +03:00
|
|
|
void questlog(); //show quest log in hero window
|
2009-04-04 22:26:41 +03:00
|
|
|
void switchHero(); //changes displayed hero
|
|
|
|
|
|
|
|
//friends
|
2009-08-11 19:05:33 +03:00
|
|
|
friend void CArtPlace::clickLeft(tribool down, bool previousState);
|
2009-04-04 22:26:41 +03:00
|
|
|
friend class CPlayerInterface;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __CHEROWINDOW_H__
|