Grayed out mission buttons

Leoreth

Bofurin
Retired Moderator
Joined
Aug 23, 2009
Messages
38,064
Location
風鈴高等学校
Hey everyone,

I've recently added a couple of new great people missions to the DLL to implement a Great Statesman great person. Everything worked without problems, except that missions that aren't applicable at the moment don't display their buttons at all, while I would prefer those buttons being grayed out, so that the player knows these missions exist and I can display a tooltip that explains what they do and under which circumstances they become available.

To explain in terms of an existing mission, I want the infiltrate mission to display its button (grayed out) even when the Great Spy is not in an enemy city.

Currently I'm checking if a mission is possible in CvSelectionGroup::canStartMission(), but a false here apparently results in the button not being shown.

I'm sure this is possible somehow because the GA button is always shown even if there are not enough GPs to start it. Does anyone know how to do it?
 
The Great Prophet buttons for building the shrines are also shown greyed out if the religion has not been founded or the GP is not in the correct city. I don't do dll stuff but that fact may help you find what you are looking for.
 
Oh, that's a good point. The being able to build check should factor into it somewhere, thanks.
 
Back
Top Bottom