Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2008, 7:12:28 PM (17 years ago)
Author:
FelixSchulthess
Message:

using a std::set for the radar objects, which still has a the small problem, that the first radar object is selected twice when cycling through radar objects

File:
1 edited

Legend:

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

    r1454 r1456  
    4040#include "RadarOverlayElement.h"
    4141#include "HUD.h"
     42#include "core/Debug.h"
    4243
    4344namespace orxonox
     
    204205    void Navigation::cycleFocus(){
    205206        if(focus_ == NULL){
    206             focus_ = HUD::getSingleton().getFirstRadarObject();
     207            it_ = HUD::getSingleton().roSet.begin();
     208            focus_ = *it_;
    207209        }
    208210        else{
    209211            focus_->resetColour();
    210             if(focus_ != NULL) focus_ = focus_->next;
    211         }
    212 
     212            if(it_ != HUD::getSingleton().roSet.end()){
     213                focus_ = *it_;
     214                ++it_;
     215            }
     216            else focus_ = NULL;
     217        }
    213218        if(focus_ == NULL){
    214219            navMarker_->hide();
Note: See TracChangeset for help on using the changeset viewer.