Fix hover over label update bug inside character equip menu (thanks to a side effect of updating the item reference).

Applied random stats to equip stats. Made sure that rings that are the same in both equip slots do not cause the stats difference display from showing any actual differences. Prevent accidental unequipping of rings already equipped (if you technically were to swap between them)
This commit is contained in:
2023-12-31 18:05:41 -06:00
parent 4daf4f0135
commit 5a9396fbcb
6 changed files with 64 additions and 41 deletions
+2 -1
View File
@@ -49,12 +49,13 @@ INCLUDE_ITEM_DATA
class MenuItemItemButton:public MenuIconButton{
private:
std::weak_ptr<Item>itemRef;
std::string itemNameLabelName;
std::string itemDescriptionLabelName;
bool hideQty=false;
CompactText compact=COMPACT;
bool hideDetails=false;
protected:
std::weak_ptr<Item>itemRef;
public:
inline MenuItemItemButton(geom2d::rect<float>rect,const std::weak_ptr<Item>itemRef,MenuType menuDest,MenuFunc onClick,std::string itemNameLabelName,std::string itemDescriptionLabelName,IconButtonAttr attributes=IconButtonAttr::SELECTABLE)
:MenuIconButton(rect,!ISBLANK(itemRef)?const_cast<Decal*>(itemRef.lock()->Decal()):nullptr,menuDest,onClick,attributes),itemRef(itemRef),itemNameLabelName(itemNameLabelName),itemDescriptionLabelName(itemDescriptionLabelName){