std::vector<std::weak_ptr<MenuComponent>>*itemList=&Component<RowInventoryScrollableWindowComponent>(type,"Weapon Inventory Display")->GetComponents();//By default we'll reference the weapon display as we assume being from the weapon tab, we are probably lookinga t weapons. However, there is an edge case where hovering over the weapon tab but pressing down using a non-mouse navigational method while viewing the armor tab will cause the cursor to simply vanish. So, we have to interrogate both the weapon and armor inventories to make sure we grab the right one.
itemList=&Component<RowInventoryScrollableWindowComponent>(type,"Armor Inventory Display")->GetComponents();//By default we'll reference the weapon display as we assume being from the weapon tab, we are probably lookinga t weapons. However, there is an edge case where hovering over the weapon tab but pressing down using a non-mouse navigational method while viewing the armor tab will cause the cursor to simply vanish. So, we have to interrogate both the weapon and armor inventories to make sure we grab the right one.
std::vector<std::weak_ptr<MenuComponent>>*itemList=&Component<RowInventoryScrollableWindowComponent>(type,"Weapon Inventory Display")->GetComponents();//By default we'll reference the weapon display as we assume being from the weapon tab, we are probably lookinga t weapons. However, there is an edge case where hovering over the weapon tab but pressing down using a non-mouse navigational method while viewing the armor tab will cause the cursor to simply vanish. So, we have to interrogate both the weapon and armor inventories to make sure we grab the right one.
itemList=&Component<RowInventoryScrollableWindowComponent>(type,"Armor Inventory Display")->GetComponents();//By default we'll reference the weapon display as we assume being from the weapon tab, we are probably lookinga t weapons. However, there is an edge case where hovering over the weapon tab but pressing down using a non-mouse navigational method while viewing the armor tab will cause the cursor to simply vanish. So, we have to interrogate both the weapon and armor inventories to make sure we grab the right one.
std::vector<std::weak_ptr<MenuComponent>>*itemList=&Component<RowInventoryScrollableWindowComponent>(type,"Weapon Inventory Display")->GetComponents();//By default we'll reference the weapon display as we assume being from the weapon tab, we are probably lookinga t weapons. However, there is an edge case where hovering over the weapon tab but pressing down using a non-mouse navigational method while viewing the armor tab will cause the cursor to simply vanish. So, we have to interrogate both the weapon and armor inventories to make sure we grab the right one.
itemList=&Component<RowInventoryScrollableWindowComponent>(type,"Armor Inventory Display")->GetComponents();//By default we'll reference the weapon display as we assume being from the weapon tab, we are probably lookinga t weapons. However, there is an edge case where hovering over the weapon tab but pressing down using a non-mouse navigational method while viewing the armor tab will cause the cursor to simply vanish. So, we have to interrogate both the weapon and armor inventories to make sure we grab the right one.
}
if(itemList->size()>0){
returnData=(*itemList)[itemList->size()-1];
}else{
returnData="Leave Button";
}
},
.down=[](MenuTypetype,Data&returnData){
std::vector<std::weak_ptr<MenuComponent>>*itemList=&Component<RowInventoryScrollableWindowComponent>(type,"Weapon Inventory Display")->GetComponents();//By default we'll reference the weapon display as we assume being from the weapon tab, we are probably lookinga t weapons. However, there is an edge case where hovering over the weapon tab but pressing down using a non-mouse navigational method while viewing the armor tab will cause the cursor to simply vanish. So, we have to interrogate both the weapon and armor inventories to make sure we grab the right one.
itemList=&Component<RowInventoryScrollableWindowComponent>(type,"Armor Inventory Display")->GetComponents();//By default we'll reference the weapon display as we assume being from the weapon tab, we are probably lookinga t weapons. However, there is an edge case where hovering over the weapon tab but pressing down using a non-mouse navigational method while viewing the armor tab will cause the cursor to simply vanish. So, we have to interrogate both the weapon and armor inventories to make sure we grab the right one.