Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 19, 2008, 2:58:22 PM (16 years ago)
Author:
landauf
Message:

Added a command-history to the console. you can scroll through all previously entered commands by pressing [up] key.
The history is stored in orxonox.ini in the section [Shell]. You can configure the maximal amount of stored commands (default: 100).
This allows you to use the history after orxonox was restarted.
The history uses a cyclic vector (with the configured size), meaning the newest command will overwrite the oldest entry (if the maximal size was reached).

additionally I fixed some bugs in ConfigValueContainer and added a mod-function to Math.h, that does basically the same as %, but without returning a negative value in case of a negative input.

-1 % 10 = -1
-11 % 10 = -1

mod(-1, 10) = 9
mod(-11, 10) = 9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/core/ConfigValueContainer.h

    r1321 r1324  
    9090            }
    9191
     92            template <typename T>
     93            inline void setVectorType(const std::vector<T>& value)
     94            {
     95                this->value_ = T();
     96            }
     97
    9298            inline const std::string& getName() const
    9399                { return this->varname_; }
Note: See TracChangeset for help on using the changeset viewer.