2012-07-22 21:15:55 +00:00
|
|
|
#ifndef _GUIINPUTCONFIG_H_
|
|
|
|
#define _GUIINPUTCONFIG_H_
|
|
|
|
|
|
|
|
#include "../GuiComponent.h"
|
|
|
|
#include "../InputManager.h"
|
|
|
|
#include <map>
|
|
|
|
#include <SDL/SDL.h>
|
|
|
|
|
|
|
|
class GuiInputConfig : GuiComponent {
|
|
|
|
public:
|
|
|
|
GuiInputConfig();
|
|
|
|
~GuiInputConfig();
|
|
|
|
|
|
|
|
void onRender();
|
|
|
|
void onInput(InputManager::InputButton button, bool keyDown);
|
|
|
|
private:
|
|
|
|
bool mDone;
|
|
|
|
int mInputNum;
|
2012-07-23 17:27:38 +00:00
|
|
|
int mLastAxis;
|
2012-07-22 21:15:55 +00:00
|
|
|
SDL_Joystick* mJoystick;
|
|
|
|
static std::string sInputs[];
|
|
|
|
static int sInputCount;
|
|
|
|
static std::string sConfigPath;
|
|
|
|
|
|
|
|
std::map<int, InputManager::InputButton> mButtonMap;
|
2012-07-23 17:27:38 +00:00
|
|
|
std::map<int, InputManager::InputButton> mAxisPosMap;
|
|
|
|
std::map<int, InputManager::InputButton> mAxisNegMap;
|
2012-07-22 21:15:55 +00:00
|
|
|
void writeConfig(std::string path);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|