1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-29 04:47:41 +00:00

Improved the UI for 'geodesic movement' setting, and also make it work correctly in SL2 and hyperbolic geometries

This commit is contained in:
Zeno Rogue
2022-12-25 12:14:36 +01:00
parent 080e853364
commit 86492d1181
10 changed files with 84 additions and 44 deletions

View File

@@ -1108,13 +1108,8 @@ EX void showEuclideanMenu() {
dialog::add_action_push(show3D);
}
menuitem_projection('1');
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(lie_movement_available()) {
add_edit(nisot::geodesic_movement);
}
#if CAP_CRYSTAL && MAXMDIM >= 4
crystal::add_crystal_transform('x');