what was changed in the code?
local Backdrop = {
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
}
local f = CreateFrame("Button", "BakoraGetChatName", UIParent, "BackdropTemplate")
f:SetSize(200, 28)
f:SetPoint("BOTTOMLEFT", ChatFrame1, "TOPLEFT", 0, 50)
f:SetBackdrop(Backdrop)
f:SetClampedToScreen(true)
f:EnableMouse(true)
f:SetMovable(true)
f:SetUserPlaced(true)
f:RegisterForDrag("LeftButton")
f:RegisterForClicks("AnyUp")
f:SetScript("OnDragStart",function(self)
self:StartMoving()
end)
f:SetScript("OnDragStop",function(self)
self:StopMovingOrSizing()
end)
f.Text = CreateFrame("EditBox", nil, f, "InputBoxTemplate")
f.Text:SetPoint("TOPLEFT", 5, -11)
f.Text:SetPoint("BOTTOMRIGHT", -1, 5)
f.Text:SetFontObject(GameFontNormalSmall)
f.Text:SetAutoFocus(false)
f.Text:SetScript("OnEscapePressed", function(self)
self:ClearFocus()
self:GetParent():Hide()
end)
f.Close = CreateFrame("Button", nil, f, "UIPanelCloseButton")
f.Close:SetSize(10, 10)
f.Close:SetPoint("TOPRIGHT")
f:Hide()
local copyString = "%s-%s"
hooksecurefunc(UnitPopupCopyCharacterNameButtonMixin, "OnClick", function(self, button, down)
local dropdownMenu = UnitPopupSharedUtil.GetCurrentDropdownMenu()
local name = format(copyString, dropdownMenu.name, dropdownMenu.server or GetRealmName())
local nameLen = strlen(name)
BakoraGetChatName.Text:SetText(name)
BakoraGetChatName:Show()
BakoraGetChatName.Text:SetFocus()
BakoraGetChatName.Text:SetCursorPosition(nameLen)
BakoraGetChatName.Text:HighlightText(0, nameLen)
end)