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
+12
View File
@@ -292,6 +292,18 @@ void Menu::Update(Crawler*game){
}
KeyboardButtonNavigation(game,pos);
for(auto&[key,value]:buttons){
for(auto&button:value){
if(button->renderInMain){
button->BeforeUpdate(game);
}
}
}
for(auto&component:displayComponents){
if(component->renderInMain){
component->BeforeUpdate(game);
}
}
for(auto&[key,value]:buttons){
for(auto&button:value){
if(button->renderInMain){