Various window shortcut keys
* Settings window: "r" for Reload, "a" for Auto-Save, "s" for Save.
* Screen size: "h" to set height
* Spray menu: "s" for Size, "d" for Delay, "m" for Mono-Flow, "i" for Init
* Text Menu: "t" to enter text, "s" to enter size, show underscore for AA, Bold, Italic
* Palette window: "w" for Swap, "t" for Histo, fix "i" for Flip, show underscore for Merge, Used
* Transform menu: replace X and Y labels with W and H, and make them also shortcuts. I have renamed these
labels so that it does not conflict with the existing Mirror "X" and "Y" buttons.
This commit is contained in:
parent
a01e7eea69
commit
044a042e38
@ -1036,11 +1036,11 @@ void Button_Settings(int btn)
|
|||||||
Open_window(307,182,"Settings");
|
Open_window(307,182,"Settings");
|
||||||
|
|
||||||
// Button Reload
|
// Button Reload
|
||||||
Window_set_normal_button( 6,163, 51,14,"Reload" ,0,1,SDLK_LAST); // 1
|
Window_set_normal_button( 6,163, 51,14,"Reload" ,1,1,SDLK_r); // 1
|
||||||
// Button Auto-save
|
// Button Auto-save
|
||||||
Window_set_normal_button( 73,163,107,14,"Auto-save: ",0,1,SDLK_LAST); // 2
|
Window_set_normal_button( 73,163,107,14,"Auto-save: ",1,1,SDLK_a); // 2
|
||||||
// Button Save
|
// Button Save
|
||||||
Window_set_normal_button(183,163, 51,14,"Save" ,0,1,SDLK_LAST); // 3
|
Window_set_normal_button(183,163, 51,14,"Save" ,1,1,SDLK_s); // 3
|
||||||
// Button Close
|
// Button Close
|
||||||
Window_set_normal_button(250,163, 51,14,"Close" ,0,1,KEY_ESC); // 4
|
Window_set_normal_button(250,163, 51,14,"Close" ,0,1,KEY_ESC); // 4
|
||||||
|
|
||||||
@ -1934,8 +1934,8 @@ void Button_Resolution(int btn)
|
|||||||
Print_in_window_underscore( 12, 37,"Width:",MC_Dark,MC_Light,1);
|
Print_in_window_underscore( 12, 37,"Width:",MC_Dark,MC_Light,1);
|
||||||
input_width_button=Window_set_input_button_s( 60, 35,4,SDLK_w); // 3
|
input_width_button=Window_set_input_button_s( 60, 35,4,SDLK_w); // 3
|
||||||
|
|
||||||
Print_in_window(108, 37,"Height:" ,MC_Dark,MC_Light);
|
Print_in_window_underscore(108, 37,"Height:",MC_Dark,MC_Light,1);
|
||||||
input_button_height=Window_set_input_button(164, 35,4); // 4
|
input_button_height=Window_set_input_button_s(164, 35,4,SDLK_h); // 4
|
||||||
|
|
||||||
Window_display_frame ( 8,72,283,110);
|
Window_display_frame ( 8,72,283,110);
|
||||||
Window_display_frame_in (37,84,228,84);
|
Window_display_frame_in (37,84,228,84);
|
||||||
@ -4197,23 +4197,23 @@ void Button_Airbrush_menu(int btn)
|
|||||||
|
|
||||||
Window_set_normal_button( 8, 37,43,14,"Clear" ,1,1,SDLK_c); // 10
|
Window_set_normal_button( 8, 37,43,14,"Clear" ,1,1,SDLK_c); // 10
|
||||||
|
|
||||||
Print_in_window(142,25,"Size:" ,MC_Dark,MC_Light);
|
Print_in_window_underscore(142,25,"Size:" ,MC_Dark,MC_Light,1);
|
||||||
input_size_button = Window_set_input_button(186,23,3); // 11
|
input_size_button = Window_set_input_button_s(186,23,3,SDLK_s); // 11
|
||||||
Num2str(Airbrush_size,str,3);
|
Num2str(Airbrush_size,str,3);
|
||||||
Window_input_content(input_size_button,str);
|
Window_input_content(input_size_button,str);
|
||||||
|
|
||||||
Print_in_window(142,39,"Delay:" ,MC_Dark,MC_Light);
|
Print_in_window_underscore(142,39,"Delay:" ,MC_Dark,MC_Light,1);
|
||||||
input_delay_button = Window_set_input_button(194,37,2); // 12
|
input_delay_button = Window_set_input_button_s(194,37,2,SDLK_d); // 12
|
||||||
Num2str(Airbrush_delay,str,2);
|
Num2str(Airbrush_delay,str,2);
|
||||||
Window_input_content(input_delay_button,str);
|
Window_input_content(input_delay_button,str);
|
||||||
|
|
||||||
Print_in_window( 27,24,"Mono-Flow:",MC_Dark,MC_Light);
|
Print_in_window_underscore( 27,24,"Mono-Flow:",MC_Dark,MC_Light,1);
|
||||||
input_flow_button = Window_set_input_button(111,22,2); // 13
|
input_flow_button = Window_set_input_button_s(111,22,2,SDLK_m); // 13
|
||||||
Num2str(Airbrush_mono_flow,str,2);
|
Num2str(Airbrush_mono_flow,str,2);
|
||||||
Window_input_content(input_flow_button,str);
|
Window_input_content(input_flow_button,str);
|
||||||
|
|
||||||
Print_in_window( 67,40,"Init:",MC_Dark,MC_Light);
|
Print_in_window_underscore( 67,40,"Init:",MC_Dark,MC_Light,1);
|
||||||
input_init_button = Window_set_input_button(111,38,2); // 14
|
input_init_button = Window_set_input_button_s(111,38,2,SDLK_i); // 14
|
||||||
Num2str(spray_init,str,2);
|
Num2str(spray_init,str,2);
|
||||||
Window_input_content(input_init_button,str);
|
Window_input_content(input_init_button,str);
|
||||||
|
|
||||||
@ -4974,21 +4974,21 @@ void Button_Text(int btn)
|
|||||||
Open_window(288,180,"Text");
|
Open_window(288,180,"Text");
|
||||||
|
|
||||||
// Texte saisi
|
// Texte saisi
|
||||||
Print_in_window(6,20,"Text:",MC_Dark,MC_Light);
|
Print_in_window_underscore(6,20,"Text:",MC_Dark,MC_Light,1);
|
||||||
input_text_button = Window_set_input_button(48,18,29); // 1
|
input_text_button = Window_set_input_button_s(48,18,29,SDLK_t); // 1
|
||||||
|
|
||||||
// TrueType options
|
// TrueType options
|
||||||
Window_display_frame_in(182,34,100,68);
|
Window_display_frame_in(182,34,100,68);
|
||||||
Print_in_window(199,31,"TrueType", MC_Dark, MC_Light);
|
Print_in_window(199,31,"TrueType", MC_Dark, MC_Light);
|
||||||
// AA
|
// AA
|
||||||
Window_set_normal_button(188,58,13,11,antialias?"X":" ",0,1,SDLK_a); // 2
|
Window_set_normal_button(188,58,13,11,antialias?"X":" ",0,1,SDLK_a); // 2
|
||||||
Print_in_window(206,60,"AntiAlias", MC_Dark, MC_Light);
|
Print_in_window_underscore(206,60,"AntiAlias", MC_Dark, MC_Light,5);
|
||||||
// Bold
|
// Bold
|
||||||
Window_set_normal_button(188,72,13,11,is_bold?"X":" ",0,1,SDLK_b); // 3
|
Window_set_normal_button(188,72,13,11,is_bold?"X":" ",0,1,SDLK_b); // 3
|
||||||
Print_in_window(206,75,"Bold", MC_Dark, MC_Light);
|
Print_in_window_underscore(206,75,"Bold", MC_Dark, MC_Light,1);
|
||||||
// Italic
|
// Italic
|
||||||
Window_set_normal_button(188,86,13,11,is_italic?"X":" ",0,1,SDLK_i); // 4
|
Window_set_normal_button(188,86,13,11,is_italic?"X":" ",0,1,SDLK_i); // 4
|
||||||
Print_in_window(206,89,"Italic", MC_Dark, MC_Light);
|
Print_in_window_underscore(206,89,"Italic", MC_Dark, MC_Light,1);
|
||||||
|
|
||||||
// Scroller des fontes
|
// Scroller des fontes
|
||||||
font_scroller = Window_set_scroller_button(165,35,NB_FONTS*8,Nb_fonts,NB_FONTS,list_start); // 5
|
font_scroller = Window_set_scroller_button(165,35,NB_FONTS*8,Nb_fonts,NB_FONTS,list_start); // 5
|
||||||
@ -4997,7 +4997,7 @@ void Button_Text(int btn)
|
|||||||
Window_display_frame_in(7, 33, 154, NB_FONTS*8+4);
|
Window_display_frame_in(7, 33, 154, NB_FONTS*8+4);
|
||||||
|
|
||||||
// Taille texte
|
// Taille texte
|
||||||
input_size_button = Window_set_input_button(220,43,3); // 7
|
input_size_button = Window_set_input_button_s(220,43,3,SDLK_s); // 7
|
||||||
Window_set_repeatable_button(202,43,13,11,"-",0,1,SDLK_LAST); // 8
|
Window_set_repeatable_button(202,43,13,11,"-",0,1,SDLK_LAST); // 8
|
||||||
Window_set_repeatable_button(251,43,13,11,"+",0,1,SDLK_LAST); // 9
|
Window_set_repeatable_button(251,43,13,11,"+",0,1,SDLK_LAST); // 9
|
||||||
|
|
||||||
|
|||||||
@ -1199,9 +1199,9 @@ void Button_Palette(int btn)
|
|||||||
Num2str(Fore_color, str, 3);
|
Num2str(Fore_color, str, 3);
|
||||||
Print_in_window(COLOR_X, COLOR_Y, str, MC_Black, MC_Light);
|
Print_in_window(COLOR_X, COLOR_Y, str, MC_Black, MC_Light);
|
||||||
|
|
||||||
Window_set_normal_button(C4_X,L3,C4_W,14,"Merge" ,0,1,SDLK_m); // 5
|
Window_set_normal_button(C4_X,L3,C4_W,14,"Merge" ,1,1,SDLK_m); // 5
|
||||||
Window_set_normal_button(C2_X,L3,C2_W,14,"Gray" ,1,1,SDLK_g); // 6
|
Window_set_normal_button(C2_X,L3,C2_W,14,"Gray" ,1,1,SDLK_g); // 6
|
||||||
Window_set_normal_button(C1_X,L1,C1_W,14,"Swap" ,0,1,KEY_NONE); // 7
|
Window_set_normal_button(C1_X,L1,C1_W,14,"Swap" ,2,1,SDLK_w); // 7
|
||||||
Window_set_normal_button(C2_X,L1,C2_W,14,"X-Swap" ,1,1,SDLK_x); // 8
|
Window_set_normal_button(C2_X,L1,C2_W,14,"X-Swap" ,1,1,SDLK_x); // 8
|
||||||
Window_set_normal_button(C3_X,L1,C3_W,14,"Copy" ,1,1,SDLK_c); // 9
|
Window_set_normal_button(C3_X,L1,C3_W,14,"Copy" ,1,1,SDLK_c); // 9
|
||||||
Window_set_normal_button(C3_X,L3,C3_W,14,"Spread" ,4,1,SDLK_e); // 10
|
Window_set_normal_button(C3_X,L3,C3_W,14,"Spread" ,4,1,SDLK_e); // 10
|
||||||
@ -1222,15 +1222,15 @@ void Button_Palette(int btn)
|
|||||||
Window_set_normal_button(122,178,51,14,"Cancel",0,1,KEY_ESC); // 13
|
Window_set_normal_button(122,178,51,14,"Cancel",0,1,KEY_ESC); // 13
|
||||||
Window_set_normal_button(177,178,35,14,"OK" ,0,1,SDLK_RETURN); // 14
|
Window_set_normal_button(177,178,35,14,"OK" ,0,1,SDLK_RETURN); // 14
|
||||||
|
|
||||||
Window_set_normal_button(C4_X,L2,C4_W,14,"Used",0,1,SDLK_d); // 15
|
Window_set_normal_button(C4_X,L2,C4_W,14,"Used",4,1,SDLK_d); // 15
|
||||||
Window_set_normal_button(C1_X,L4,83,14,"Zap unused",0,1,SDLK_DELETE);//16
|
Window_set_normal_button(C1_X,L4,83,14,"Zap unused",0,1,SDLK_DELETE);//16
|
||||||
|
|
||||||
Window_set_repeatable_button(BUTTON_PLUS_X, BUTTON_PLUS_Y,12,11,"+",0,1,SDLK_KP_PLUS); // 17
|
Window_set_repeatable_button(BUTTON_PLUS_X, BUTTON_PLUS_Y,12,11,"+",0,1,SDLK_KP_PLUS); // 17
|
||||||
Window_set_repeatable_button(BUTTON_MINUS_X,BUTTON_MINUS_Y,12,11,"-",0,1,SDLK_KP_MINUS); // 18
|
Window_set_repeatable_button(BUTTON_MINUS_X,BUTTON_MINUS_Y,12,11,"-",0,1,SDLK_KP_MINUS); // 18
|
||||||
|
|
||||||
Window_set_normal_button(C1_X,L3,C1_W,14,"Neg" ,1,1,SDLK_n); // 19
|
Window_set_normal_button(C1_X,L3,C1_W,14,"Neg" ,1,1,SDLK_n); // 19
|
||||||
Window_set_normal_button(C1_X,L2,C1_W,14,"Flip" ,1,1,SDLK_i); // 20
|
Window_set_normal_button(C1_X,L2,C1_W,14,"Flip" ,3,1,SDLK_i); // 20
|
||||||
Window_set_normal_button(C2_X,L2,C2_W,14,"X-Flip" ,5,1,SDLK_v); // 21
|
Window_set_normal_button(C2_X,L2,C2_W,14,"X-Flip" ,0,1,SDLK_v); // 21
|
||||||
|
|
||||||
// Button without outline (RGB/HSL switch)
|
// Button without outline (RGB/HSL switch)
|
||||||
Window_set_normal_button(NUMERIC_BOX_X,14,81,11,"" ,0,1,SDLK_h); // 22
|
Window_set_normal_button(NUMERIC_BOX_X,14,81,11,"" ,0,1,SDLK_h); // 22
|
||||||
@ -1246,7 +1246,7 @@ void Button_Palette(int btn)
|
|||||||
// Button without outline
|
// Button without outline
|
||||||
Window_display_frame_mono(NUMERIC_BOX_X-1,NUMERIC_BOX_Y-1,NUMERIC_BOX_W+2,NUMERIC_BOX_H+2,MC_Light);
|
Window_display_frame_mono(NUMERIC_BOX_X-1,NUMERIC_BOX_Y-1,NUMERIC_BOX_W+2,NUMERIC_BOX_H+2,MC_Light);
|
||||||
|
|
||||||
Window_set_normal_button(C4_X,L1,C4_W,14,"Histo",0,1,KEY_NONE);// 25
|
Window_set_normal_button(C4_X,L1,C4_W,14,"Histo",4,1,SDLK_t);// 25
|
||||||
|
|
||||||
Window_set_normal_button( 44,178,35,14,"Load" ,1,1,SDLK_l); // 26
|
Window_set_normal_button( 44,178,35,14,"Load" ,1,1,SDLK_l); // 26
|
||||||
Window_set_normal_button( 83,178,35,14,"Save" ,1,1,SDLK_s); // 27
|
Window_set_normal_button( 83,178,35,14,"Save" ,1,1,SDLK_s); // 27
|
||||||
|
|||||||
@ -131,11 +131,11 @@ void Button_Transform_menu(int btn)
|
|||||||
Window_set_normal_button( 80, 86, 60,14,"RESIZE",1,1,SDLK_r); // 7
|
Window_set_normal_button( 80, 86, 60,14,"RESIZE",1,1,SDLK_r); // 7
|
||||||
Print_in_window( 51, 34,"New",MC_Dark,MC_Light);
|
Print_in_window( 51, 34,"New",MC_Dark,MC_Light);
|
||||||
Print_in_window( 96, 34,"Old",MC_Dark,MC_Light);
|
Print_in_window( 96, 34,"Old",MC_Dark,MC_Light);
|
||||||
Print_in_window( 30, 44,"X:",MC_Dark,MC_Light);
|
Print_in_window_underscore( 30, 44,"W:",MC_Dark,MC_Light,1);
|
||||||
Print_in_window( 30, 59,"Y:",MC_Dark,MC_Light);
|
Print_in_window_underscore( 30, 59,"H:",MC_Dark,MC_Light,1);
|
||||||
Print_in_window( 80, 44,":",MC_Dark,MC_Light);
|
Print_in_window( 80, 44,":",MC_Dark,MC_Light);
|
||||||
Print_in_window( 80, 59,":",MC_Dark,MC_Light);
|
Print_in_window( 80, 59,":",MC_Dark,MC_Light);
|
||||||
Print_in_window( 44, 75,"Lock proportions",MC_Dark,MC_Light);
|
Print_in_window_underscore( 44, 75,"Lock proportions",MC_Dark,MC_Light,1);
|
||||||
|
|
||||||
Window_set_normal_button( 28, 72, 13,13,ratio_is_locked?"X":" ",0,1,SDLK_l);// 8
|
Window_set_normal_button( 28, 72, 13,13,ratio_is_locked?"X":" ",0,1,SDLK_l);// 8
|
||||||
unit_button = Window_set_dropdown_button(128,50,69,11,69,unit_label[unit_index],1,0,1,LEFT_SIDE|RIGHT_SIDE,0);// 9
|
unit_button = Window_set_dropdown_button(128,50,69,11,69,unit_label[unit_index],1,0,1,LEFT_SIDE|RIGHT_SIDE,0);// 9
|
||||||
@ -143,9 +143,9 @@ void Button_Transform_menu(int btn)
|
|||||||
Window_dropdown_add_item(unit_button,UNIT_PERCENT,unit_label[UNIT_PERCENT]);
|
Window_dropdown_add_item(unit_button,UNIT_PERCENT,unit_label[UNIT_PERCENT]);
|
||||||
Window_dropdown_add_item(unit_button,UNIT_RATIO,unit_label[UNIT_RATIO]);
|
Window_dropdown_add_item(unit_button,UNIT_RATIO,unit_label[UNIT_RATIO]);
|
||||||
|
|
||||||
input_button[0] = Window_set_input_button(45,43,4); // 10
|
input_button[0] = Window_set_input_button_s(45,43,4,SDLK_w); // 10
|
||||||
input_button[1] = Window_set_input_button(89,43,4); // 11
|
input_button[1] = Window_set_input_button(89,43,4); // 11
|
||||||
input_button[2] = Window_set_input_button(45,58,4); // 12
|
input_button[2] = Window_set_input_button_s(45,58,4,SDLK_h); // 12
|
||||||
input_button[3] = Window_set_input_button(89,58,4); // 13
|
input_button[3] = Window_set_input_button(89,58,4); // 13
|
||||||
|
|
||||||
Update_window_area(0,0,Window_width, Window_height);
|
Update_window_area(0,0,Window_width, Window_height);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user