mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
feat(editor): random seed button for noise generator
This commit is contained in:
parent
629bfd6377
commit
47bf2d662b
1 changed files with 2 additions and 0 deletions
|
|
@ -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<int>(std::rand());
|
||||
if (ImGui::Button("Apply Noise", ImVec2(-1, 0))) {
|
||||
app.getTerrainEditor().applyNoise(noiseFreq, noiseAmp, noiseOctaves,
|
||||
static_cast<uint32_t>(noiseSeed));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue