CMapOverview.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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;
  27. class CMapOverviewWidget : public InterfaceObjectConfigurable
  28. {
  29. CMapOverview& p;
  30. bool drawPlayerElements;
  31. std::vector<Canvas> minimaps;
  32. Canvas createMinimapForLayer(std::unique_ptr<CMap> & map, int layer) const;
  33. std::vector<Canvas> createMinimaps(ResourcePath resource) const;
  34. std::vector<Canvas> 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 ESelectionScreen tabType;
  48. CMapOverview(std::string mapName, std::string fileName, std::string date, ResourcePath resource, ESelectionScreen tabType);
  49. };