1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

Display object description only on right-click

This commit is contained in:
Ivan Savenko
2023-10-19 14:36:11 +03:00
parent 530c70c282
commit e0f6b582f5
5 changed files with 70 additions and 55 deletions

View File

@@ -39,6 +39,10 @@ protected:
std::vector<Component> loadComponents(const CGHeroInstance * contextHero, const std::vector<ui32> & rewardIndices) const;
std::string getDisplayTextImpl(PlayerColor player, const CGHeroInstance * hero, bool includeDescription) const;
std::string getDescriptionMessage(PlayerColor player, const CGHeroInstance * hero) const;
std::vector<Component> getPopupComponentsImpl(PlayerColor player, const CGHeroInstance * hero) const;
public:
/// Visitability checks. Note that hero check includes check for hero owner (returns true if object was visited by player)
bool wasVisited(PlayerColor player) const override;
@@ -68,8 +72,8 @@ public:
std::string getHoverText(PlayerColor player) const override;
std::string getHoverText(const CGHeroInstance * hero) const override;
std::string getDescriptionMessage(PlayerColor player) const;
std::string getDescriptionMessage(const CGHeroInstance * hero) const;
std::string getPopupText(PlayerColor player) const override;
std::string getPopupText(const CGHeroInstance * hero) const override;
std::vector<Component> getPopupComponents(PlayerColor player) const override;
std::vector<Component> getPopupComponents(const CGHeroInstance * hero) const override;