mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 09:03:52 +00:00
feat(editor): undo object placement, snap to ground, keyboard shortcuts
- Ctrl+Z in Object/NPC mode undoes last placement (50-deep stack) - "Snap Ground" button raycasts straight down to place object on terrain - Useful for objects placed too high or moved off terrain surface - Undo stack adjusts indices when objects are removed mid-stack
This commit is contained in:
parent
ace6173401
commit
88abbfb564
5 changed files with 50 additions and 5 deletions
|
|
@ -360,8 +360,10 @@ void EditorUI::renderObjectPanel(EditorApp& app) {
|
|||
|
||||
if (changed) app.markObjectsDirty();
|
||||
|
||||
if (ImGui::Button("Delete", ImVec2(100, 0))) placer.deleteSelected();
|
||||
if (ImGui::Button("Snap Ground", ImVec2(100, 0)))
|
||||
app.snapSelectedToGround();
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Delete", ImVec2(100, 0))) placer.deleteSelected();
|
||||
if (ImGui::Button("Duplicate", ImVec2(100, 0))) {
|
||||
PlacedObject copy = *sel;
|
||||
copy.uniqueId = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue