keep map aspect ratio

This commit is contained in:
Eduardo Bart 2011-08-29 22:22:12 -03:00
parent 608e5a0331
commit 00484b96c8
1 changed files with 7 additions and 2 deletions

View File

@ -31,8 +31,13 @@ void UIMap::setup()
void UIMap::render() void UIMap::render()
{ {
if(g_game.isOnline()) if(g_game.isOnline()) {
g_map.draw(m_rect); Rect mapRect = m_rect;
Size mapSize(15*32, 11*32);
mapSize.scale(mapRect.size(), Fw::KeepAspectRatio);
mapRect.setSize(mapSize);
g_map.draw(mapRect);
}
UIWidget::render(); UIWidget::render();
} }