Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- GUI_Main.old.lua Sat Nov 1 00:16:59 2014
- +++ GUI_Main.lua Sat Nov 1 00:17:22 2014
- @@ -151,6 +151,12 @@
- end,
- --me.DeleteCombatantWrapper,
- },
- + armory_link = {
- + order = 50,
- + name = "Show Armory Link",
- + type = "execute",
- + func = function() ShowArmoryLink(me) end,
- + }
- }
- }
- @@ -1828,4 +1834,51 @@
- function Recount.LocalizeCombatants()
- dbCombatants = Recount.db2.combatants
- oldlocalizer()
- +end
- +
- +
- +
- +--
- +-- General structure of popup stolen from Prat.
- +StaticPopupDialogs["RECOUNT_ARMORY_LINK"] = {
- + text = "Armory link : %s",
- + button2 = "Ok",
- + hasEditBox = true,
- + hasWideEditbox = 1,
- + editBoxWidth = 350,
- +
- + preferredIndex = 3,
- +
- + OnShow = function(self, ...)
- + self:SetWidth(420)
- +
- + self.editBox:SetText(StaticPopupDialogs["RECOUNT_ARMORY_LINK"].editBoxText)
- + self.editBox:SetFocus()
- + self.editBox:HighlightText(false)
- +
- + local button = _G[this:GetName() .. "Button2"]
- + button:ClearAllPoints()
- + button:SetWidth(200)
- + button:SetPoint("CENTER", editBox, "CENTER", 0, -30)
- + end,
- + OnHide = NOP,
- + OnAccept = NOP,
- + OnCancel = NOP,
- + EditBoxOnEscapePressed = function(this, ...) this:GetParent():Hide() end,
- + timeout = 0,
- + whileDead = 1,
- + hideOnEscape = 1,
- +}
- +
- +function ShowArmoryLink(person)
- + local name, server = strsplit("-", person.name, 2)
- +
- + if (server == nil) then
- + server = GetRealmName()
- + end
- +
- + local link = string.format("http://us.battle.net/wow/en/character/%s/%s/advanced", server, name)
- +
- + StaticPopupDialogs["RECOUNT_ARMORY_LINK"].editBoxText = link
- + StaticPopup_Show("RECOUNT_ARMORY_LINK", name)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement