Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7050 for code


Ignore:
Timestamp:
May 31, 2010, 3:17:25 PM (14 years ago)
Author:
sfluecki
Message:

Added a ConfigValue to limit the amount of marked entities

Location:
code/branches/presentation3/src/modules/overlays/hud
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/modules/overlays/hud/HUDNavigation.cc

    r7014 r7050  
    4646#include "worldentities/pawns/Pawn.h"
    4747#include "worldentities/WorldEntity.h"
    48 #include "interfaces/RadarViewable.h"
     48#include "core/ConfigValueIncludes.h"
    4949// #include <boost/bind/bind_template.hpp>
    5050
     
    5757
    5858}
     59
     60void HUDNavigation::setConfigValues()
     61{
     62  SetConfigValue(markerLimit_, 3);
     63}
     64
    5965CreateFactory ( HUDNavigation );
    6066
     
    6369{
    6470    RegisterObject ( HUDNavigation );
     71    this->setConfigValues();
    6572
    6673    // Set default values
     
    132139}
    133140
     141
     142
    134143void HUDNavigation::tick ( float dt )
    135144{
     
    142151
    143152
    144     //TODO: sort list 'sortedObjectList_' according to distance.$
    145153    for ( sortedList::iterator listIt = sortedObjectList_.begin(); listIt != sortedObjectList_.end(); ++listIt )
    146154    {
     
    338346    sortedObjectList_.push_front ( std::make_pair ( object, ( unsigned int ) 0 ) );
    339347
    340     //TODO: hide elements
     348
    341349}
    342350
     
    380388void HUDNavigation::changedOwner()
    381389{
    382     // TODO: Delete old objects?
     390   
    383391    const std::set<RadarViewable*>& respawnObjects = this->getOwner()->getScene()->getRadar()->getRadarObjects();
    384392    for ( std::set<RadarViewable*>::const_iterator it = respawnObjects.begin(); it != respawnObjects.end(); ++it )
  • code/branches/presentation3/src/modules/overlays/hud/HUDNavigation.h

    r6971 r7050  
    4949    virtual ~HUDNavigation();
    5050
     51    void setConfigValues();
     52   
    5153    virtual void XMLPort ( Element& xmlElement, XMLPort::Mode mode );
    5254    virtual void tick ( float dt );
     
    98100    float textSize_;
    99101
    100     static const unsigned int markerLimit_ = 5; //TODO: is it possible to set this over the console and/or the IG-Setting
     102    unsigned int markerLimit_;; //TODO: is it possible to set this over the console and/or the IG-Setting
    101103
    102104
Note: See TracChangeset for help on using the changeset viewer.