allow each language to specify special keys allowed for that language (bugfix for polish)

This commit is contained in:
Mark Vejvoda
2013-06-05 05:53:59 +00:00
parent c54251c12c
commit 173075d962
3 changed files with 97 additions and 0 deletions

View File

@@ -121,6 +121,7 @@ private:
static void setKeystate(SDL_keysym state) { keystate = state; }
//static bool masterserverMode;
static map<wchar_t,bool> mapAllowedKeys;
protected:
int w, h;
@@ -144,6 +145,10 @@ public:
Window();
virtual ~Window();
static void addAllowedKeys(string keyList);
static void clearAllowedKeys();
static bool isAllowedKey(wchar_t key);
virtual bool ChangeVideoMode(bool preserveContext,int resWidth, int resHeight,
bool fullscreenWindow, int colorBits, int depthBits, int stencilBits,
bool hardware_acceleration, bool fullscreen_anti_aliasing,
@@ -214,6 +219,8 @@ private:
//static char getKey(SDL_keysym keysym, bool skipSpecialKeys=false);
//static char getNormalKey(SDL_keysym keysym,bool skipSpecialKeys=false);
static void toggleFullscreen();
static wchar_t convertStringtoSDLKey(const string &value);
};
bool isKeyPressed(SDLKey compareKey, SDL_KeyboardEvent input, vector<int> modifiersToCheck);