2023-07-06 21:14:12 +02:00
|
|
|
/*
|
|
|
|
* CHeroBackpackWindow.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
|
|
|
|
|
2024-04-23 15:21:45 +02:00
|
|
|
#include "CWindowWithArtifacts.h"
|
2023-07-06 21:14:12 +02:00
|
|
|
|
2023-08-20 00:52:03 +02:00
|
|
|
class CFilledTexture;
|
|
|
|
|
2024-01-18 13:42:52 +02:00
|
|
|
class CHeroBackpackWindow : public CStatusbarWindow, public CWindowWithArtifacts
|
2023-07-06 21:14:12 +02:00
|
|
|
{
|
|
|
|
public:
|
2024-04-16 16:45:31 +02:00
|
|
|
CHeroBackpackWindow(const CGHeroInstance * hero, const std::vector<CArtifactsOfHeroPtr> & artsSets);
|
2023-07-06 21:14:12 +02:00
|
|
|
|
2023-11-07 14:17:34 +02:00
|
|
|
protected:
|
2023-07-06 21:14:12 +02:00
|
|
|
std::shared_ptr<CArtifactsOfHeroBackpack> arts;
|
2023-07-17 18:42:55 +02:00
|
|
|
std::shared_ptr<CButton> quitButton;
|
2024-09-26 12:47:26 +02:00
|
|
|
std::shared_ptr<CButton> sortBySlot;
|
2023-08-20 00:52:03 +02:00
|
|
|
std::shared_ptr<CFilledTexture> stretchedBackground;
|
2023-11-07 14:17:34 +02:00
|
|
|
const int windowMargin = 5;
|
|
|
|
|
|
|
|
void showAll(Canvas & to) override;
|
|
|
|
};
|
2023-08-20 00:52:03 +02:00
|
|
|
|
2024-04-23 15:21:45 +02:00
|
|
|
class CHeroQuickBackpackWindow : public CWindowWithArtifacts
|
2023-11-07 14:17:34 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
CHeroQuickBackpackWindow(const CGHeroInstance * hero, ArtifactPosition targetSlot);
|
2023-12-17 16:30:19 +02:00
|
|
|
void gesture(bool on, const Point & initialPosition, const Point & finalPosition) override;
|
|
|
|
void gesturePanning(const Point & initialPosition, const Point & currentPosition, const Point & lastUpdateDistance) override;
|
2024-09-24 15:35:28 +02:00
|
|
|
void notFocusedClick() override;
|
2023-11-07 14:17:34 +02:00
|
|
|
|
|
|
|
private:
|
2023-12-17 16:30:19 +02:00
|
|
|
std::shared_ptr<CArtifactsOfHeroQuickBackpack> arts;
|
|
|
|
std::shared_ptr<CFilledTexture> stretchedBackground;
|
|
|
|
const int windowMargin = 5;
|
|
|
|
|
2023-08-31 21:27:32 +02:00
|
|
|
void showAll(Canvas & to) override;
|
2023-07-16 20:16:12 +02:00
|
|
|
};
|