From f15fbf508f1f05fc7bb3618688251b062091938c Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 5 May 2026 07:32:41 -0700 Subject: [PATCH] feat(editor): Reset + Apply noise button for quick terrain iteration --- tools/editor/editor_ui.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/editor/editor_ui.cpp b/tools/editor/editor_ui.cpp index 75de4b93..231c9773 100644 --- a/tools/editor/editor_ui.cpp +++ b/tools/editor/editor_ui.cpp @@ -505,11 +505,18 @@ void EditorUI::renderBrushPanel(EditorApp& app) { ImGui::InputInt("Seed", &noiseSeed); ImGui::SameLine(); if (ImGui::SmallButton("Random##seed")) noiseSeed = static_cast(std::rand()); - if (ImGui::Button("Apply Noise", ImVec2(-1, 0))) { + if (ImGui::Button("Apply Noise", ImVec2(140, 0))) { app.getTerrainEditor().applyNoise(noiseFreq, noiseAmp, noiseOctaves, static_cast(noiseSeed)); app.showToast("Noise applied"); } + ImGui::SameLine(); + if (ImGui::Button("Reset + Apply", ImVec2(120, 0))) { + app.getTerrainEditor().resetToFlat(); + app.getTerrainEditor().applyNoise(noiseFreq, noiseAmp, noiseOctaves, + static_cast(noiseSeed)); + app.showToast("Reset + noise applied"); + } static int smoothPasses = 2; ImGui::SliderInt("Smooth Passes", &smoothPasses, 1, 10); if (ImGui::Button("Smooth Entire Tile", ImVec2(-1, 0))) {