1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-29 03:33:48 +00:00

block help screen from accidentally opening in key config menu, and make sure (?)-button isn't shown

This commit is contained in:
fgenesis 2019-03-24 19:45:52 +01:00
parent 0abe0f821c
commit 0f0d839fc7
4 changed files with 12 additions and 3 deletions

View file

@ -2521,6 +2521,11 @@ float Game::getHalfTimer(float mod)
return halfTimer*mod;
}
void Game::toggleHelpScreen()
{
action(ACTION_TOGGLEHELPSCREEN, 0, -1, INPUT_NODEVICE);
}
void Game::action(int id, int state, int source, InputDevice device)
{
for (size_t i = 0; i < paths.size(); i++)
@ -3528,7 +3533,7 @@ void Game::onToggleHelpScreen()
{
if (inHelpScreen)
toggleHelpScreen(false);
else if (core->isStateJumpPending())
else if (core->isStateJumpPending() || themenu->isInKeyConfigMenu())
return;
else
{

View file

@ -443,7 +443,7 @@ public:
bool cameraOffBounds;
void toggleHelpScreen() { action(ACTION_TOGGLEHELPSCREEN, 0, -1, INPUT_NODEVICE); }
void toggleHelpScreen();
void setWorldPaused(bool b) { worldPaused = b; }
bool isWorldPaused() const { return worldPaused; }

View file

@ -3929,13 +3929,15 @@ void InGameMenu::toggleOptionsMenu(bool f, bool skipBackup, bool isKeyConfig)
{
for (int i = 0; i <= 1; i++)
menu[i]->alpha.interpolateTo(1, t);
for (int i = 4; i <= 9; i++)
for (int i = 4; i <= 8; i++)
{
menu[i]->alpha.interpolateTo(1, t);
}
if (!isKeyConfig)
{
menu[9]->alpha.interpolateTo(1, t);
switch(lastOptionsMenuPage)
{
case MENUPAGE_FOOD:

View file

@ -96,6 +96,8 @@ public:
float menuSelectDelay;
bool isInKeyConfigMenu() const { return keyConfigMenu; }
private:
void updateOptionsMenu(float dt);
void updateKeyConfigMenu(float dt);