Feat/modelspinnermousebutton
Took over #5594 as @zonkmachine indicated they no longer have the time to complete their PR.
Changes from the last commit:
- Unify almost all spinning by creating Input::Manager::IsMouseRotatePressed()
- almost a single place to implement the logic instead of in multiple places throughout the code.
- the current button combos for rotation are the MMB and Ctrl+LMB
- The ModelSpinner has its own implementation as it uses
ImGui, notInput::Manager - TODO: remove the now-obsolete "No middle mouse button" option
- TODO: add user configuration options for the buttons/modifiers used
- Add Input::Manager::GetRotateSpeedShiftModifier() to also unify rotation speed modifiers
- change using the Right-Shift key to the Left-Alt key for the secondary speed and rotation modifiers
- Fix SystemView deselecting objects when rotation is started
- Fix ShipView rotating when rotating the ship (via RMB) itself.
Discussion: Given that the RMB moves the ship itself, would this be the more natural default to spin everything instead of the MMB? That could free up the MMB for panning/moving in the SectorView and SystemView.
Having pan on MMB would be nice
Discussion: Given that the RMB moves the ship itself, would this be the more natural default to spin everything instead of the MMB? That could free up the MMB for panning/moving in the SectorView and SystemView.
... although that still leaves the question of which combo to use for rotating the camera (not the ship) in the ShipView.. I guess it could stay on MMB..?
<- not a UX designer, I can do the technical implementation but open to suggestion on which actual buttons/modifiers to use for the various tasks (which were summarised in a "Details" pop-up here : https://github.com/pioneerspacesim/pioneer/pull/5594#issuecomment-2491710476) ..
I'd say that can stay on MMB. In Blender at least MMB is always the primary viewport navigation: in 3D view it rotates the view, in 2D windows it pans, and I don't think I ever got confused over that. Although admittedly, when switching to other software, especially to Krita sometime I do get confused sometimes, and try to use shift+MMB for pan, which spins the view.
Given that the RMB moves the ship itself, would this be the more natural default to spin everything instead of the MMB? That could free up the MMB for panning/moving in the SectorView and SystemView.
MMB should "generally" be rotate view, with the WASD keys (and/or left stick on controller, equivalent on joystick) serving to move the "map cursors" in Sector/System map view. I find it more helpful to think about the maps as having a discrete cursor (at the center of the view) which is moved rather than moving by panning the view.
Specifically this is because the map cursors in both maps should move on (some sort) of plane, whether that's the equatorial / ecliptic plane or a custom plane for the specific view (i.e. close zoom on planets wraps around the surface via lat/lon).