mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
feat(editor): select all, recent zones, minimap selection highlights
- Ctrl+A selects all placed objects, context menu has Select All item - selectAll() added to ObjectPlacer, works with multi-select transforms - Recent Zones submenu in File menu (last 8 loaded zones, deduplicated) - Minimap: selected objects shown as white dots with gold ring outline vs yellow dots for unselected objects - Help panel updated with Ctrl+A and Ctrl+Shift+Click documentation
This commit is contained in:
parent
ddf97e9b8a
commit
533c218983
5 changed files with 49 additions and 3 deletions
|
|
@ -302,6 +302,10 @@ void EditorApp::processEvents() {
|
|||
ui_.openNewTerrainDialog();
|
||||
if (sc == SDL_SCANCODE_O && (event.key.keysym.mod & KMOD_CTRL))
|
||||
ui_.openLoadDialog();
|
||||
if (sc == SDL_SCANCODE_A && (event.key.keysym.mod & KMOD_CTRL)) {
|
||||
objectPlacer_.selectAll();
|
||||
showToast("Selected " + std::to_string(objectPlacer_.selectionCount()) + " objects");
|
||||
}
|
||||
// Ctrl+Y = Redo (alternate binding)
|
||||
if (sc == SDL_SCANCODE_Y && (event.key.keysym.mod & KMOD_CTRL)) {
|
||||
if (terrainEditor_.history().canRedo()) {
|
||||
|
|
@ -699,6 +703,13 @@ void EditorApp::loadADT(const std::string& mapName, int tileX, int tileY) {
|
|||
loadedTileX_ = tileX;
|
||||
loadedTileY_ = tileY;
|
||||
|
||||
// Track recent zones (deduplicate, max 8)
|
||||
recentZones_.erase(std::remove_if(recentZones_.begin(), recentZones_.end(),
|
||||
[&](const RecentZone& rz) { return rz.mapName == mapName && rz.tileX == tileX && rz.tileY == tileY; }),
|
||||
recentZones_.end());
|
||||
recentZones_.insert(recentZones_.begin(), {mapName, tileX, tileY});
|
||||
if (recentZones_.size() > 8) recentZones_.resize(8);
|
||||
|
||||
// Position camera at terrain center using actual chunk positions
|
||||
if (mesh.validChunkCount > 0) {
|
||||
auto& firstChunk = mesh.chunks[0];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue