1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-31 00:07:39 +02:00

* partial support for grail digging

This commit is contained in:
mateuszb
2010-02-21 15:03:30 +00:00
parent e6f31b7500
commit b2aa0e5930
13 changed files with 122 additions and 11 deletions

View File

@@ -578,7 +578,9 @@ void CTerrainRect::clickRight(tribool down, bool previousState)
const TerrainTile * tile = LOCPLINT->cb->getTileInfo(mp);
if (tile)
{
CSimpleWindow * temp = CMessage::genWindow(VLC->generaltexth->terrainNames[tile->tertype], LOCPLINT->playerID, true);
std::string hlp;
CGI->mh->getTerrainDescr(mp, hlp, true);
CSimpleWindow * temp = CMessage::genWindow(hlp, LOCPLINT->playerID, true);
CRClickPopupInt *rcpi = new CRClickPopupInt(temp,true);
GH.pushInt(rcpi);
}
@@ -706,7 +708,10 @@ void CTerrainRect::mouseMoved (const SDL_MouseMotionEvent & sEvent)
}
else
{
adventureInt->statusbar.clear();
std::string hlp;
CGI->mh->getTerrainDescr(pom, hlp, false);
adventureInt->statusbar.print(hlp);
//adventureInt->statusbar.clear();
}
const CGPathNode *pnode = LOCPLINT->cb->getPathInfo(pom);

View File

@@ -2064,8 +2064,8 @@ CHotSeatPlayers::CHotSeatPlayers(const std::string &firstPlayer)
txt[0]->setText(firstPlayer);
txt[0]->giveFocus();
ok = new AdventureMapButton(CGI->generaltexth->zelp[560], bind(&CHotSeatPlayers::enterSelectionScreen, this), 95, 338, "MUBCHCK.DEF");
cancel = new AdventureMapButton(CGI->generaltexth->zelp[561], bind(&CGuiHandler::popIntTotally, ref(GH), this), 205, 338, "MUBCANC.DEF");
ok = new AdventureMapButton(CGI->generaltexth->zelp[560], bind(&CHotSeatPlayers::enterSelectionScreen, this), 95, 338, "MUBCHCK.DEF", SDLK_RETURN);
cancel = new AdventureMapButton(CGI->generaltexth->zelp[561], bind(&CGuiHandler::popIntTotally, ref(GH), this), 205, 338, "MUBCANC.DEF", SDLK_ESCAPE);
bar = new CGStatusBar(new CPicture(Rect(7, 381, 348, 18), 0));//226, 472
}
@@ -2313,6 +2313,10 @@ CBonusSelection::CRegion::~CRegion()
void CBonusSelection::CRegion::clickLeft( tribool down, bool previousState )
{
//select if selectable & clicked inside our graphic
if ( indeterminate(down) )
{
return;
}
if( !down && selectable && !CSDL_Ext::isTransparent(graphics[0], GH.current->motion.x-pos.x, GH.current->motion.y-pos.y) )
{
owner->selectMap(myNumber);