diff --git a/helpfile.h b/helpfile.h index 2e089084..fd3a0e63 100644 --- a/helpfile.h +++ b/helpfile.h @@ -2498,9 +2498,16 @@ static const T_Help_table helptable_layertrans[] = HELP_TITLE("LAYERS TRANSPARENCY") HELP_TEXT ("") + HELP_BOLD ("LEFT CLICK") + HELP_TEXT ("") + HELP_TEXT ("Sets the transparent color as background pen") + HELP_TEXT ("color.") + HELP_TEXT ("") + HELP_BOLD ("RIGHT CLICK") + HELP_TEXT ("") HELP_TEXT ("The current Background color becomes the") HELP_TEXT ("color considered transparent for the layers.") - + }; static const T_Help_table helptable_layermerge[] = { diff --git a/init.c b/init.c index 43b50dca..f184e55b 100644 --- a/init.c +++ b/init.c @@ -1271,7 +1271,7 @@ void Init_buttons(void) 58,0, 13,9, BUTTON_SHAPE_RECTANGLE, - Button_Layer_color, Button_Layer_color, + Button_Layer_get_transparent, Button_Layer_set_transparent, Do_nothing, FAMILY_INSTANT); Init_button(BUTTON_LAYER_MERGE, diff --git a/layers.c b/layers.c index 31aae61a..c3b319a7 100644 --- a/layers.c +++ b/layers.c @@ -159,7 +159,7 @@ void Button_Layer_menu(void) Display_cursor(); } -void Button_Layer_color(void) +void Button_Layer_set_transparent(void) { Hide_cursor(); @@ -170,7 +170,6 @@ void Button_Layer_color(void) Redraw_layered_image(); Display_all_screen(); - Display_cursor(); End_of_modification(); } @@ -178,6 +177,19 @@ void Button_Layer_color(void) Display_cursor(); } +void Button_Layer_get_transparent(void) +{ + Hide_cursor(); + + if (Main_backups->Pages->Transparent_color != Back_color) + { + Set_back_color(Main_backups->Pages->Transparent_color); + } + + Unselect_button(BUTTON_LAYER_COLOR); + Display_cursor(); +} + void Button_Layer_merge(void) { Hide_cursor(); diff --git a/layers.h b/layers.h index 154557f1..d814496d 100644 --- a/layers.h +++ b/layers.h @@ -23,7 +23,8 @@ void Button_Layer_add(void); void Button_Layer_remove(void); void Button_Layer_menu(void); -void Button_Layer_color(void); +void Button_Layer_set_transparent(void); +void Button_Layer_get_transparent(void); void Button_Layer_merge(void); void Button_Layer_up(void); void Button_Layer_down(void); diff --git a/skins/skin_modern.png b/skins/skin_modern.png index 78880d00..790060c9 100644 Binary files a/skins/skin_modern.png and b/skins/skin_modern.png differ