[FL-3621] Fix double arrows and add proper indication (#3146)
Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
		
							parent
							
								
									9d6352e92f
								
							
						
					
					
						commit
						e664159188
					
				| @ -225,18 +225,35 @@ static void byte_input_draw_input(Canvas* canvas, ByteInputModel* model) { | |||||||
|                     byte_input_get_nibble_text(model->bytes[i], false)); |                     byte_input_get_nibble_text(model->bytes[i], false)); | ||||||
|                 canvas_invert_color(canvas); |                 canvas_invert_color(canvas); | ||||||
|             } |             } | ||||||
|  |         } else { | ||||||
|  |             if(model->first_visible_byte > 0 && i == model->first_visible_byte) { | ||||||
|  |                 canvas_draw_icon( | ||||||
|  |                     canvas, | ||||||
|  |                     text_x + 2 + byte_position * 14, | ||||||
|  |                     text_y - 7, | ||||||
|  |                     &I_More_data_placeholder_5x7); | ||||||
|             } else { |             } else { | ||||||
|                 canvas_draw_glyph( |                 canvas_draw_glyph( | ||||||
|                     canvas, |                     canvas, | ||||||
|                     text_x + 2 + byte_position * 14, |                     text_x + 2 + byte_position * 14, | ||||||
|                     text_y, |                     text_y, | ||||||
|                     byte_input_get_nibble_text(model->bytes[i], true)); |                     byte_input_get_nibble_text(model->bytes[i], true)); | ||||||
|  |             } | ||||||
|  |             if(model->bytes_count - model->first_visible_byte > max_drawable_bytes && | ||||||
|  |                i == model->first_visible_byte + MIN(model->bytes_count, max_drawable_bytes) - 1) { | ||||||
|  |                 canvas_draw_icon( | ||||||
|  |                     canvas, | ||||||
|  |                     text_x + 8 + byte_position * 14, | ||||||
|  |                     text_y - 7, | ||||||
|  |                     &I_More_data_placeholder_5x7); | ||||||
|  |             } else { | ||||||
|                 canvas_draw_glyph( |                 canvas_draw_glyph( | ||||||
|                     canvas, |                     canvas, | ||||||
|                     text_x + 8 + byte_position * 14, |                     text_x + 8 + byte_position * 14, | ||||||
|                     text_y, |                     text_y, | ||||||
|                     byte_input_get_nibble_text(model->bytes[i], false)); |                     byte_input_get_nibble_text(model->bytes[i], false)); | ||||||
|             } |             } | ||||||
|  |         } | ||||||
| 
 | 
 | ||||||
|         if(draw_index_line) { |         if(draw_index_line) { | ||||||
|             canvas_draw_icon(canvas, 1, text_y + 8, &I_Hashmark_7x7); |             canvas_draw_icon(canvas, 1, text_y + 8, &I_Hashmark_7x7); | ||||||
| @ -260,14 +277,6 @@ static void byte_input_draw_input(Canvas* canvas, ByteInputModel* model) { | |||||||
|         snprintf(str, 20, "%u", (model->selected_byte + 1)); |         snprintf(str, 20, "%u", (model->selected_byte + 1)); | ||||||
|         canvas_draw_str(canvas, text_x + 75, text_y2, str); |         canvas_draw_str(canvas, text_x + 75, text_y2, str); | ||||||
|     } |     } | ||||||
| 
 |  | ||||||
|     if(model->bytes_count - model->first_visible_byte > max_drawable_bytes) { |  | ||||||
|         canvas_draw_icon(canvas, 123, 21, &I_ButtonRightSmall_3x5); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     if(model->first_visible_byte > 0) { |  | ||||||
|         canvas_draw_icon(canvas, 1, 21, &I_ButtonLeftSmall_3x5); |  | ||||||
|     } |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /** Draw input box (selected view)
 | /** Draw input box (selected view)
 | ||||||
| @ -305,12 +314,28 @@ static void byte_input_draw_input_selected(Canvas* canvas, ByteInputModel* model | |||||||
|                 text_y, |                 text_y, | ||||||
|                 byte_input_get_nibble_text(model->bytes[i], false)); |                 byte_input_get_nibble_text(model->bytes[i], false)); | ||||||
|             canvas_invert_color(canvas); |             canvas_invert_color(canvas); | ||||||
|  |         } else { | ||||||
|  |             if(model->first_visible_byte > 0 && i == model->first_visible_byte) { | ||||||
|  |                 canvas_draw_icon( | ||||||
|  |                     canvas, | ||||||
|  |                     text_x + 2 + byte_position * 14, | ||||||
|  |                     text_y - 7, | ||||||
|  |                     &I_More_data_placeholder_5x7); | ||||||
|             } else { |             } else { | ||||||
|                 canvas_draw_glyph( |                 canvas_draw_glyph( | ||||||
|                     canvas, |                     canvas, | ||||||
|                     text_x + 2 + byte_position * 14, |                     text_x + 2 + byte_position * 14, | ||||||
|                     text_y, |                     text_y, | ||||||
|                     byte_input_get_nibble_text(model->bytes[i], true)); |                     byte_input_get_nibble_text(model->bytes[i], true)); | ||||||
|  |             } | ||||||
|  |             if(model->bytes_count - model->first_visible_byte > max_drawable_bytes && | ||||||
|  |                i == model->first_visible_byte + MIN(model->bytes_count, max_drawable_bytes) - 1) { | ||||||
|  |                 canvas_draw_icon( | ||||||
|  |                     canvas, | ||||||
|  |                     text_x + 8 + byte_position * 14, | ||||||
|  |                     text_y - 7, | ||||||
|  |                     &I_More_data_placeholder_5x7); | ||||||
|  |             } else { | ||||||
|                 canvas_draw_glyph( |                 canvas_draw_glyph( | ||||||
|                     canvas, |                     canvas, | ||||||
|                     text_x + 8 + byte_position * 14, |                     text_x + 8 + byte_position * 14, | ||||||
| @ -318,13 +343,6 @@ static void byte_input_draw_input_selected(Canvas* canvas, ByteInputModel* model | |||||||
|                     byte_input_get_nibble_text(model->bytes[i], false)); |                     byte_input_get_nibble_text(model->bytes[i], false)); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 |  | ||||||
|     if(model->bytes_count - model->first_visible_byte > max_drawable_bytes) { |  | ||||||
|         canvas_draw_icon(canvas, 123, 21, &I_ButtonRightSmall_3x5); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     if(model->first_visible_byte > 0) { |  | ||||||
|         canvas_draw_icon(canvas, 1, 21, &I_ButtonLeftSmall_3x5); |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     canvas_invert_color(canvas); |     canvas_invert_color(canvas); | ||||||
|  | |||||||
							
								
								
									
										
											BIN
										
									
								
								assets/icons/Common/More_data_placeholder_5x7.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/icons/Common/More_data_placeholder_5x7.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 92 B | 
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user