Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7891 for code/trunk/src


Ignore:
Timestamp:
Feb 14, 2011, 10:30:01 PM (14 years ago)
Author:
landauf
Message:

keybind mode shouldn't be changed if it was defined explicitly in the keybindings.ini

Location:
code/trunk/src/libraries/core/input
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/input/Button.cc

    r7401 r7891  
    219219                        }
    220220                    }
     221                    else
     222                        cmd->setFixedKeybindMode(true);
    221223                }
    222224                else
     
    227229                    if (mode == KeybindMode::None)
    228230                        mode = eval.getConsoleCommand()->getKeybindMode();
     231                    else
     232                        cmd->setFixedKeybindMode(true);
    229233
    230234                    commands[mode].push_back(cmd);
  • code/trunk/src/libraries/core/input/InputCommands.h

    r7861 r7891  
    5656    {
    5757    public:
     58        BaseCommand() : bFixedKeybindMode_(false) {}
    5859        virtual ~BaseCommand() { }
     60
    5961        virtual bool execute(float abs = 1.0f, float rel = 1.0f) = 0;
    6062        virtual CommandEvaluation* getEvaluation() = 0;
     63
     64        inline void setFixedKeybindMode(bool fixed)
     65            { this->bFixedKeybindMode_ = fixed; }
     66        inline bool hasFixedKeybindMode() const
     67            { return this->bFixedKeybindMode_; }
     68
     69    private:
     70        bool bFixedKeybindMode_;
    6171    };
    6272
  • code/trunk/src/libraries/core/input/KeyBinder.cc

    r7861 r7891  
    404404                for (size_t command_index = 0; command_index < button->nCommands_[mode_index]; ++command_index)
    405405                {
     406                    if (button->commands_[mode_index][command_index]->hasFixedKeybindMode())
     407                        continue;
     408
    406409                    CommandEvaluation* evaluation = button->commands_[mode_index][command_index]->getEvaluation();
    407410
Note: See TracChangeset for help on using the changeset viewer.