Changeset 5663 for code/branches/resource2/src/core/input/KeyBinder.h
- Timestamp:
- Aug 19, 2009, 9:30:05 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource2/src/core/input/KeyBinder.h
r3327 r5663 41 41 #include <string> 42 42 #include <vector> 43 #include <boost/shared_ptr.hpp> 43 44 44 45 #include "InputHandler.h" … … 115 116 }; 116 117 //! Actual key bindings for joy stick buttons 117 std::vector< JoyStickButtonVector> joyStickButtons_;118 std::vector<shared_ptr<JoyStickButtonVector> > joyStickButtons_; 118 119 //! Helper class to use something like std:vector<HalfAxis[48]> 119 120 struct JoyStickAxisVector … … 123 124 }; 124 125 //! Actual key bindings for joy stick axes (and sliders) 125 std::vector< JoyStickAxisVector> joyStickAxes_;126 std::vector<shared_ptr<JoyStickAxisVector> > joyStickAxes_; 126 127 127 128 //! Pointer map with all Buttons, including half axes … … 191 192 192 193 inline void KeyBinder::buttonPressed (unsigned int device, JoyStickButtonCode::ByEnum button) 193 { joyStickButtons_[device][button].execute(KeybindMode::OnPress); }194 { (*joyStickButtons_[device])[button].execute(KeybindMode::OnPress); } 194 195 195 196 inline void KeyBinder::buttonReleased(unsigned int device, JoyStickButtonCode::ByEnum button) 196 { joyStickButtons_[device][button].execute(KeybindMode::OnRelease); }197 { (*joyStickButtons_[device])[button].execute(KeybindMode::OnRelease); } 197 198 198 199 inline void KeyBinder::buttonHeld (unsigned int device, JoyStickButtonCode::ByEnum button) 199 { joyStickButtons_[device][button].execute(KeybindMode::OnHold); }200 { (*joyStickButtons_[device])[button].execute(KeybindMode::OnHold); } 200 201 201 202 inline void KeyBinder::allDevicesUpdated(float dt)
Note: See TracChangeset
for help on using the changeset viewer.