diff --git a/src/buttons.c b/src/buttons.c index 679e3f9b..324b24f6 100644 --- a/src/buttons.c +++ b/src/buttons.c @@ -4569,7 +4569,7 @@ void Button_Effects(void) Window_display_frame_mono(C1-5,L1+8,90,88,MC_Dark); Window_rectangle(C1-1, L1+2, 78, 14, MC_Light); - Window_set_normal_button( 11,21,14,14," ",1,1,SDLK_f); // 13 + Window_set_normal_button(C1+1,L1+2,14,14," ",1,1,SDLK_f); // 13 Print_in_window(28,24,"Feedback",MC_Dark,MC_Light); Window_set_normal_button(C2, L4, 16,16,"",0,1,Config_Key[SPECIAL_FORMAT_CHECKER_MENU][0]); // 14 @@ -4578,7 +4578,8 @@ void Button_Effects(void) // "Grid" frame Window_display_frame_mono(C3-5,L1+8,86,88,MC_Dark); Window_rectangle(C3-1, L1+2, 52, 14, MC_Light); - //Window_set_normal_button( 11,21,14,14," ",1,1,SDLK_f); // 13 + + Window_set_normal_button(C3+1,L1+2,14,14,Show_grid?"X":" ",1,1,Config_Key[SPECIAL_SHOW_GRID][0]); // 16 Print_in_window(C3+17,L1+5,"Grid",MC_Dark,MC_Light); Display_feedback_state(); @@ -4858,6 +4859,11 @@ void Button_Effects(void) clicked_button=11; } break; + case 16: // Show grid + Show_grid = !Show_grid; + Hide_cursor(); + Print_in_window(C3+4, L1+5, Show_grid?"X":" ", MC_Black, MC_Light); + Display_cursor(); } } while (clicked_button!=11); diff --git a/src/buttons_effects.c b/src/buttons_effects.c index 17d3ada2..4beffb07 100644 --- a/src/buttons_effects.c +++ b/src/buttons_effects.c @@ -346,10 +346,8 @@ void Button_Grid_menu(void) short dx_selected=Snap_offset_X; short dy_selected=Snap_offset_Y; - char showgrid = Show_grid; - // if grid is shown check if we snap - // if not snap by default (so the window work like before we introduced the "show" option) - char snapgrid = Show_grid?Snap_mode:1; + // Entering this window automatically enables "snap" + char snapgrid = 1; T_Special_button * input_x_button; T_Special_button * input_y_button; @@ -384,13 +382,9 @@ void Button_Grid_menu(void) Num2str(dy_selected,str,3); Window_set_normal_button(12, 62, 14, 14, " ", 0, 1, 0); // 7 - Window_set_normal_button(78, 62, 14, 14, " ", 0, 1, 0); // 8 if (snapgrid) Print_in_window(16, 65, "X", MC_Black, MC_Light); - if (Show_grid) - Print_in_window(82, 65, "X", MC_Black, MC_Light); Print_in_window(32, 65,"Snap",MC_Dark,MC_Light); - Print_in_window(98, 65,"Show",MC_Dark,MC_Light); Window_input_content(input_dy_button,str); Update_window_area(0,0,Window_width, Window_height); @@ -479,13 +473,6 @@ void Button_Grid_menu(void) Print_in_window(16, 65, snapgrid?"X":" ", MC_Black, MC_Light); Display_cursor(); break; - case 8: - showgrid = !showgrid; - Hide_cursor(); - Print_in_window(82, 65, showgrid?"X":" ", MC_Black, MC_Light); - Display_cursor(); - break; - } if (Is_shortcut(Key,0x100+BUTTON_HELP)) Window_help(BUTTON_EFFECTS, "GRID"); @@ -506,7 +493,6 @@ void Button_Grid_menu(void) Snap_offset_X=dx_selected; Snap_offset_Y=dy_selected; Snap_mode=snapgrid; - Show_grid=showgrid; if (modified) {