Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 12, 2008, 12:57:45 AM (16 years ago)
Author:
rgrieder
Message:

svn save, just in case our house burns down over night…

File:
1 edited

Legend:

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

    r1588 r1590  
    107107                Ogre::OverlayManager::getSingleton().destroy(this->orxonoxHUD_);
    108108            this->orxonoxHUD_ = 0;
    109 
    110             if (this->nav_)
    111                 delete this->nav_;
    112             this->nav_ = 0;
    113109        }
    114110
     
    143139        radar_->init(0.5, 0.9, 0.2, container_);
    144140
    145         // create Navigation
    146         nav_ = new Navigation(container_);
    147 
    148141        WorldEntity* object;
    149142        object = new WorldEntity();
     
    189182    {
    190183        radar_->update();
    191         nav_->update();
    192     }
    193 
    194     void HUD::resize()
     184    }
     185
     186    void HUD::windowResized(int newWidth, int newHeight)
    195187    {
    196188        this->radar_->resize();
     
    215207            if ((*it)->getObject() == object)
    216208            {
    217                 if (this->nav_ && this->nav_->getFocus() == (*it))
    218                     this->nav_->releaseFocus();
     209                /*if (this->nav_ && this->nav_->getFocus() == (*it))
     210                    this->nav_->releaseFocus();*/
    219211
    220212                delete (*it);
     
    243235    }
    244236
    245     /*static*/ void HUD::cycleNavigationFocus(){
    246         HUD::getSingleton().nav_->cycleFocus();
     237    /*static*/ void HUD::cycleNavigationFocus()
     238    {
     239        if (HUD::getSingleton().hudElements_.find("Navigation") != HUD::getSingleton().hudElements_.end())
     240        {
     241            Navigation* navi = dynamic_cast<Navigation*>(HUD::getSingleton().hudElements_["Navigation"]);
     242            navi->cycleFocus();
     243        }
    247244    }
    248245
    249246    /*static*/ void HUD::releaseNavigationFocus(){
    250         HUD::getSingleton().nav_->releaseFocus();
     247        //HUD::getSingleton().nav_->releaseFocus();
    251248    }
    252249}
Note: See TracChangeset for help on using the changeset viewer.