Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 12, 2009, 8:20:07 PM (15 years ago)
Author:
rgrieder
Message:

Merged core5 branch back to the trunk.
Key features include clean level unloading and an extended XML event system.

Two important notes:
Delete your keybindings.ini files! * or you will still get parser errors when loading the key bindings.
Delete build_dir/lib/modules/libgamestates.module! * or orxonox won't start.
Best thing to do is to delete the build folder ;)

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/input/KeyDetector.h

    r5781 r5929  
    3232#include "InputPrereqs.h"
    3333
    34 #include <string>
     34#include "util/Singleton.h"
    3535#include "KeyBinder.h"
    3636
    3737namespace orxonox
    3838{
    39     class _CoreExport KeyDetector : public KeyBinder
     39    class _CoreExport KeyDetector : public KeyBinder, public Singleton<KeyDetector>
    4040    {
     41        friend class Singleton<KeyDetector>;
     42
    4143    public:
    4244        KeyDetector();
    4345        ~KeyDetector();
    44         void setCallbackCommand(const std::string& command);
    45         void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList);
     46
     47        void setCallback(Functor* function) { this->callbackFunction_ = function; }
    4648
    4749    private:
    48         std::string callbackCommand_;
     50        KeyDetector(const KeyDetector&);
     51
     52        void callback(const std::string& name);
     53        void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList);
     54        void assignCommands();
     55
     56        Functor* callbackFunction_;
     57        InputState* inputState_;
     58        static std::string callbackCommand_s;
     59        static KeyDetector* singletonPtr_s;
    4960    };
    5061}
Note: See TracChangeset for help on using the changeset viewer.