1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

all extra_options in number dialogs now use capital letters to avoid conflicts

This commit is contained in:
Zeno Rogue 2018-11-09 22:18:18 +01:00
parent 2d87ca4798
commit cf52faa484
3 changed files with 23 additions and 23 deletions

View File

@ -647,27 +647,27 @@ void edit_sightrange() {
dialog::editNumber(vid.smart_range_detail, 1, 50, 1, 8, XLAT("minimum visible cell in pixels"), "");
}
dialog::extra_options = [] () {
dialog::addBoolItem(XLAT("draw range based on distance"), vid.use_smart_range == 0, 'd');
dialog::addBoolItem(XLAT("draw range based on distance"), vid.use_smart_range == 0, 'D');
dialog::add_action([] () { vid.use_smart_range = 0; popScreen(); edit_sightrange(); });
if(allowIncreasedSight()) {
dialog::addBoolItem(XLAT("draw based on size in the projection (no generation)"), vid.use_smart_range == 1, 'n');
dialog::addBoolItem(XLAT("draw based on size in the projection (no generation)"), vid.use_smart_range == 1, 'N');
dialog::add_action([] () { vid.use_smart_range = 1; popScreen(); edit_sightrange(); });
}
if(allowChangeRange() && allowIncreasedSight()) {
dialog::addBoolItem(XLAT("draw based on size in the projection (generation)"), vid.use_smart_range == 2, 'g');
dialog::addBoolItem(XLAT("draw based on size in the projection (generation)"), vid.use_smart_range == 2, 'G');
dialog::add_action([] () { vid.use_smart_range = 2; popScreen(); edit_sightrange(); });
}
if(vid.use_smart_range == 0 && allowChangeRange()) {
dialog::addSelItem(XLAT("generation range bonus"), its(genrange_bonus), 'o');
dialog::addSelItem(XLAT("generation range bonus"), its(genrange_bonus), 'O');
dialog::add_action([] () { genrange_bonus = sightrange_bonus; doOvergenerate(); });
dialog::addSelItem(XLAT("game range bonus"), its(gamerange_bonus), 'O');
dialog::addSelItem(XLAT("game range bonus"), its(gamerange_bonus), 'S');
dialog::add_action([] () { gamerange_bonus = sightrange_bonus; doOvergenerate(); });
}
if(!allowChangeRange() || !allowIncreasedSight()) {
dialog::addItem(XLAT("enable the cheat mode for additional options"), 'C');
dialog::addItem(XLAT("enable the cheat mode for additional options"), 'X');
dialog::add_action(enable_cheat);
}
dialog::addSelItem(XLAT("cells drawn"), its(cells_drawn), 'c');
dialog::addSelItem(XLAT("cells drawn"), its(cells_drawn), 'C');
dialog::add_action([] () {
popScreen();
dialog::editNumber(vid.cells_drawn_limit, 100, 1000000, log(10), 10000, XLAT("limit on cells drawn"),
@ -819,7 +819,7 @@ void showGraphConfig() {
if(xuni == 'w' && vid.usingGL) {
dialog::editNumber(vid.linewidth, 0, 10, 0.1, 1, XLAT("line width"), "");
dialog::extra_options = [] () {
dialog::addBoolItem("finer lines at the boundary", vid.antialias & AA_LINEWIDTH, 'o');
dialog::addBoolItem("finer lines at the boundary", vid.antialias & AA_LINEWIDTH, 'O');
dialog::add_action([] () { vid.antialias ^= AA_LINEWIDTH; });
};
}
@ -1080,11 +1080,11 @@ void projectionDialog() {
"for more models."));
dialog::extra_options = [] () {
dialog::addBreak(100);
dialog::addSelItem(sphere ? "stereographic" : "Poincaré model", "1", 'p');
dialog::addSelItem(sphere ? "stereographic" : "Poincaré model", "1", 'P');
dialog::add_action([] () { *dialog::ne.editwhat = 1; vid.scale = 1; dialog::ne.s = "1"; });
dialog::addSelItem(sphere ? "gnomonic" : "Klein model", "0", 'k');
dialog::addSelItem(sphere ? "gnomonic" : "Klein model", "0", 'K');
dialog::add_action([] () { *dialog::ne.editwhat = 0; vid.scale = 1; dialog::ne.s = "0"; });
dialog::addItem(sphere ? "towards orthographic" : "towards Gans model", 'o');
dialog::addItem(sphere ? "towards orthographic" : "towards Gans model", 'O');
dialog::add_action([] () { double d = exp(shiftmul/10); vid.alpha *= d; vid.scale *= d; dialog::ne.s = dialog::disp(vid.alpha); });
};
}
@ -1328,7 +1328,7 @@ void show3D() {
dialog::editNumber(geom3::wall_height, 0, 1, .1, .3, XLAT("Height of walls"), "");
dialog::reaction = delayed_geo_reset;
dialog::extra_options = [] () {
dialog::addBoolItem(XLAT("auto-adjust in Goldberg grids"), geom3::gp_autoscale_heights, 'o');
dialog::addBoolItem(XLAT("auto-adjust in Goldberg grids"), geom3::gp_autoscale_heights, 'O');
dialog::add_action([] () {
geom3::gp_autoscale_heights = !geom3::gp_autoscale_heights;
buildpolys();

View File

@ -746,7 +746,7 @@ namespace conformal {
dialog::extra_options = [] () {
dialog::addBreak(100);
if(sphere && pmodel == mdBandEquiarea) {
dialog::addBoolItem("Gall-Peters", vid.stretch == 2, 'o');
dialog::addBoolItem("Gall-Peters", vid.stretch == 2, 'O');
dialog::add_action([] { vid.stretch = 2; dialog::ne.s = "2"; });
}
if(pmodel == mdBandEquiarea) {
@ -822,11 +822,11 @@ namespace conformal {
dialog::dialogflags |= sm::CENTER;
dialog::extra_options = [] () {
dialog::addBreak(100);
dialog::addBoolItem("line animation only", conformal::do_rotate == 0, 'n');
dialog::addBoolItem("line animation only", conformal::do_rotate == 0, 'N');
dialog::add_action([] () { conformal::do_rotate = 0; });
dialog::addBoolItem("gravity lands", conformal::do_rotate == 1, 'g');
dialog::addBoolItem("gravity lands", conformal::do_rotate == 1, 'G');
dialog::add_action([] () { conformal::do_rotate = 1; });
dialog::addBoolItem("all directional lands", conformal::do_rotate == 2, 'd');
dialog::addBoolItem("all directional lands", conformal::do_rotate == 2, 'D');
dialog::add_action([] () { conformal::do_rotate = 2; });
};
}

View File

@ -659,15 +659,15 @@ void show() {
dialog::extra_options = [] () {
if(hyperbolic) {
// area = 2pi (cosh(r)-1)
dialog::addSelItem(XLAT("double spin"), fts(acosh(2.)), 'a');
dialog::addSelItem(XLAT("double spin"), fts(acosh(2.)), 'A');
dialog::add_action([] () { circle_radius = acosh(2.); });
dialog::addSelItem(XLAT("triple spin"), fts(acosh(3.)), 'b');
dialog::addSelItem(XLAT("triple spin"), fts(acosh(3.)), 'B');
dialog::add_action([] () { circle_radius = acosh(3.); });
}
if(sphere) {
dialog::addSelItem(XLAT("double spin"), fts(acos(1/2.)), 'a');
dialog::addSelItem(XLAT("double spin"), fts(acos(1/2.)), 'A');
dialog::add_action([] () { circle_radius = acos(1/2.); });
dialog::addSelItem(XLAT("triple spin"), fts(acos(1/3.)), 'b');
dialog::addSelItem(XLAT("triple spin"), fts(acos(1/3.)), 'B');
dialog::add_action([] () { circle_radius = acos(1/3.); });
}
};
@ -687,11 +687,11 @@ void show() {
dialog::add_action([] () {
dialog::editNumber(cycle_length, 0, 10, 0.1, 2*M_PI, "shift", "");
dialog::extra_options = [] () {
dialog::addSelItem(XLAT("full circle"), fts(2 * M_PI), 'a');
dialog::addSelItem(XLAT("full circle"), fts(2 * M_PI), 'A');
dialog::add_action([] () { cycle_length = 2 * M_PI; });
dialog::addSelItem(XLAT("Zebra period"), fts(2.898149445355172), 'b');
dialog::addSelItem(XLAT("Zebra period"), fts(2.898149445355172), 'B');
dialog::add_action([] () { cycle_length = 2.898149445355172; });
dialog::addSelItem(XLAT("Bolza period"), fts(2 * 1.528571), 'c');
dialog::addSelItem(XLAT("Bolza period"), fts(2 * 1.528571), 'C');
dialog::add_action([] () { cycle_length = 2 * 1.528571; });
};
});