mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Rename and events modal mode always
This commit is contained in:
@@ -291,6 +291,7 @@ void CGPandoraBox::serializeJsonOptions(JsonSerializeFormat & handler)
|
|||||||
void CGEvent::init()
|
void CGEvent::init()
|
||||||
{
|
{
|
||||||
blockVisit = false;
|
blockVisit = false;
|
||||||
|
configuration.infoWindowType = EInfoWindowMode::MODAL;
|
||||||
|
|
||||||
for(auto & i : configuration.info)
|
for(auto & i : configuration.info)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,18 +49,18 @@ void CRewardableObject::grantRewardWithMessage(const CGHeroInstance * contextHer
|
|||||||
grantReward(index, contextHero);
|
grantReward(index, contextHero);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CRewardableObject::selectRewardWthMessage(const CGHeroInstance * contextHero, const std::vector<ui32> & rewardIndeces, const MetaString & dialog) const
|
void CRewardableObject::selectRewardWthMessage(const CGHeroInstance * contextHero, const std::vector<ui32> & rewardIndices, const MetaString & dialog) const
|
||||||
{
|
{
|
||||||
BlockingDialog sd(configuration.canRefuse, rewardIndeces.size() > 1);
|
BlockingDialog sd(configuration.canRefuse, rewardIndices.size() > 1);
|
||||||
sd.player = contextHero->tempOwner;
|
sd.player = contextHero->tempOwner;
|
||||||
sd.text = dialog;
|
sd.text = dialog;
|
||||||
|
|
||||||
if (rewardIndeces.size() > 1)
|
if (rewardIndices.size() > 1)
|
||||||
for (auto index : rewardIndeces)
|
for (auto index : rewardIndices)
|
||||||
sd.components.push_back(configuration.info.at(index).reward.getDisplayedComponent(contextHero));
|
sd.components.push_back(configuration.info.at(index).reward.getDisplayedComponent(contextHero));
|
||||||
|
|
||||||
if (rewardIndeces.size() == 1)
|
if (rewardIndices.size() == 1)
|
||||||
configuration.info.at(rewardIndeces.front()).reward.loadComponents(sd.components, contextHero);
|
configuration.info.at(rewardIndices.front()).reward.loadComponents(sd.components, contextHero);
|
||||||
|
|
||||||
cb->showBlockingDialog(&sd);
|
cb->showBlockingDialog(&sd);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ protected:
|
|||||||
void serializeJsonOptions(JsonSerializeFormat & handler) override;
|
void serializeJsonOptions(JsonSerializeFormat & handler) override;
|
||||||
|
|
||||||
virtual void grantRewardWithMessage(const CGHeroInstance * contextHero, int rewardIndex, bool markAsVisit) const;
|
virtual void grantRewardWithMessage(const CGHeroInstance * contextHero, int rewardIndex, bool markAsVisit) const;
|
||||||
virtual void selectRewardWthMessage(const CGHeroInstance * contextHero, const std::vector<ui32> & rewardIndeces, const MetaString & dialog) const;
|
virtual void selectRewardWthMessage(const CGHeroInstance * contextHero, const std::vector<ui32> & rewardIndices, const MetaString & dialog) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// Visitability checks. Note that hero check includes check for hero owner (returns true if object was visited by player)
|
/// Visitability checks. Note that hero check includes check for hero owner (returns true if object was visited by player)
|
||||||
|
|||||||
Reference in New Issue
Block a user