CMapOverview.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * CMapOverview.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. VCMI_LIB_NAMESPACE_BEGIN
  12. class CMap;
  13. VCMI_LIB_NAMESPACE_END
  14. #include "CWindowObject.h"
  15. #include "../../lib/filesystem/ResourcePath.h"
  16. #include "../gui/InterfaceObjectConfigurable.h"
  17. class CSlider;
  18. class CLabel;
  19. class CPicture;
  20. class CFilledTexture;
  21. class CTextBox;
  22. class IImage;
  23. class CanvasImage;
  24. class TransparentFilledRectangle;
  25. enum class ESelectionScreen : ui8;
  26. class CMapOverview;
  27. class CMapOverviewWidget : public InterfaceObjectConfigurable
  28. {
  29. CMapOverview& p;
  30. bool drawPlayerElements;
  31. std::vector<std::shared_ptr<CanvasImage>> minimaps;
  32. std::shared_ptr<CanvasImage> createMinimapForLayer(std::unique_ptr<CMap> & map, int layer) const;
  33. std::vector<std::shared_ptr<CanvasImage>> createMinimaps(const ResourcePath & resource) const;
  34. std::vector<std::shared_ptr<CanvasImage>> createMinimaps(std::unique_ptr<CMap> & map) const;
  35. std::shared_ptr<CPicture> buildDrawMinimap(const JsonNode & config) const;
  36. public:
  37. CMapOverviewWidget(CMapOverview& p);
  38. };
  39. class CMapOverview : public CWindowObject
  40. {
  41. std::shared_ptr<CMapOverviewWidget> widget;
  42. public:
  43. const ResourcePath resource;
  44. const std::string mapName;
  45. const std::string fileName;
  46. const std::string date;
  47. const std::string author;
  48. const std::string version;
  49. const ESelectionScreen tabType;
  50. CMapOverview(const std::string & mapName, const std::string & fileName, const std::string & date, const std::string & author, const std::string & version, const ResourcePath & resource, ESelectionScreen tabType);
  51. };