CreatureCostBox.h 698 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * CreatureCostBox.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 "../../lib/ResourceSet.h"
  12. #include "../gui/CIntObject.h"
  13. class CLabel;
  14. class CAnimImage;
  15. class CreatureCostBox : public CIntObject
  16. {
  17. public:
  18. void set(TResources res);
  19. CreatureCostBox(Rect position, std::string titleText);
  20. void createItems(TResources res);
  21. private:
  22. using LabelPtr = std::shared_ptr<CLabel>;
  23. using ImagePtr = std::shared_ptr<CAnimImage>;
  24. LabelPtr title;
  25. std::map<GameResID, std::pair<LabelPtr, ImagePtr>> resources;
  26. };