ingame/restyle/keyboard/restyle_keyboard.lua:45 -- RESTYLE_SCENE:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_SHOWING then
MAIN_MENU_MANAGER:SetBlockingScene("restyle_keyboard", OnBlockingSceneActivated)
SetRestylePreviewMode(self.mode)
KEYBIND_STRIP:RemoveDefaultExit()
KEYBIND_STRIP:AddKeybindButtonGroup(self.keybindStripDescriptor)
local currentSheet = self.sheetsByMode[self.mode]
SCENE_MANAGER:AddFragment(currentSheet:GetFragment())
local IS_ENABLED = true
if CanUseCollectibleDyeing() then
ZO_MenuBar_SetDescriptorEnabled(self.tabs, RESTYLE_MODE_COLLECTIBLE, IS_ENABLED)
else
-- if we have the collectible tab selected, switch tabs it before disabling it
-- so the highlights setup correctly
local selectedTabType = ZO_MenuBar_GetSelectedDescriptor(self.tabs)
if selectedTabType == RESTYLE_MODE_COLLECTIBLE then
ZO_MenuBar_SelectDescriptor(self.tabs, RESTYLE_MODE_EQUIPMENT)
end
ZO_MenuBar_SetDescriptorEnabled(self.tabs, RESTYLE_MODE_COLLECTIBLE, not IS_ENABLED)
end
self:RefreshCategoryContent()
self:InitializeSearch()
elseif newState == SCENE_HIDDEN then
KEYBIND_STRIP:RemoveKeybindButtonGroup(self.keybindStripDescriptor)
KEYBIND_STRIP:RestoreDefaultExit()
MAIN_MENU_MANAGER:ClearBlockingScene(OnBlockingSceneActivated)
end
end)