local _, addon = ... local ag = addon.CreateActionGroup("Soulbind"); ag.repeatInterval = 0.25; function ag:Init() self.characters = Narci_SoulbindsFrame.buttons; self.activateButton = Narci_SoulbindsFrame.ActivateButton; self.maxIndex = 3; self.index = 0; end function ag:OnActiveCallback() self.index = 1; for i = 1, #self.characters do if self.characters[i].isSelected then self.index = i; break end end self:Navigate(0, 0); addon.GamePadNavBar:SelectButtonByID(4); end function ag:Navigate(x, y) local hold, valid; if y > 0 or x < 0 then if self.index > 1 then self.index = self.index - 1; hold = true; valid = true; else return end elseif y < 0 or x > 0 then if self.index 0 then Narci_NavBar:SelectTab(4); end end function ag:ResetNavigation() self.pad3 = nil; end