CHeroOverview.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * CHeroOverview.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "../windows/CWindowObject.h"
  12. class CLabel;
  13. class CMultiLineLabel;
  14. class CFilledTexture;
  15. class CAnimImage;
  16. class CComponentBox;
  17. class CTextBox;
  18. class TransparentFilledRectangle;
  19. class SimpleLine;
  20. class CSecSkillPlace;
  21. class CHeroOverview : public CWindowObject
  22. {
  23. const HeroTypeID & hero;
  24. int heroIdx;
  25. const int yOffset = 35;
  26. const int borderOffset = 5;
  27. const ColorRGBA rectangleColor = ColorRGBA(0, 0, 0, 75);
  28. const ColorRGBA borderColor = ColorRGBA(128, 100, 75);
  29. const ColorRGBA grayedColor = ColorRGBA(158, 130, 105);
  30. std::shared_ptr<CFilledTexture> backgroundTexture;
  31. std::vector<std::shared_ptr<TransparentFilledRectangle>> backgroundRectangles;
  32. std::vector<std::shared_ptr<SimpleLine>> backgroundLines;
  33. std::shared_ptr<CLabel> labelTitle;
  34. std::shared_ptr<CAnimImage> imageHero;
  35. std::shared_ptr<CLabel> labelHeroName;
  36. std::shared_ptr<CTextBox> labelHeroBiography;
  37. std::shared_ptr<CLabel> labelHeroClass;
  38. std::shared_ptr<CLabel> labelHeroSpeciality;
  39. std::shared_ptr<CAnimImage> imageSpeciality;
  40. std::vector<std::shared_ptr<CLabel>> labelSkillHeader;
  41. std::vector<std::shared_ptr<CAnimImage>> imageSkill;
  42. std::vector<std::shared_ptr<CLabel>> labelSkillFooter;
  43. std::shared_ptr<CLabel> labelSpecialityName;
  44. std::shared_ptr<CTextBox> labelSpecialityDescription;
  45. std::shared_ptr<CLabel> labelArmyTitle;
  46. std::vector<std::shared_ptr<CAnimImage>> imageArmy;
  47. std::vector<std::shared_ptr<CLabel>> labelArmyCount;
  48. std::shared_ptr<CLabel> labelWarMachineTitle;
  49. std::vector<std::shared_ptr<CAnimImage>> imageWarMachine;
  50. std::shared_ptr<CLabel> labelSpellTitle;
  51. std::vector<std::shared_ptr<CAnimImage>> imageSpells;
  52. std::vector<std::shared_ptr<CLabel>> labelSpellsNames;
  53. std::shared_ptr<CLabel> labelSecSkillTitle;
  54. std::vector<std::shared_ptr<CSecSkillPlace>> secSkills;
  55. std::vector<std::shared_ptr<CLabel>> labelSecSkillsNames;
  56. void genBackground();
  57. void genControls();
  58. public:
  59. CHeroOverview(const HeroTypeID & h);
  60. };