diff --git a/Adventures in Lestoria/Menu.cpp b/Adventures in Lestoria/Menu.cpp index 1f8ffa0c..0d303bc5 100644 --- a/Adventures in Lestoria/Menu.cpp +++ b/Adventures in Lestoria/Menu.cpp @@ -59,18 +59,6 @@ safemap>>Menu::merchantInven std::vector>Menu::equipStatListeners; std::vector>Menu::chapterListeners; const vf2d Menu::CENTERED = {-456,-456}; -////////////////////////////////////////////////////////////////////////////////////////////////// -///__///////////////////////////////////////////////////////////////////////////////////////////// -//| |//////////////////////////////////////////////////////////////////////////////////////////// -//| |/////WARNING! If you are adding something here you likely are adding another container with MenuComponent pointers in it right now. -//| |/////Because we are handling raw pointers, you must also add this container to the list of iterating search removal containers that occur in the -//| |/////DESTRUCTOR of MenuComponents!!!!! (Go to MenuComponent::~MenuComponent()) THIS IS NOT A DRILL! -//|__|//////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -///__///////////////////////////////////////////////////////////////////////////////////////////// -//|__///////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// MenuType Menu::lastMenuTypeCreated; std::string Menu::lastRegisteredComponent; @@ -129,7 +117,11 @@ Menu*Menu::CreateMenu(MenuType type,vf2d pos,vf2d size){ void Menu::CheckClickAndPerformMenuSelect(AiL*game){ if(game->KEY_CONFIRM.Released()){ - MenuSelect(game); + if(ignoreInputs){ + ignoreInputs=false; + }else{ + MenuSelect(game); + } } } @@ -234,7 +226,7 @@ void Menu::Update(AiL*game){ } } } - + if(!game->IsTextEntryEnabled()){ KeyboardButtonNavigation(game,pos); } @@ -481,6 +473,7 @@ void Menu::SetMouseNavigation(bool mouseNavigation){ if(MOUSE_NAVIGATION&&!mouseNavigation){ //When mouse navigation was enabled and now needs to be disabled, we store the mouse position. lastActiveMousePos=game->GetMousePos(); + ignoreInputs=true; if(!keyboardSelection.expired()){ SetSelection(keyboardSelection); } diff --git a/Adventures in Lestoria/Menu.h b/Adventures in Lestoria/Menu.h index ff84b270..08633418 100644 --- a/Adventures in Lestoria/Menu.h +++ b/Adventures in Lestoria/Menu.h @@ -250,6 +250,8 @@ private: std::weak_ptrselection; std::weak_ptrkeyboardSelection; + bool ignoreInputs=false; //We set this to true because on the next button release, we don't want buttons to cause menu navigation. This is for when the player needs to activate the cursor via keyboard/gamepad and nothing is highlighted. It gets reset to false once a button has been released. + static bool MOUSE_NAVIGATION; bool cover; //A black cover for when a menu pops up to fade out the stuff behind it. }; diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index b607cf17..ad5a83ec 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 0 #define VERSION_MINOR 2 #define VERSION_PATCH 1 -#define VERSION_BUILD 6014 +#define VERSION_BUILD 6020 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/assets/Campaigns/1_1_v2.tmx b/Adventures in Lestoria/assets/Campaigns/1_1_v2.tmx index c46fa885..f47ff588 100644 --- a/Adventures in Lestoria/assets/Campaigns/1_1_v2.tmx +++ b/Adventures in Lestoria/assets/Campaigns/1_1_v2.tmx @@ -1076,7 +1076,7 @@ - + @@ -1717,14 +1717,14 @@ - + - + diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index a42d66af..8c166ca9 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ