CMapOverview.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 Canvas;
  24. class TransparentFilledRectangle;
  25. enum ESelectionScreen : ui8;
  26. class CMapOverview : public CWindowObject
  27. {
  28. class CMapOverviewWidget : public InterfaceObjectConfigurable
  29. {
  30. CMapOverview& parent;
  31. bool drawPlayerElements;
  32. bool renderImage;
  33. Canvas createMinimapForLayer(std::unique_ptr<CMap> & map, int layer) const;
  34. std::vector<std::shared_ptr<IImage>> createMinimaps(ResourcePath resource, Point size) const;
  35. std::shared_ptr<TransparentFilledRectangle> buildDrawTransparentRect(const JsonNode & config) const;
  36. std::shared_ptr<CPicture> buildDrawMinimap(const JsonNode & config) const;
  37. std::shared_ptr<CTextBox> buildDrawPath(const JsonNode & config) const;
  38. std::shared_ptr<CLabel> buildDrawString(const JsonNode & config) const;
  39. public:
  40. CMapOverviewWidget(CMapOverview& parent);
  41. };
  42. std::shared_ptr<CMapOverviewWidget> widget;
  43. public:
  44. const ResourcePath resource;
  45. const std::string mapName;
  46. const std::string fileName;
  47. const std::string date;
  48. const ESelectionScreen tabType;
  49. CMapOverview(std::string mapName, std::string fileName, std::string date, ResourcePath resource, ESelectionScreen tabType);
  50. };