mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Rename and events modal mode always
This commit is contained in:
parent
2960895041
commit
326791886d
@ -291,6 +291,7 @@ void CGPandoraBox::serializeJsonOptions(JsonSerializeFormat & handler)
|
||||
void CGEvent::init()
|
||||
{
|
||||
blockVisit = false;
|
||||
configuration.infoWindowType = EInfoWindowMode::MODAL;
|
||||
|
||||
for(auto & i : configuration.info)
|
||||
{
|
||||
|
@ -49,18 +49,18 @@ void CRewardableObject::grantRewardWithMessage(const CGHeroInstance * contextHer
|
||||
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.text = dialog;
|
||||
|
||||
if (rewardIndeces.size() > 1)
|
||||
for (auto index : rewardIndeces)
|
||||
if (rewardIndices.size() > 1)
|
||||
for (auto index : rewardIndices)
|
||||
sd.components.push_back(configuration.info.at(index).reward.getDisplayedComponent(contextHero));
|
||||
|
||||
if (rewardIndeces.size() == 1)
|
||||
configuration.info.at(rewardIndeces.front()).reward.loadComponents(sd.components, contextHero);
|
||||
if (rewardIndices.size() == 1)
|
||||
configuration.info.at(rewardIndices.front()).reward.loadComponents(sd.components, contextHero);
|
||||
|
||||
cb->showBlockingDialog(&sd);
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ protected:
|
||||
void serializeJsonOptions(JsonSerializeFormat & handler) override;
|
||||
|
||||
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:
|
||||
/// Visitability checks. Note that hero check includes check for hero owner (returns true if object was visited by player)
|
||||
|
Loading…
Reference in New Issue
Block a user