Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 16, 2010, 11:22:36 AM (14 years ago)
Author:
rgrieder
Message:

Merged revisions 6430-6440 from the gamestate branch to the trunk.
This adds keybindings merging functionality.

(from log of r6437)
When running development builds, the keybinder will merge the local file and the one from the data folder.
Catch: if you want to remove a binding, you'll have to write "NoBinding" (not case sensitive) to override the default command

The keybind command already does that for you though.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/ConfigValueContainer.h

    r6417 r6536  
    5050
    5151#include "util/MultiType.h"
    52 #include "ConfigFileManager.h"
    5352#include "Identifier.h"
    5453
     
    108107            */
    109108            template <class D, class V>
    110             ConfigValueContainer(ConfigFileType type, Identifier* identifier, const std::string& sectionname, const std::string& varname, const D& defvalue, const V& value)
     109            ConfigValueContainer(ConfigFileType::Value type, Identifier* identifier, const std::string& sectionname, const std::string& varname, const D& defvalue, const V& value)
    111110            {
    112111                this->init(type, identifier, sectionname, varname);
     
    122121            */
    123122            template <class D, class V>
    124             ConfigValueContainer(ConfigFileType type, Identifier* identifier, const std::string& sectionname, const std::string& varname, const std::vector<D>& defvalue, const std::vector<V>& value)
     123            ConfigValueContainer(ConfigFileType::Value type, Identifier* identifier, const std::string& sectionname, const std::string& varname, const std::vector<D>& defvalue, const std::vector<V>& value)
    125124            {
    126125                this->init(type, identifier, sectionname, varname);
     
    217216            inline const std::string& getName() const
    218217                { return this->varname_; }
    219             /** @brief Retuns the name of the section this config value is in. */
     218            /** @brief Returns the name of the section this config value is in. */
    220219            inline const std::string& getSectionName() const
    221220                { return this->sectionname_; }
     221            /** @brief Returns the associated identifier (can be NULL). */
     222            inline Identifier* getIdentifier() const
     223                { return this->identifier_; }
    222224            /** @brief Returns true if this config-value is a vector */
    223225            inline bool isVector() const
     
    271273
    272274        private:
    273             void init(ConfigFileType type, Identifier* identifier, const std::string& sectionname, const std::string& varname);
     275            void init(ConfigFileType::Value type, Identifier* identifier, const std::string& sectionname, const std::string& varname);
    274276            void initValue(const MultiType& defvalue);
    275277            void initVector();
     
    278280            bool                       bIsVector_;                  //!< True if the container contains a std::vector
    279281
    280             ConfigFileType             type_;                       //!< The type of the corresponding config-file
     282            ConfigFileType::Value      type_;                       //!< The type of the corresponding config-file
    281283            Identifier*                identifier_;                 //!< The identifier of the class
    282284            std::string                sectionname_;                //!< The name of the class the variable belongs to
Note: See TracChangeset for help on using the changeset viewer.