Changeset 1598 for code/branches/hud/src/orxonox/hud/HUDOverlay.h
- Timestamp:
- Jun 14, 2008, 4:19:42 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud/src/orxonox/hud/HUDOverlay.h
r1595 r1598 50 50 bool getAspectCorrection() { return this->bCorrectAspect_; } 51 51 52 /** Sets the scrolling factorof this overlay. */53 void set Scroll(Vector2 scroll) { overlay_->setScroll(scroll.x, scroll.y); }52 /** Sets the position of this overlay. */ 53 void setPosition(Vector2 pos) { this->position_ = pos; this->positionChanged(); } 54 54 55 /** Gets the current scroll value*/56 Vector2 get Scroll() const { return Vector2(overlay_->getScrollX(), overlay_->getScrollY()); }55 /** Gets the current position. */ 56 Vector2 getPosition() const { return this->position_; } 57 57 58 58 /** Scrolls the overlay by the offsets provided. */ 59 void scroll(Vector2 scroll) { overlay_->scroll(scroll.x, scroll.y); } 59 void scroll(Vector2 scroll) { this->position_ += scroll; this->positionChanged(); } 60 61 /** Sets the origin point of this overlay. */ 62 void setOrigin(Vector2 pos) { this->origin_ = pos; this->positionChanged(); } 63 64 /** Gets the origin point of this overlay */ 65 Vector2 getOrigin() const { return this->origin_; } 60 66 61 67 /** Sets the rotation applied to this overlay.*/ 62 void setRotation(const Ogre::Radian& angle) { overlay_->setRotate(angle); }68 void setRotation(const Ogre::Radian& angle) { this->angle_ = angle; this->angleChanged(); } 63 69 64 70 /** Gets the rotation applied to this overlay, in degrees.*/ 65 const Radian& getRotation() const { return overlay_->getRotate(); }71 const Radian& getRotation() const { return this->angle_; } 66 72 67 73 /** Adds the passed in angle to the rotation applied to this overlay. */ 68 void rotate(const Radian& angle) { overlay_->rotate(angle); }74 void rotate(const Radian& angle) { this->angle_ += angle; this->angleChanged(); } 69 75 70 76 /** Sets the scaling factor of this overlay. */ … … 86 92 virtual void changedVisibility(); 87 93 virtual void sizeChanged(); 94 virtual void angleChanged(); 95 virtual void positionChanged(); 88 96 float getWindowAspectRatio() { return windowAspectRatio_; } 89 97 … … 97 105 Vector2 size_; 98 106 Vector2 sizeCorrection_; 107 Radian angle_; 108 Vector2 position_; 109 Vector2 origin_; 99 110 100 111 static unsigned int hudOverlayCounter_s;
Note: See TracChangeset
for help on using the changeset viewer.