2017-07-13 10:26:03 +02:00
|
|
|
/*
|
2023-02-01 16:42:03 +02:00
|
|
|
* CResDataBar.h, part of VCMI engine
|
2017-07-13 10:26:03 +02:00
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
2011-12-14 00:23:17 +03:00
|
|
|
#pragma once
|
|
|
|
|
2023-02-01 20:42:06 +02:00
|
|
|
#include "../gui/CIntObject.h"
|
2015-02-02 14:02:27 +02:00
|
|
|
|
2011-02-22 13:52:36 +02:00
|
|
|
/// Resources bar which shows information about how many gold, crystals,... you have
|
|
|
|
/// Current date is displayed too
|
2012-06-13 16:04:06 +03:00
|
|
|
class CResDataBar : public CIntObject
|
2008-12-27 03:01:59 +02:00
|
|
|
{
|
2023-02-03 18:55:25 +02:00
|
|
|
std::string buildDateString();
|
|
|
|
|
2018-04-07 13:34:11 +02:00
|
|
|
std::shared_ptr<CPicture> background;
|
|
|
|
|
2008-12-27 03:01:59 +02:00
|
|
|
std::vector<std::pair<int,int> > txtpos;
|
|
|
|
|
2023-02-10 23:29:13 +02:00
|
|
|
|
|
|
|
void draw(SDL_Surface * to);
|
|
|
|
public:
|
2008-12-27 03:01:59 +02:00
|
|
|
CResDataBar();
|
|
|
|
CResDataBar(const std::string &defname, int x, int y, int offx, int offy, int resdist, int datedist);
|
|
|
|
|
2023-02-10 23:29:13 +02:00
|
|
|
void colorize(PlayerColor player);
|
2015-10-12 15:47:10 +02:00
|
|
|
void showAll(SDL_Surface * to) override;
|
2008-12-27 03:01:59 +02:00
|
|
|
};
|
2011-02-22 13:52:36 +02:00
|
|
|
|