ingame/guild/gamepad/zo_guildhome_gamepad.lua:15 -- GAMEPAD_GUILD_HOME_SCENE:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_SHOWING then
self:PerformDeferredInitializationHome()
self:PerformUpdate()
if self.activeScreenCallback then
self.activeScreenCallback()
end
ZO_GamepadGenericHeader_Activate(self.header)
self.control:RegisterForEvent(EVENT_GUILD_DATA_LOADED, function() self:Update() end)
self.control:RegisterForEvent(EVENT_GUILD_MEMBER_REMOVED, function(_, guildId, displayName) if(self:IsCurrentGuildId(guildId)) then self:Update() end end)
self.control:RegisterForEvent(EVENT_GUILD_MEMBER_ADDED, function(_, guildId, displayName) if(self:IsCurrentGuildId(guildId)) then self:Update() end end)
self.control:RegisterForEvent(EVENT_GUILD_MEMBER_RANK_CHANGED, function(_, guildId, displayName, rankIndex) if(self:IsCurrentGuildId(guildId)) then self:Update() end end)
self.control:RegisterForEvent(EVENT_GUILD_MEMBER_PLAYER_STATUS_CHANGED, function(_, guildId, displayName, oldStatus, newStatus) if(self:IsCurrentGuildId(guildId)) then self:Update() end end)
elseif newState == SCENE_HIDDEN then
ZO_GamepadGenericHeader_Deactivate(self.header)
self:RemoveCurrentPage()
self.control:UnregisterForEvent(EVENT_GUILD_DATA_LOADED)
self.control:UnregisterForEvent(EVENT_GUILD_MEMBER_REMOVED)
self.control:UnregisterForEvent(EVENT_GUILD_MEMBER_ADDED)
self.control:UnregisterForEvent(EVENT_GUILD_MEMBER_RANK_CHANGED)
self.control:UnregisterForEvent(EVENT_GUILD_MEMBER_PLAYER_STATUS_CHANGED)
end
ZO_Gamepad_ParametricList_Screen.OnStateChanged(self, oldState, newState)
end)