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))) {