ES-DE/src/InputManager.h

32 lines
777 B
C
Raw Normal View History

#ifndef _INPUTMANAGER_H_
#define _INPUTMANAGER_H_
#include <vector>
#include <SDL/SDL.h>
#include <map>
#include <string>
class GuiComponent;
namespace InputManager {
void registerComponent(GuiComponent* comp);
void unregisterComponent(GuiComponent* comp);
void loadConfig(std::string path);
//enum for identifying input, regardless of configuration
2012-07-23 17:27:38 +00:00
enum InputButton { UNKNOWN, UP, DOWN, LEFT, RIGHT, BUTTON1, BUTTON2 };
void processEvent(SDL_Event* event);
extern std::vector<GuiComponent*> inputVector;
extern SDL_Event* lastEvent; //mostly for GuiInputConfig
extern int deadzone;
extern std::map<int, InputButton> joystickButtonMap;
2012-07-23 17:27:38 +00:00
extern std::map<int, InputButton> joystickAxisPosMap, joystickAxisNegMap;
extern std::map<int, int> axisState;
}
#endif