Remove TextError::ExceedMaxTextAtlases(usize) variant (#6796)
				
					
				
			# Objective Fixes #6756 ## Solution Removes the variant wherever it's used Co-authored-by: Jay Pavlina <jay@enjin.io>
This commit is contained in:
		
							parent
							
								
									83e8224694
								
							
						
					
					
						commit
						e621acd7f2
					
				@ -7,7 +7,4 @@ pub enum TextError {
 | 
				
			|||||||
    NoSuchFont,
 | 
					    NoSuchFont,
 | 
				
			||||||
    #[error("failed to add glyph to newly-created atlas {0:?}")]
 | 
					    #[error("failed to add glyph to newly-created atlas {0:?}")]
 | 
				
			||||||
    FailedToAddGlyph(GlyphId),
 | 
					    FailedToAddGlyph(GlyphId),
 | 
				
			||||||
    // TODO this is not used. Remove it.
 | 
					 | 
				
			||||||
    #[error("exceeded {0:?} available TextAltases for font. This can be caused by using an excessive number of font sizes or ui scaling. If you are changing font sizes or ui scaling dynamically consider using Transform::scale to modify the size. If you need more font sizes modify TextSettings.max_font_atlases." )]
 | 
					 | 
				
			||||||
    ExceedMaxTextAtlases(usize),
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -207,8 +207,7 @@ pub fn update_text2d_layout(
 | 
				
			|||||||
                    // queue for further processing
 | 
					                    // queue for further processing
 | 
				
			||||||
                    queue.insert(entity);
 | 
					                    queue.insert(entity);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                Err(e @ TextError::FailedToAddGlyph(_))
 | 
					                Err(e @ TextError::FailedToAddGlyph(_)) => {
 | 
				
			||||||
                | Err(e @ TextError::ExceedMaxTextAtlases(_)) => {
 | 
					 | 
				
			||||||
                    panic!("Fatal error when processing text: {e}.");
 | 
					                    panic!("Fatal error when processing text: {e}.");
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                Ok(info) => {
 | 
					                Ok(info) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -135,8 +135,7 @@ pub fn text_system(
 | 
				
			|||||||
                    // queue for further processing
 | 
					                    // queue for further processing
 | 
				
			||||||
                    new_queue.push(entity);
 | 
					                    new_queue.push(entity);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                Err(e @ TextError::FailedToAddGlyph(_))
 | 
					                Err(e @ TextError::FailedToAddGlyph(_)) => {
 | 
				
			||||||
                | Err(e @ TextError::ExceedMaxTextAtlases(_)) => {
 | 
					 | 
				
			||||||
                    panic!("Fatal error when processing text: {e}.");
 | 
					                    panic!("Fatal error when processing text: {e}.");
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                Ok(info) => {
 | 
					                Ok(info) => {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user