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

mac-build
sigonasr2 9 months ago
parent 9d76814f9a
commit 79d80e3e0d
  1. 6
      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,8 +2981,10 @@ void AiL::RenderMenu(){
if(Menu::alreadyClicked){ //Do not run a click event for this round. if(Menu::alreadyClicked){ //Do not run a click event for this round.
Menu::alreadyClicked=false; Menu::alreadyClicked=false;
}else{ }else{
if(!MenuClicksDeactivated()){
Menu::stack.back()->Update(this); Menu::stack.back()->Update(this);
} }
}
for(Menu*menu:Menu::stack){ for(Menu*menu:Menu::stack){
if(menu->cover)FillRectDecal({0,0},WINDOW_SIZE,{0,0,0,uint8_t(255*0.4)}); if(menu->cover)FillRectDecal({0,0},WINDOW_SIZE,{0,0,0,uint8_t(255*0.4)});
menu->Draw(this); menu->Draw(this);
@ -3369,6 +3371,10 @@ void AiL::RenderFadeout(){
#endif #endif
} }
bool AiL::MenuClicksDeactivated()const{
return fadeOutDuration>0||disableFadeIn||LoadingScreen::loading;
}
bool AiL::GamePaused(){ bool AiL::GamePaused(){
return fadeOutDuration>0||disableFadeIn||paused||LoadingScreen::loading; return fadeOutDuration>0||disableFadeIn||paused||LoadingScreen::loading;
} }

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

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

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

Loading…
Cancel
Save