common/zo_options/gamepad/zo_options_gamepad.lua:42 -- GAMEPAD_OPTIONS_PANEL_SCENE:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_SHOWING then
self:RefreshOptionsList()
self:RefreshHeader()
self:SetCurrentList(self.optionsList)
KEYBIND_STRIP:AddKeybindButtonGroup(self.panelKeybindDescriptor)
elseif newState == SCENE_HIDDEN then
self:DisableCurrentList()
self:DeactivateSelectedControl()
self:SaveCachedSettings()
ZO_SavePlayerConsoleProfile()
SetCameraOptionsPreviewModeEnabled(false, CAMERA_OPTIONS_PREVIEW_NONE)
KEYBIND_STRIP:RemoveKeybindButtonGroup(self.panelKeybindDescriptor)
KEYBIND_STRIP:RemoveKeybindButtonGroup(self.checkboxDescriptor)
end
end)