Implement Crafting requirements display on equipment crafting window. Add in crafting requirement sample data for non-equipment items.
This commit is contained in:
@@ -93,24 +93,31 @@ void Menu::InitializeBlacksmithCraftingWindow(){
|
||||
return true;
|
||||
},
|
||||
[](MenuFuncData data){
|
||||
RowItemDisplay*rowItem=DYNAMIC_CAST<RowItemDisplay*>(data.component);
|
||||
Component<MenuItemItemButton>(BLACKSMITH,"Item Icon")->SetItem(rowItem->GetItem());
|
||||
return true;
|
||||
},
|
||||
[](MenuFuncData data){
|
||||
Component<MenuItemItemButton>(BLACKSMITH,"Item Icon")->SetItem(Item::BLANK);
|
||||
return true;
|
||||
},
|
||||
InventoryCreator::RowPlayerWeapons_InventoryUpdate,
|
||||
{.padding=1,.size={207,28}}
|
||||
)END;
|
||||
AddInventoryListener(weaponsDisplay,"Equipment");
|
||||
weaponsDisplay->SetCompactDescriptions(CRAFTING_INFO);
|
||||
|
||||
auto armorDisplay=blacksmithWindow->ADD("Armor Inventory Display",RowInventoryScrollableWindowComponent)({{2,28},{220,blacksmithWindow->size.y-44}},"Item Name Label","Item Description Label",
|
||||
[](MenuFuncData data){
|
||||
return true;
|
||||
},
|
||||
[](MenuFuncData data){
|
||||
RowItemDisplay*rowItem=DYNAMIC_CAST<RowItemDisplay*>(data.component);
|
||||
Component<MenuItemItemButton>(BLACKSMITH,"Item Icon")->SetItem(rowItem->GetItem());
|
||||
return true;
|
||||
},
|
||||
[](MenuFuncData data){
|
||||
Component<MenuItemItemButton>(BLACKSMITH,"Item Icon")->SetItem(Item::BLANK);
|
||||
return true;
|
||||
},
|
||||
InventoryCreator::RowPlayerArmor_InventoryUpdate,
|
||||
@@ -118,6 +125,7 @@ void Menu::InitializeBlacksmithCraftingWindow(){
|
||||
)END;
|
||||
AddInventoryListener(armorDisplay,"Equipment");
|
||||
armorDisplay->Enable(false);
|
||||
armorDisplay->SetCompactDescriptions(CRAFTING_INFO);
|
||||
|
||||
#pragma region Inventory Description
|
||||
float inventoryDescriptionWidth=blacksmithWindow->pos.x+blacksmithWindow->size.x-26-224;
|
||||
|
||||
Reference in New Issue
Block a user