Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 719 for code/branches/FICN


Ignore:
Timestamp:
Dec 29, 2007, 1:59:22 AM (17 years ago)
Author:
landauf
Message:

small hack with a static bool to add a description to the language config value without getting an infinite recursion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/core/Language.cc

    r715 r719  
    6969        this->defaultTranslation_ = "ERROR: LANGUAGE ENTRY DOESN'T EXIST!";
    7070        this->readDefaultLanguageFile();
    71 
    72         this->setConfigValues();
    7371    }
    7472
    7573    void Language::setConfigValues()
    7674    {
    77         SetConfigValue(language_, this->defaultLanguage_);
     75        SetConfigValue(language_, this->defaultLanguage_).description("The language of the ingame text");
    7876        this->readTranslatedLanguageFile();
    7977    }
     
    8280    {
    8381        static Language theOnlyLanguageObject = Language();
     82        static bool bCreatingTheOnlyLanguageObject = true;
     83
     84        if (bCreatingTheOnlyLanguageObject)
     85        {
     86            bCreatingTheOnlyLanguageObject = false;
     87            theOnlyLanguageObject.setConfigValues();
     88        }
     89
    8490        return theOnlyLanguageObject;
    8591    }
Note: See TracChangeset for help on using the changeset viewer.