mirror of
				https://github.com/nicbarker/clay.git
				synced 2025-11-04 00:26:17 +00:00 
			
		
		
		
	Fix aspect ratio display, closes #449
This commit is contained in:
		
							parent
							
								
									4a91cac1b2
								
							
						
					
					
						commit
						b1c9a9dc3c
					
				
							
								
								
									
										7
									
								
								clay.h
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								clay.h
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -3611,7 +3611,12 @@ void Clay__RenderDebugView(void) {
 | 
			
		|||
                            CLAY({ .id = CLAY_ID("Clay__DebugViewElementInfoAspectRatioBody"), .layout = { .padding = attributeConfigPadding, .childGap = 8, .layoutDirection = CLAY_TOP_TO_BOTTOM } }) {
 | 
			
		||||
                                CLAY_TEXT(CLAY_STRING("Aspect Ratio"), infoTitleConfig);
 | 
			
		||||
                                // Aspect Ratio
 | 
			
		||||
                                CLAY_TEXT(Clay__IntToString(aspectRatioConfig->aspectRatio), infoTextConfig);
 | 
			
		||||
                                CLAY({ .id = CLAY_ID("Clay__DebugViewElementInfoAspectRatio") }) {
 | 
			
		||||
                                    CLAY_TEXT(Clay__IntToString(aspectRatioConfig->aspectRatio), infoTextConfig);
 | 
			
		||||
                                    CLAY_TEXT(CLAY_STRING("."), infoTextConfig);
 | 
			
		||||
                                    float frac = aspectRatioConfig->aspectRatio - (int)(aspectRatioConfig->aspectRatio);
 | 
			
		||||
                                    CLAY_TEXT(Clay__IntToString(frac * 100), infoTextConfig);
 | 
			
		||||
                                }
 | 
			
		||||
                            }
 | 
			
		||||
                            break;
 | 
			
		||||
                        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue