mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-27 20:07:40 +00:00
more OOP-style standard dialogs
This commit is contained in:
@@ -873,7 +873,7 @@ void show_gridmaker() {
|
||||
dialog::addSelItem(XLAT("density"), fts(density), 'd');
|
||||
dialog::add_action([] {
|
||||
dialog::editNumber(density, 1, 10, .1, 4, XLAT("density"), XLAT(irrhelp));
|
||||
dialog::reaction = [] () {
|
||||
dialog::get_di().reaction = [] () {
|
||||
int s = cellcount;
|
||||
if(density < 1) density = 1;
|
||||
cellcount = int(isize(currentmap->allcells()) * density + .5);
|
||||
@@ -888,7 +888,7 @@ void show_gridmaker() {
|
||||
"The smallest allowed ratio of edge length to median edge length. "
|
||||
"Tilings with low values are easier to generate, but tend to be more ugly."
|
||||
));
|
||||
dialog::reaction = [] () {
|
||||
dialog::get_di().reaction = [] () {
|
||||
println(hlog, "quality = ", density);
|
||||
if(runlevel > 4) runlevel = 4;
|
||||
};
|
||||
@@ -931,7 +931,7 @@ void show_gridmaker() {
|
||||
dialog::add_action([] () {
|
||||
dialog::editNumber(bitruncations_requested, 0, 5, 1, 1, XLAT("bitruncation const"),
|
||||
XLAT("Bitruncation introduces some regularity, allowing more sophisticated floor tilings and textures."));
|
||||
dialog::reaction = [] () {
|
||||
dialog::get_di().reaction = [] () {
|
||||
if(bitruncations_requested > bitruncations_performed && runlevel > 5) runlevel = 5;
|
||||
if(bitruncations_requested < bitruncations_performed) runlevel = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user