- Timestamp:
- Apr 16, 2010, 1:42:28 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gamestates2/src/libraries/core/input/InputHandler.h
r6662 r6745 118 118 template<class T> void buttonEvent(unsigned int device, T button, ButtonEvent::THold) 119 119 { this->buttonHeld(button); } 120 template<> void buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::TPress)121 { this->buttonPressed(device - InputDeviceEnumerator::FirstJoyStick, button); }122 template<> void buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::TRelease)123 { this->buttonReleased(device - InputDeviceEnumerator::FirstJoyStick, button); }124 template<> void buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::THold)125 { this->buttonHeld(device - InputDeviceEnumerator::FirstJoyStick, button); }126 120 127 121 virtual void buttonPressed (const KeyEvent& evt) { } … … 149 143 static InputHandler EMPTY; 150 144 }; 145 146 template<> inline void InputHandler::buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::TPress) 147 { this->buttonPressed(device - InputDeviceEnumerator::FirstJoyStick, button); } 148 template<> inline void InputHandler::buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::TRelease) 149 { this->buttonReleased(device - InputDeviceEnumerator::FirstJoyStick, button); } 150 template<> inline void InputHandler::buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::THold) 151 { this->buttonHeld(device - InputDeviceEnumerator::FirstJoyStick, button); } 151 152 } 152 153
Note: See TracChangeset
for help on using the changeset viewer.