Fix menus being active during screen transitions. Release Build 7905.

mac-build
sigonasr2 9 months ago
parent 9d76814f9a
commit 79d80e3e0d
  1. 8
      Adventures in Lestoria/AdventuresInLestoria.cpp
  2. 1
      Adventures in Lestoria/AdventuresInLestoria.h
  3. 1
      Adventures in Lestoria/Menu.cpp
  4. 2
      Adventures in Lestoria/Version.h
  5. BIN
      x64/Release/Adventures in Lestoria.exe

@ -2981,7 +2981,9 @@ void AiL::RenderMenu(){
if(Menu::alreadyClicked){ //Do not run a click event for this round.
Menu::alreadyClicked=false;
}else{
Menu::stack.back()->Update(this);
if(!MenuClicksDeactivated()){
Menu::stack.back()->Update(this);
}
}
for(Menu*menu:Menu::stack){
if(menu->cover)FillRectDecal({0,0},WINDOW_SIZE,{0,0,0,uint8_t(255*0.4)});
@ -3369,6 +3371,10 @@ void AiL::RenderFadeout(){
#endif
}
bool AiL::MenuClicksDeactivated()const{
return fadeOutDuration>0||disableFadeIn||LoadingScreen::loading;
}
bool AiL::GamePaused(){
return fadeOutDuration>0||disableFadeIn||paused||LoadingScreen::loading;
}

@ -205,6 +205,7 @@ public:
void RenderWorld(float fElapsedTime);
void RenderHud();
void RenderMenu();
bool MenuClicksDeactivated()const;
void AddEffect(std::unique_ptr<Effect>foreground,std::unique_ptr<Effect>background);
//If back is true, places the effect in the background
void AddEffect(std::unique_ptr<Effect>foreground,bool back=false);

@ -46,6 +46,7 @@ All rights reserved.
#include "MenuItemItemButton.h"
#include <variant>
#include "SoundEffect.h"
#include "LoadingScreen.h"
INCLUDE_ITEM_CATEGORIES
INCLUDE_DATA

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0
#define VERSION_MINOR 4
#define VERSION_PATCH 4
#define VERSION_BUILD 7902
#define VERSION_BUILD 7905
#define stringify(a) stringify_(a)
#define stringify_(a) #a

Loading…
Cancel
Save