Started the spellcache for tww; "/de spellid" to copy the spellid of the latest hovered over spell in the breakdown; Fixed /dumpt for spellids

This commit is contained in:
Tercio Jose
2024-06-10 00:07:00 -03:00
parent 5bf4d2e220
commit c9029933f8
4 changed files with 80 additions and 1 deletions
+51
View File
@@ -777,6 +777,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*(.-)$")