ingame/map/worldmap.lua:5079 -- GAMEPAD_WORLD_MAP_SCENE:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_SHOWING then
ZO_WorldMap_SetGamepadKeybindsShown(true)
SCENE_MANAGER:AddFragment(WORLD_MAP_ZONE_STORY_GAMEPAD_FRAGMENT)
if g_pendingKeepInfo then
GAMEPAD_WORLD_MAP_KEEP_INFO:ShowKeep(g_pendingKeepInfo)
g_pendingKeepInfo = nil
end
if ZO_WorldMapButtonsToggleSize then
ZO_WorldMapButtonsToggleSize:SetHidden(true)
end
elseif newState == SCENE_HIDING then
ZO_WorldMap_SetDirectionalInputActive(false)
KEYBIND_STRIP:RemoveKeybindButtonGroup(g_keybindStrips.gamepad:GetDescriptor())
KEYBIND_STRIP:RemoveKeybindButtonGroup(g_keybindStrips.gamepadCloseOptions:GetDescriptor())
elseif newState == SCENE_HIDDEN then
g_gamepadMap:StopMotion()
if ZO_WorldMapButtonsToggleSize then
ZO_WorldMapButtonsToggleSize:SetHidden(false)
end
ZO_SavePlayerConsoleProfile()
ZO_WorldMap_SetGamepadKeybindsShown(false)
end
end)