feat(editor): height offset tool for shifting entire terrain up/down

- Offset Heights: shifts all terrain heights by a constant amount
  (-100 to +100 range with Apply button)
- Useful for raising terrain above water level or sinking below
- Slider + Apply button in the Noise Generator section
This commit is contained in:
Kelsi 2026-05-05 07:53:01 -07:00
parent d50e4b3f78
commit 5f9bf5c924
3 changed files with 22 additions and 0 deletions

View file

@ -546,6 +546,13 @@ void EditorUI::renderBrushPanel(EditorApp& app) {
app.getTerrainEditor().invertHeights();
app.showToast("Heights inverted");
}
static float offsetAmt = 10.0f;
ImGui::SliderFloat("Offset##ht", &offsetAmt, -100.0f, 100.0f, "%.0f");
ImGui::SameLine();
if (ImGui::SmallButton("Apply##off")) {
app.getTerrainEditor().offsetHeights(offsetAmt);
app.showToast("Heights offset");
}
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1),
"Scale: exaggerate (>1) or flatten (<1) relief");
}