Merge remote-tracking branch 'fork/master'
This commit is contained in:
@@ -11,6 +11,7 @@ local UIParent = UIParent
|
||||
local UnitGUID = UnitGUID
|
||||
local tonumber= tonumber
|
||||
local LoggingCombat = LoggingCombat
|
||||
local GetSpellInfo = Details222.GetSpellInfo
|
||||
|
||||
SLASH_PLAYEDCLASS1 = "/playedclass"
|
||||
function SlashCmdList.PLAYEDCLASS(msg, editbox)
|
||||
@@ -779,6 +780,57 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
end
|
||||
end
|
||||
|
||||
elseif (command == "spellid") then
|
||||
if (Details222.FocusedSpellId) then
|
||||
local npcId = Details222.FocusedSpellId
|
||||
if (not Details.id_frame) then
|
||||
local backdrop = {
|
||||
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
edgeFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
tile = true, edgeSize = 1, tileSize = 5,
|
||||
}
|
||||
|
||||
Details.id_frame = CreateFrame("Frame", "DetailsID", UIParent, "BackdropTemplate")
|
||||
Details.id_frame:SetHeight(14)
|
||||
Details.id_frame:SetWidth(120)
|
||||
Details.id_frame:SetPoint("center", UIParent, "center")
|
||||
Details.id_frame:SetBackdrop(backdrop)
|
||||
|
||||
table.insert(UISpecialFrames, "DetailsID")
|
||||
|
||||
Details.id_frame.texto = CreateFrame("editbox", nil, Details.id_frame, "BackdropTemplate")
|
||||
Details.id_frame.texto:SetPoint("topleft", Details.id_frame, "topleft")
|
||||
Details.id_frame.texto:SetAutoFocus(false)
|
||||
Details.id_frame.texto:SetFontObject(GameFontHighlightSmall)
|
||||
Details.id_frame.texto:SetHeight(14)
|
||||
Details.id_frame.texto:SetWidth(120)
|
||||
Details.id_frame.texto:SetJustifyH("CENTER")
|
||||
Details.id_frame.texto:EnableMouse(true)
|
||||
Details.id_frame.texto:SetBackdropColor(0, 0, 0, 0.5)
|
||||
Details.id_frame.texto:SetBackdropBorderColor(0.3, 0.3, 0.30, 0.80)
|
||||
Details.id_frame.texto:SetText("")
|
||||
Details.id_frame.texto.perdeu_foco = nil
|
||||
|
||||
Details.id_frame.texto:SetScript("OnEnterPressed", function()
|
||||
Details.id_frame.texto:ClearFocus()
|
||||
Details.id_frame:Hide()
|
||||
end)
|
||||
|
||||
Details.id_frame.texto:SetScript("OnEscapePressed", function()
|
||||
Details.id_frame.texto:ClearFocus()
|
||||
Details.id_frame:Hide()
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
C_Timer.After(0.1, function()
|
||||
Details.id_frame:Show()
|
||||
Details.id_frame.texto:SetFocus()
|
||||
Details.id_frame.texto:SetText("" .. npcId)
|
||||
Details.id_frame.texto:HighlightText()
|
||||
end)
|
||||
end
|
||||
|
||||
elseif (command == "profile") then
|
||||
|
||||
local profile = rest:match("^(%S*)%s*(.-)$")
|
||||
|
||||
Reference in New Issue
Block a user