Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 16, 2006, 5:22:18 PM (18 years ago)
Author:
bensch
Message:

text with dots at the end

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/graphics/text_engine/limited_width_text.cc

    r8539 r8542  
    4040{
    4141  this->_lineWidth = lineWidth;
    42   this->setSizeX2D(lineWidth);
     42  this->setupTextWidth();
     43}
     44
     45/**
     46 * @brief sets the Dots Position
     47 * @param dotsPosition the Position of the Dots
     48 */
     49void LimitedWidthText::setDotsPosition(DotsPosition dotsPosition)
     50{
     51  this->_dotsPosition = dotsPosition;
    4352  this->setupTextWidth();
    4453}
     
    114123  float maxWidth = this->_lineWidth / this->size();
    115124
     125  this->_dotedText = this->text();
     126
    116127  switch (this->_dotsPosition)
    117128  {
     
    129140          width += this->font()->getGlyphArray()[this->text()[i]]->advance;
    130141      }
    131       this->setSizeX2D(width);
    132142      break;
    133143    case Begin:
     
    144154          width += this->font()->getGlyphArray()[this->text()[i]]->advance;
    145155      }
    146       this->setSizeX2D(width);
    147156      break;
    148157  }
     158
     159  this->setSizeX2D(width * this->size());
    149160}
    150161
Note: See TracChangeset for help on using the changeset viewer.