|
|
@ -100,13 +100,16 @@ public: |
|
|
|
std::string itemName=itemRef.lock()->DisplayName(); |
|
|
|
std::string itemName=itemRef.lock()->DisplayName(); |
|
|
|
vf2d scaledSize={std::min(1.f,(rect.size.x-6-iconSize.x)/game->GetTextSizeProp(itemName).x),1}; |
|
|
|
vf2d scaledSize={std::min(1.f,(rect.size.x-6-iconSize.x)/game->GetTextSizeProp(itemName).x),1}; |
|
|
|
|
|
|
|
|
|
|
|
if(!canEnhance&&fadeOutIfMissingRequirements){ |
|
|
|
bool missingRequirements=!canEnhance&&fadeOutIfMissingRequirements; |
|
|
|
itemName="#666666"+itemName; |
|
|
|
|
|
|
|
|
|
|
|
Pixel itemNameTextCol=WHITE; |
|
|
|
|
|
|
|
if(missingRequirements){ |
|
|
|
|
|
|
|
itemNameTextCol=DARK_GREY; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(locked&&hideLabelWhileLocked)std::for_each(itemName.begin(),itemName.end(),[](char&c){if(c>='0'&&c<='z'){c='?';}}); |
|
|
|
if(locked&&hideLabelWhileLocked)std::for_each(itemName.begin(),itemName.end(),[](char&c){if(c>='0'&&c<='z'){c='?';}}); |
|
|
|
|
|
|
|
|
|
|
|
window.DrawShadowStringPropDecal(rect.pos+vf2d{4,4}+vf2d{iconSize.x,iconSize.y/2-4},itemName,WHITE,BLACK,scaledSize); |
|
|
|
window.DrawShadowStringPropDecal(rect.pos+vf2d{4,4}+vf2d{iconSize.x,iconSize.y/2-4},itemName,itemNameTextCol,BLACK,scaledSize); |
|
|
|
#pragma endregion |
|
|
|
#pragma endregion |
|
|
|
|
|
|
|
|
|
|
|
if(showQuantity&&itemRef.lock()->Amt()!=INFINITE){ |
|
|
|
if(showQuantity&&itemRef.lock()->Amt()!=INFINITE){ |
|
|
|