keep map aspect ratio
This commit is contained in:
parent
608e5a0331
commit
00484b96c8
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue