mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
feat(editor): path preview line, transform undo, complete undo coverage
- River/road tool now shows translucent blue path preview ribbon with edge lines between start and end points before applying - Preview follows cursor when waiting for end point, locks when set - Undo support for all remaining operations: rotateTerrain90, mirrorX, mirrorY, scaleHeights, offsetHeights, invertHeights, smoothBeaches - Every terrain-modifying operation in the editor is now undoable
This commit is contained in:
parent
7e02db73df
commit
acfbf19144
5 changed files with 106 additions and 0 deletions
|
|
@ -537,6 +537,17 @@ void EditorApp::updateTerrainEditing(float dt) {
|
|||
viewport_.setBrushIndicator({}, 0, false);
|
||||
viewport_.clearGhostPreview();
|
||||
}
|
||||
|
||||
// Path preview for river/road tool
|
||||
if (ui_.getPathCapture() == EditorUI::PathCapture::WaitingEnd ||
|
||||
ui_.isPathReady()) {
|
||||
glm::vec3 endPt = ui_.isPathReady() ? ui_.getPathEnd()
|
||||
: terrainEditor_.brush().getPosition();
|
||||
viewport_.setPathPreview(ui_.getPathStart(), endPt,
|
||||
ui_.getPathWidth(), true);
|
||||
} else {
|
||||
viewport_.setPathPreview({}, {}, 0, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (painting_ && terrainEditor_.brush().isActive()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue