@@ -1147,7 +1147,8 @@ EX void initConfig() {
11471147 ->editable (" use higher contrast" , ' h' )
11481148 ->help (" Use higher contrast for some terrain elements." );
11491149
1150- param_b (vid.grid , " grid" );
1150+ param_b (vid.grid , " grid" )
1151+ -> editable (" display grid" , ' g' );
11511152 param_b (models::desitter_projections, " desitter_projections" , false );
11521153 param_b (nonisotropic_weird_transforms, " nonisotropic_weird_transforms" , false );
11531154
@@ -2414,12 +2415,12 @@ void show_animation_speed_settings() {
24142415 dialog::display ();
24152416 }
24162417
2417- EX void showGraphConfig () {
2418+ EX void showScreenConfig () {
24182419 cmode = vid.xres > vid.yres * 1.4 ? sm::SIDE : sm::MAYDARK;
24192420 gamescreen ();
24202421
2421- dialog::init (XLAT (" graphics configuration" ));
2422-
2422+ dialog::init (XLAT (" screen configuration" ));
2423+
24232424#if !ISIOS && !ISWEB
24242425 add_edit (vid.want_fullscreen );
24252426
@@ -2491,6 +2492,19 @@ EX void showGraphConfig() {
24912492 else
24922493 dialog::addBreak (200 );
24932494
2495+ dialog::display ();
2496+ }
2497+
2498+
2499+ EX void showGraphConfig () {
2500+ cmode = vid.xres > vid.yres * 1.4 ? sm::SIDE : sm::MAYDARK;
2501+ gamescreen ();
2502+
2503+ dialog::init (XLAT (" graphics configuration" ));
2504+
2505+ dialog::addSelItem (XLAT (" screen settings" ), its (current_display->xsize ) + " x" + its (current_display->ysize ), ' s' );
2506+ dialog::add_action_push (showScreenConfig);
2507+
24942508 add_edit (mapfontscale);
24952509
24962510 dialog::addSelItem (XLAT (" vector settings" ), XLAT (" width" ) + " " + fts (vid.linewidth ), ' w' );
@@ -3894,23 +3908,41 @@ EX void edit_color_table(colortable& ct, const reaction_t& r IS(reaction_t()), b
38943908 dialog::display ();
38953909 }
38963910
3897- EX void show_color_dialog () {
3911+ void color_handler (int sym, int uni) {
3912+ if (uni == ' -' ) {
3913+ cell *c = mouseover;
3914+ if (!c) return ;
3915+ else if (c == cwt.at ) {
3916+ pushScreen (showCustomizeChar);
3917+ return ;
3918+ }
3919+ else if (c->monst )
3920+ dialog::openColorDialog (minf[c->monst ].color );
3921+ else if (c->item )
3922+ dialog::openColorDialog (iinf[c->item ].color );
3923+ else if (auto tab = special_colortable_for (c)) { pushScreen ([tab] { edit_color_table (*tab); }); return ; }
3924+ else if (c->wall )
3925+ dialog::openColorDialog (winf[c->wall == waMineMine ? waMineUnknown : c->wall ].color );
3926+ #if CAP_COMPLEX2
3927+ else if (c->land == laBrownian)
3928+ dialog::openColorDialog (brownian::get_color_edit (c->landparam ));
3929+ #endif
3930+ else
3931+ dialog::openColorDialog (floorcolors[c->land ]);
3932+ dialog::colorAlpha = false ;
3933+ dialog::get_di ().dialogflags |= sm::SIDE;
3934+ return ;
3935+ }
3936+ else dialog::handleNavigation (sym, uni);
3937+ if (doexiton (sym, uni)) popScreen ();
3938+ }
3939+
3940+ EX void show_color_dialog_projection () {
38983941 cmode = sm::SIDE | sm::DIALOG_STRICT_X;
38993942 getcstat = ' -' ;
39003943 gamescreen ();
3901- dialog::init (XLAT (" colors & aura" ));
39023944
3903- dialog::addColorItem (XLAT (" background" ), addalpha (backcolor), ' b' );
3904- dialog::add_action ([] () { dialog::openColorDialog (backcolor); dialog::colorAlpha = false ; dialog::get_di ().dialogflags |= sm::SIDE; });
3905-
3906- if (WDIM == 2 && GDIM == 3 && hyperbolic)
3907- dialog::addBoolItem_action (XLAT (" cool fog effect" ), context_fog, ' B' );
3908-
3909- dialog::addColorItem (XLAT (" foreground" ), addalpha (forecolor), ' f' );
3910- dialog::add_action ([] () { dialog::openColorDialog (forecolor); dialog::colorAlpha = false ; dialog::get_di ().dialogflags |= sm::SIDE; });
3911-
3912- dialog::addColorItem (XLAT (" borders" ), addalpha (bordcolor), ' o' );
3913- dialog::add_action ([] () { dialog::openColorDialog (bordcolor); dialog::colorAlpha = false ; dialog::get_di ().dialogflags |= sm::SIDE; });
3945+ dialog::init (XLAT (" projection colors & aura" ));
39143946
39153947 dialog::addColorItem (XLAT (" projection boundary" ), ringcolor, ' r' );
39163948 dialog::add_action ([] () { dialog::openColorDialog (ringcolor); dialog::get_di ().dialogflags |= sm::SIDE; });
@@ -3921,22 +3953,42 @@ EX void show_color_dialog() {
39213953 dialog::addColorItem (XLAT (" projection background" ), modelcolor, ' c' );
39223954 dialog::add_action ([] () { dialog::openColorDialog (modelcolor); dialog::get_di ().dialogflags |= sm::SIDE; });
39233955
3924- dialog::addColorItem (XLAT (" standard grid color" ), stdgridcolor, ' g' );
3925- dialog::add_action ([] () { vid.grid = true ; dialog::openColorDialog (stdgridcolor); dialog::get_di ().dialogflags |= sm::SIDE; });
3926-
3927- dialog::addSelItem (XLAT (" grid width multiplier" ), fts (vid.multiplier_grid ), ' G' );
3928- dialog::add_action ([] () { dialog::editNumber (vid.multiplier_grid , 0 , 10 , 1 , 1 , XLAT (" grid width multiplier" ), " " ); });
3929-
39303956 dialog::addSelItem (XLAT (" brightness behind the sphere" ), fts (backbrightness), ' i' );
39313957 dialog::add_action ([] () { dialog::editNumber (backbrightness, 0 , 1 , .01 , 0.25 , XLAT (" brightness behind the sphere" ),
39323958 XLAT (" In the orthogonal projection, objects on the other side of the sphere are drawn darker." )); dialog::bound_low (0 ); });
39333959
39343960 dialog::addColorItem (XLAT (" projection period" ), periodcolor, ' p' );
39353961 dialog::add_action ([] () { dialog::openColorDialog (periodcolor); dialog::get_di ().dialogflags |= sm::SIDE; });
39363962
3937- dialog::addColorItem (XLAT (" dialogs" ), addalpha (dialog::dialogcolor), ' d' );
3938- dialog::add_action ([] () { dialog::openColorDialog (dialog::dialogcolor); dialog::colorAlpha = false ; dialog::get_di ().dialogflags |= sm::SIDE; });
3939- dialog::addBoolItem_action (XLAT (" higher contrast" ), higher_contrast, ' h' );
3963+ dialog::addBreak (50 );
3964+
3965+ dialog::addSelItem (XLAT (" aura brightness" ), its (vid.aurastr ), ' a' );
3966+ dialog::add_action ([] () { dialog::editNumber (vid.aurastr , 0 , 256 , 10 , 128 , XLAT (" aura brightness" ), " " ); dialog::bound_low (0 ); });
3967+
3968+ dialog::addSelItem (XLAT (" aura smoothening factor" ), its (vid.aurasmoothen ), ' s' );
3969+ dialog::add_action ([] () { dialog::editNumber (vid.aurasmoothen , 1 , 180 , 1 , 5 , XLAT (" aura smoothening factor" ), " " ); dialog::bound_low (1 ); });
3970+
3971+ dialog::addBreak (50 );
3972+ dialog::addBack ();
3973+ dialog::display ();
3974+
3975+ keyhandler = color_handler;
3976+ }
3977+
3978+ EX void show_color_dialog_game () {
3979+ cmode = sm::SIDE | sm::DIALOG_STRICT_X;
3980+ getcstat = ' -' ;
3981+ gamescreen ();
3982+
3983+ dialog::init (XLAT (" game colors" ));
3984+
3985+ add_edit (vid.grid );
3986+
3987+ dialog::addColorItem (XLAT (" standard grid color" ), stdgridcolor, ' g' );
3988+ dialog::add_action ([] () { vid.grid = true ; dialog::openColorDialog (stdgridcolor); dialog::get_di ().dialogflags |= sm::SIDE; });
3989+
3990+ dialog::addSelItem (XLAT (" grid width multiplier" ), fts (vid.multiplier_grid ), ' G' );
3991+ dialog::add_action ([] () { dialog::editNumber (vid.multiplier_grid , 0 , 10 , 1 , 1 , XLAT (" grid width multiplier" ), " " ); });
39403992
39413993 dialog::addBreak (50 );
39423994 if (specialland == laCanvas && ccolor::which->ctab .size ()) {
@@ -3972,15 +4024,43 @@ EX void show_color_dialog() {
39724024 dialog::addBoolItem_action (XLAT (" Galápagos shading" ), tortoise::shading_enabled, ' T' );
39734025 }
39744026
4027+ dialog::addBoolItem_action (XLAT (" higher contrast" ), higher_contrast, ' h' );
4028+
39754029 dialog::addInfo (XLAT (" colors of some game objects can be edited by clicking them." ));
39764030
39774031 dialog::addBreak (50 );
4032+ dialog::addBack ();
4033+ dialog::display ();
39784034
3979- dialog::addSelItem ( XLAT ( " aura brightness " ), its (vid. aurastr ), ' a ' ) ;
3980- dialog::add_action ([] () { dialog::editNumber (vid. aurastr , 0 , 256 , 10 , 128 , XLAT ( " aura brightness " ), " " ); dialog::bound_low ( 0 ); });
4035+ keyhandler = color_handler ;
4036+ }
39814037
3982- dialog::addSelItem (XLAT (" aura smoothening factor" ), its (vid.aurasmoothen ), ' s' );
3983- dialog::add_action ([] () { dialog::editNumber (vid.aurasmoothen , 1 , 180 , 1 , 5 , XLAT (" aura smoothening factor" ), " " ); dialog::bound_low (1 ); });
4038+ EX void show_color_dialog () {
4039+ cmode = sm::SIDE | sm::DIALOG_STRICT_X;
4040+ getcstat = ' -' ;
4041+ gamescreen ();
4042+ dialog::init (XLAT (" colors & aura" ));
4043+
4044+ dialog::addColorItem (XLAT (" background" ), addalpha (backcolor), ' b' );
4045+ dialog::add_action ([] () { dialog::openColorDialog (backcolor); dialog::colorAlpha = false ; dialog::get_di ().dialogflags |= sm::SIDE; });
4046+
4047+ if (WDIM == 2 && GDIM == 3 && hyperbolic)
4048+ dialog::addBoolItem_action (XLAT (" cool fog effect" ), context_fog, ' B' );
4049+
4050+ dialog::addColorItem (XLAT (" foreground" ), addalpha (forecolor), ' f' );
4051+ dialog::add_action ([] () { dialog::openColorDialog (forecolor); dialog::colorAlpha = false ; dialog::get_di ().dialogflags |= sm::SIDE; });
4052+
4053+ dialog::addColorItem (XLAT (" borders" ), addalpha (bordcolor), ' o' );
4054+ dialog::add_action ([] () { dialog::openColorDialog (bordcolor); dialog::colorAlpha = false ; dialog::get_di ().dialogflags |= sm::SIDE; });
4055+
4056+ dialog::addColorItem (XLAT (" dialogs" ), addalpha (dialog::dialogcolor), ' d' );
4057+ dialog::add_action ([] () { dialog::openColorDialog (dialog::dialogcolor); dialog::colorAlpha = false ; dialog::get_di ().dialogflags |= sm::SIDE; });
4058+
4059+ dialog::addItem (XLAT (" projection colors & aura" ), ' p' );
4060+ dialog::add_action_push (show_color_dialog_projection);
4061+
4062+ dialog::addItem (XLAT (" grid & game colors" ), ' g' );
4063+ dialog::add_action_push (show_color_dialog_game);
39844064
39854065 dialog::addBreak (50 );
39864066 dialog::addBack ();
@@ -4014,6 +4094,8 @@ EX void show_color_dialog() {
40144094 else dialog::handleNavigation (sym, uni);
40154095 if (doexiton (sym, uni)) popScreen ();
40164096 };
4097+
4098+ keyhandler = color_handler;
40174099 }
40184100
40194101#if CAP_CONFIG
0 commit comments