/* * CExchangeWindow.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 "CWindowWithArtifacts.h" #include "../widgets/CExchangeController.h" class CGarrisonSlot; class CExchangeWindow : public CStatusbarWindow, public IGarrisonHolder, public CWindowWithArtifacts { std::array, 2> titles; std::vector> primSkillImages;//shared for both heroes std::array>, 2> primSkillValues; std::array>, 2> secSkillIcons; std::array, 2> specImages; std::array, 2> expImages; std::array, 2> expValues; std::array, 2> manaImages; std::array, 2> manaValues; std::vector> primSkillAreas; std::array>, 2> secSkillAreas; std::array, 2> heroAreas; std::array, 2> specialtyAreas; std::array, 2> experienceAreas; std::array, 2> spellPointsAreas; std::array, 2> morale; std::array, 2> luck; std::shared_ptr quit; std::array, 2> questlogButton; std::shared_ptr garr; std::shared_ptr buttonMoveUnitsFromLeftToRight; std::shared_ptr buttonMoveUnitsFromRightToLeft; std::shared_ptr buttonMoveArtifactsFromLeftToRight; std::shared_ptr buttonMoveArtifactsFromRightToLeft; std::shared_ptr exchangeUnitsButton; std::shared_ptr exchangeArtifactsButton; std::vector> moveUnitFromLeftToRightButtons; std::vector> moveUnitFromRightToLeftButtons; std::shared_ptr backpackButtonLeft; std::shared_ptr backpackButtonRight; CExchangeController controller; void moveArtifactsCallback(bool leftToRight); void swapArtifactsCallback(); void moveUnitsShortcut(bool leftToRight); void backpackShortcut(bool leftHero); void questLogShortcut(); std::array heroInst; std::array, 2> artifs; const CGarrisonSlot * getSelectedSlotID() const; public: CExchangeWindow(ObjectInstanceID hero1, ObjectInstanceID hero2, QueryID queryID); void keyPressed(EShortcut key) override; void update() override; // IGarrisonHolder impl void updateGarrisons() override; bool holdsGarrison(const CArmedInstance * army) override; };