Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 19, 2009, 5:31:02 PM (15 years ago)
Author:
rgrieder
Message:

Merged all remaining revisions from core4 back to the trunk.

Location:
code/trunk
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/core/input/JoyStickQuantityListener.cc

    r3276 r3327  
    2727 */
    2828
    29 /**
    30 @file
    31 @brief
    32     Implementation of the JoyStickQuantityListener class.
    33 */
     29#include "JoyStickQuantityListener.h"
    3430
    35 #include "JoyStickQuantityListener.h"
    3631#include "core/CoreIncludes.h"
     32#include "core/ObjectList.h"
    3733
    3834namespace orxonox
    3935{
     36    std::vector<JoyStick*> JoyStickQuantityListener::joyStickList_s;
     37
    4038    JoyStickQuantityListener::JoyStickQuantityListener()
    4139    {
    4240        RegisterObject(JoyStickQuantityListener);
    4341    }
     42
     43    //! Calls all registered objects and sets the static variable
     44    /*static*/ void JoyStickQuantityListener::changeJoyStickQuantity(const std::vector<JoyStick*>& joyStickList)
     45    {
     46        joyStickList_s = joyStickList;
     47        for (ObjectList<JoyStickQuantityListener>::iterator it = ObjectList<JoyStickQuantityListener>::begin(); it; ++it)
     48            it->JoyStickQuantityChanged(joyStickList);
     49    }
    4450}
Note: See TracChangeset for help on using the changeset viewer.