ingame/crafting/gamepad/smithing_gamepad.lua:89 -- GAMEPAD_SMITHING_ROOT_SCENE:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_SHOWING then
local craftingType = GetCraftingInteractionType()
self.creationPanel:PerformDeferredInitialization()
self.researchPanel:PerformDeferredInitialization()
self:RefreshModeList(craftingType)
self.resetUIs = self.resetUIs or self.oldCraftingType ~= craftingType
self.refinementPanel:SetCraftingType(craftingType, self.oldCraftingType, self.resetUIs)
self.creationPanel:SetCraftingType(craftingType, self.oldCraftingType, self.resetUIs)
self.improvementPanel:SetCraftingType(craftingType, self.oldCraftingType, self.resetUIs)
self.deconstructionPanel:SetCraftingType(craftingType, self.oldCraftingType, self.resetUIs)
self.researchPanel:SetCraftingType(craftingType, self.oldCraftingType, self.resetUIs)
self.oldCraftingType = craftingType
self:ResetMode()
if self.resetUIs then
self.modeList:SetSelectedIndexWithoutAnimation(SMITHING_MODE_REFINEMENT)
end
self:SetEnableSkillBar(true)
KEYBIND_STRIP:AddKeybindButtonGroup(self.keybindStripDescriptor)
self.modeList:Activate()
local titleString = ZO_GamepadCraftingUtils_GetLineNameForCraftingType(craftingType)
ZO_GamepadCraftingUtils_SetupGenericHeader(self, titleString)
ZO_GamepadCraftingUtils_RefreshGenericHeader(self)
self.resetUIs = nil
elseif newState == SCENE_HIDDEN then
ZO_InventorySlot_RemoveMouseOverKeybinds()
KEYBIND_STRIP:RemoveKeybindButtonGroup(self.keybindStripDescriptor)
self.modeList:Deactivate()
self:DirtyAllPanels()
self:SetEnableSkillBar(false)
end
end)