From 604511d8e9188324b5b286b68bf2d65ad7a2ddfa Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Tue, 16 Jan 2024 17:14:33 -0600 Subject: [PATCH] Fix menu components not being clickable. --- Adventures in Lestoria/Menu.cpp | 6 +++--- Adventures in Lestoria/Version.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Adventures in Lestoria/Menu.cpp b/Adventures in Lestoria/Menu.cpp index 3616ea09..a2cff2ed 100644 --- a/Adventures in Lestoria/Menu.cpp +++ b/Adventures in Lestoria/Menu.cpp @@ -148,8 +148,8 @@ void Menu::HoverMenuSelect(AiL*game){ } void Menu::MenuSelect(AiL*game){ - if(!game->IsFocused()||selection.expired()||(selection.lock()->disabled||selection.lock()->grayedOut))return; - bool buttonStillValid=selection.lock()->onClick(MenuFuncData{*this,game,selection,DYNAMIC_POINTER_CAST(selection.lock()->parentComponent.lock())}); + if(!game->IsFocused()||selection.expired()||selection.lock()->disabled||selection.lock()->grayedOut)return; + bool buttonStillValid=selection.lock()->onClick(MenuFuncData{*this,game,selection,dynamic_pointer_cast(selection.lock()->parentComponent.lock())}); if(buttonStillValid){ if(selection.lock()->menuDest!=MenuType::ENUM_END){ if(stack.size()<32){ @@ -162,7 +162,7 @@ void Menu::MenuSelect(AiL*game){ } void Menu::Update(AiL*game){ - if(draggingComponent){ + if(!draggingComponent){ HoverMenuSelect(game); } diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index e12e6f73..fcd8522e 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 5944 +#define VERSION_BUILD 5947 #define stringify(a) stringify_(a) #define stringify_(a) #a