Add a BeforeUpdate event for components to handle mouse out events (specifically for equip item slots showing stat differences.) Corrects a bug with stat differences not refreshing on mouse out.

This commit is contained in:
2023-12-08 16:36:51 -06:00
parent 4ab88b3014
commit ae2d1719c8
7 changed files with 43 additions and 14 deletions
+2
View File
@@ -67,6 +67,8 @@ MenuComponent::~MenuComponent(){
void MenuComponent::AfterCreate(){}
void MenuComponent::BeforeUpdate(Crawler*game){}
void MenuComponent::Update(Crawler*game){
if(hovered){
hoverEffect=std::min("ThemeGlobal.HighlightTime"_F,hoverEffect+game->GetElapsedTime());