1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-07-04 02:32:51 +00:00

rotspace:: in configure_period menu, updated description, and menu is left correctly

This commit is contained in:
Zeno Rogue 2020-07-28 13:16:36 +02:00
parent 475d16451a
commit c99650cae4

View File

@ -1488,35 +1488,36 @@ EX namespace hybrid {
string str = ""; string str = "";
if(rotspace) if(rotspace)
str = XLAT( str = XLAT(
"Theoretically, the double period ('sphere') works in underlying spherical geometry, " "If the 2D underlying manifold is bounded, the period should be a divisor of the 'rotation space' "
"any value works in (full) hyperbolic geometry, and single period ('PSL(2,R)') " "value (PSL(2,R)) times the Euler characteristics of the underlying manifold. "
"works in hyperbolic quotient spaces; quotients of these numbers work too. " "For unbounded underlying manifold, any value should work (theoretically, "
"(The current implementation in HyperRogue is not perfect, though, so only single is guaranteed to work.) " "the current implementation in HyperRogue is not perfect).\n\n"
"We won't stop you from trying illegal numbers, but they won't work correctly."); "We won't stop you from trying illegal numbers, but they won't work correctly.");
dialog::editNumber(s, 0, 16, 1, 0, XLAT("%1 period", "Z"), str); dialog::editNumber(s, 0, 16, 1, 0, XLAT("%1 period", "Z"), str);
dialog::bound_low(0); dialog::bound_low(0);
auto set_s = [] (int s1, bool ret) { auto set_s = [] (int s1, bool ret) {
return [s1] { return [s1,ret] {
if(ret) popScreen();
if(csteps == s1) return; if(csteps == s1) return;
stop_game(); stop_game();
csteps = s1 * cgi.single_step; csteps = s1 * cgi.single_step;
hybrid::reconfigure(); hybrid::reconfigure();
start_game(); start_game();
}; };
if(ret) popScreen();
}; };
dialog::extra_options = [=] () { dialog::extra_options = [=] () {
if(rotspace) { if(rotspace) {
int e_steps = cgi.psl_steps / gcd(cgi.single_step, cgi.psl_steps); int e_steps = cgi.psl_steps / gcd(cgi.single_step, cgi.psl_steps);
bool ubounded = PIU(bounded);
dialog::addSelItem( XLAT(sphere ? "elliptic" : "PSL(2,R)"), its(e_steps), 'P'); dialog::addSelItem( XLAT(sphere ? "elliptic" : "PSL(2,R)"), its(e_steps), 'P');
dialog::add_action(set_s(e_steps, true)); dialog::add_action(set_s(e_steps, true));
dialog::addSelItem( XLAT(sphere ? "sphere" : "SL(2,R)"), its(2*e_steps), 'P'); dialog::addSelItem( XLAT(sphere ? "sphere" : "SL(2,R)"), its(2*e_steps), 'P');
dialog::add_action(set_s(2*e_steps, true)); dialog::add_action(set_s(2*e_steps, true));
if(sl2) { if(sl2 && !ubounded) {
dialog::addSelItem( XLAT("universal cover"), its(0), 'P'); dialog::addSelItem( XLAT("universal cover"), its(0), 'P');
dialog::add_action(set_s(0, true)); dialog::add_action(set_s(0, true));
} }
dialog::addSelItem( XLAT("works correctly so far"), its(disc_quotient), 'Q'); dialog::addSelItem(ubounded ? XLAT("maximum") : XLAT("works correctly so far"), its(disc_quotient), 'Q');
dialog::add_action(set_s(disc_quotient, true)); dialog::add_action(set_s(disc_quotient, true));
} }
else { else {