Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 23, 2009, 12:15:06 PM (15 years ago)
Author:
rgrieder
Message:

Moved Config value detailLevelParticle from GraphicsManager to ParticleInterface.
The resulting section name problem is to be resolved later. We've got a mess of config values anyway.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/src/orxonox/tools/ParticleInterface.cc

    r3301 r3336  
    4343#include "util/Math.h"
    4444#include "core/CoreIncludes.h"
     45#include "core/ConfigValueIncludes.h"
    4546#include "core/GameMode.h"
    4647#include "GraphicsManager.h"
     
    9192    }
    9293
     94    void ParticleInterface::setConfigValues()
     95    {
     96        SetConfigValue(globalDetailLevel_, 2)
     97            .description("O: off, 1: low, 2: normal, 3: high").callback(this, &ParticleInterface::detailLevelChanged);
     98    }
     99
    93100    Ogre::ParticleEmitter* ParticleInterface::createNewEmitter()
    94101    {
     
    180187        this->detaillevel_ = level;
    181188        if (GameMode::showsGraphics())
    182             this->detailLevelChanged(GraphicsManager::getInstance().getDetailLevelParticle());
    183     }
    184 
    185     void ParticleInterface::detailLevelChanged(unsigned int newlevel)
    186     {
    187         if (newlevel >= static_cast<unsigned int>(this->detaillevel_))
     189            this->detailLevelChanged();
     190    }
     191
     192    void ParticleInterface::detailLevelChanged()
     193    {
     194        if (this->globalDetailLevel_ >= this->detaillevel_)
    188195            this->bAllowedByLOD_ = true;
    189196        else
Note: See TracChangeset for help on using the changeset viewer.