Add label update manual disable flag for when a label update would cause issues on the character equip menu.

pull/28/head
sigonasr2 11 months ago
parent fccf24c0c9
commit cbdd317068
  1. 2
      Crawler/CharacterMenuWindow.cpp
  2. 6
      Crawler/MenuItemItemButton.h
  3. 2
      Crawler/RowItemDisplay.h
  4. 2
      Crawler/Version.h

@ -162,7 +162,7 @@ void Menu::InitializeCharacterMenuWindow(){
statDisplayLabel->SetStatChangeAmt(0);
}
MenuItemItemButton*equipButton=Component<MenuItemItemButton>(CHARACTER_MENU,"Equip Slot "+slotNames[data.parentComponent->I(A::INDEXED_THEME)]);
equipButton->SetItem(comp->GetItem());
equipButton->SetItem(comp->GetItem(),false);
}
}else{
ERR("WARNING! Attempting to cast a button that isn't a RowItemDisplay!");

@ -73,10 +73,12 @@ public:
inline const std::weak_ptr<Item>GetItem(){
return itemRef;
}
inline const std::weak_ptr<Item>SetItem(const std::weak_ptr<Item>newItem){
inline const std::weak_ptr<Item>SetItem(const std::weak_ptr<Item>newItem,bool labelUpdate=true){
itemRef=newItem;
if(labelUpdate){
UpdateLabel();
}
UpdateIcon();
UpdateLabel();
return itemRef;
}
inline void SetShowQuantity(bool show){

@ -68,7 +68,7 @@ public:
}
virtual inline void DrawDecal(ViewPort&window,bool focused)override{
bool canEnhance=itemRef.lock()->CanEnhanceItem();
bool locked=itemRef.lock()->EnhancementIsPossible()&&itemRef.lock()->GetEnhancementInfo().AvailableChapter()>game->GetCurrentChapter();
bool locked=fadeOutIfMissingRequirements&&itemRef.lock()->EnhancementIsPossible()&&itemRef.lock()->GetEnhancementInfo().AvailableChapter()>game->GetCurrentChapter();
MenuComponent::DrawDecal(window,focused);

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0
#define VERSION_MINOR 2
#define VERSION_PATCH 1
#define VERSION_BUILD 5180
#define VERSION_BUILD 5182
#define stringify(a) stringify_(a)
#define stringify_(a) #a

Loading…
Cancel
Save