1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Partial interactive mode for Commander level-up dialog. It is possible to select secondary skill.

This commit is contained in:
DjWarmonger
2012-07-03 08:07:34 +00:00
parent 406346a6ab
commit ac997b8214
5 changed files with 143 additions and 43 deletions

View File

@ -482,14 +482,12 @@ void CPlayerInterface::commanderGotLevel (const CCommanderInstance * commander,
waitWhileDialog();
CCS->soundh->playSound(soundBase::heroNewLevel);
//boost::function<void(ui32)>(boost::bind(&CCallback::selectionMade,cl->callbacks[h->tempOwner].get(),_1,id))
auto callback2 = boost::bind (&CCallback::selectionMade, cb, 0, playerID);
showYesNoDialog ("Commander got level", callback2, callback2, true, std::vector<CComponent*>());
//showYesNoDialog ("Commander got level", callback, callback, true, std::vector<CComponent*>());
//auto callback2 = boost::bind (&CCallback::selectionMade, cb, 0, playerID);
//showYesNoDialog ("Commander got level", callback2, callback2, true, std::vector<CComponent*>());
//TODO: display full window
//CCreatureWindow * cw = new CCreatureWindow(commander);
//GH.pushInt(cw);
CCreatureWindow * cw = new CCreatureWindow(skills, commander, callback);
GH.pushInt(cw);
}
void CPlayerInterface::heroInGarrisonChange(const CGTownInstance *town)
{