Double-clicking a palette color to open the palette now requires a time of less than 0.5 seconds between clicks
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@803 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
		
							parent
							
								
									ce812e481d
								
							
						
					
					
						commit
						315a17ae5b
					
				
							
								
								
									
										14
									
								
								buttons.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								buttons.c
									
									
									
									
									
								
							@ -274,12 +274,22 @@ void Button_Pal_right_fast(void)
 | 
			
		||||
//-------------------- item de la forecolor dans le menu --------------------
 | 
			
		||||
void Button_Select_forecolor(void)
 | 
			
		||||
{
 | 
			
		||||
  static long time_click = 0;
 | 
			
		||||
  long time_previous;
 | 
			
		||||
 | 
			
		||||
  int color=Pick_color_in_palette();
 | 
			
		||||
 | 
			
		||||
  time_previous = time_click;
 | 
			
		||||
  time_click = SDL_GetTicks();
 | 
			
		||||
 | 
			
		||||
  if (color == Fore_color)
 | 
			
		||||
  {
 | 
			
		||||
	// Open palette window
 | 
			
		||||
	Button_Palette();
 | 
			
		||||
    // Check if it's a double-click    
 | 
			
		||||
    if (time_click - time_previous < 500)
 | 
			
		||||
    {
 | 
			
		||||
    	// Open palette window
 | 
			
		||||
    	Button_Palette();
 | 
			
		||||
    }
 | 
			
		||||
  }	  
 | 
			
		||||
  else if (color!=-1)
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1
									
								
								misc.h
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								misc.h
									
									
									
									
									
								
							@ -24,7 +24,6 @@
 | 
			
		||||
void Copy_image_to_brush(short start_x,short start_y,short Brush_width,short Brush_height,word image_width);
 | 
			
		||||
void Remap_general_lowlevel(byte * conversion_table,byte * buffer,short width,short height,short buffer_width);
 | 
			
		||||
void Scroll_picture(short x_offset,short y_offset);
 | 
			
		||||
void Set_mouse_video_mode_number(void);
 | 
			
		||||
void Set_mouse_position(void);
 | 
			
		||||
void Wait_end_of_click(void);
 | 
			
		||||
void Mouse_sensitivity(word x,word y);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user