1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

- Removed pointer usage for CQuest. may look rough, but works and fixes #1051.

- Better autoSkip mode, now info windows are not displayed.
This commit is contained in:
DjWarmonger
2012-09-28 15:46:09 +00:00
parent 786bd73e67
commit 0435d5a4f1
6 changed files with 48 additions and 25 deletions

View File

@@ -942,10 +942,15 @@ void CPlayerInterface::showComp(const Component &comp, std::string message)
void CPlayerInterface::showInfoDialog(const std::string &text, const std::vector<Component*> &components, int soundID)
{
EVENT_HANDLER_CALLED_BY_CLIENT;
if (settings["session"]["autoSkip"].Bool() && !LOCPLINT->shiftPressed())
{
return;
}
std::vector<CComponent*> intComps;
for(int i=0;i<components.size();i++)
intComps.push_back(new CComponent(*components[i]));
showInfoDialog(text,intComps,soundID);
}
void CPlayerInterface::showInfoDialog(const std::string &text, const std::vector<CComponent*> & components, int soundID, bool delComps)
@@ -953,6 +958,10 @@ void CPlayerInterface::showInfoDialog(const std::string &text, const std::vector
waitWhileDialog();
stopMovement();
if (settings["session"]["autoSkip"].Bool() && !LOCPLINT->shiftPressed())
{
return;
}
CInfoWindow *temp = CInfoWindow::create(text, playerID, &components);
temp->setDelComps(delComps);
if(makingTurn && GH.listInt.size() && LOCPLINT == this)