- Timestamp:
- Mar 30, 2010, 12:13:33 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gamestate/src/libraries/core/input/InputHandler.h
r6105 r6657 112 112 virtual ~InputHandler() { } 113 113 114 template<class T> void buttonEvent(unsigned int device, const T&button, ButtonEvent::TPress)114 template<class T> void buttonEvent(unsigned int device, T button, ButtonEvent::TPress) 115 115 { this->buttonPressed(button); } 116 template<class T> void buttonEvent(unsigned int device, const T&button, ButtonEvent::TRelease)116 template<class T> void buttonEvent(unsigned int device, T button, ButtonEvent::TRelease) 117 117 { this->buttonReleased(button); } 118 template<class T> void buttonEvent(unsigned int device, const T&button, ButtonEvent::THold)118 template<class T> void buttonEvent(unsigned int device, T button, ButtonEvent::THold) 119 119 { this->buttonHeld(button); } 120 void buttonEvent(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::TPress)120 template<> void buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::TPress) 121 121 { this->buttonPressed(device - InputDeviceEnumerator::FirstJoyStick, button); } 122 void buttonEvent(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::TRelease)122 template<> void buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::TRelease) 123 123 { this->buttonReleased(device - InputDeviceEnumerator::FirstJoyStick, button); } 124 void buttonEvent(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::THold)124 template<> void buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::THold) 125 125 { this->buttonHeld(device - InputDeviceEnumerator::FirstJoyStick, button); } 126 126
Note: See TracChangeset
for help on using the changeset viewer.