Changeset 1604 for code/branches/hud/src/orxonox/overlays/OrxonoxOverlay.cc
- Timestamp:
- Jun 15, 2008, 1:09:07 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud/src/orxonox/overlays/OrxonoxOverlay.cc
r1601 r1604 66 66 67 67 XMLPortParam(OrxonoxOverlay, "correctAspect", setAspectCorrection, getAspectCorrection, xmlElement, mode); 68 XMLPortParam(OrxonoxOverlay, "size", setSize, get Size, xmlElement, mode);68 XMLPortParam(OrxonoxOverlay, "size", setSize, getUncorrectedSize, xmlElement, mode); 69 69 XMLPortParam(OrxonoxOverlay, "rotation", setRotation, getRotation, xmlElement, mode); 70 70 XMLPortParam(OrxonoxOverlay, "origin", setOrigin, getOrigin, xmlElement, mode); … … 78 78 79 79 this->sizeChanged(); 80 this->positionChanged(); 81 this->angleChanged(); 80 82 } 81 83 } … … 129 131 { 130 132 this->overlay_->setScale(size_.x * sizeCorrection_.x, size_.y * sizeCorrection_.y); 133 positionChanged(); 131 134 } 132 135 … … 146 149 void OrxonoxOverlay::positionChanged() 147 150 { 148 Vector2 scroll = (position_ - 0.5 - size_ * (origin_ - 0.5)) * 2.0;151 Vector2 scroll = (position_ - 0.5 - size_ * sizeCorrection_ * (origin_ - 0.5)) * 2.0; 149 152 this->overlay_->setScroll(scroll.x, -scroll.y); 150 153 }
Note: See TracChangeset
for help on using the changeset viewer.