|
|
|
@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
|
|
|
|
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
|
|
|
SUCH DAMAGE. |
|
|
|
|
|
|
|
|
|
Portions of this software are copyright © 2023 The FreeType |
|
|
|
|
Portions of this software are copyright <EFBFBD> 2023 The FreeType |
|
|
|
|
Project (www.freetype.org). Please see LICENSE_FT.txt for more information. |
|
|
|
|
All rights reserved. |
|
|
|
|
*/ |
|
|
|
@ -161,7 +161,11 @@ std::function<void(InventoryScrollableWindowComponent&component,ITCategory cat)> |
|
|
|
|
int itemIndex=y*invWidth+x; |
|
|
|
|
auto newItem=c->ADD("item_Weapon_"+std::to_string(itemIndex),RowItemDisplay)(geom2d::rect<float>{totalSpacing*vf2d{float(x),float(y)},buttonSize},weapon,c->inventoryButtonClickAction,c->itemNameLabelName,c->itemDescriptionLabelName,c->inventoryButtonsActive?ButtonAttr::NONE:ButtonAttr::UNSELECTABLE)END; |
|
|
|
|
newItem->SetCompactDescriptions(c->compact); |
|
|
|
|
newItem->SetPriceLabelType(c->priceLabel); |
|
|
|
|
if(Inventory::GetItemCount(weapon.lock()->ActualName())==0){ //An item that is not in our inventory is considered craftable..
|
|
|
|
|
newItem->SetPriceLabelType(PriceLabel::CRAFTABLE); |
|
|
|
|
}else{ //Items that we do have are considered upgradeable.
|
|
|
|
|
newItem->SetPriceLabelType(PriceLabel::UPGRADEABLE); |
|
|
|
|
} |
|
|
|
|
newItem->SetHoverFunc(c->inventoryButtonHoverAction); |
|
|
|
|
newItem->SetMouseOutFunc(c->inventoryButtonMouseOutAction); |
|
|
|
|
newItem->SetCheckCraftingRequirements(true); |
|
|
|
@ -194,7 +198,11 @@ std::function<void(InventoryScrollableWindowComponent&component,ITCategory cat)> |
|
|
|
|
int itemIndex=y*invWidth+x; |
|
|
|
|
auto newItem=c->ADD("item_Armor_"+std::to_string(itemIndex),RowItemDisplay)(geom2d::rect<float>{totalSpacing*vf2d{float(x),float(y)},buttonSize},armor,c->inventoryButtonClickAction,c->itemNameLabelName,c->itemDescriptionLabelName,c->inventoryButtonsActive?ButtonAttr::NONE:ButtonAttr::UNSELECTABLE)END; |
|
|
|
|
newItem->SetCompactDescriptions(c->compact); |
|
|
|
|
newItem->SetPriceLabelType(c->priceLabel); |
|
|
|
|
if(Inventory::GetItemCount(armor.lock()->ActualName())==0){ //An item that is not in our inventory is considered craftable..
|
|
|
|
|
newItem->SetPriceLabelType(PriceLabel::CRAFTABLE); |
|
|
|
|
}else{ //Items that we do have are considered upgradeable.
|
|
|
|
|
newItem->SetPriceLabelType(PriceLabel::UPGRADEABLE); |
|
|
|
|
} |
|
|
|
|
newItem->SetHoverFunc(c->inventoryButtonHoverAction); |
|
|
|
|
newItem->SetMouseOutFunc(c->inventoryButtonMouseOutAction); |
|
|
|
|
newItem->SetCheckCraftingRequirements(true); |
|
|
|
|