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:
@@ -177,7 +177,14 @@ void Menu::InitializeCharacterMenuWindow(){
|
||||
Inventory::EquipItem(*equippedItem,slot);
|
||||
}
|
||||
return true;
|
||||
},DO_NOTHING);
|
||||
},[](MenuFuncData data){
|
||||
for(int counter=0;ItemAttribute attribute:displayAttrs){
|
||||
StatLabel*statDisplayLabel=Component<StatLabel>(CHARACTER_MENU,"Attribute "+ItemAttributable::GetDisplayInfo(attribute).name+" Label");
|
||||
statDisplayLabel->SetStatChangeAmt(0);
|
||||
counter++;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
equip->I(Attribute::EQUIP_TYPE)=int(slot);
|
||||
if(Inventory::GetEquip(slot)==&itemInvRef){
|
||||
equip->SetSelected(true);
|
||||
|
||||
Reference in New Issue
Block a user