You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR introduces an explicit editor tool mode system with Select and Move as the initial tools. A new EditorTool enum is defined in editor_tool.hpp with two constexpr helper functions. SceneState gains a defaulted editor_tool member. The Scene base class acquires virtual methods for tool access and a execute_scene_creation_action hook. WorldScene implements these, replacing the old draw_creation_tools with a programmatic action-dispatch method. All three concrete scenes reset the tool to Select on runtime reset and mark player objects as editor-movable. SceneInteraction now dispatches drag-start selection through a new tool-aware path. Ui::draw_scene_viewport gains an in-viewport tool palette rendered as an overlay, suppressing viewport hover when the mouse is above it.
Estimated code review effort
🎯 4 (Complex) | ⏱️ ~50 minutes
Possibly related PRs
deanblackborough/Prune#78: Both PRs modify src/prune/scene/scene_interaction.cpp to change drag initiation — this PR gates drag selection via the new Move-tool body-move logic including group-drag, while #78 adds multi-selection move/delete support.
deanblackborough/Prune#25: Both PRs modify the Ui::draw_scene_viewport rendering flow, viewport hover/input routing, and panel sizing, with this PR's tool-palette overlay building directly on that foundation.
deanblackborough/Prune#55: This PR extends DECISIONS.md with the new editor tool mode decision section, directly building on the file introduced in #55.
Suggested labels
enhancement
✨ Finishing Touches📝 Generate docstrings
Create stacked PR
Commit on current branch
🧪 Generate unit tests (beta)
Create PR with unit tests
Commit unit tests in branch add-tool-mode-state
Comment @coderabbitai help to get the list of available commands and usage tips.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit
Release Notes
New Features
Improvements