Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Survey map fixes #2797

Merged
merged 1 commit into from
Sep 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions source/main/gui/panels/GUI_SurveyMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ void SurveyMap::Draw()
}

// Calculate window position
Ogre::RenderWindow* rw = RoR::App::GetAppContext()->GetRenderWindow();
ImVec2 view_size(0, 0);
if (mMapMode == SurveyMapMode::BIG)
{
view_size.y = ImGui::GetIO().DisplaySize.y -
view_size.y = (rw->getWidth() * 0.55f) -
((2 * App::GetGuiManager()->GetTheme().screen_edge_padding.y) + (2 * WINDOW_PADDING));
Vector3 terrn_size = App::GetSimTerrain()->getMaxTerrainSize(); // Y is 'up'!
if (!terrn_size.isZeroLength())
Expand All @@ -87,7 +88,7 @@ void SurveyMap::Draw()
}
else if (mMapMode == SurveyMapMode::SMALL)
{
view_size.y = ImGui::GetIO().DisplaySize.y * 0.30f;
view_size.y = rw->getWidth() * 0.2f;
view_size.x = view_size.y;
}

Expand Down Expand Up @@ -256,7 +257,7 @@ void SurveyMap::CreateTerrainTextures()
int res = std::pow(2, std::floor(std::log2(resolution)));

mMapTextureCreatorStatic = std::unique_ptr<SurveyMapTextureCreator>(new SurveyMapTextureCreator(terrain_size.y));
mMapTextureCreatorStatic->init(res, fsaa);
mMapTextureCreatorStatic->init(res / 1.5, fsaa);
mMapTextureCreatorStatic->update(mMapCenter + mMapCenterOffset, mTerrainSize);

// TODO: Find out how to zoom into the static texture instead
Expand Down