18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-02 17:46:48 +01:00

fix(editor): the checkbox of the terrain around the camera in the layers shows the answer Without terrain of the scenery open

This commit is contained in:
maj00r
2026-11-24 18:55:09 +01:00
parent f53cb24c6e
commit 1d5e5ac527
+6 -2
View File
@@ -1879,9 +1879,13 @@ void editor_mode::render_terrain_loading()
if (ImGui::IsItemHovered())
ImGui::SetTooltip("%s", STR_C("Where the terrain of the scenery ends, the terrain model is made under the tracks as they're laid, around the cursor from the first point placed; "
"the chunks there are stay as they are. Off, it's made only when asked for"));
auto &model{EditorSettings.terrain_model()};
if (ImGui::Checkbox(STR_C("The terrain of the scenery around the camera"), &model.area))
// as it is for the scenery open: off after the answer Without terrain, and ticked, on again and kept so in the settings
if (bool area{nmt_area()}; ImGui::Checkbox(STR_C("The terrain of the scenery around the camera"), &area))
{
m_nmt_state.declined = false;
EditorSettings.terrain_model().area = area;
EditorSettings.save();
}
if (ImGui::IsItemHovered())
ImGui::SetTooltip("%s", STR_C("Makes the terrain from the terrain model within the area, around the camera wherever it goes,\n"
"a chunk at a time while the editor is idle. The terrain there is already isn't touched.\n"