Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 29, 2008, 5:37:26 PM (16 years ago)
Author:
rgrieder
Message:

fixed a bug in OverlayText (no text was seen)
adjusted OverlayText in conjunction with aspect ratio

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/overlays/OverlayText.cc

    r1628 r1632  
    6363            this->text_ = static_cast<Ogre::TextAreaOverlayElement*>(Ogre::OverlayManager::getSingleton()
    6464                .createOverlayElement("TextArea", "OverlayText_text_" + getUniqueNumberStr()));
     65            this->text_->setCharHeight(1.0);
    6566
    6667            this->background_->addChild(this->text_);
     
    9192            return;
    9293
    93         this->overlay_->setScale(size_.y * sizeCorrection_.y, size_.y * sizeCorrection_.y);
     94        if (this->rotState_ == Horizontal)
     95            this->overlay_->setScale(size_.y * sizeCorrection_.y, size_.y * sizeCorrection_.y);
     96        else if (this->rotState_ == Vertical)
     97            this->overlay_->setScale(size_.y / (sizeCorrection_.y * sizeCorrection_.y), size_.y * sizeCorrection_.y);
     98        else
     99            this->overlay_->setScale(size_.y, size_.y);
     100
    94101        positionChanged();
    95102    }
Note: See TracChangeset for help on using the changeset viewer.