diff --git a/AI/GeniusAI/genius.vcproj b/AI/GeniusAI/genius.vcproj
index 7426b129c..0244d07aa 100644
--- a/AI/GeniusAI/genius.vcproj
+++ b/AI/GeniusAI/genius.vcproj
@@ -41,13 +41,13 @@
cond.wait(un);
}
boost::unique_lock un(*pim);
+ LOCPLINT->showingDialog->setn(true);
CLevelWindow *lw = new CLevelWindow(hero,pskill,skills,callback);
curint->deactivate();
lw->activate();
@@ -2100,7 +2101,6 @@ void CPlayerInterface::actionStarted(const BattleAction* action)
battleInt->defendingHero->setPhase(4);
else
battleInt->attackingHero->setPhase(4);
- return;
}
if(!stack)
{
@@ -3582,17 +3582,18 @@ void CLevelWindow::close()
}
delete this;
LOCPLINT->curint->activate();
- LOCPLINT->showingDialog->setn(false);
}
CLevelWindow::CLevelWindow(const CGHeroInstance *hero, int pskill, std::vector &skills, boost::function &callback)
{
- LOCPLINT->showingDialog->setn(true);
heroType = hero->subID;
cb = callback;
for(int i=0;igetSecSkillLevel(skills[i])+1,boost::bind(&CLevelWindow::selectionChanged,this,i)));
- comps.back()->assignedKeys.insert(SDLK_1 + i);
+ if(comps.size())
+ {
+ comps[0]->assignedKeys.insert(SDLK_1);
+ if(comps.size() > 1)
+ comps[1]->assignedKeys.insert(SDLK_2);
}
bitmap = BitmapHandler::loadBitmap("LVLUPBKG.bmp");
graphics->blueToPlayersAdv(bitmap,hero->tempOwner);
@@ -3602,6 +3603,7 @@ CLevelWindow::CLevelWindow(const CGHeroInstance *hero, int pskill, std::vectorw;
pos.h = bitmap->h;
ok = new AdventureMapButton("","",boost::bind(&CLevelWindow::close,this),pos.x+297,pos.y+413,"IOKAY.DEF",SDLK_RETURN);
+ ok->block(true);
//draw window
char buf[100], buf2[100];
strcpy(buf2,CGI->generaltexth->allTexts[444].c_str()); //%s has gained a level.
@@ -3629,16 +3631,6 @@ CLevelWindow::CLevelWindow(const CGHeroInstance *hero, int pskill, std::vectorw + 18;
}
}
-
- if(comps.size() > 1)
- {
- ok->block(true);
- }
- else if(comps.size() == 1)
- {
- comps[0]->select(true);
- }
-
SDL_FreeSurface(ort);
}
diff --git a/CPlayerInterface.h b/CPlayerInterface.h
index 4aa5e38d2..03d2e875c 100644
--- a/CPlayerInterface.h
+++ b/CPlayerInterface.h
@@ -1,813 +1,813 @@
-#ifndef __CPLAYERINTERFACE_H__
-#define __CPLAYERINTERFACE_H__
-#include "global.h"
-#include "CGameInterface.h"
-#include "SDL_framerate.h"
-#include