pregameandingame/zo_options/keyboard/zo_options_keyboard.lua:18 -- OPTIONS_WINDOW_FRAGMENT:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_FRAGMENT_SHOWING then
RefreshSettings()
self:UpdateAllPanelOptions(SAVE_CURRENT_VALUES)
control:GetNamedChild("ApplyButton"):SetHidden(true)
PushActionLayerByName("OptionsWindow")
elseif newState == SCENE_FRAGMENT_HIDING then
SetCameraOptionsPreviewModeEnabled(false, CAMERA_OPTIONS_PREVIEW_NONE)
RemoveActionLayerByName("OptionsWindow")
self:SaveCachedSettings()
elseif newState == SCENE_FRAGMENT_HIDDEN then
-- We may hide this scene while one of these panels is active, and disabling share features.
-- To undo that, just re-enable them here. This assumes that there aren't multiple reasons to disable share features.
if DoesPlatformSupportDisablingShareFeatures() and ZO_SharedOptions.DoesPanelDisableShareFeatures(self.currentPanel) then
EnableShareFeatures()
end
end
end)