Partial merge of the SDL2 branch into trunk

* Mainly get the cleanup of window drawing functions.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2102 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues
2015-03-02 13:44:18 +00:00
parent f0ebf223a8
commit 78fcc648c3
11 changed files with 145 additions and 197 deletions

View File

@@ -159,9 +159,7 @@ void Window_set_shortcut(int action_id)
Window_set_normal_button(6,111,111,14,"Reset default",0,1,KEY_NONE); // 3
// Titre
Block(Window_pos_X+(Menu_factor_X*5),
Window_pos_Y+(Menu_factor_Y*16),
Menu_factor_X*292,Menu_factor_Y*11,MC_Black);
Window_rectangle(5,16,292,11,MC_Black);
Print_in_window(7,18,ConfigKey[config_index].Label,MC_White,MC_Black);
// Zone de description
@@ -184,16 +182,12 @@ void Window_set_shortcut(int action_id)
if (redraw_controls)
{
Hide_cursor();
Block(Window_pos_X+(Menu_factor_X*32),
Window_pos_Y+(Menu_factor_Y*33),
Menu_factor_X*21*8,Menu_factor_Y*8,MC_Light);
Window_rectangle(32,33,21*8,8,MC_Light);
Print_in_window_limited(32,33,Key_name(shortcut_ptr[0]),21,MC_Black,MC_Light);
Block(Window_pos_X+(Menu_factor_X*32),
Window_pos_Y+(Menu_factor_Y*52),
Menu_factor_X*21*8,Menu_factor_Y*8,MC_Light);
Window_rectangle(32,52,21*8,8,MC_Light);
Print_in_window_limited(32,52,Key_name(shortcut_ptr[1]),21,MC_Black,MC_Light);
Update_rect(Window_pos_X,Window_pos_Y,302*Menu_factor_X,131*Menu_factor_Y);
Update_window_area(0,0,302,131);
Display_cursor();
redraw_controls=0;
@@ -527,9 +521,7 @@ void Window_help(int section, const char *sub_section)
// dessiner de la fenêtre où va défiler le texte
Window_display_frame_in(8,17,274,132);
Block(Window_pos_X+(Menu_factor_X*9),
Window_pos_Y+(Menu_factor_Y*18),
Menu_factor_X*272,Menu_factor_Y*130,MC_Black);
Window_rectangle(9, 18, 272, 130, MC_Black);
Window_set_normal_button(266,153,35,14,"Exit",0,1,KEY_ESC); // 1
scroller=Window_set_scroller_button(290,18,130,nb_lines,
@@ -545,7 +537,7 @@ void Window_help(int section, const char *sub_section)
Display_help();
Update_rect(Window_pos_X,Window_pos_Y,310*Menu_factor_X,175*Menu_factor_Y);
Update_window_area(0,0,310,175);
Display_cursor();
@@ -702,9 +694,7 @@ void Button_Stats(void)
// Dessin de la fenetre ou va s'afficher le texte
Window_display_frame_in(8,17,294,132);
Block(Window_pos_X+(Menu_factor_X*9),
Window_pos_Y+(Menu_factor_Y*18),
Menu_factor_X*292,Menu_factor_Y*130,MC_Black);
Window_rectangle(9,18,292,130,MC_Black);
Window_set_normal_button(120,153,70,14,"OK",0,1,KEY_ESC); // 1
@@ -879,7 +869,7 @@ void Button_Stats(void)
sprintf(buffer,"%dx%d",Screen_width,Screen_height);
Print_in_window(106,y,buffer,STATS_DATA_COLOR,MC_Black);
Update_rect(Window_pos_X,Window_pos_Y,Menu_factor_X*310,Menu_factor_Y*174);
Update_window_area(0,0,310,174);
Display_cursor();