Changeset 7756 in orxonox.OLD for trunk/src/lib/graphics/text_engine
- Timestamp:
- May 21, 2006, 6:42:09 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/text_engine/multi_line_text.cc
r7754 r7756 136 136 if (width > maxWidth || this->getText()[i] == '\n') 137 137 { 138 this->lineEnds.push_back(i); 139 width = 0.0f; 138 if (likely(i > 0)) 139 { 140 this->lineEnds.push_back( i -1 ); 141 width = this->getFont()->getGlyphArray()[this->getText()[i-1]]->advance; 142 } 143 else 144 width = 0.0f; 140 145 } 146 141 147 // Advance the Text. 142 148 if(this->getFont()->getGlyphArray()[this->getText()[i]] != NULL)
Note: See TracChangeset
for help on using the changeset viewer.