Prog.
This commit is contained in:
		@@ -108,6 +108,8 @@ void UILabel::rebufferQuads(const std::vector<struct UILabelText> newTexts) {
 | 
			
		||||
  quadCountTotal = 0;
 | 
			
		||||
  std::vector<struct UILabelText> realNewTexts;
 | 
			
		||||
 | 
			
		||||
  float_t maxWidth = this->width;
 | 
			
		||||
 | 
			
		||||
  // Reset
 | 
			
		||||
  lines.clear();
 | 
			
		||||
 | 
			
		||||
@@ -236,8 +238,8 @@ void UILabel::rebufferQuads(const std::vector<struct UILabelText> newTexts) {
 | 
			
		||||
      if(
 | 
			
		||||
        ch != ' ' &&
 | 
			
		||||
        lastSpaceCharacter != -1 &&
 | 
			
		||||
        this->width > charInfo.bitmapSize.x &&
 | 
			
		||||
        (position.x + charInfo.advanceX) > this->width
 | 
			
		||||
        maxWidth > charInfo.bitmapSize.x &&
 | 
			
		||||
        (position.x + charInfo.advanceX) > maxWidth
 | 
			
		||||
      ) {
 | 
			
		||||
        // Basically this rewinds everything we've done to the last space char,
 | 
			
		||||
        // changes it to a newline, and then moves the position along.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user