switching nisot::geodesic_movement now automatically switches the perspective -- basically, light also moves as chosen

This commit is contained in:
Zeno Rogue 2022-12-16 23:08:54 +01:00
parent 1210de672e
commit 70718b2602
2 changed files with 10 additions and 3 deletions

View File

@ -1102,8 +1102,14 @@ EX void showEuclideanMenu() {
dialog::add_action_push(show3D);
}
menuitem_projection('1');
if(nonisotropic && !sl2 && !embedded_plane)
dialog::addBoolItem_action(XLAT("geodesic movement in Sol/Nil"), nisot::geodesic_movement, 'G');
if(nonisotropic && !sl2 && !embedded_plane) {
dialog::addBoolItem(XLAT("geodesic movement in Sol/Nil"), nisot::geodesic_movement, 'G');
dialog::add_action([] {
nisot::geodesic_movement = !nisot::geodesic_movement;
if(pmodel == mdLiePerspective && nisot::geodesic_movement) pmodel = mdGeodesic;
if(pmodel == mdGeodesic && !nisot::geodesic_movement) pmodel = mdLiePerspective;
});
}
#if CAP_CRYSTAL && MAXMDIM >= 4
crystal::add_crystal_transform('x');
#endif

View File

@ -1368,7 +1368,8 @@ EX void stop_game() {
}
EX eModel default_model() {
if(nonisotropic) return mdGeodesic;
if(sl2) return mdGeodesic;
if(nonisotropic) return nisot::geodesic_movement ? mdGeodesic : mdLiePerspective;
if(GDIM == 3) return mdPerspective;
return mdDisk;
}