CMapOverview.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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& p;
  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::vector<std::shared_ptr<IImage>> createMinimaps(std::unique_ptr<CMap> & map, Point size) const;
  36. std::shared_ptr<CPicture> buildDrawMinimap(const JsonNode & config) const;
  37. public:
  38. CMapOverviewWidget(CMapOverview& p);
  39. };
  40. std::shared_ptr<CMapOverviewWidget> widget;
  41. public:
  42. const ResourcePath resource;
  43. const std::string mapName;
  44. const std::string fileName;
  45. const std::string date;
  46. const ESelectionScreen tabType;
  47. CMapOverview(std::string mapName, std::string fileName, std::string date, ResourcePath resource, ESelectionScreen tabType);
  48. };