Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 15, 2008, 1:09:07 AM (16 years ago)
Author:
rgrieder
Message:
  • adjusted Radar to fit in XML loading scheme
  • OverlayGroup should be more or less what I imagine for now (only supports scale method to scale the entire HUD)
  • singletonized HUDNavigation (and HUDRadar of course): These are temporary hacks!
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/hud/src/orxonox/overlays/OrxonoxOverlay.cc

    r1601 r1604  
    6666
    6767    XMLPortParam(OrxonoxOverlay, "correctAspect", setAspectCorrection, getAspectCorrection, xmlElement, mode);
    68     XMLPortParam(OrxonoxOverlay, "size", setSize, getSize, xmlElement, mode);
     68    XMLPortParam(OrxonoxOverlay, "size", setSize, getUncorrectedSize, xmlElement, mode);
    6969    XMLPortParam(OrxonoxOverlay, "rotation", setRotation, getRotation, xmlElement, mode);
    7070    XMLPortParam(OrxonoxOverlay, "origin", setOrigin, getOrigin, xmlElement, mode);
     
    7878
    7979      this->sizeChanged();
     80      this->positionChanged();
     81      this->angleChanged();
    8082    }
    8183  }
     
    129131  {
    130132    this->overlay_->setScale(size_.x * sizeCorrection_.x, size_.y * sizeCorrection_.y);
     133    positionChanged();
    131134  }
    132135
     
    146149  void OrxonoxOverlay::positionChanged()
    147150  {
    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;
    149152    this->overlay_->setScroll(scroll.x, -scroll.y);
    150153  }
Note: See TracChangeset for help on using the changeset viewer.