Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 19, 2008, 2:58:22 PM (17 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/ConfigValueIncludes.h

    r1062 r1324  
    6969            temp.push_back(MultiTypeMath(defvalue[i])); \
    7070        container##varname = new orxonox::ConfigValueContainer(CFT_Settings, this->getIdentifier(), #varname, temp); \
     71        container##varname->setVectorType(varname); \
    7172        this->getIdentifier()->addConfigValueContainer(#varname, container##varname); \
    7273    } \
Note: See TracChangeset for help on using the changeset viewer.