diff --git a/tools/editor/editor_ui.cpp b/tools/editor/editor_ui.cpp index 45b5c059..b6b8baa7 100644 --- a/tools/editor/editor_ui.cpp +++ b/tools/editor/editor_ui.cpp @@ -510,7 +510,16 @@ void EditorUI::renderBrushPanel(EditorApp& app) { ImGui::SliderInt("Octaves", &noiseOctaves, 1, 8); ImGui::InputInt("Seed", &noiseSeed); ImGui::SameLine(); - if (ImGui::SmallButton("Random##seed")) noiseSeed = static_cast(std::rand()); + if (ImGui::SmallButton("Rnd")) noiseSeed = static_cast(std::rand()); + ImGui::SameLine(); + if (ImGui::SmallButton("Randomize All")) { + noiseSeed = static_cast(std::rand()); + app.getTerrainEditor().resetToFlat(); + app.getTerrainEditor().applyNoise(noiseFreq, noiseAmp, noiseOctaves, + static_cast(noiseSeed)); + app.getTerrainEditor().smoothEntireTile(2); + app.showToast("Randomized (seed " + std::to_string(noiseSeed) + ")"); + } static int noiseType = 0; ImGui::RadioButton("Value##nt", &noiseType, 0); ImGui::SameLine();