mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	dialog:: addBoolItem_action, addBoolItem_action_neg, addBoolItem_choice used when applicable
This commit is contained in:
		
							
								
								
									
										21
									
								
								config.cpp
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								config.cpp
									
									
									
									
									
								
							| @@ -859,11 +859,9 @@ void configureOther() { | |||||||
|   dialog::add_action([] {vid.steamscore = vid.steamscore^1; }); |   dialog::add_action([] {vid.steamscore = vid.steamscore^1; }); | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|   dialog::addBoolItem(XLAT("skip the start menu"), vid.skipstart, 'm'); |   dialog::addBoolItem_action(XLAT("skip the start menu"), vid.skipstart, 'm'); | ||||||
|   dialog::add_action([] { vid.skipstart = !vid.skipstart; }); |  | ||||||
|  |  | ||||||
|   dialog::addBoolItem(XLAT("forget faraway cells"), memory_saving_mode, 'y'); |   dialog::addBoolItem_action(XLAT("forget faraway cells"), memory_saving_mode, 'y'); | ||||||
|   dialog::add_action([] { memory_saving_mode = !memory_saving_mode; }); |  | ||||||
|  |  | ||||||
|   if(CAP_AUDIO) { |   if(CAP_AUDIO) { | ||||||
|     dialog::addSelItem(XLAT("background music volume"), its(musicvolume), 'b'); |     dialog::addSelItem(XLAT("background music volume"), its(musicvolume), 'b'); | ||||||
| @@ -1284,8 +1282,7 @@ void show3D() { | |||||||
|   dialog::addBreak(50); |   dialog::addBreak(50); | ||||||
|   #if CAP_RUG |   #if CAP_RUG | ||||||
|   if(rug::rugged) { |   if(rug::rugged) { | ||||||
|     dialog::addBoolItem(XLAT("3D monsters/walls on the surface"), rug::spatial_rug, 'S'); |     dialog::addBoolItem_action(XLAT("3D monsters/walls on the surface"), rug::spatial_rug, 'S'); | ||||||
|     dialog::add_action([] () { rug::spatial_rug = !rug::spatial_rug; }); |  | ||||||
|     } |     } | ||||||
|   #endif |   #endif | ||||||
|   dialog::addBoolItem(XLAT("configure TPP automatically"), pmodel == mdDisk && vid.camera_angle, 'T'); |   dialog::addBoolItem(XLAT("configure TPP automatically"), pmodel == mdDisk && vid.camera_angle, 'T'); | ||||||
| @@ -1394,8 +1391,7 @@ void show3D() { | |||||||
|         XLAT("Don't center on the player character.") |         XLAT("Don't center on the player character.") | ||||||
|         ); |         ); | ||||||
|       if(DIM == 3) dialog::extra_options = [] () { |       if(DIM == 3) dialog::extra_options = [] () { | ||||||
|         dialog::addBoolItem(XLAT("reduce if walls on the way"), vid.use_wall_radar, 'R'); |         dialog::addBoolItem_action(XLAT("reduce if walls on the way"), vid.use_wall_radar, 'R'); | ||||||
|         dialog::add_action([] () { vid.use_wall_radar = !vid.use_wall_radar; }); |  | ||||||
|         }; |         }; | ||||||
|       } |       } | ||||||
|     else if(uni == 's')  |     else if(uni == 's')  | ||||||
| @@ -1709,11 +1705,9 @@ void configureMouse() { | |||||||
|   gamescreen(1); |   gamescreen(1); | ||||||
|   dialog::init(XLAT("mouse & touchscreen")); |   dialog::init(XLAT("mouse & touchscreen")); | ||||||
|  |  | ||||||
|   dialog::addBoolItem(XLAT("reverse pointer control"), (vid.revcontrol), 'r'); |   dialog::addBoolItem_action(XLAT("reverse pointer control"), (vid.revcontrol), 'r'); | ||||||
|   dialog::add_action([] {vid.revcontrol = !vid.revcontrol; }); |  | ||||||
|    |    | ||||||
|   dialog::addBoolItem(XLAT("draw circle around the target"), (vid.drawmousecircle), 'd'); |   dialog::addBoolItem_action(XLAT("draw circle around the target"), (vid.drawmousecircle), 'd'); | ||||||
|   dialog::add_action([] { vid.drawmousecircle = !vid.drawmousecircle; }); |  | ||||||
|    |    | ||||||
| #if ISMOBILE | #if ISMOBILE | ||||||
|   dialog::addBoolItem(XLAT("targetting ranged Orbs long-click only"), (vid.shifttarget&2), 'i'); |   dialog::addBoolItem(XLAT("targetting ranged Orbs long-click only"), (vid.shifttarget&2), 'i'); | ||||||
| @@ -1723,8 +1717,7 @@ void configureMouse() { | |||||||
|   dialog::add_action([] {vid.shifttarget = vid.shifttarget^3; });     |   dialog::add_action([] {vid.shifttarget = vid.shifttarget^3; });     | ||||||
|  |  | ||||||
|   #if !ISMOBILE |   #if !ISMOBILE | ||||||
|   dialog::addBoolItem(XLAT("quick mouse"), vid.quickmouse, 'M'); |   dialog::addBoolItem_action(XLAT("quick mouse"), vid.quickmouse, 'M'); | ||||||
|   dialog::add_action([] {vid.quickmouse = !vid.quickmouse; }); |  | ||||||
|   #endif |   #endif | ||||||
|  |  | ||||||
|   dialog::addSelItem(XLAT("move by clicking on compass"), its(vid.mobilecompasssize), 'C'); |   dialog::addSelItem(XLAT("move by clicking on compass"), its(vid.mobilecompasssize), 'C'); | ||||||
|   | |||||||
| @@ -826,8 +826,7 @@ namespace conformal { | |||||||
|       } |       } | ||||||
|  |  | ||||||
|     if(pmodel == mdRotatedHyperboles) { |     if(pmodel == mdRotatedHyperboles) { | ||||||
|       dialog::addBoolItem(XLAT("use atan to make it finite"), use_atan, 'x'); |       dialog::addBoolItem_action(XLAT("use atan to make it finite"), use_atan, 'x'); | ||||||
|       dialog::add_action([] () { use_atan = !use_atan; }); |  | ||||||
|       } |       } | ||||||
|  |  | ||||||
|     if(pmodel == mdBall) { |     if(pmodel == mdBall) { | ||||||
| @@ -1023,12 +1022,9 @@ namespace conformal { | |||||||
|         dialog::dialogflags |= sm::CENTER; |         dialog::dialogflags |= sm::CENTER; | ||||||
|         dialog::extra_options = [] () { |         dialog::extra_options = [] () { | ||||||
|           dialog::addBreak(100); |           dialog::addBreak(100); | ||||||
|           dialog::addBoolItem("line animation only", conformal::do_rotate == 0, 'N'); |           dialog::addBoolItem_choice("line animation only", conformal::do_rotate, 0, 'N'); | ||||||
|           dialog::add_action([] () { conformal::do_rotate = 0; }); |           dialog::addBoolItem_choice("gravity lands", conformal::do_rotate, 1, 'G'); | ||||||
|           dialog::addBoolItem("gravity lands", conformal::do_rotate == 1, 'G'); |           dialog::addBoolItem_choice("all directional lands", conformal::do_rotate, 2, 'D'); | ||||||
|           dialog::add_action([] () { conformal::do_rotate = 1; }); |  | ||||||
|           dialog::addBoolItem("all directional lands", conformal::do_rotate == 2, 'D'); |  | ||||||
|           dialog::add_action([] () { conformal::do_rotate = 2; }); |  | ||||||
|           }; |           }; | ||||||
|         } |         } | ||||||
|       else if(doexiton(sym, uni)) popScreen(); |       else if(doexiton(sym, uni)) popScreen(); | ||||||
|   | |||||||
| @@ -1149,8 +1149,7 @@ void show() { | |||||||
|   dialog::addBoolItem(XLAT("4D double bitruncated"), ginf[gCrystal].vertex == 3, 'D'); |   dialog::addBoolItem(XLAT("4D double bitruncated"), ginf[gCrystal].vertex == 3, 'D'); | ||||||
|   dialog::add_action(dialog::add_confirmation([]() { set_crystal(8); set_variation(eVariation::bitruncated); set_variation(eVariation::bitruncated); start_game(); })); |   dialog::add_action(dialog::add_confirmation([]() { set_crystal(8); set_variation(eVariation::bitruncated); set_variation(eVariation::bitruncated); start_game(); })); | ||||||
|   dialog::addBreak(50); |   dialog::addBreak(50); | ||||||
|   dialog::addBoolItem(XLAT("view coordinates in the cheat mode"), view_coordinates, 'v'); |   dialog::addBoolItem_action(XLAT("view coordinates in the cheat mode"), view_coordinates, 'v'); | ||||||
|   dialog::add_action([]() { view_coordinates = !view_coordinates; }); |  | ||||||
|   dialog::addSelItem(XLAT("compass probability"), fts(compass_probability), 'p'); |   dialog::addSelItem(XLAT("compass probability"), fts(compass_probability), 'p'); | ||||||
|   dialog::add_action([]() {  |   dialog::add_action([]() {  | ||||||
|     dialog::editNumber(compass_probability, 0, 1, 0.1, 1, XLAT("compass probability"), compass_help());  |     dialog::editNumber(compass_probability, 0, 1, 0.1, 1, XLAT("compass probability"), compass_help());  | ||||||
|   | |||||||
| @@ -1091,6 +1091,11 @@ namespace dialog { | |||||||
|     dialog::addBoolItem(s, b, c); |     dialog::addBoolItem(s, b, c); | ||||||
|     dialog::add_action([&b] { b = !b; }); |     dialog::add_action([&b] { b = !b; }); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |   void addBoolItem_action_neg(const string& s, bool& b, char c) {  | ||||||
|  |     dialog::addBoolItem(s, !b, c); | ||||||
|  |     dialog::add_action([&b] { b = !b; }); | ||||||
|  |     } | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -583,8 +583,7 @@ void viewdist_configure_dialog() { | |||||||
|   dialog::addSelItem(XLAT("number codes"), XLAT(ncnames[number_coding]), 'n'); |   dialog::addSelItem(XLAT("number codes"), XLAT(ncnames[number_coding]), 'n'); | ||||||
|   dialog::add_action([] () { number_coding = eNumberCoding((number_coding + 1) % (mod_allowed() ? 4 : 2)); }); |   dialog::add_action([] () { number_coding = eNumberCoding((number_coding + 1) % (mod_allowed() ? 4 : 2)); }); | ||||||
|  |  | ||||||
|   dialog::addBoolItem(XLAT("color codes"), use_color_codes, 'u'); |   dialog::addBoolItem_action(XLAT("color codes"), use_color_codes, 'u'); | ||||||
|   dialog::add_action([] () { use_color_codes = !use_color_codes; }); |  | ||||||
|  |  | ||||||
|   dialog::addSelItem(XLAT("display distances from"), its(first_distance), 'd'); |   dialog::addSelItem(XLAT("display distances from"), its(first_distance), 'd'); | ||||||
|   dialog::add_action([] () {  |   dialog::add_action([] () {  | ||||||
|   | |||||||
							
								
								
									
										5
									
								
								hyper.h
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								hyper.h
									
									
									
									
									
								
							| @@ -1974,6 +1974,11 @@ namespace dialog { | |||||||
|  |  | ||||||
|   void add_action_push(const reaction_t& action); |   void add_action_push(const reaction_t& action); | ||||||
|   void addBoolItem_action(const string&  s, bool& b, char c); |   void addBoolItem_action(const string&  s, bool& b, char c); | ||||||
|  |   void addBoolItem_action_neg(const string&  s, bool& b, char c); | ||||||
|  |   template<class T> void addBoolItem_choice(const string&  s, T& b, T val, char c) { | ||||||
|  |     addBoolItem(s, b == val, c); | ||||||
|  |     add_action([&b, val] { b = val; }); | ||||||
|  |     } | ||||||
|    |    | ||||||
|   string view_edited_string(); |   string view_edited_string(); | ||||||
|   void start_editing(string& s); |   void start_editing(string& s); | ||||||
|   | |||||||
| @@ -2108,21 +2108,17 @@ namespace mapeditor { | |||||||
|    |    | ||||||
|     dialog::init(XLAT("Map settings")); |     dialog::init(XLAT("Map settings")); | ||||||
|    |    | ||||||
|     dialog::addBoolItem(XLAT("disable wandering monsters"), !gen_wandering, 'w'); |     dialog::addBoolItem_action_neg(XLAT("disable wandering monsters"), gen_wandering, 'w'); | ||||||
|     dialog::add_action([] () { gen_wandering = !gen_wandering; }); |  | ||||||
|  |  | ||||||
|     if(gen_wandering) { |     if(gen_wandering) { | ||||||
|       dialog::addBoolItem(XLAT("disable ghost timer"), !timerghost, 'g'); |       dialog::addBoolItem_action_neg(XLAT("disable ghost timer"), timerghost, 'g'); | ||||||
|       dialog::add_action([] () { timerghost = !timerghost; }); |  | ||||||
|       } |       } | ||||||
|     else dialog::addBreak(100); |     else dialog::addBreak(100); | ||||||
|  |  | ||||||
|     dialog::addBoolItem(XLAT("simple pattern generation"), reptilecheat, 'p'); |     dialog::addBoolItem_action(XLAT("simple pattern generation"), reptilecheat, 'p'); | ||||||
|     dialog::add_action([] () { reptilecheat = !reptilecheat; }); |  | ||||||
|     dialog::addInfo(XLAT("(e.g. pure Reptile pattern)")); |     dialog::addInfo(XLAT("(e.g. pure Reptile pattern)")); | ||||||
|  |  | ||||||
|     dialog::addBoolItem(XLAT("safety generation"), safety, 's'); |     dialog::addBoolItem_action(XLAT("safety generation"), safety, 's'); | ||||||
|     dialog::add_action([] () { safety = !safety; }); |  | ||||||
|     dialog::addInfo(XLAT("(no treasure, no dangers)")); |     dialog::addInfo(XLAT("(no treasure, no dangers)")); | ||||||
|  |  | ||||||
|     dialog::addBoolItem(XLAT("god mode"), autocheat, 'G'); |     dialog::addBoolItem(XLAT("god mode"), autocheat, 'G'); | ||||||
|   | |||||||
| @@ -1018,8 +1018,7 @@ void race_projection() { | |||||||
|     dialog::addItem(XLAT("configure the projection"), 'p'); |     dialog::addItem(XLAT("configure the projection"), 'p'); | ||||||
|     dialog::add_action_push(race_projection); |     dialog::add_action_push(race_projection); | ||||||
|    |    | ||||||
|     dialog::addBoolItem(XLAT("guiding line"), guiding, 'g'); |     dialog::addBoolItem_action(XLAT("guiding line"), guiding, 'g'); | ||||||
|     dialog::add_action([] () { guiding = !guiding; }); |  | ||||||
|    |    | ||||||
|     dialog::addItem(shmup::player_count_name(playercfg), 'n'); |     dialog::addItem(shmup::player_count_name(playercfg), 'n'); | ||||||
|     dialog::add_action([/*this*/] () {  |     dialog::add_action([/*this*/] () {  | ||||||
|   | |||||||
| @@ -422,8 +422,7 @@ namespace flocking { | |||||||
|     hr::showquotients = true; |     hr::showquotients = true; | ||||||
|     dialog::add_action(runGeometryExperiments); |     dialog::add_action(runGeometryExperiments); | ||||||
|  |  | ||||||
|     dialog::addBoolItem("draw forces", draw_lines, 'l'); |     dialog::addBoolItem_action("draw forces", draw_lines, 'l'); | ||||||
|     dialog::add_action([] () { draw_lines = !draw_lines; }); |  | ||||||
|    |    | ||||||
|     dialog::addSelItem("follow", follow_names[follow], 'f'); |     dialog::addSelItem("follow", follow_names[follow], 'f'); | ||||||
|     dialog::add_action([] () { follow++; follow %= 3; }); |     dialog::add_action([] () { follow++; follow %= 3; }); | ||||||
|   | |||||||
| @@ -1959,10 +1959,8 @@ void configure_edge_display() { | |||||||
|     } |     } | ||||||
|   dialog::addBreak(100); |   dialog::addBreak(100); | ||||||
|   if(among(kind, kSAG, kKohonen, kSpiral)) { |   if(among(kind, kSAG, kKohonen, kSpiral)) { | ||||||
|     dialog::addBoolItem("color/alpha", mode == 0, '1'); |     dialog::addBoolItem_choice("color/alpha", mode, 0, '1'); | ||||||
|     dialog::add_action([] () { mode = 0; }); |     dialog::addBoolItem_choice(s3, mode, 1, '2'); | ||||||
|     dialog::addBoolItem(s3, mode == 1, '2'); |  | ||||||
|     dialog::add_action([] () { mode = 1; }); |  | ||||||
|     } |     } | ||||||
|   else mode = 0; |   else mode = 0; | ||||||
|    |    | ||||||
|   | |||||||
| @@ -414,8 +414,7 @@ void menu() { | |||||||
|     dialog::addSelItem(XLAT("supersampling"), its(shot_aa), 's'); |     dialog::addSelItem(XLAT("supersampling"), its(shot_aa), 's'); | ||||||
|     dialog::add_action([] { shot_aa *= 2; if(shot_aa > 16) shot_aa = 1; }); |     dialog::add_action([] { shot_aa *= 2; if(shot_aa > 16) shot_aa = 1; }); | ||||||
|     } |     } | ||||||
|   dialog::addBoolItem(XLAT("transparent"), transparent, 't'); |   dialog::addBoolItem_action(XLAT("transparent"), transparent, 't'); | ||||||
|   dialog::add_action([] { transparent = !transparent; }); |  | ||||||
|  |  | ||||||
|   dialog::addSelItem(XLAT("gamma"), fts(gamma), 'g'); |   dialog::addSelItem(XLAT("gamma"), fts(gamma), 'g'); | ||||||
|   dialog::add_action([] { dialog::editNumber(gamma, 0, 2, .1, .5, XLAT("gamma"), "higher value = darker"); }); |   dialog::add_action([] { dialog::editNumber(gamma, 0, 2, .1, .5, XLAT("gamma"), "higher value = darker"); }); | ||||||
| @@ -423,11 +422,9 @@ void menu() { | |||||||
|   dialog::addSelItem(XLAT("brightness"), fts(fade), 'b'); |   dialog::addSelItem(XLAT("brightness"), fts(fade), 'b'); | ||||||
|   dialog::add_action([] { dialog::editNumber(fade, 0, 2, .1, 1, XLAT("brightness"), "higher value = lighter"); }); |   dialog::add_action([] { dialog::editNumber(fade, 0, 2, .1, 1, XLAT("brightness"), "higher value = lighter"); }); | ||||||
|  |  | ||||||
|   dialog::addBoolItem(XLAT("disable the HUD"), hide_hud, 'h'); |   dialog::addBoolItem_action(XLAT("disable the HUD"), hide_hud, 'h'); | ||||||
|   dialog::add_action([] { hide_hud = !hide_hud; }); |  | ||||||
|  |  | ||||||
|   dialog::addBoolItem(XLAT("hide the player"), !mapeditor::drawplayer, 'H'); |   dialog::addBoolItem_action_neg(XLAT("hide the player"), mapeditor::drawplayer, 'H'); | ||||||
|   dialog::add_action([] { mapeditor::drawplayer = !mapeditor::drawplayer; }); |  | ||||||
|  |  | ||||||
|   dialog::addItem(XLAT("colors & aura"), 'c'); |   dialog::addItem(XLAT("colors & aura"), 'c'); | ||||||
|   dialog::add_action_push(show_color_dialog); |   dialog::add_action_push(show_color_dialog); | ||||||
| @@ -796,19 +793,14 @@ void show() { | |||||||
|         }; |         }; | ||||||
|       }); |       }); | ||||||
|     } |     } | ||||||
|   dialog::addBoolItem(XLAT("no movement animation"), ma == maNone, '0'); |   dialog::addBoolItem_choice(XLAT("no movement animation"), ma, maNone, '0'); | ||||||
|   dialog::add_action([] () { ma = maNone; }); |   dialog::addBoolItem_choice(XLAT("translation"), ma, maTranslation, '1'); | ||||||
|   dialog::addBoolItem(XLAT("translation"), ma == maTranslation, '1'); |   dialog::addBoolItem_choice(XLAT("rotation"), ma, maRotation, '2'); | ||||||
|   dialog::add_action([] () { ma = maTranslation; }); |  | ||||||
|   dialog::addBoolItem(XLAT("rotation"), ma == maRotation, '2'); |  | ||||||
|   dialog::add_action([] () { ma = maRotation; }); |  | ||||||
|   if(hyperbolic) { |   if(hyperbolic) { | ||||||
|     dialog::addBoolItem(XLAT("parabolic"), ma == maParabolic, '3'); |     dialog::addBoolItem_choice(XLAT("parabolic"), ma, maParabolic, '3'); | ||||||
|     dialog::add_action([] () { ma = maParabolic; }); |  | ||||||
|     } |     } | ||||||
|   if(among(pmodel, mdJoukowsky, mdJoukowskyInverted)) { |   if(among(pmodel, mdJoukowsky, mdJoukowskyInverted)) { | ||||||
|     dialog::addBoolItem(XLAT("joukowsky_anim"), joukowsky_anim, 'j'); |     dialog::addBoolItem_action(XLAT("joukowsky_anim"), joukowsky_anim, 'j'); | ||||||
|     dialog::add_action([] () { joukowsky_anim = !joukowsky_anim; }); |  | ||||||
|     } |     } | ||||||
|   if(among(pmodel, mdJoukowsky, mdJoukowskyInverted)) { |   if(among(pmodel, mdJoukowsky, mdJoukowskyInverted)) { | ||||||
|     animator(XLAT("Möbius transformations"), skiprope_rotation, 'S'); |     animator(XLAT("Möbius transformations"), skiprope_rotation, 'S'); | ||||||
|   | |||||||
							
								
								
									
										30
									
								
								textures.cpp
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								textures.cpp
									
									
									
									
									
								
							| @@ -1147,19 +1147,19 @@ void showMenu() { | |||||||
|     dialog::addItem(XLAT("select the texture's pattern"), 'r'); |     dialog::addItem(XLAT("select the texture's pattern"), 'r'); | ||||||
|     dialog::addItem(XLAT("enable the texture"), 't'); |     dialog::addItem(XLAT("enable the texture"), 't'); | ||||||
|     dialog::addItem(XLAT("cancel the texture"), 'T'); |     dialog::addItem(XLAT("cancel the texture"), 'T'); | ||||||
|     dialog::addBoolItem(XLAT("move the model"), panstate == tpsModel, 'm'); |     dialog::addBoolItem_choice(XLAT("move the model"), panstate, tpsModel, 'm'); | ||||||
|     dialog::addBoolItem(XLAT("move the texture"), panstate == tpsMove, 'a'); |     dialog::addBoolItem_choice(XLAT("move the texture"), panstate, tpsMove, 'a'); | ||||||
|     dialog::addBoolItem(XLAT("zoom/scale the texture"), panstate == tpsScale, 'x'); |     dialog::addBoolItem_choice(XLAT("zoom/scale the texture"), panstate, tpsScale, 'x'); | ||||||
|     dialog::addBoolItem(XLAT("zoom/scale the model"), panstate == tpsZoom, 'z'); |     dialog::addBoolItem_choice(XLAT("zoom/scale the model"), panstate, tpsZoom, 'z'); | ||||||
|     dialog::addBoolItem(XLAT("projection"), panstate == tpsProjection, 'p'); |     dialog::addBoolItem_choice(XLAT("projection"), panstate, tpsProjection, 'p'); | ||||||
|     dialog::addBoolItem(XLAT("affine transformations"), panstate == tpsAffine, 'y'); |     dialog::addBoolItem_choice(XLAT("affine transformations"), panstate, tpsAffine, 'y'); | ||||||
|     dialog::addBoolItem(XLAT("magic"), false, 'A'); |     dialog::addBoolItem(XLAT("magic"), false, 'A'); | ||||||
|      |      | ||||||
|     dialog::addBreak(50); |     dialog::addBreak(50); | ||||||
|  |  | ||||||
|     dialog::addBoolItem(XLAT("select master cells"), panstate == tpsCell, 'C'); |     dialog::addBoolItem_choice(XLAT("select master cells"), panstate, tpsCell, 'C'); | ||||||
|     dialog::addBoolItem(XLAT("select master triangles"), panstate == tpsTriangle, 'X'); |     dialog::addBoolItem_choice(XLAT("select master triangles"), panstate, tpsTriangle, 'X'); | ||||||
|     dialog::addBoolItem(XLAT("fine tune vertices"), panstate == tpsTune, 'F'); |     dialog::addBoolItem_choice(XLAT("fine tune vertices"), panstate, tpsTune, 'F'); | ||||||
|  |  | ||||||
|     dialog::addColorItem(XLAT("grid color (master)"), config.master_color, 'M'); |     dialog::addColorItem(XLAT("grid color (master)"), config.master_color, 'M'); | ||||||
|     dialog::addColorItem(XLAT("grid color (copy)"), config.slave_color, 'K'); |     dialog::addColorItem(XLAT("grid color (copy)"), config.slave_color, 'K'); | ||||||
| @@ -1183,8 +1183,7 @@ void showMenu() { | |||||||
|     dialog::addColorItem(XLAT("mesh color"), config.mesh_color, 'm'); |     dialog::addColorItem(XLAT("mesh color"), config.mesh_color, 'm'); | ||||||
|     dialog::addSelItem(XLAT("color alpha"), its(config.color_alpha), 'c'); |     dialog::addSelItem(XLAT("color alpha"), its(config.color_alpha), 'c'); | ||||||
|     dialog::addSelItem(XLAT("precision"), its(config.gsplits), 'P'); |     dialog::addSelItem(XLAT("precision"), its(config.gsplits), 'P'); | ||||||
|     dialog::addBoolItem(XLAT("aura from texture"), texture_aura, 'a'); |     dialog::addBoolItem_action(XLAT("aura from texture"), texture_aura, 'a'); | ||||||
|     dialog::add_action([] () { texture_aura = !texture_aura; }); |  | ||||||
| #if CAP_EDIT | #if CAP_EDIT | ||||||
|     if(DIM == 2) dialog::addItem(XLAT("edit the texture"), 'e'); |     if(DIM == 2) dialog::addItem(XLAT("edit the texture"), 'e'); | ||||||
| #endif | #endif | ||||||
| @@ -1212,15 +1211,6 @@ void showMenu() { | |||||||
|         } |         } | ||||||
|       } |       } | ||||||
|  |  | ||||||
|     else if(uni == 'm' && config.tstate == tsAdjusting) panstate = tpsModel; |  | ||||||
|     else if(uni == 'a' && config.tstate == tsAdjusting) panstate = tpsMove; |  | ||||||
|     else if(uni == 'x' && config.tstate == tsAdjusting) panstate = tpsScale; |  | ||||||
|     else if(uni == 'y' && config.tstate == tsAdjusting) panstate = tpsAffine; |  | ||||||
|     else if(uni == 'z' && config.tstate == tsAdjusting) panstate = tpsZoom; |  | ||||||
|     else if(uni == 'p' && config.tstate == tsAdjusting) panstate = tpsProjection; |  | ||||||
|     else if(uni == 'C' && config.tstate == tsAdjusting) panstate = tpsCell; |  | ||||||
|     else if(uni == 'X' && config.tstate == tsAdjusting) panstate = tpsTriangle; |  | ||||||
|     else if(uni == 'F' && config.tstate == tsAdjusting) panstate = tpsTune; |  | ||||||
|     else if(uni == 'A' && config.tstate == tsAdjusting)  |     else if(uni == 'A' && config.tstate == tsAdjusting)  | ||||||
|       pushScreen(showMagicMenu); |       pushScreen(showMagicMenu); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue