mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-23 12:08:45 +02:00
* reduntant quotation marks from artifact descriptions are removed
* fixed map scrolling with ctrl+arrows when some windows are opened
This commit is contained in:
parent
51821ad5c4
commit
ab1a759458
@ -1373,14 +1373,30 @@ void CAdvMapInt::activate()
|
|||||||
heroList.activate();
|
heroList.activate();
|
||||||
townList.activate();
|
townList.activate();
|
||||||
terrain.activate();
|
terrain.activate();
|
||||||
KeyInterested::activate();
|
|
||||||
|
|
||||||
LOCPLINT->cingconsole->activate();
|
LOCPLINT->cingconsole->activate();
|
||||||
}
|
}
|
||||||
void CAdvMapInt::deactivate()
|
void CAdvMapInt::deactivate()
|
||||||
{
|
{
|
||||||
KeyInterested::deactivate();
|
scrollingDir = 0;
|
||||||
hide();
|
CGI->curh->changeGraphic(0,0);
|
||||||
|
kingOverview.deactivate();
|
||||||
|
underground.deactivate();
|
||||||
|
questlog.deactivate();
|
||||||
|
sleepWake.deactivate();
|
||||||
|
moveHero.deactivate();
|
||||||
|
spellbook.deactivate();
|
||||||
|
advOptions.deactivate();
|
||||||
|
sysOptions.deactivate();
|
||||||
|
nextHero.deactivate();
|
||||||
|
endTurn.deactivate();
|
||||||
|
minimap.deactivate();
|
||||||
|
heroList.deactivate();
|
||||||
|
townList.deactivate();
|
||||||
|
terrain.deactivate();
|
||||||
|
if(std::find(LOCPLINT->timeinterested.begin(),LOCPLINT->timeinterested.end(),&infoBar)!=LOCPLINT->timeinterested.end())
|
||||||
|
LOCPLINT->timeinterested.erase(std::find(LOCPLINT->timeinterested.begin(),LOCPLINT->timeinterested.end(),&infoBar));
|
||||||
|
infoBar.mode=-1;
|
||||||
|
|
||||||
LOCPLINT->cingconsole->deactivate();
|
LOCPLINT->cingconsole->deactivate();
|
||||||
|
|
||||||
@ -1418,28 +1434,6 @@ void CAdvMapInt::showAll(SDL_Surface *to)
|
|||||||
infoBar.draw(to);
|
infoBar.draw(to);
|
||||||
LOCPLINT->cingconsole->show(to);
|
LOCPLINT->cingconsole->show(to);
|
||||||
}
|
}
|
||||||
void CAdvMapInt::hide()
|
|
||||||
{
|
|
||||||
CGI->curh->changeGraphic(0,0);
|
|
||||||
kingOverview.deactivate();
|
|
||||||
underground.deactivate();
|
|
||||||
questlog.deactivate();
|
|
||||||
sleepWake.deactivate();
|
|
||||||
moveHero.deactivate();
|
|
||||||
spellbook.deactivate();
|
|
||||||
advOptions.deactivate();
|
|
||||||
sysOptions.deactivate();
|
|
||||||
nextHero.deactivate();
|
|
||||||
endTurn.deactivate();
|
|
||||||
minimap.deactivate();
|
|
||||||
heroList.deactivate();
|
|
||||||
townList.deactivate();
|
|
||||||
terrain.deactivate();
|
|
||||||
if(std::find(LOCPLINT->timeinterested.begin(),LOCPLINT->timeinterested.end(),&infoBar)!=LOCPLINT->timeinterested.end())
|
|
||||||
LOCPLINT->timeinterested.erase(std::find(LOCPLINT->timeinterested.begin(),LOCPLINT->timeinterested.end(),&infoBar));
|
|
||||||
infoBar.mode=-1;
|
|
||||||
|
|
||||||
}
|
|
||||||
void CAdvMapInt::show(SDL_Surface *to)
|
void CAdvMapInt::show(SDL_Surface *to)
|
||||||
{
|
{
|
||||||
++animValHitCount; //for animations
|
++animValHitCount; //for animations
|
||||||
|
@ -112,7 +112,6 @@ public:
|
|||||||
/*****************************/
|
/*****************************/
|
||||||
class CAdvMapInt : public CMainInterface, public KeyInterested //adventure map interface
|
class CAdvMapInt : public CMainInterface, public KeyInterested //adventure map interface
|
||||||
{
|
{
|
||||||
void hide(); //deactivates advmap interface
|
|
||||||
public:
|
public:
|
||||||
CAdvMapInt(int Player);
|
CAdvMapInt(int Player);
|
||||||
~CAdvMapInt();
|
~CAdvMapInt();
|
||||||
|
@ -1195,6 +1195,7 @@ void CPlayerInterface::yourTurn()
|
|||||||
|
|
||||||
adventureInt->showAll(screen);
|
adventureInt->showAll(screen);
|
||||||
pushInt(adventureInt);
|
pushInt(adventureInt);
|
||||||
|
adventureInt->KeyInterested::activate();
|
||||||
|
|
||||||
timeHandler th;
|
timeHandler th;
|
||||||
th.getDif();
|
th.getDif();
|
||||||
@ -1243,9 +1244,17 @@ void CPlayerInterface::yourTurn()
|
|||||||
delete ev;
|
delete ev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!adventureInt->active && adventureInt->scrollingDir) //player force map scrolling though interface is disabled
|
||||||
|
{
|
||||||
|
totalRedraw();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//update only top interface and draw background
|
||||||
if(objsToBlit.size() > 1)
|
if(objsToBlit.size() > 1)
|
||||||
blitAt(screen2,0,0,screen); //blit background
|
blitAt(screen2,0,0,screen); //blit background
|
||||||
objsToBlit.back()->show(screen); //blit active interface/window
|
objsToBlit.back()->show(screen); //blit active interface/window
|
||||||
|
}
|
||||||
|
|
||||||
CGI->curh->draw1();
|
CGI->curh->draw1();
|
||||||
CSDL_Ext::update(screen);
|
CSDL_Ext::update(screen);
|
||||||
@ -1254,6 +1263,7 @@ void CPlayerInterface::yourTurn()
|
|||||||
SDL_framerateDelay(mainFPSmng);
|
SDL_framerateDelay(mainFPSmng);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
adventureInt->KeyInterested::deactivate();
|
||||||
popInt(adventureInt);
|
popInt(adventureInt);
|
||||||
|
|
||||||
cb->endTurn();
|
cb->endTurn();
|
||||||
|
@ -55,6 +55,7 @@ void CArtHandler::loadArtifacts(bool onlyTxt)
|
|||||||
for (int i=0; i<ARTIFACTS_QUANTITY; i++)
|
for (int i=0; i<ARTIFACTS_QUANTITY; i++)
|
||||||
{
|
{
|
||||||
CArtifact nart;
|
CArtifact nart;
|
||||||
|
nart.id=i;
|
||||||
loadToIt(VLC->generaltexth->artifNames[i],buf,it,4);
|
loadToIt(VLC->generaltexth->artifNames[i],buf,it,4);
|
||||||
loadToIt(pom,buf,it,4);
|
loadToIt(pom,buf,it,4);
|
||||||
nart.price=atoi(pom.c_str());
|
nart.price=atoi(pom.c_str());
|
||||||
@ -66,8 +67,13 @@ void CArtHandler::loadArtifacts(bool onlyTxt)
|
|||||||
}
|
}
|
||||||
loadToIt(pom,buf,it,4);
|
loadToIt(pom,buf,it,4);
|
||||||
nart.aClass = classes[pom[0]];
|
nart.aClass = classes[pom[0]];
|
||||||
loadToIt(VLC->generaltexth->artifDescriptions[i],buf,it,3);
|
|
||||||
nart.id=i;
|
//load description and remove quotation marks
|
||||||
|
std::string &desc = VLC->generaltexth->artifDescriptions[i];
|
||||||
|
loadToIt(desc,buf,it,3);
|
||||||
|
if(desc[0] == '\"' && desc[desc.size()-1] == '\"')
|
||||||
|
desc = desc.substr(1,desc.size()-2);
|
||||||
|
|
||||||
if(!onlyTxt)
|
if(!onlyTxt)
|
||||||
artifacts.push_back(nart);
|
artifacts.push_back(nart);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user