Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 14, 2009, 1:59:39 PM (16 years ago)
Author:
rgrieder
Message:

Added documentation for the InputState.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/src/core/input/InputState.cc

    r3288 r3292  
    3232namespace orxonox
    3333{
     34    //! Sets priority of it's a high priority and resizes the handler list
    3435    InputState::InputState(const std::string& name, bool bAlwaysGetsInput, bool bTransparent, InputStatePriority priority)
    3536        : name_(name)
     
    4748            priority_ = 0;
    4849
    49         handlers_.resize(InputDeviceEnumerator::FirstJoyStick + JoyStickQuantityListener::getJoyStickList().size(), NULL);
     50        handlers_.resize(InputDeviceEnumerator::FirstJoyStick + this->getJoyStickList().size(), NULL);
    5051    }
    5152
     
    5859    }
    5960
     61    //! Called by JoyStickQuantityListener upon joy stick adding/removal
    6062    void InputState::JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList)
    6163    {
     
    6971    }
    7072
    71     /**
    72     @brief
    73         Adds a joy stick handler.
    74     @param handler
    75         Pointer to the handler object.
    76     @param joyStickID
    77         ID of the joy stick
    78     @return
    79         True if added, false otherwise.
    80     */
    8173    bool InputState::setJoyStickHandler(InputHandler* handler, unsigned int joyStick)
    8274    {
     
    9082    }
    9183
    92     /**
    93     @brief
    94         Adds a joy stick handler.
    95     @param handler
    96         Pointer to the handler object.
    97     @return
    98         True if added, false if handler already existed.
    99     */
    100     bool InputState::setJoyStickHandler(InputHandler* handler)
     84    void InputState::setJoyStickHandler(InputHandler* handler)
    10185    {
    10286        joyStickHandlerAll_ = handler;
     
    10488            handlers_[i] = handler;
    10589        bExpired_ = true;
    106         return true;
    10790    }
    10891
    109     /**
    110     @brief
    111         Adds a handler of any kind. dynamic_cast determines to which list it is added.
    112     @param handler
    113         Pointer to the handler object.
    114     @return
    115         True if added, false if handler already existed.
    116     */
    117     bool InputState::setHandler(InputHandler* handler)
     92    void InputState::setHandler(InputHandler* handler)
    11893    {
    11994        setKeyHandler(handler);
    12095        setMouseHandler(handler);
    121         return setJoyStickHandler(handler);
     96        setJoyStickHandler(handler);
    12297    }
    12398
Note: See TracChangeset for help on using the changeset viewer.