| 106 | } |
| 107 | |
| 108 | void MapWidget::CreateEngine() |
| 109 | { |
| 110 | Framework::DrapeCreationParams p; |
| 111 | |
| 112 | p.m_apiVersion = dp::ApiVersion::OpenGLES3; |
| 113 | |
| 114 | p.m_surfaceWidth = m_screenshotMode ? width() : static_cast<int>(m_ratio * width()); |
| 115 | p.m_surfaceHeight = m_screenshotMode ? height() : static_cast<int>(m_ratio * height()); |
| 116 | p.m_visualScale = static_cast<float>(m_ratio); |
| 117 | p.m_hints.m_screenshotMode = m_screenshotMode; |
| 118 | |
| 119 | m_skin.reset(new gui::Skin(gui::ResolveGuiSkinFile("default"), m_ratio)); |
| 120 | m_skin->Resize(p.m_surfaceWidth, p.m_surfaceHeight); |
| 121 | m_skin->ForEach([&p](gui::EWidget widget, gui::Position const & pos) { p.m_widgetsInitInfo[widget] = pos; }); |
| 122 | |
| 123 | p.m_widgetsInitInfo[gui::WIDGET_SCALE_FPS_LABEL] = gui::Position(dp::LeftTop); |
| 124 | |
| 125 | m_framework.CreateDrapeEngine(make_ref(m_contextFactory), std::move(p)); |
| 126 | m_framework.SetViewportListener(std::bind(&MapWidget::OnViewportChanged, this, std::placeholders::_1)); |
| 127 | } |
| 128 | |
| 129 | void MapWidget::ScalePlus() |
| 130 | { |
nothing calls this directly
no test coverage detected