mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
feat(editor): invert heights, fill entire tile with water, remove all water
- Invert Heights: flips terrain upside-down around midpoint (mountains become valleys and vice versa) - Fill Entire Tile with Water: one-click fills all 256 chunks at the configured water height and liquid type - Remove ALL Water: clears water from every chunk instantly - Water panel now has three water operations: fill tile, remove under brush, remove all - fillWater() and invertHeights() methods on TerrainEditor
This commit is contained in:
parent
bd1356bd08
commit
825939db3b
3 changed files with 65 additions and 1 deletions
|
|
@ -1470,13 +1470,21 @@ void EditorUI::renderWaterPanel(EditorApp& app) {
|
|||
app.setWaterType(static_cast<uint16_t>(typeIdx));
|
||||
|
||||
ImGui::Separator();
|
||||
if (ImGui::Button("Fill Entire Tile with Water", ImVec2(-1, 0))) {
|
||||
app.getTerrainEditor().fillWater(app.getWaterHeight(), app.getWaterType());
|
||||
app.showToast("Tile filled with water");
|
||||
}
|
||||
if (ImGui::Button("Remove Water Under Brush", ImVec2(-1, 0))) {
|
||||
auto& brush = app.getTerrainEditor().brush();
|
||||
if (brush.isActive()) {
|
||||
app.getTerrainEditor().removeWater(brush.getPosition(), s.radius);
|
||||
app.getEditorCamera(); // trigger dirty
|
||||
}
|
||||
}
|
||||
if (ImGui::Button("Remove ALL Water", ImVec2(-1, 0))) {
|
||||
for (int ci = 0; ci < 256; ci++)
|
||||
app.getTerrainEditor().getTerrain()->waterData[ci].layers.clear();
|
||||
app.showToast("All water removed");
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
ImGui::TextColored(ImVec4(0.5f, 0.8f, 1.0f, 1.0f), "Left-click to place water");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue