2023-07-06 21:14:12 +02:00
|
|
|
/*
|
|
|
|
* CArtifactsOfHeroBackpack.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 "CArtifactsOfHeroBase.h"
|
|
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
|
|
|
|
|
|
|
struct ArtifactLocation;
|
|
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_END
|
|
|
|
|
2023-07-17 18:42:55 +02:00
|
|
|
class CListBoxWithCallback;
|
|
|
|
|
2023-07-06 21:14:12 +02:00
|
|
|
class CArtifactsOfHeroBackpack : public CArtifactsOfHeroBase
|
|
|
|
{
|
|
|
|
public:
|
2023-07-16 20:16:12 +02:00
|
|
|
CArtifactsOfHeroBackpack(const Point & position);
|
2023-07-06 21:14:12 +02:00
|
|
|
void swapArtifacts(const ArtifactLocation & srcLoc, const ArtifactLocation & dstLoc);
|
|
|
|
void pickUpArtifact(CHeroArtPlace & artPlace);
|
2023-07-17 18:42:55 +02:00
|
|
|
void scrollBackpack(int offset) override;
|
|
|
|
void updateBackpackSlots() override;
|
|
|
|
size_t getActiveSlotLinesNum();
|
2023-07-06 21:14:12 +02:00
|
|
|
|
2023-07-16 20:16:12 +02:00
|
|
|
private:
|
2023-07-17 18:42:55 +02:00
|
|
|
std::shared_ptr<CListBoxWithCallback> backpackListBox;
|
2023-08-20 18:57:53 +02:00
|
|
|
std::vector<std::shared_ptr<CPicture>> backpackSlotsBackgrounds;
|
2023-07-06 21:14:12 +02:00
|
|
|
const size_t HERO_BACKPACK_WINDOW_SLOT_COLUMNS = 8;
|
2023-08-21 16:56:50 +02:00
|
|
|
const size_t HERO_BACKPACK_WINDOW_SLOT_ROWS = 8;
|
2023-07-16 20:16:12 +02:00
|
|
|
};
|