Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 10, 2008, 1:37:36 AM (16 years ago)
Author:
rgrieder
Message:

merged gui back to trunk.
update the media repository!

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/core/input/Button.h

    r1535 r1755  
    2828
    2929/**
    30  @file
    31  @brief Different definitions of input processing.
    32  */
     30@file
     31@brief
     32    Different definitions of input processing.
     33*/
    3334
    3435#ifndef _Button_H__
     
    4243namespace orxonox
    4344{
    44   class _CoreExport Button
    45   {
    46   public:
    47     Button() { nCommands_[0]=0; nCommands_[1]=0; nCommands_[2]=0; clear(); }
    48     virtual ~Button() { clear(); }
    49     virtual void clear();
    50     virtual bool addParamCommand(ParamCommand* command) { return false; }
    51     void parse(std::vector<BufferedParamCommand*>& paramCommandBuffer);
    52     bool execute(KeybindMode::Enum mode, float abs = 1.0f, float rel = 1.0f);
     45    class _CoreExport Button
     46    {
     47    public:
     48        Button() { nCommands_[0]=0; nCommands_[1]=0; nCommands_[2]=0; clear(); }
     49        virtual ~Button() { clear(); }
     50        virtual void clear();
     51        virtual bool addParamCommand(ParamCommand* command) { return false; }
     52        void parse(std::vector<BufferedParamCommand*>& paramCommandBuffer);
     53        bool execute(KeybindMode::Enum mode, float abs = 1.0f, float rel = 1.0f);
    5354
    54     //! The configured string value
    55     std::string bindingString_;
    56     //! Name of the trigger as strings
    57     std::string name_;
    58     //! Basic commands for OnPress, OnHold and OnRelease
    59     BaseCommand** commands_[3];
    60     //! Number of basic commands
    61     unsigned int nCommands_[3];
    62     //! Says how much it takes for an analog axis to trigger a button
    63     //! Note: This variable is here to have only one parse() function.
    64     float buttonThreshold_;
    65   };
     55        //! The configured string value
     56        std::string bindingString_;
     57        //! Name of the trigger as strings
     58        std::string name_;
     59        //! Basic commands for OnPress, OnHold and OnRelease
     60        BaseCommand** commands_[3];
     61        //! Number of basic commands
     62        unsigned int nCommands_[3];
     63        //! Says how much it takes for an analog axis to trigger a button
     64        //! Note: This variable is here to have only one parse() function.
     65        float buttonThreshold_;
     66
     67    private:
     68        void parseError(std::string message, bool serious);
     69    };
    6670}
    6771
Note: See TracChangeset for help on using the changeset viewer.