From 47bf2d662b18c87ea236ff61917dac458d90cdb9 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 5 May 2026 07:28:14 -0700 Subject: [PATCH] feat(editor): random seed button for noise generator --- tools/editor/editor_ui.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/editor/editor_ui.cpp b/tools/editor/editor_ui.cpp index e32fd595..4a1575eb 100644 --- a/tools/editor/editor_ui.cpp +++ b/tools/editor/editor_ui.cpp @@ -498,6 +498,8 @@ void EditorUI::renderBrushPanel(EditorApp& app) { ImGui::SliderFloat("Amplitude", &noiseAmp, 1.0f, 200.0f, "%.0f"); ImGui::SliderInt("Octaves", &noiseOctaves, 1, 8); ImGui::InputInt("Seed", &noiseSeed); + ImGui::SameLine(); + if (ImGui::SmallButton("Random##seed")) noiseSeed = static_cast(std::rand()); if (ImGui::Button("Apply Noise", ImVec2(-1, 0))) { app.getTerrainEditor().applyNoise(noiseFreq, noiseAmp, noiseOctaves, static_cast(noiseSeed));