Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 23, 2008, 12:15:09 AM (16 years ago)
Author:
rgrieder
Message:
  • Fixed issue with relative mouse movements.
  • Fixed bug when parsing commands in keybindings.ini
  • Fixed potential framerate dependency with relative movements
  • Simplified the use of a configured input command
  • Changed how parametrised input is handled (superposition and [-1,1]-clamp instead of average).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/core/ConsoleCommand.h

    r1755 r2001  
    122122                { return this->argumentList_.end(); }
    123123
     124            inline ConsoleCommand& setAsInputCommand()
     125            {
     126                this->keybindMode(KeybindMode::OnHold);
     127                this->defaultValue(0, Vector2(0.0f, 0.0f));
     128                this->inputConfiguredParam(0);
     129                return *this;
     130            }
     131
    124132            inline ConsoleCommand& keybindMode(KeybindMode::Enum mode)
    125133                { this->keybindMode_ = mode; return *this; }
     
    127135                { return this->keybindMode_; }
    128136
    129             inline ConsoleCommand& axisParamIndex(int index)
    130                 { this->axisParamIndex_ = index; return *this; }
    131             inline int getAxisParamIndex() const
    132                 { return this->axisParamIndex_; }
    133 
    134             inline ConsoleCommand& isAxisRelative(bool val)
    135                 { this->bAxisRelative_ = val; return *this; }
    136             inline int getIsAxisRelative() const
    137                 { return this->bAxisRelative_; }
     137            inline ConsoleCommand& inputConfiguredParam(int index)
     138                { this->inputConfiguredParam_ = index; return *this; }
     139            inline int getInputConfiguredParam_() const
     140                { return this->inputConfiguredParam_; }
    138141
    139142        private:
     
    143146
    144147            KeybindMode::Enum keybindMode_;
    145             int axisParamIndex_;
    146             bool bAxisRelative_;
     148            int inputConfiguredParam_;
    147149    };
    148150
Note: See TracChangeset for help on using the changeset viewer.