CHeroWindow.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #ifndef __CHEROWINDOW_H__
  2. #define __CHEROWINDOW_H__
  3. #include "CPlayerInterface.h"
  4. /*
  5. * CHeroWindow.h, part of VCMI engine
  6. *
  7. * Authors: listed in file AUTHORS in main folder
  8. *
  9. * License: GNU General Public License v2.0 or later
  10. * Full text of license available in license.txt file, in main folder
  11. *
  12. */
  13. class AdventureMapButton;
  14. struct SDL_Surface;
  15. class CGHeroInstance;
  16. class CDefHandler;
  17. class CArtifact;
  18. class CHeroWindow;
  19. class LClickableAreaHero;
  20. class LRClickableAreaWText;
  21. class LRClickableAreaWTextComp;
  22. class CArtifactsOfHero;
  23. class CHeroSwitcher : public CIntObject
  24. {
  25. public:
  26. int id;
  27. CHeroWindow * getOwner();
  28. virtual void clickLeft(tribool down, bool previousState);
  29. CHeroSwitcher(int serial);
  30. };
  31. class CHeroWindow: public CWindowWithGarrison
  32. {
  33. enum ELabel {};
  34. std::map<ELabel, CLabel*> labels;
  35. CPicture *background;
  36. CGStatusBar * ourBar; //heroWindow's statusBar
  37. //general graphics
  38. CDefEssential *flags;
  39. //buttons
  40. //AdventureMapButton * gar4button; //splitting
  41. std::vector<CHeroSwitcher *> heroListMi; //new better list of heroes
  42. CArtifactsOfHero * artifs;
  43. //clickable areas
  44. LRClickableAreaWText * portraitArea;
  45. std::vector<LRClickableAreaWTextComp *> primSkillAreas;
  46. LRClickableAreaWText * expArea;
  47. LRClickableAreaWText * spellPointsArea;
  48. LRClickableAreaWText * specArea;//speciality
  49. MoraleLuckBox * morale, * luck;
  50. std::vector<LRClickableAreaWTextComp *> secSkillAreas;
  51. public:
  52. const CGHeroInstance * curHero;
  53. AdventureMapButton * quitButton, * dismissButton, * questlogButton; //general
  54. CHighlightableButton *tacticsButton; //garrison / formation handling;
  55. CHighlightableButtonsGroup *formations;
  56. int player;
  57. CHeroWindow(const CGHeroInstance *hero); //c-tor
  58. ~CHeroWindow(); //d-tor
  59. void setHero(const CGHeroInstance * hero); //sets main displayed hero
  60. void showAll(SDL_Surface * to); //shows and activates adv. map interface
  61. // void redrawCurBack(); //redraws curBAck from scratch
  62. void quit(); //stops displaying hero window and disposes
  63. void dismissCurrent(); //dissmissed currently displayed hero (curHero)
  64. void questlog(); //show quest log in hero window
  65. void switchHero(); //changes displayed hero
  66. //friends
  67. friend void CArtPlace::clickLeft(tribool down, bool previousState);
  68. friend class CPlayerInterface;
  69. };
  70. #endif // __CHEROWINDOW_H__