mirror of
				https://github.com/RetroDECK/ES-DE.git
				synced 2025-04-10 19:15:13 +00:00 
			
		
		
		
	Fixed an issue where the text debug overlay was not always rendered correctly
This commit is contained in:
		
							parent
							
								
									ad11046d2d
								
							
						
					
					
						commit
						493f51cbe8
					
				|  | @ -224,13 +224,6 @@ void TextComponent::render(const glm::mat4& parentTrans) | |||
|     glm::mat4 trans {parentTrans * getTransform()}; | ||||
|     mRenderer->setMatrix(trans); | ||||
| 
 | ||||
|     // Draw the overall textbox area. If we're inside a vertical scrollable container then
 | ||||
|     // this area is rendered inside that component instead of here.
 | ||||
|     if (Settings::getInstance()->getBool("DebugText")) { | ||||
|         if (!mParent || !mParent->isScrollable()) | ||||
|             mRenderer->drawRect(0.0f, 0.0f, mSize.x, mSize.y, 0x0000FF33, 0x0000FF33); | ||||
|     } | ||||
| 
 | ||||
|     float offsetX {0.0f}; | ||||
| 
 | ||||
|     if (mHorizontalScrolling) { | ||||
|  | @ -286,6 +279,13 @@ void TextComponent::render(const glm::mat4& parentTrans) | |||
|                 yOff = (mSize.y - textSize.y) / 2.0f; | ||||
|             } | ||||
| 
 | ||||
|             // Draw the overall textbox area. If we're inside a vertical scrollable container then
 | ||||
|             // this area is rendered inside that component instead of here.
 | ||||
|             if (!secondPass && Settings::getInstance()->getBool("DebugText")) { | ||||
|                 if (!mParent || !mParent->isScrollable()) | ||||
|                     mRenderer->drawRect(0.0f, 0.0f, mSize.x, mSize.y, 0x0000FF33, 0x0000FF33); | ||||
|             } | ||||
| 
 | ||||
|             trans = glm::translate(trans, glm::vec3 {0.0f, yOff, 0.0f}); | ||||
|             mRenderer->setMatrix(trans); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Leon Styhre
						Leon Styhre