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:
@@ -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();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user