PHP код:
local lines = {}
do
--Create Frames/Objects
local frame = CreateFrame("Frame", "BCMCopyFrame", UIParent)
frame:SetBackdrop({bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
tile = true, tileSize = 16, edgeSize = 16,
insets = {left = 3, right = 3, top = 5, bottom = 3}})
frame:SetBackdropColor(0,0,0,1)
frame:SetWidth(500)
frame:SetHeight(400)
frame:SetPoint("CENTER", UIParent, "CENTER")
frame:Hide()
frame:SetFrameStrata("DIALOG")
local scrollArea = CreateFrame("ScrollFrame", "BCMCopyScroll", frame, "UIPanelScrollFrameTemplate")
scrollArea:SetPoint("TOPLEFT", frame, "TOPLEFT", 8, -30)
scrollArea:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -30, 8)
local editBox = CreateFrame("EditBox", "BCMCopyBox", frame)
editBox:SetMultiLine(true)
editBox:SetMaxLetters(99999)
editBox:EnableMouse(true)
editBox:SetAutoFocus(false)
editBox:SetFontObject(ChatFontNormal)
editBox:SetWidth(400)
editBox:SetHeight(270)
editBox:SetScript("OnEscapePressed", function(f) f:GetParent():GetParent():Hide() f:SetText("") end)
scrollArea:SetScrollChild(editBox)
local close = CreateFrame("Button", "BCMCloseButton", frame, "UIPanelCloseButton")
close:SetPoint("TOPRIGHT", frame, "TOPRIGHT")
local copyFunc = function(frame, btn)
local cf = _G[format("%s%d", "ChatFrame", frame:GetID())]
local _, size = cf:GetFont()
FCF_SetChatWindowFontSize(cf, cf, 0.01)
local ct = 1
for i = select("#", cf:GetRegions()), 1, -1 do
local region = select(i, cf:GetRegions())
if region:GetObjectType() == "FontString" then
lines[ct] = tostring(region:GetText())
ct = ct + 1
end
end
local lineCt = ct - 1
local text = table.concat(lines, "\n", 1, lineCt)
FCF_SetChatWindowFontSize(cf, cf, size)
BCMCopyFrame:Show()
BCMCopyBox:SetText(text)
BCMCopyBox:HighlightText(0)
wipe(lines)
end
local hintFunc = function(frame)
GameTooltip:SetOwner(frame, "ANCHOR_TOP")
if SHOW_NEWBIE_TIPS == "1" then
GameTooltip:AddLine(CHAT_OPTIONS_LABEL, 1, 1, 1)
GameTooltip:AddLine(NEWBIE_TOOLTIP_CHATOPTIONS, nil, nil, nil, 1)
end
GameTooltip:AddLine((SHOW_NEWBIE_TIPS == "1" and "\n" or "").."|TInterface\\Buttons\\UI-GuildButton-OfficerNote-Disabled:27|tDouble-click to copy chat.", 1, 0, 0)
GameTooltip:Show()
end
for i = 1, 10 do
local tab = _G[format("%s%d%s", "ChatFrame", i, "Tab")]
tab:SetScript("OnDoubleClick", copyFunc)
tab:SetScript("OnEnter", hintFunc)
end
end
PHP код:
--EditBox Module
local ebParts = {'Left', 'Mid', 'Right'}
local eb = _G['ChatFrame'..i..'EditBox']
for _, ebPart in ipairs(ebParts) do
_G['ChatFrame'..i..'EditBox'..ebPart]:SetTexture(0, 0, 0, 0)
local ebed = _G['ChatFrame'..i..'EditBoxFocus'..ebPart]
ebed:SetTexture(0,0,0,0.8)
ebed:SetHeight(18)
end
eb:SetAltArrowKeyMode(false)
eb:ClearAllPoints()
eb:SetPoint("BOTTOMLEFT", UIParent, eb_point[1], eb_point[2], eb_point[3])
eb:SetPoint("BOTTOMRIGHT", UIParent, eb_point[1], eb_point[2]+eb_width, eb_point[3])
eb:EnableMouse(false)
5 - недавно были темы litestats чтоли