Fix Menu crash for tab switching on blacksmith (inactive scrolled menu items were unfocused and unselectable). Added sound effect for toggling button icon sets. Fix Key DrawInput functions to respect new extended icon types. Bosses now respect boundaries of boss arenas. Release Build 7474.
This commit is contained in:
@@ -327,7 +327,8 @@ void Menu::InitializeCharacterMenuWindow(){
|
||||
{{game->KEY_MOUSE_RIGHT,Pressed},{[](MenuFuncData data){
|
||||
if(!data.menu.GetSelection().expired()&&
|
||||
data.menu.GetSelection().lock()->GetName().starts_with("Equip Slot ")){
|
||||
if(!ISBLANK(Inventory::GetEquip(EquipSlot(data.menu.GetSelection().lock()->I(Attribute::EQUIP_TYPE))))){
|
||||
EquipSlot slot=EquipSlot(data.menu.GetSelection().lock()->I(Attribute::EQUIP_TYPE));
|
||||
if(!ISBLANK(Inventory::GetEquip(slot))){
|
||||
return "Unequip";
|
||||
}
|
||||
}
|
||||
@@ -335,16 +336,22 @@ void Menu::InitializeCharacterMenuWindow(){
|
||||
},[](MenuType type){
|
||||
if(!Menu::menus[type]->GetSelection().expired()&&
|
||||
Menu::menus[type]->GetSelection().lock()->GetName().starts_with("Equip Slot ")){
|
||||
if(!ISBLANK(Inventory::GetEquip(EquipSlot(Menu::menus[type]->GetSelection().lock()->I(Attribute::EQUIP_TYPE))))){
|
||||
Inventory::UnequipItem(EquipSlot(Menu::menus[type]->GetSelection().lock()->I(Attribute::EQUIP_TYPE)));
|
||||
SoundEffect::PlaySFX("Unequip Armor",SoundEffect::CENTERED);
|
||||
EquipSlot slot=EquipSlot(Menu::menus[type]->GetSelection().lock()->I(Attribute::EQUIP_TYPE));
|
||||
if(!ISBLANK(Inventory::GetEquip(slot))){
|
||||
Inventory::UnequipItem(slot);
|
||||
if(slot&EquipSlot::RING1||slot&EquipSlot::RING2){
|
||||
SoundEffect::PlaySFX("Unequip Accessory",SoundEffect::CENTERED);
|
||||
}else{
|
||||
SoundEffect::PlaySFX("Unequip Armor",SoundEffect::CENTERED);
|
||||
}
|
||||
}
|
||||
}
|
||||
}}},
|
||||
{{game->KEY_FACELEFT,Pressed},{[](MenuFuncData data){
|
||||
if(!data.menu.GetSelection().expired()&&
|
||||
data.menu.GetSelection().lock()->GetName().starts_with("Equip Slot ")){
|
||||
if(!ISBLANK(Inventory::GetEquip(EquipSlot(data.menu.GetSelection().lock()->I(Attribute::EQUIP_TYPE))))){
|
||||
EquipSlot slot=EquipSlot(data.menu.GetSelection().lock()->I(Attribute::EQUIP_TYPE));
|
||||
if(!ISBLANK(Inventory::GetEquip(slot))){
|
||||
return "Unequip";
|
||||
}
|
||||
}
|
||||
@@ -352,9 +359,14 @@ void Menu::InitializeCharacterMenuWindow(){
|
||||
},[](MenuType type){
|
||||
if(!Menu::menus[type]->GetSelection().expired()&&
|
||||
Menu::menus[type]->GetSelection().lock()->GetName().starts_with("Equip Slot ")){
|
||||
if(!ISBLANK(Inventory::GetEquip(EquipSlot(Menu::menus[type]->GetSelection().lock()->I(Attribute::EQUIP_TYPE))))){
|
||||
Inventory::UnequipItem(EquipSlot(Menu::menus[type]->GetSelection().lock()->I(Attribute::EQUIP_TYPE)));
|
||||
SoundEffect::PlaySFX("Unequip Armor",SoundEffect::CENTERED);
|
||||
EquipSlot slot=EquipSlot(Menu::menus[type]->GetSelection().lock()->I(Attribute::EQUIP_TYPE));
|
||||
if(!ISBLANK(Inventory::GetEquip(slot))){
|
||||
Inventory::UnequipItem(slot);
|
||||
if(slot&EquipSlot::RING1||slot&EquipSlot::RING2){
|
||||
SoundEffect::PlaySFX("Unequip Accessory",SoundEffect::CENTERED);
|
||||
}else{
|
||||
SoundEffect::PlaySFX("Unequip Armor",SoundEffect::CENTERED);
|
||||
}
|
||||
}
|
||||
}
|
||||
}}},
|
||||
|
||||
Reference in New Issue
Block a user