Now the screen fades when large map is visible

This commit is contained in:
yvt 2013-08-27 22:53:06 +09:00
parent 1ce7d2c30a
commit ad48ac6b5a

View File

@ -204,6 +204,19 @@ namespace spades {
alpha = zoomState;
}
// fades bg
if(largeMap) {
IImage *bg = renderer->RegisterImage("Gfx/MapBg.png");
Vector2 scrSize = {renderer->ScreenWidth(),
renderer->ScreenHeight()};
float size = std::max(scrSize.x, scrSize.y);
renderer->SetColor(MakeVector4(0, 0, 0,alpha * .5f));
renderer->DrawImage(bg,
AABB2((scrSize.x - size) * .5f,
(scrSize.y - size) * .5f,
size, size));
}
// draw border
IImage *border;
float borderWidth;