mirror of
https://github.com/glest/glest-source.git
synced 2025-08-21 07:31:21 +02:00
- bugfix for keydown event in intro and battle end screens (missed htis when converted to SDL keys)
This commit is contained in:
@@ -435,9 +435,9 @@ void BattleEnd::render() {
|
||||
renderer.swapBuffers();
|
||||
}
|
||||
|
||||
void BattleEnd::keyDown(char key){
|
||||
void BattleEnd::keyDown(SDL_KeyboardEvent key){
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(key == vkEscape || key == SDLK_ESCAPE) {
|
||||
if(isKeyPressed(SDLK_ESCAPE,key) == true) {
|
||||
//program->setState(new MainMenu(program));
|
||||
|
||||
if(mainMessageBox.getEnabled()) {
|
||||
@@ -448,7 +448,7 @@ void BattleEnd::keyDown(char key){
|
||||
showMessageBox(lang.get("ExitGame?"), "", true);
|
||||
}
|
||||
}
|
||||
else if(key == vkReturn && mainMessageBox.getEnabled()) {
|
||||
else if(isKeyPressed(SDLK_RETURN,key) && mainMessageBox.getEnabled()) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
program->setState(new MainMenu(program));
|
||||
}
|
||||
|
@@ -45,7 +45,7 @@ public:
|
||||
|
||||
virtual void update();
|
||||
virtual void render();
|
||||
virtual void keyDown(char key);
|
||||
virtual void keyDown(SDL_KeyboardEvent key);
|
||||
virtual void mouseDownLeft(int x, int y);
|
||||
virtual void mouseMove(int x, int y, const MouseState *ms);
|
||||
//virtual void tick();
|
||||
|
@@ -743,7 +743,7 @@ void Intro::render() {
|
||||
renderer.swapBuffers();
|
||||
}
|
||||
|
||||
void Intro::keyDown(char key){
|
||||
void Intro::keyDown(SDL_KeyboardEvent key) {
|
||||
mouseUpLeft(0, 0);
|
||||
}
|
||||
|
||||
|
@@ -119,7 +119,7 @@ public:
|
||||
|
||||
virtual void update();
|
||||
virtual void render();
|
||||
virtual void keyDown(char key);
|
||||
virtual void keyDown(SDL_KeyboardEvent key);
|
||||
virtual void mouseUpLeft(int x, int y);
|
||||
void mouseMove(int x, int y, const MouseState *ms);
|
||||
};
|
||||
|
Reference in New Issue
Block a user