/* * BattleOnlyMode.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" #include "../../lib/constants/EntityIdentifiers.h" VCMI_LIB_NAMESPACE_BEGIN class CGHeroInstance; class CCreatureSet; class CMap; class EditorCallback; class BattleOnlyModeStartInfo; VCMI_LIB_NAMESPACE_END class FilledTexturePlayerColored; class CButton; class CPicture; class CLabel; class BattleOnlyModeWindow; class CAnimImage; class GraphicalPrimitiveCanvas; class CTextInput; class TransparentFilledRectangle; class BattleOnlyMode { public: static void openBattleWindow(); }; class BattleOnlyModeHeroSelector : public CIntObject { private: BattleOnlyModeWindow& parent; std::shared_ptr backgroundImage; std::shared_ptr heroImage; std::shared_ptr heroLabel; std::vector> creatureImage; int id; public: std::vector> primSkills; std::vector> primSkillsBorder; std::vector> primSkillsInput; std::vector> selectedArmyInput; void setHeroIcon(); void setCreatureIcons(); BattleOnlyModeHeroSelector(int id, BattleOnlyModeWindow& parent, Point position); }; class BattleOnlyModeWindow : public CWindowObject { friend class BattleOnlyModeHeroSelector; private: std::shared_ptr startInfo; std::unique_ptr map; std::shared_ptr cb; std::shared_ptr backgroundTexture; std::shared_ptr buttonOk; std::shared_ptr buttonAbort; std::shared_ptr title; std::shared_ptr battlefieldSelector; std::shared_ptr buttonReset; std::shared_ptr heroSelector1; std::shared_ptr heroSelector2; void init(); void onChange(); void setTerrainButtonText(); void setOkButtonEnabled(); void startBattle(); public: BattleOnlyModeWindow(); void applyStartInfo(std::shared_ptr si); };