/* * RandomMapTab.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 "CSelectionBase.h" #include "../../lib/FunctionList.h" #include "../../lib/GameConstants.h" class CMapGenOptions; class CToggleButton; class CLabel; class CLabelGroup; class RandomMapTab : public CIntObject { public: RandomMapTab(); void updateMapInfoByHost(); void setMapGenOptions(std::shared_ptr opts); CFunctionList, std::shared_ptr)> mapInfoChanged; private: void addButtonsWithRandToGroup(CToggleGroup * group, const std::vector & defs, int startIndex, int endIndex, int btnWidth, int helpStartIndex, int helpRandIndex, int randIndex = -1, bool animIdfromBtnId = true) const; void addButtonsToGroup(CToggleGroup * group, const std::vector & defs, int startIndex, int endIndex, int btnWidth, int helpStartIndex, bool animIdfromBtnId = true) const; void deactivateButtonsFrom(CToggleGroup * group, int startId); void validatePlayersCnt(int playersCnt); void validateCompOnlyPlayersCnt(int compOnlyPlayersCnt); std::vector getPossibleMapSizes(); std::shared_ptr background; std::shared_ptr labelHeadlineBig; std::shared_ptr labelHeadlineSmall; std::shared_ptr labelMapSize; std::shared_ptr groupMapSize; std::shared_ptr buttonTwoLevels; std::shared_ptr labelGroupForOptions; std::shared_ptr groupMaxPlayers; std::shared_ptr groupMaxTeams; std::shared_ptr groupCompOnlyPlayers; std::shared_ptr groupCompOnlyTeams; std::shared_ptr groupWaterContent; std::shared_ptr groupMonsterStrength; std::shared_ptr buttonShowRandomMaps; std::shared_ptr mapGenOptions; std::shared_ptr mapInfo; };