Move the "show grid" setting to the effects window.
Fixes https://code.google.com/p/grafx2/issues/detail?id=315 git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2108 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
0f64436854
commit
26458456a8
@ -4569,7 +4569,7 @@ void Button_Effects(void)
|
|||||||
Window_display_frame_mono(C1-5,L1+8,90,88,MC_Dark);
|
Window_display_frame_mono(C1-5,L1+8,90,88,MC_Dark);
|
||||||
Window_rectangle(C1-1, L1+2, 78, 14, MC_Light);
|
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);
|
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
|
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
|
// "Grid" frame
|
||||||
Window_display_frame_mono(C3-5,L1+8,86,88,MC_Dark);
|
Window_display_frame_mono(C3-5,L1+8,86,88,MC_Dark);
|
||||||
Window_rectangle(C3-1, L1+2, 52, 14, MC_Light);
|
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);
|
Print_in_window(C3+17,L1+5,"Grid",MC_Dark,MC_Light);
|
||||||
|
|
||||||
Display_feedback_state();
|
Display_feedback_state();
|
||||||
@ -4858,6 +4859,11 @@ void Button_Effects(void)
|
|||||||
clicked_button=11;
|
clicked_button=11;
|
||||||
}
|
}
|
||||||
break;
|
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);
|
while (clicked_button!=11);
|
||||||
|
|||||||
@ -346,10 +346,8 @@ void Button_Grid_menu(void)
|
|||||||
short dx_selected=Snap_offset_X;
|
short dx_selected=Snap_offset_X;
|
||||||
short dy_selected=Snap_offset_Y;
|
short dy_selected=Snap_offset_Y;
|
||||||
|
|
||||||
char showgrid = Show_grid;
|
// Entering this window automatically enables "snap"
|
||||||
// if grid is shown check if we snap
|
char snapgrid = 1;
|
||||||
// if not snap by default (so the window work like before we introduced the "show" option)
|
|
||||||
char snapgrid = Show_grid?Snap_mode:1;
|
|
||||||
|
|
||||||
T_Special_button * input_x_button;
|
T_Special_button * input_x_button;
|
||||||
T_Special_button * input_y_button;
|
T_Special_button * input_y_button;
|
||||||
@ -384,13 +382,9 @@ void Button_Grid_menu(void)
|
|||||||
Num2str(dy_selected,str,3);
|
Num2str(dy_selected,str,3);
|
||||||
|
|
||||||
Window_set_normal_button(12, 62, 14, 14, " ", 0, 1, 0); // 7
|
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)
|
if (snapgrid)
|
||||||
Print_in_window(16, 65, "X", MC_Black, MC_Light);
|
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(32, 65,"Snap",MC_Dark,MC_Light);
|
||||||
Print_in_window(98, 65,"Show",MC_Dark,MC_Light);
|
|
||||||
|
|
||||||
Window_input_content(input_dy_button,str);
|
Window_input_content(input_dy_button,str);
|
||||||
Update_window_area(0,0,Window_width, Window_height);
|
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);
|
Print_in_window(16, 65, snapgrid?"X":" ", MC_Black, MC_Light);
|
||||||
Display_cursor();
|
Display_cursor();
|
||||||
break;
|
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))
|
if (Is_shortcut(Key,0x100+BUTTON_HELP))
|
||||||
Window_help(BUTTON_EFFECTS, "GRID");
|
Window_help(BUTTON_EFFECTS, "GRID");
|
||||||
@ -506,7 +493,6 @@ void Button_Grid_menu(void)
|
|||||||
Snap_offset_X=dx_selected;
|
Snap_offset_X=dx_selected;
|
||||||
Snap_offset_Y=dy_selected;
|
Snap_offset_Y=dy_selected;
|
||||||
Snap_mode=snapgrid;
|
Snap_mode=snapgrid;
|
||||||
Show_grid=showgrid;
|
|
||||||
|
|
||||||
if (modified)
|
if (modified)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user