mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 09:03:52 +00:00
feat(editor): object scatter, camera bookmarks, shortcut hints
- Object scatter tool: place N copies of selected M2/WMO in a radius with random rotation and scale range (Min/Max Scale slider) - Camera bookmarks: F5 saves current position, View > Load Bookmark to jump back — useful for working on different parts of a large zone - Shortcut hints shown at bottom of Object panel (G=move, R=rotate, T=scale, Del=remove) - DragFloatRange2 for min/max scale in scatter UI
This commit is contained in:
parent
48026421c9
commit
5daa359e74
5 changed files with 90 additions and 0 deletions
|
|
@ -189,6 +189,7 @@ void EditorApp::processEvents() {
|
|||
if (event.type == SDL_KEYDOWN) {
|
||||
auto sc = event.key.keysym.scancode;
|
||||
if (sc == SDL_SCANCODE_F3) setWireframe(!isWireframe());
|
||||
if (sc == SDL_SCANCODE_F5) saveBookmark("");
|
||||
// Transform shortcuts (Blender-style)
|
||||
if (objectPlacer_.getSelected()) {
|
||||
if (sc == SDL_SCANCODE_G) startGizmoMode(TransformMode::Move);
|
||||
|
|
@ -603,6 +604,19 @@ void EditorApp::setGizmoAxis(TransformAxis axis) {
|
|||
viewport_.getGizmo().setTarget(sel->position, sel->scale);
|
||||
}
|
||||
|
||||
void EditorApp::saveBookmark(const std::string& name) {
|
||||
CameraBookmark bm;
|
||||
bm.pos = camera_.getCamera().getPosition();
|
||||
bm.yaw = 0; bm.pitch = 0; // EditorCamera doesn't expose these directly
|
||||
bm.name = name.empty() ? ("Bookmark " + std::to_string(bookmarks_.size() + 1)) : name;
|
||||
bookmarks_.push_back(bm);
|
||||
}
|
||||
|
||||
void EditorApp::loadBookmark(int index) {
|
||||
if (index < 0 || index >= static_cast<int>(bookmarks_.size())) return;
|
||||
camera_.setPosition(bookmarks_[index].pos);
|
||||
}
|
||||
|
||||
void EditorApp::addAdjacentTile(int offsetX, int offsetY) {
|
||||
if (!terrain_.isLoaded()) return;
|
||||
int newX = loadedTileX_ + offsetX;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue