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

some minor improvements

This commit is contained in:
mateuszb
2008-01-25 19:09:41 +00:00
parent 1f324c3b31
commit b5ecb2e146
3 changed files with 135 additions and 64 deletions

View File

@@ -7,6 +7,7 @@ struct SDL_Surface;
class CGHeroInstance;
class CDefHandler;
class CArtifact;
class CHeroWindow;
class LClickableArea: public ClickableL
{
@@ -16,6 +17,14 @@ public:
virtual void deactivate();
};
class LClickableAreaHero : public LClickableArea
{
public:
int id;
CHeroWindow * owner;
virtual void clickLeft (tribool down);
};
class LClickableAreaWText: public LClickableArea
{
public:
@@ -41,7 +50,6 @@ class CHeroWindow: public IActivable, public IShowable, public virtual CIntObjec
{
SDL_Surface * background, * curBack;
const CGHeroInstance * curHero;
int player;
//general graphics
CDefHandler * skillpics, *flags;
@@ -50,7 +58,8 @@ class CHeroWindow: public IActivable, public IShowable, public virtual CIntObjec
AdventureMapButton<CHeroWindow> * quitButton, * dismissButton, * questlogButton, //general
* gar1button, * gar2button, * gar3button, * gar4button, //garrison / formation handling
* leftArtRoll, * rightArtRoll;
std::vector< AdventureMapButton<CHeroWindow> * > heroList; //list of heroes
//std::vector< AdventureMapButton<CHeroWindow> * > heroList; //list of heroes
std::vector<LClickableAreaHero *> heroListMi; //new better list of heroes
//artifact places
CArtPlace * artHead, * artLRing, * artRRing, * artLHand, * artRhand,
@@ -62,6 +71,7 @@ class CHeroWindow: public IActivable, public IShowable, public virtual CIntObjec
//clickable areas
LClickableAreaWText * portraitArea;
public:
int player;
CHeroWindow(int playerColor); //c-tor
~CHeroWindow(); //d-tor
void setHero(const CGHeroInstance * hero); //sets main displayed hero