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/hud/RadarObject.cc

    r1599 r1604  
    4141{
    4242    template <>
    43     class less<orxonox::ColourValue>
     43    bool less<orxonox::ColourValue>::operator()(const orxonox::ColourValue& __x, const orxonox::ColourValue& __y) const
    4444    {
    45         public:
    46             bool operator()(const orxonox::ColourValue& __x, const orxonox::ColourValue& __y) const
     45        if (__x.r == __y.r)
     46        {
     47            if (__x.g == __y.g)
    4748            {
    48                 if (__x.r == __y.r)
     49                if (__x.b == __y.b)
    4950                {
    50                     if (__x.g == __y.g)
    51                     {
    52                         if (__x.b == __y.b)
    53                         {
    54                             return __x.a < __y.a;
    55                         }
    56                         return __x.b < __y.b;
    57                     }
    58                     return __x.g < __y.g;
     51                    return __x.a < __y.a;
    5952                }
    60                 return __x.r < __y.r;
     53                return __x.b < __y.b;
    6154            }
    62     };
     55            return __x.g < __y.g;
     56        }
     57        return __x.r < __y.r;
     58    }
    6359}
    6460
     
    6965    std::map<std::string, std::map<ColourValue, std::string> > RadarObject::materials_s;
    7066
    71     RadarObject::RadarObject(Ogre::OverlayContainer* container, WorldEntity* object, const ColourValue& colour, const std::string& texturename)
     67    RadarObject::RadarObject(Ogre::Overlay* container, WorldEntity* object, const ColourValue& colour, const std::string& texturename)
    7268    {
    7369        this->colour_ = colour;
     
    7874        this->panel_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "RadarObject" + getConvertedValue<unsigned int, std::string>(RadarObject::count_s++)));
    7975        this->setMaterial(colour, texturename);
    80 
    81         this->panel_->setDimensions(3, 3);
    82         this->panel_->setMetricsMode(Ogre::GMM_PIXELS);
    83         this->panel_->show();
    84 
    85         container->addChild(panel_);
     76        this->panel_->setDimensions(0.01, 0.01);
     77        container->add2D(panel_);
    8678    }
    8779
Note: See TracChangeset for help on using the changeset viewer.