Fixed menu label updates for row item displays. Added a row scrollable inventory window component. Made InventoryScrollableWindowComponent more modular with a couple overrideable functions.

This commit is contained in:
2023-12-17 00:44:22 -06:00
parent e656dc95b2
commit 57377823c5
12 changed files with 183 additions and 61 deletions
+7 -9
View File
@@ -73,7 +73,6 @@ public:
return itemRef.get();
}
inline Item&SetItem(Item&newItem){
UpdateIcon();
return itemRef=std::reference_wrapper<Item>(newItem);
}
inline void SetShowQuantity(bool show){
@@ -83,6 +82,13 @@ public:
if(compact)this->compact=COMPACT;
else this->compact=NON_COMPACT;
}
inline void UpdateIcon(){
if(itemRef.get().IsBlank()){
icon=nullptr;
return;
}
icon=itemRef.get().Decal();
}
protected:
virtual inline void OnMouseOut()override{
if(itemNameLabelName!=""){
@@ -137,12 +143,4 @@ protected:
window.DrawShadowStringDecal(drawPos,quantityText,WHITE,BLACK,quantityTextScale,quantityTextScale.x);
}
}
private:
inline void UpdateIcon(){
if(itemRef.get().IsBlank()){
icon=nullptr;
return;
}
icon=itemRef.get().Decal();
}
};