1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-02-27 00:24:01 +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; return halfTimer*mod;
} }
void Game::toggleHelpScreen()
{
action(ACTION_TOGGLEHELPSCREEN, 0, -1, INPUT_NODEVICE);
}
void Game::action(int id, int state, int source, InputDevice device) void Game::action(int id, int state, int source, InputDevice device)
{ {
for (size_t i = 0; i < paths.size(); i++) for (size_t i = 0; i < paths.size(); i++)
@ -3528,7 +3533,7 @@ void Game::onToggleHelpScreen()
{ {
if (inHelpScreen) if (inHelpScreen)
toggleHelpScreen(false); toggleHelpScreen(false);
else if (core->isStateJumpPending()) else if (core->isStateJumpPending() || themenu->isInKeyConfigMenu())
return; return;
else else
{ {

View file

@ -443,7 +443,7 @@ public:
bool cameraOffBounds; bool cameraOffBounds;
void toggleHelpScreen() { action(ACTION_TOGGLEHELPSCREEN, 0, -1, INPUT_NODEVICE); } void toggleHelpScreen();
void setWorldPaused(bool b) { worldPaused = b; } void setWorldPaused(bool b) { worldPaused = b; }
bool isWorldPaused() const { return worldPaused; } 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++) for (int i = 0; i <= 1; i++)
menu[i]->alpha.interpolateTo(1, t); 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); menu[i]->alpha.interpolateTo(1, t);
} }
if (!isKeyConfig) if (!isKeyConfig)
{ {
menu[9]->alpha.interpolateTo(1, t);
switch(lastOptionsMenuPage) switch(lastOptionsMenuPage)
{ {
case MENUPAGE_FOOD: case MENUPAGE_FOOD:

View file

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