mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
feat(editor): Reset + Apply noise button for quick terrain iteration
This commit is contained in:
parent
623aeff417
commit
f15fbf508f
1 changed files with 8 additions and 1 deletions
|
|
@ -505,11 +505,18 @@ void EditorUI::renderBrushPanel(EditorApp& app) {
|
|||
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))) {
|
||||
if (ImGui::Button("Apply Noise", ImVec2(140, 0))) {
|
||||
app.getTerrainEditor().applyNoise(noiseFreq, noiseAmp, noiseOctaves,
|
||||
static_cast<uint32_t>(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<uint32_t>(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))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue