HeroInfoWindow.h 1022 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * HeroInfoWindow.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 CAnimImage;
  14. struct InfoAboutHero;
  15. class HeroInfoBasicPanel : public CIntObject //extracted from InfoWindow to fit better as non-popup embed element
  16. {
  17. private:
  18. std::shared_ptr<CPicture> background;
  19. std::vector<std::shared_ptr<CLabel>> labels;
  20. std::vector<std::shared_ptr<CAnimImage>> icons;
  21. public:
  22. HeroInfoBasicPanel(const InfoAboutHero & hero, Point * position, bool initializeBackground = true);
  23. void show(Canvas & to) override;
  24. void initializeData(const InfoAboutHero & hero);
  25. void update(const InfoAboutHero & updatedInfo);
  26. };
  27. class HeroInfoWindow : public CWindowObject
  28. {
  29. private:
  30. std::shared_ptr<HeroInfoBasicPanel> content;
  31. public:
  32. HeroInfoWindow(const InfoAboutHero & hero, Point * position);
  33. };