CResDataBar.h 903 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * CResDataBar.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 "../gui/CIntObject.h"
  12. /// Resources bar which shows information about how many gold, crystals,... you have
  13. /// Current date is displayed too
  14. class CResDataBar : public CIntObject
  15. {
  16. std::string buildDateString();
  17. public:
  18. std::shared_ptr<CPicture> background;
  19. std::vector<std::pair<int,int> > txtpos;
  20. void clickRight(tribool down, bool previousState) override;
  21. CResDataBar();
  22. CResDataBar(const std::string &defname, int x, int y, int offx, int offy, int resdist, int datedist);
  23. ~CResDataBar();
  24. void draw(SDL_Surface * to);
  25. void show(SDL_Surface * to) override;
  26. void showAll(SDL_Surface * to) override;
  27. };