From 454c6d0afeca9406b93a8088f5591228f24a4821 Mon Sep 17 00:00:00 2001 From: rachytski Date: Thu, 31 Mar 2011 02:12:59 +0300 Subject: [PATCH] better empty model message rendering. --- map/framework.hpp | 1 + map/information_display.cpp | 24 ++++++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/map/framework.hpp b/map/framework.hpp index b37b63e9cf..7d08749c77 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -387,6 +387,7 @@ public: } catch (redraw_operation_cancelled const &) { + m_renderQueue.renderStatePtr()->m_isEmptyModelCurrent = false; } if (m_navigator.Update(GetPlatform().TimeInSec())) diff --git a/map/information_display.cpp b/map/information_display.cpp index fba7e20b9d..32c3f457b9 100644 --- a/map/information_display.cpp +++ b/map/information_display.cpp @@ -536,23 +536,39 @@ void InformationDisplay::drawEmptyModelMessage(DrawerYG * pDrawer) { m2::PointD pt = m_screen.PixelRect().Center() - m2::PointD(0, m_bottomShift * m_visualScale); - char const s0 [] = "Nothing found. Have you tried downloading maps of the countries?"; - char const s1 [] = "Just the button at the bottom right corner to download the maps."; + char const s0 [] = "Nothing found. Have you tried"; + char const s1 [] = "downloading maps of the countries?"; + char const s2 [] = "Just the button at the bottom right"; + char const s3 [] = "corner to download the maps."; m2::RectD tr0 = pDrawer->screen()->textRect(s0, 10, true, false); m2::RectD tr1 = pDrawer->screen()->textRect(s1, 10, true, false); + m2::RectD tr2 = pDrawer->screen()->textRect(s2, 10, true, false); + m2::RectD tr3 = pDrawer->screen()->textRect(s3, 10, true, false); - pDrawer->screen()->drawText(m2::PointD(-tr0.SizeX() / 2, -tr0.SizeY() / 2) + pt, + pDrawer->screen()->drawText(m2::PointD(-tr0.SizeX() / 2, -(tr1.SizeY() + 5)) + pt, 0, 10, yg::Color(255, 255, 255, 255), s0, true, yg::Color(255, 255, 255, 255), yg::maxDepth, true, false); - pDrawer->screen()->drawText(m2::PointD(-tr1.SizeX() / 2, -tr1.SizeY() / 2 + tr0.SizeY() + 5) + pt, + pDrawer->screen()->drawText(m2::PointD(-tr1.SizeX() / 2, 0) + pt, 0, 10, yg::Color(255, 255, 255, 255), s1, true, yg::Color(255, 255, 255, 255), yg::maxDepth, true, false); + + pDrawer->screen()->drawText(m2::PointD(-tr2.SizeX() / 2, tr2.SizeY() + 5) + pt, + 0, 10, yg::Color(255, 255, 255, 255), s2, true, yg::Color(255, 255, 255, 255), + yg::maxDepth, + true, + false); + + pDrawer->screen()->drawText(m2::PointD(-tr3.SizeX() / 2, tr2.SizeY() + 5 + tr3.SizeY() + 5) + pt, + 0, 10, yg::Color(255, 255, 255, 255), s3, true, yg::Color(255, 255, 255, 255), + yg::maxDepth, + true, + false); } void InformationDisplay::enableBenchmarkInfo(bool doEnable)