Clear input when pressing Escape.
This commit is contained in:
parent
fe55f2e8ba
commit
ac59559d90
|
@ -80,7 +80,6 @@ void initChallengeHome(void)
|
|||
initBackground();
|
||||
|
||||
start = getWidget("start", "challenges");
|
||||
start->enabled = 0;
|
||||
start->action = startChallengeMission;
|
||||
|
||||
getWidget("resume", "challengesMenu")->action = resume;
|
||||
|
@ -168,7 +167,9 @@ static void doChallenges(void)
|
|||
|
||||
updateChallengeMissionData();
|
||||
|
||||
start->enabled = c->available;
|
||||
start->enabled = 1;
|
||||
|
||||
playSound(SND_GUI_CLICK);
|
||||
}
|
||||
|
||||
app.mouse.button[SDL_BUTTON_LEFT] = 0;
|
||||
|
@ -436,7 +437,7 @@ static void handleKeyboard(void)
|
|||
|
||||
playSound(SND_GUI_CLOSE);
|
||||
|
||||
memset(app.keyboard, 0, sizeof(int) * MAX_KEYBOARD_KEYS);
|
||||
clearInput();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@ extern char *getPlanetTextureName(int n);
|
|||
extern void playMusic(char *filename);
|
||||
extern char *timeToString(long millis, int showHours);
|
||||
extern char *getChallengeDescription(Challenge *c);
|
||||
extern void clearInput(void);
|
||||
|
||||
extern App app;
|
||||
extern Battle battle;
|
||||
|
|
|
@ -615,7 +615,7 @@ static void handleKeyboard(void)
|
|||
|
||||
playSound(SND_GUI_CLOSE);
|
||||
|
||||
memset(app.keyboard, 0, sizeof(int) * MAX_KEYBOARD_KEYS);
|
||||
clearInput();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@ extern void updateAllMissions(void);
|
|||
extern StarSystem *getStarSystem(char *name);
|
||||
extern void showOKDialog(void (*callback)(void), const char *format, ...);
|
||||
extern char *getTranslatedString(char *string);
|
||||
extern void clearInput(void);
|
||||
|
||||
extern App app;
|
||||
extern Colors colors;
|
||||
|
|
|
@ -202,6 +202,8 @@ static void handleKeyboard(void)
|
|||
{
|
||||
returnFromOptions();
|
||||
playSound(SND_GUI_CLOSE);
|
||||
|
||||
clearInput();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ extern void initChallengeHome(void);
|
|||
extern void selectWidget(const char *name, const char *group);
|
||||
extern void drawStats(void);
|
||||
extern void updateAllMissions(void);
|
||||
extern void clearInput(void);
|
||||
|
||||
extern App app;
|
||||
extern Battle battle;
|
||||
|
|
Loading…
Reference in New Issue