Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 23, 2008, 6:49:46 PM (16 years ago)
Author:
FelixSchulthess
Message:

moved navigation marker to new class: Navigation

File:
1 edited

Legend:

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

    r1393 r1394  
    11/*
    2 *   ORXONOX - the hottest 3D action shooter ever to exist
     2*   ORXONOX - the hotnavText_ 3D action shooter ever to exist
    33*
    44*
     
    5050    void Navigation::init(){
    5151                om = &OverlayManager::getSingleton();
     52        // create nav text
     53        navText_ = static_cast<TextAreaOverlayElement*>(om->createOverlayElement("TextArea", "navText"));
     54        navText_->show();
     55        navText_->setMetricsMode(Ogre::GMM_RELATIVE);
     56        navText_->setDimensions(0.3, 0.3);
     57        navText_->setPosition(0.02, 0.02);
     58        navText_->setFontName("Console");
     59        navText_->setCaption("init");
     60        container_->addChild(navText_);
     61
     62
    5263        // create nav marker ...
    5364        navMarker_ = static_cast<PanelOverlayElement*>(om->createOverlayElement("Panel", "NavMarker"));
     
    96107            }
    97108        }
     109
     110        int d = (float)(getDist2Focus()/10);
     111        if(d) test->setCaption("Distance: " + Ogre::StringConverter::toString(d));
     112        else test->setCaption("");
    98113    }
    99114
Note: See TracChangeset for help on using the changeset viewer.