mirror of
https://codeberg.org/piebot/LegacyEvolved
synced 2026-07-18 00:20:52 +00:00
rabbit stew fix
This commit is contained in:
@@ -469,6 +469,7 @@ void IUIScene_CreativeMenu::staticCtor()
|
||||
ITEM_AUX(Item::apple_gold_Id,1) // Enchanted
|
||||
ITEM(Item::melon_Id)
|
||||
ITEM(Item::mushroomStew_Id)
|
||||
ITEM(Item::rabbitStew_Id)
|
||||
ITEM(Item::bread_Id)
|
||||
ITEM(Item::cake_Id)
|
||||
ITEM(Item::cookie_Id)
|
||||
|
||||
@@ -30,7 +30,7 @@ UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void *_initData, UILayer *p
|
||||
// Setup all the Iggy references we need for this scene
|
||||
initialiseMovie();
|
||||
|
||||
for(unsigned int i = 0; i < 4; ++i) m_labelIngredientsDesc[i].init(L"");
|
||||
for(unsigned int i = 0; i < 9; ++i) m_labelIngredientsDesc[i].init(L"");
|
||||
m_labelDescription.init(L"");
|
||||
m_labelGroupName.init(L"");
|
||||
m_labelItemName.init(L"");
|
||||
@@ -135,7 +135,7 @@ UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void *_initData, UILayer *p
|
||||
XuiSetTimer(m_hObj,IGNORE_KEYPRESS_TIMERID,IGNORE_KEYPRESS_TIME);
|
||||
#endif
|
||||
|
||||
for(unsigned int i = 0; i < 4; ++i)
|
||||
for(unsigned int i = 0; i < 9; ++i)
|
||||
{
|
||||
m_slotListIngredients[i].addSlot(CRAFTING_INGREDIENTS_DESCRIPTION_START + i);
|
||||
}
|
||||
@@ -477,7 +477,7 @@ void UIScene_CraftingMenu::handleReload()
|
||||
m_slotListInventory.addSlots(CRAFTING_INVENTORY_SLOT_START,CRAFTING_INVENTORY_SLOT_END - CRAFTING_INVENTORY_SLOT_START);
|
||||
m_slotListHotBar.addSlots(CRAFTING_HOTBAR_SLOT_START, CRAFTING_HOTBAR_SLOT_END - CRAFTING_HOTBAR_SLOT_START);
|
||||
|
||||
for(unsigned int i = 0; i < 4; ++i)
|
||||
for(unsigned int i = 0; i < 9; ++i)
|
||||
{
|
||||
m_slotListIngredients[i].addSlot(CRAFTING_INGREDIENTS_DESCRIPTION_START + i);
|
||||
}
|
||||
@@ -608,7 +608,7 @@ void UIScene_CraftingMenu::customDraw(IggyCustomDrawCallbackRegion *region)
|
||||
alpha = static_cast<float>(m_ingredientsSlotsInfo[iIndex].alpha)/31.0f;
|
||||
}
|
||||
}
|
||||
else if(slotId >= CRAFTING_INGREDIENTS_DESCRIPTION_START && slotId < (CRAFTING_INGREDIENTS_DESCRIPTION_START + 4) )
|
||||
else if(slotId >= CRAFTING_INGREDIENTS_DESCRIPTION_START && slotId < (CRAFTING_INGREDIENTS_DESCRIPTION_START + 9) )
|
||||
{
|
||||
int iIndex = slotId - CRAFTING_INGREDIENTS_DESCRIPTION_START;
|
||||
if(m_ingredientsInfo[iIndex].show)
|
||||
|
||||
@@ -48,7 +48,7 @@ private:
|
||||
SlotInfo m_vSlotsInfo[m_iMaxDisplayedVSlotC];
|
||||
SlotInfo m_ingredientsSlotsInfo[m_iIngredients3x3SlotC];
|
||||
SlotInfo m_craftingOutputSlotInfo;
|
||||
SlotInfo m_ingredientsInfo[4];
|
||||
SlotInfo m_ingredientsInfo[9];
|
||||
|
||||
AbstractContainerMenu *m_menu;
|
||||
|
||||
@@ -86,9 +86,9 @@ protected:
|
||||
UIControl_SlotList m_slotListCraftingHSlots;
|
||||
UIControl_SlotList m_slotListCrafting1VSlots, m_slotListCrafting2VSlots[2], m_slotListCrafting3VSlots[3];
|
||||
UIControl_SlotList m_slotListIngredientsLayout, m_slotListCraftingOutput;
|
||||
UIControl_SlotList m_slotListIngredients[4];
|
||||
UIControl_SlotList m_slotListIngredients[9];
|
||||
UIControl_SlotList m_slotListInventory, m_slotListHotBar;
|
||||
UIControl_Label m_labelIngredientsDesc[4];
|
||||
UIControl_Label m_labelIngredientsDesc[9];
|
||||
UIControl_HTMLLabel m_labelDescription;
|
||||
UIControl_Label m_labelGroupName, m_labelItemName, m_labelInventory, m_labelIngredients;
|
||||
|
||||
@@ -143,11 +143,21 @@ protected:
|
||||
UI_MAP_ELEMENT( m_slotListIngredients[1], "Ingredient2")
|
||||
UI_MAP_ELEMENT( m_slotListIngredients[2], "Ingredient3")
|
||||
UI_MAP_ELEMENT( m_slotListIngredients[3], "Ingredient4")
|
||||
UI_MAP_ELEMENT( m_slotListIngredients[4], "Ingredient5")
|
||||
UI_MAP_ELEMENT( m_slotListIngredients[5], "Ingredient6")
|
||||
UI_MAP_ELEMENT( m_slotListIngredients[6], "Ingredient7")
|
||||
UI_MAP_ELEMENT( m_slotListIngredients[7], "Ingredient8")
|
||||
UI_MAP_ELEMENT( m_slotListIngredients[8], "Ingredient9")
|
||||
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[0], "Ingredient1Desc")
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[1], "Ingredient2Desc")
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[2], "Ingredient3Desc")
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[3], "Ingredient4Desc")
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[4], "Ingredient5Desc")
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[5], "Ingredient6Desc")
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[6], "Ingredient7Desc")
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[7], "Ingredient8Desc")
|
||||
UI_MAP_ELEMENT( m_labelIngredientsDesc[8], "Ingredient9Desc")
|
||||
|
||||
UI_MAP_ELEMENT( m_labelIngredients, "IngredientsLabel")
|
||||
|
||||
|
||||
@@ -99,10 +99,12 @@ HRESULT CXuiSceneCraftingPanel::OnInit( XUIMessageInit* pInitData, BOOL& bHandle
|
||||
m_iCraftablesMaxHSlotC=m_iMaxHSlot3x3C;
|
||||
|
||||
// set up the ingredients descriptions
|
||||
for(int i=0;i<4;i++)
|
||||
for(int i=0;i<9;i++)
|
||||
{
|
||||
pObj = nullptr;
|
||||
m_pCraftIngredientDescA[i] = nullptr;
|
||||
XuiObjectFromHandle( m_hCraftIngredientDescA[i], &pObj );
|
||||
m_pCraftIngredientDescA[i] = static_cast<CXuiCtrlCraftIngredientSlot *>(pObj);
|
||||
if(pObj) m_pCraftIngredientDescA[i] = static_cast<CXuiCtrlCraftIngredientSlot *>(pObj);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -124,10 +126,12 @@ HRESULT CXuiSceneCraftingPanel::OnInit( XUIMessageInit* pInitData, BOOL& bHandle
|
||||
m_iCraftablesMaxHSlotC=m_iMaxHSlot2x2C;
|
||||
|
||||
// set up the ingredients descriptions
|
||||
for(int i=0;i<4;i++)
|
||||
for(int i=0;i<9;i++)
|
||||
{
|
||||
pObj = nullptr;
|
||||
m_pCraftIngredientDescA[i] = nullptr;
|
||||
XuiObjectFromHandle( m_hCraftIngredientDescA[i], &pObj );
|
||||
m_pCraftIngredientDescA[i] = static_cast<CXuiCtrlCraftIngredientSlot *>(pObj);
|
||||
if(pObj) m_pCraftIngredientDescA[i] = static_cast<CXuiCtrlCraftIngredientSlot *>(pObj);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -413,7 +417,7 @@ void CXuiSceneCraftingPanel::hideAllIngredientsSlots()
|
||||
{
|
||||
for(int i=0;i<m_iIngredientsC;i++)
|
||||
{
|
||||
m_pCraftIngredientDescA[i]->SetShow(FALSE);
|
||||
if(m_pCraftIngredientDescA[i]) m_pCraftIngredientDescA[i]->SetShow(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -467,17 +471,17 @@ void CXuiSceneCraftingPanel::setIngredientSlotRedBox(int index, bool show)
|
||||
|
||||
void CXuiSceneCraftingPanel::setIngredientDescriptionItem(int iPad, int index, shared_ptr<ItemInstance> item)
|
||||
{
|
||||
m_pCraftIngredientDescA[index]->SetIcon(iPad, item->id,item->getAuxValue(),item->GetCount(),8,31,TRUE,item->isFoil(),FALSE);
|
||||
if(m_pCraftIngredientDescA[index]) m_pCraftIngredientDescA[index]->SetIcon(iPad, item->id,item->getAuxValue(),item->GetCount(),8,31,TRUE,item->isFoil(),FALSE);
|
||||
}
|
||||
|
||||
void CXuiSceneCraftingPanel::setIngredientDescriptionRedBox(int index, bool show)
|
||||
{
|
||||
m_pCraftIngredientDescA[index]->SetRedBox(show?TRUE:FALSE);
|
||||
if(m_pCraftIngredientDescA[index]) m_pCraftIngredientDescA[index]->SetRedBox(show?TRUE:FALSE);
|
||||
}
|
||||
|
||||
void CXuiSceneCraftingPanel::setIngredientDescriptionText(int index, LPCWSTR text)
|
||||
{
|
||||
m_pCraftIngredientDescA[index]->SetDescription(text);
|
||||
if(m_pCraftIngredientDescA[index]) m_pCraftIngredientDescA[index]->SetDescription(text);
|
||||
}
|
||||
|
||||
void CXuiSceneCraftingPanel::setShowCraftHSlot(int iIndex, bool show)
|
||||
@@ -511,9 +515,9 @@ void CXuiSceneCraftingPanel::UpdateMultiPanel()
|
||||
{
|
||||
case DISPLAY_INVENTORY:
|
||||
// turn off all the ingredients display
|
||||
for(int i=0;i<4;i++)
|
||||
for(int i=0;i<9;i++)
|
||||
{
|
||||
m_pCraftIngredientDescA[i]->SetShow(FALSE);
|
||||
if(m_pCraftIngredientDescA[i]) m_pCraftIngredientDescA[i]->SetShow(FALSE);
|
||||
}
|
||||
|
||||
XuiElementSetShow(m_hGridInventory,TRUE);
|
||||
@@ -533,7 +537,7 @@ void CXuiSceneCraftingPanel::UpdateMultiPanel()
|
||||
// display the ingredients
|
||||
for(int i=0;i<m_iIngredientsC;i++)
|
||||
{
|
||||
m_pCraftIngredientDescA[i]->SetShow(TRUE);
|
||||
if(m_pCraftIngredientDescA[i]) m_pCraftIngredientDescA[i]->SetShow(TRUE);
|
||||
}
|
||||
|
||||
if(m_iIngredientsC==0)
|
||||
|
||||
@@ -134,6 +134,11 @@ public:
|
||||
MAP_CONTROL(IDC_Ingredient2,m_hCraftIngredientDescA[1])
|
||||
MAP_CONTROL(IDC_Ingredient3,m_hCraftIngredientDescA[2])
|
||||
MAP_CONTROL(IDC_Ingredient4,m_hCraftIngredientDescA[3])
|
||||
MAP_CONTROL(L"Ingredient5",m_hCraftIngredientDescA[4])
|
||||
MAP_CONTROL(L"Ingredient6",m_hCraftIngredientDescA[5])
|
||||
MAP_CONTROL(L"Ingredient7",m_hCraftIngredientDescA[6])
|
||||
MAP_CONTROL(L"Ingredient8",m_hCraftIngredientDescA[7])
|
||||
MAP_CONTROL(L"Ingredient9",m_hCraftIngredientDescA[8])
|
||||
|
||||
MAP_CONTROL(IDC_CraftingOutputRed,m_hCraftOutput)
|
||||
END_MAP_CHILD_CONTROLS()
|
||||
|
||||
Reference in New Issue
Block a user