2025-06-18 17:29:20 +03:00
|
|
|
/*
|
|
|
|
* HeroInfoWindow.h, part of VCMI engine
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../windows/CWindowObject.h"
|
|
|
|
|
|
|
|
class CLabel;
|
|
|
|
class CAnimImage;
|
2025-06-19 20:52:40 +03:00
|
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
2025-06-18 17:29:20 +03:00
|
|
|
struct InfoAboutHero;
|
2025-06-19 20:52:40 +03:00
|
|
|
VCMI_LIB_NAMESPACE_END
|
2025-06-18 17:29:20 +03:00
|
|
|
|
|
|
|
class HeroInfoBasicPanel : public CIntObject //extracted from InfoWindow to fit better as non-popup embed element
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
std::shared_ptr<CPicture> background;
|
|
|
|
std::vector<std::shared_ptr<CLabel>> labels;
|
|
|
|
std::vector<std::shared_ptr<CAnimImage>> icons;
|
|
|
|
|
|
|
|
public:
|
2025-06-19 20:52:40 +03:00
|
|
|
HeroInfoBasicPanel(const InfoAboutHero & hero, const Point * position, bool initializeBackground = true);
|
2025-06-18 17:29:20 +03:00
|
|
|
|
|
|
|
void show(Canvas & to) override;
|
|
|
|
|
|
|
|
void initializeData(const InfoAboutHero & hero);
|
|
|
|
void update(const InfoAboutHero & updatedInfo);
|
|
|
|
};
|
|
|
|
|
|
|
|
class HeroInfoWindow : public CWindowObject
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
std::shared_ptr<HeroInfoBasicPanel> content;
|
|
|
|
|
|
|
|
public:
|
2025-06-19 20:52:40 +03:00
|
|
|
HeroInfoWindow(const InfoAboutHero & hero, const Point * position);
|
2025-06-18 17:29:20 +03:00
|
|
|
};
|