Fix a mouse dropping remaining when clicking layer color. Made the button pick current transp color when left-clicking, and set it on right-click.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1201 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
		
							parent
							
								
									8612aa7303
								
							
						
					
					
						commit
						e2f4ed00f1
					
				@ -2498,6 +2498,13 @@ static const T_Help_table helptable_layertrans[] =
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  HELP_TITLE("LAYERS TRANSPARENCY")
 | 
					  HELP_TITLE("LAYERS TRANSPARENCY")
 | 
				
			||||||
  HELP_TEXT ("")
 | 
					  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 ("The current Background color becomes the")
 | 
				
			||||||
  HELP_TEXT ("color considered transparent for the layers.")
 | 
					  HELP_TEXT ("color considered transparent for the layers.")
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								init.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								init.c
									
									
									
									
									
								
							@ -1271,7 +1271,7 @@ void Init_buttons(void)
 | 
				
			|||||||
                     58,0,
 | 
					                     58,0,
 | 
				
			||||||
                     13,9,
 | 
					                     13,9,
 | 
				
			||||||
                     BUTTON_SHAPE_RECTANGLE,
 | 
					                     BUTTON_SHAPE_RECTANGLE,
 | 
				
			||||||
                     Button_Layer_color, Button_Layer_color,
 | 
					                     Button_Layer_get_transparent, Button_Layer_set_transparent,
 | 
				
			||||||
                     Do_nothing,
 | 
					                     Do_nothing,
 | 
				
			||||||
                     FAMILY_INSTANT);
 | 
					                     FAMILY_INSTANT);
 | 
				
			||||||
  Init_button(BUTTON_LAYER_MERGE,
 | 
					  Init_button(BUTTON_LAYER_MERGE,
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										16
									
								
								layers.c
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								layers.c
									
									
									
									
									
								
							@ -159,7 +159,7 @@ void Button_Layer_menu(void)
 | 
				
			|||||||
  Display_cursor();
 | 
					  Display_cursor();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void Button_Layer_color(void)
 | 
					void Button_Layer_set_transparent(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  Hide_cursor();
 | 
					  Hide_cursor();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -170,7 +170,6 @@ void Button_Layer_color(void)
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    Redraw_layered_image();
 | 
					    Redraw_layered_image();
 | 
				
			||||||
    Display_all_screen();
 | 
					    Display_all_screen();
 | 
				
			||||||
    Display_cursor();
 | 
					 | 
				
			||||||
    End_of_modification();
 | 
					    End_of_modification();
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -178,6 +177,19 @@ void Button_Layer_color(void)
 | 
				
			|||||||
  Display_cursor();
 | 
					  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)
 | 
					void Button_Layer_merge(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  Hide_cursor();
 | 
					  Hide_cursor();
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										3
									
								
								layers.h
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								layers.h
									
									
									
									
									
								
							@ -23,7 +23,8 @@
 | 
				
			|||||||
void Button_Layer_add(void);
 | 
					void Button_Layer_add(void);
 | 
				
			||||||
void Button_Layer_remove(void);
 | 
					void Button_Layer_remove(void);
 | 
				
			||||||
void Button_Layer_menu(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_merge(void);
 | 
				
			||||||
void Button_Layer_up(void);
 | 
					void Button_Layer_up(void);
 | 
				
			||||||
void Button_Layer_down(void);
 | 
					void Button_Layer_down(void);
 | 
				
			||||||
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB  | 
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user