crafting ui: highlighting should work after mode change and scroll

This commit is contained in:
minjaesong
2023-09-17 17:05:28 +09:00
parent 596328688c
commit cd13696116
3 changed files with 57 additions and 24 deletions

View File

@@ -274,7 +274,7 @@ class UICrafting(val full: UIInventoryFull) : UICanvas(), HasInventory {
_getItemListPlayer().rebuild(catAll)
_getItemListIngredients().rebuild(catAll)
highlightCraftingCandidateButton(button)
highlightCraftingCandidateButton(recipe)
oldSelectedItems.clear()
oldSelectedItems.addAll(selectedItems)
@@ -348,8 +348,8 @@ class UICrafting(val full: UIInventoryFull) : UICanvas(), HasInventory {
itemListIngredients.rebuild(catAll)
}
private fun highlightCraftingCandidateButton(button: UIItemInventoryCellBase?) { // a proxy function
itemListCraftable.highlightButton(button)
private fun highlightCraftingCandidateButton(recipe: CraftingCodex.CraftingRecipe?) { // a proxy function
itemListCraftable.highlightRecipe(recipe)
itemListCraftable.rebuild(catAll)
}