change all references to SDLK_xxxxx to KEY_xxxx

+ some fixes
This commit is contained in:
Thomas Bernard
2018-05-31 16:44:04 +02:00
parent 77005eb780
commit 4d86b8a0c1
31 changed files with 863 additions and 542 deletions

View File

@@ -60,17 +60,17 @@ void Menu_tag_colors(char * window_title, byte * table, byte * mode, byte can_ca
Open_window(176,150,window_title);
Window_set_palette_button(6,38); // 1
Window_set_normal_button( 7, 19,78,14,"Clear" ,1,1,SDLK_c); // 2
Window_set_normal_button(91, 19,78,14,"Invert",1,1,SDLK_i); // 3
Window_set_normal_button( 7, 19,78,14,"Clear" ,1,1,KEY_c); // 2
Window_set_normal_button(91, 19,78,14,"Invert",1,1,KEY_i); // 3
if (can_cancel)
{
Window_set_normal_button(91,129,78,14,"OK" ,0,1,SDLK_RETURN); // 4
Window_set_normal_button(91,129,78,14,"OK" ,0,1,KEY_RETURN); // 4
Window_set_normal_button( 7,129,78,14,"Cancel",0,1,KEY_ESC); // 5
// On enregistre la table dans un backup au cas où on ferait Cancel
memcpy(backup_table,table,256);
}
else
Window_set_normal_button(49,129,78,14,"OK" ,0,1,SDLK_RETURN); // 4
Window_set_normal_button(49,129,78,14,"OK" ,0,1,KEY_RETURN); // 4
// On affiche l'état actuel de la table
for (index=0; index<=255; index++)
@@ -122,8 +122,8 @@ void Menu_tag_colors(char * window_title, byte * table, byte * mode, byte can_ca
if (!Mouse_K)
switch (Key)
{
case SDLK_BACKQUOTE : // Récupération d'une couleur derrière le menu
case SDLK_COMMA :
case KEY_BACKQUOTE : // Récupération d'une couleur derrière le menu
case KEY_COMMA :
Get_color_behind_window(&color,&click);
if (click)
{
@@ -232,7 +232,7 @@ void Button_Constraint_menu(void)
Open_window(154,79,"8-bit constraints");
Window_set_normal_button(21,55,51,14,"Cancel",0,1,KEY_ESC); // 1
Window_set_normal_button(82,55,51,14,"OK" ,0,1,SDLK_RETURN); // 2
Window_set_normal_button(82,55,51,14,"OK" ,0,1,KEY_RETURN); // 2
label = "Constraints";
for (i = 0; i < sizeof(modes)/sizeof(modes[0]) ; i++)
@@ -290,7 +290,7 @@ void Button_Tilemap_menu(void)
Open_window(166,120,"Tilemap options");
Window_set_normal_button(6,102,51,14,"Cancel",0,1,KEY_ESC); // 1
Window_set_normal_button(110,102,51,14,"OK" ,0,1,SDLK_RETURN); // 2
Window_set_normal_button(110,102,51,14,"OK" ,0,1,KEY_RETURN); // 2
Print_in_window(24,21, "Detect mirrored",MC_Dark,MC_Light);
Window_display_frame(5,17,155,56);
@@ -432,7 +432,7 @@ void Button_Grid_menu(void)
Open_window(149,118,"Grid");
Window_set_normal_button(12,92,51,14,"Cancel",0,1,KEY_ESC); // 1
Window_set_normal_button(86,92,51,14,"OK" ,0,1,SDLK_RETURN); // 2
Window_set_normal_button(86,92,51,14,"OK" ,0,1,KEY_RETURN); // 2
Print_in_window(11,26, "X:",MC_Dark,MC_Light);
input_x_button = Window_set_input_button(29,24,3); // 3
@@ -624,7 +624,7 @@ void Button_Smooth_menu(void)
Open_window(142,109,"Smooth");
Window_set_normal_button(82,59,53,14,"Cancel",0,1,KEY_ESC); // 1
Window_set_normal_button(82,88,53,14,"OK" ,0,1,SDLK_RETURN); // 2
Window_set_normal_button(82,88,53,14,"OK" ,0,1,KEY_RETURN); // 2
Window_display_frame(6,17,130,37);
for (x=11,y=0; y<4; x+=31,y++)
@@ -806,15 +806,15 @@ void Button_Colorize_menu(void)
Print_in_window(16,23,"Opacity:",MC_Dark,MC_Light);
Window_set_input_button(87,21,3); // 1
Print_in_window(117,23,"%",MC_Dark,MC_Light);
Window_set_normal_button(16,34,108,14,"Interpolate",1,1,SDLK_i); // 2
Window_set_normal_button(16,34,108,14,"Interpolate",1,1,KEY_i); // 2
Window_display_frame(12,18,116,34);
Window_set_normal_button(16,54,108,14,"Additive" ,2,1,SDLK_d); // 3
Window_set_normal_button(16,71,108,14,"Subtractive",1,1,SDLK_s); // 4
Window_set_normal_button(16,88,108,14,"Alpha",1,1,SDLK_a); // 4
Window_set_normal_button(16,54,108,14,"Additive" ,2,1,KEY_d); // 3
Window_set_normal_button(16,71,108,14,"Subtractive",1,1,KEY_s); // 4
Window_set_normal_button(16,88,108,14,"Alpha",1,1,KEY_a); // 4
Window_set_normal_button(16,111, 51,14,"Cancel" ,0,1,KEY_ESC); // 5
Window_set_normal_button(73,111, 51,14,"OK" ,0,1,SDLK_RETURN); // 6
Window_set_normal_button(73,111, 51,14,"OK" ,0,1,KEY_RETURN); // 6
Num2str(Colorize_opacity,str,3);
Window_input_content(Window_special_button_list,str);
@@ -906,7 +906,7 @@ void Button_Tiling_menu(void)
Open_window(138,79,"Tiling");
Window_set_normal_button(13,55,51,14,"Cancel",0,1,KEY_ESC); // 1
Window_set_normal_button(74,55,51,14,"OK" ,0,1,SDLK_RETURN); // 2
Window_set_normal_button(74,55,51,14,"OK" ,0,1,KEY_RETURN); // 2
input_offset_x_button = Window_set_input_button(91,21,4); // 3
input_offset_y_button = Window_set_input_button(91,35,4); // 4
Print_in_window(12,23,"Offset X:",MC_Dark,MC_Light);
@@ -1126,30 +1126,30 @@ void Button_Sieve_menu(void)
Window_set_special_button(143,69,80,80,0); // 1
Window_set_normal_button(175,157,51,14,"Cancel",0,1,KEY_ESC); // 2
Window_set_normal_button(230,157,51,14,"OK" ,0,1,SDLK_RETURN); // 3
Window_set_normal_button(230,157,51,14,"OK" ,0,1,KEY_RETURN); // 3
Window_set_normal_button( 8,157,51,14,"Clear" ,1,1,SDLK_c); // 4
Window_set_normal_button( 63,157,51,14,"Invert",1,1,SDLK_i); // 5
Window_set_normal_button( 8,157,51,14,"Clear" ,1,1,KEY_c); // 4
Window_set_normal_button( 63,157,51,14,"Invert",1,1,KEY_i); // 5
Window_set_normal_button( 8,46,131,14,"Get from brush" ,1,1,SDLK_g); // 6
Window_set_normal_button(142,46,139,14,"Transfer to brush",1,1,SDLK_t); // 7
Window_set_normal_button( 8,46,131,14,"Get from brush" ,1,1,KEY_g); // 6
Window_set_normal_button(142,46,139,14,"Transfer to brush",1,1,KEY_t); // 7
Window_set_normal_button(109,114,11,11,"\030",0,1,SDLK_UP|MOD_SHIFT); // 8
Window_set_normal_button(109,138,11,11,"\031",0,1,SDLK_DOWN|MOD_SHIFT); // 9
Window_set_normal_button( 97,126,11,11,"\033",0,1,SDLK_LEFT|MOD_SHIFT); // 10
Window_set_normal_button(121,126,11,11,"\032",0,1,SDLK_RIGHT|MOD_SHIFT); // 11
button_bg_color = Window_set_normal_button(109,126,11,11,"" ,0,1,SDLK_INSERT); // 12
Window_set_normal_button(109,114,11,11,"\030",0,1,KEY_UP|MOD_SHIFT); // 8
Window_set_normal_button(109,138,11,11,"\031",0,1,KEY_DOWN|MOD_SHIFT); // 9
Window_set_normal_button( 97,126,11,11,"\033",0,1,KEY_LEFT|MOD_SHIFT); // 10
Window_set_normal_button(121,126,11,11,"\032",0,1,KEY_RIGHT|MOD_SHIFT); // 11
button_bg_color = Window_set_normal_button(109,126,11,11,"" ,0,1,KEY_INSERT); // 12
Window_rectangle(button_bg_color->Pos_X+2,
button_bg_color->Pos_Y+2,
7, 7, (default_bg_color)?MC_White:MC_Black);
Window_set_repeatable_button(109, 69,11,11,"\030",0,1,SDLK_UP); // 13
Window_set_repeatable_button(109, 93,11,11,"\031",0,1,SDLK_DOWN); // 14
Window_set_repeatable_button( 97, 81,11,11,"\033",0,1,SDLK_LEFT); // 15
Window_set_repeatable_button(121, 81,11,11,"\032",0,1,SDLK_RIGHT); // 16
Window_set_repeatable_button(109, 69,11,11,"\030",0,1,KEY_UP); // 13
Window_set_repeatable_button(109, 93,11,11,"\031",0,1,KEY_DOWN); // 14
Window_set_repeatable_button( 97, 81,11,11,"\033",0,1,KEY_LEFT); // 15
Window_set_repeatable_button(121, 81,11,11,"\032",0,1,KEY_RIGHT); // 16
for (index=0; index<12; index++)
Window_set_normal_button((index*23)+8,20,20,20,"",0,1,SDLK_F1+index); // 17 -> 28
Window_set_normal_button((index*23)+8,20,20,20,"",0,1,KEY_F1+index); // 17 -> 28
Draw_preset_sieve_patterns();
origin_x=Window_pos_X+(Menu_factor_X*Window_special_button_list->Pos_X);