29 #ifndef _InputState_H__ 30 #define _InputState_H__ 44 #define INPUT_STATE_PUSH_CALL(deviceIndex, functionName, ...) \ 45 InputManager::getInstance().pushCall(std::function<void ()>(std::bind(&InputHandler::functionName, handlers_[deviceIndex], __VA_ARGS__))) 97 { handlers_[keyboardIndex_s] = handler; bExpired_ =
true; }
100 { handlers_[mouseIndex_s] = handler; bExpired_ =
true; }
107 bool setJoyStickHandler(
InputHandler* handler,
unsigned int joyStick);
122 bool isInputDeviceEnabled(
unsigned int device);
130 void update(
float dt,
unsigned int device);
132 void update(
float dt);
135 template <
typename EventType,
class ButtonTypeParam>
136 void buttonEvent(
unsigned int device, ButtonTypeParam button);
141 void mouseScrolled(
int abs,
int rel);
143 void joyStickAxisMoved(
unsigned int device,
unsigned int axis,
float value);
159 virtual void JoyStickQuantityChanged(
const std::vector<JoyStick*>& joyStickList)
override;
179 for (
unsigned int i = 0; i < handlers_.size(); ++i)
180 if (handlers_[i] !=
nullptr)
189 if (handlers_[keyboardIndex_s] !=
nullptr)
194 if (handlers_[mouseIndex_s] !=
nullptr)
199 if (handlers_[device] !=
nullptr)
205 template <
typename EventType,
class ButtonTypeParam>
208 assert(device < handlers_.size());
209 if (handlers_[device] !=
nullptr)
212 void (
InputHandler::*
function)(
unsigned int, ButtonTypeParam, EventType) = &InputHandler::buttonEvent<ButtonTypeParam>;
219 if (handlers_[mouseIndex_s] !=
nullptr)
225 if (handlers_[mouseIndex_s] !=
nullptr)
231 assert(device < handlers_.size());
232 if (handlers_[device] !=
nullptr)
std::shared_ptr< Functor > FunctorPtr
Definition: FunctorPtr.h:57
Derive from this class to get informed when joy sticks get added/removed.
Definition: JoyStickQuantityListener.h:45
::std::string string
Definition: gtest-port.h:756
typedef void(ENET_CALLBACK *ENetPacketFreeCallback)(struct _ENetPacket *)
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
#define _CoreExport
Definition: CorePrereqs.h:61
A 3-state boolean type.
Definition: tribool.h:38
A Vector class containing two integers x and y.
Definition: InputHandler.h:37
#define ORX_FORCEINLINE
Definition: OrxonoxConfig.h:95
internal::String name_
Definition: gtest.cc:2289