You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.9 KiB

4 years ago
do
local _detalhes = _G.Details
4 years ago
local DetailsFrameWork = _detalhes.gump
local _
3 years ago
--panel
4 years ago
function _detalhes:CreateCopyPasteWindow()
3 years ago
local panel = CreateFrame("frame", "DetailsCopy", UIParent, "ButtonFrameTemplate")
panel:SetSize(512, 148)
tinsert(UISpecialFrames, "DetailsCopy")
panel:SetFrameStrata("TOOLTIP")
panel:SetPoint("center", UIParent, "center")
4 years ago
panel.locked = false
panel:SetToplevel(true)
3 years ago
panel:SetMovable(true)
panel:SetScript("OnMouseDown", function(self, button)
4 years ago
if (self.isMoving) then
return
end
if (button == "RightButton") then
self:Hide()
else
self:StartMoving()
self.isMoving = true
end
end)
3 years ago
panel:SetScript("OnMouseUp", function(self, button)
4 years ago
if (self.isMoving and button == "LeftButton") then
self:StopMovingOrSizing()
self.isMoving = nil
end
end)
3 years ago
DetailsFrameWork:NewImage(panel, "Interface\\AddOns\\Details\\images\\copy", 512, 128, "overlay", nil, "background", "$parentBackGround")
panel.background:SetPoint(0, -25)
4 years ago
3 years ago
--title
--panel.TitleText:SetText("Paste & Copy") --10.0 fuck
--panel.portrait:SetTexture([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]])
4 years ago
3 years ago
DetailsFrameWork:NewTextEntry(panel, _, "$parentTextEntry", "text", 476, 14)
panel.text:SetPoint(20, -127)
panel.text:SetHook("OnEditFocusLost", function() panel:Hide() end)
panel.text:SetHook("OnChar", function() panel:Hide() end)
4 years ago
3 years ago
DetailsFrameWork:NewLabel(panel, _, _, "desc", "paste on your web browser address bar", "OptionsFontHighlightSmall", 12)
panel.desc:SetPoint(340, -78)
4 years ago
panel.desc.width = 150
panel.desc.height = 25
panel.desc.align = "|"
panel.desc.color = "gray"
panel:Hide()
end
function _detalhes:CopyPaste (link)
_G.DetailsCopy.text.text = link
_G.DetailsCopy.text:HighlightText()
_G.DetailsCopy:Show()
_G.DetailsCopy.text:SetFocus()
end
end