1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

Merge branch 'develop' of https://github.com/vcmi/vcmi into test/advMapFading

This commit is contained in:
Fay
2015-02-01 19:12:03 +01:00
16 changed files with 268 additions and 95 deletions

View File

@ -499,8 +499,11 @@ CAdvMapInt::CAdvMapInt():
nextHero = makeButton(301, std::bind(&CAdvMapInt::fnextHero,this), ADVOPT.nextHero, SDLK_h);
endTurn = makeButton(302, std::bind(&CAdvMapInt::fendTurn,this), ADVOPT.endTurn, SDLK_e);
int panelSpaceBottom = screen->h - resdatabar.pos.h - 4;
panelMain = new CAdvMapPanel(nullptr, Point(0, 0));
panelWorldView = new CAdvMapWorldViewPanel(bgWorldView, Point(heroList.pos.x - 2, 195)); // TODO correct drawing position
// TODO correct drawing position
panelWorldView = new CAdvMapWorldViewPanel(bgWorldView, Point(heroList.pos.x - 2, 195), panelSpaceBottom, LOCPLINT->playerID);
panelMain->addChildColorableButton(kingOverview);
panelMain->addChildColorableButton(underground);
@ -1072,6 +1075,10 @@ void CAdvMapInt::keyPressed(const SDL_KeyboardEvent & key)
if(isActive())
LOCPLINT->showPuzzleMap();
return;
case SDLK_v:
if(isActive())
LOCPLINT->viewWorldMap();
return;
case SDLK_r:
if(isActive() && LOCPLINT->ctrlPressed())
{
@ -1331,7 +1338,7 @@ void CAdvMapInt::setPlayer(PlayerColor Player)
panelMain->setPlayerColor(player);
panelWorldView->setPlayerColor(player);
panelWorldView->recolorIcons(worldViewIconsDef, player.getNum() * 19);
panelWorldView->recolorIcons(player, worldViewIconsDef, player.getNum() * 19);
graphics->blueToPlayersAdv(resdatabar.bg,player);
//heroList.updateHList();
@ -1791,8 +1798,7 @@ void CAdvMapInt::changeMode(EAdvMapMode newMode, float newScale /* = 0.4f */)
else if (worldViewScale != newScale) // still in world view mode, but the scale changed
{
worldViewScale = newScale;
terrain.redraw();
minimap.redraw(); // to recalculate radar rect on minimap
redraw();
}
}
@ -1801,7 +1807,7 @@ CAdventureOptions::CAdventureOptions():
{
OBJ_CONSTRUCTION_CAPTURING_ALL;
viewWorld = new CButton(Point(24, 23), "ADVVIEW.DEF", CButton::tooltip(), [&]{ close(); }, SDLK_x);
viewWorld = new CButton(Point(24, 23), "ADVVIEW.DEF", CButton::tooltip(), [&]{ close(); }, SDLK_v);
viewWorld->addCallback(std::bind(&CPlayerInterface::viewWorldMap, LOCPLINT));
exit = new CButton(Point(204, 313), "IOK6432.DEF", CButton::tooltip(), std::bind(&CAdventureOptions::close, this), SDLK_RETURN);