CHeroOverview.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 CHeroOverview : public CWindowObject
  21. {
  22. const HeroTypeID & hero;
  23. int heroIdx;
  24. const int yOffset = 35;
  25. const int borderOffset = 5;
  26. const ColorRGBA rectangleColor = ColorRGBA(0, 0, 0, 75);
  27. const ColorRGBA borderColor = ColorRGBA(128, 100, 75);
  28. const ColorRGBA grayedColor = ColorRGBA(158, 130, 105);
  29. std::shared_ptr<CFilledTexture> backgroundTexture;
  30. std::vector<std::shared_ptr<TransparentFilledRectangle>> backgroundRectangles;
  31. std::vector<std::shared_ptr<SimpleLine>> backgroundLines;
  32. std::shared_ptr<CLabel> labelTitle;
  33. std::shared_ptr<CAnimImage> imageHero;
  34. std::shared_ptr<CLabel> labelHeroName;
  35. std::shared_ptr<CMultiLineLabel> labelHeroBiography;
  36. std::shared_ptr<CLabel> labelHeroClass;
  37. std::shared_ptr<CLabel> labelHeroSpeciality;
  38. std::shared_ptr<CAnimImage> imageSpeciality;
  39. std::vector<std::shared_ptr<CLabel>> labelSkillHeader;
  40. std::vector<std::shared_ptr<CAnimImage>> imageSkill;
  41. std::vector<std::shared_ptr<CLabel>> labelSkillFooter;
  42. std::shared_ptr<CLabel> labelSpecialityName;
  43. std::shared_ptr<CMultiLineLabel> labelSpecialityDescription;
  44. std::shared_ptr<CLabel> labelArmyTitle;
  45. std::vector<std::shared_ptr<CAnimImage>> imageArmy;
  46. std::vector<std::shared_ptr<CLabel>> labelArmyCount;
  47. std::shared_ptr<CLabel> labelWarMachineTitle;
  48. std::vector<std::shared_ptr<CAnimImage>> imageWarMachine;
  49. std::shared_ptr<CLabel> labelSpellTitle;
  50. std::vector<std::shared_ptr<CAnimImage>> imageSpells;
  51. std::vector<std::shared_ptr<CLabel>> labelSpellsNames;
  52. std::shared_ptr<CLabel> labelSecSkillTitle;
  53. std::vector<std::shared_ptr<CAnimImage>> imageSecSkills;
  54. std::vector<std::shared_ptr<CLabel>> labelSecSkillsNames;
  55. void genBackground();
  56. void genControls();
  57. public:
  58. CHeroOverview(const HeroTypeID & h);
  59. };