feat(editor): center on terrain (Home key), navigation improvements

- "Center on Terrain" (Home key or View menu): resets camera to center
  of loaded tile at 300 units altitude with 45-degree downward pitch.
  Essential for recovering when camera gets lost in empty space.
- Toast confirmation on center action
This commit is contained in:
Kelsi 2026-05-05 05:48:00 -07:00
parent 2b0a81fd9a
commit 434fdf6c7f
3 changed files with 12 additions and 0 deletions

View file

@ -148,6 +148,7 @@ void EditorUI::renderMenuBar(EditorApp& app) {
bool wf = app.isWireframe();
if (ImGui::MenuItem("Wireframe", "F3", &wf)) app.setWireframe(wf);
if (ImGui::MenuItem("Reset Camera")) app.resetCamera();
if (ImGui::MenuItem("Center on Terrain", "Home")) app.centerOnTerrain();
ImGui::Separator();
if (ImGui::BeginMenu("Sky / Lighting")) {
if (ImGui::MenuItem("Day")) app.setSkyPreset(0);