Release Candidate 1
This commit is contained in:
+75
-72
@@ -3,6 +3,7 @@
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
local CreateFrame = CreateFrame
|
||||
local pairs = pairs
|
||||
@@ -11,11 +12,16 @@ local UnitGUID = UnitGUID
|
||||
local tonumber= tonumber
|
||||
local LoggingCombat = LoggingCombat
|
||||
|
||||
SLASH_PLAYEDCLASS1 = "/playedclass"
|
||||
function SlashCmdList.PLAYEDCLASS(msg, editbox)
|
||||
print(Details.GetPlayTimeOnClassString())
|
||||
end
|
||||
|
||||
SLASH_DUMPTABLE1 = "/dumpt"
|
||||
function SlashCmdList.DUMPTABLE(msg, editbox)
|
||||
local result = "return function() return " .. msg .. " end"
|
||||
local extractValue = loadstring(result)
|
||||
return Details:Dump(extractValue()())
|
||||
return dumpt(extractValue()())
|
||||
end
|
||||
|
||||
SLASH_DETAILS1, SLASH_DETAILS2, SLASH_DETAILS3 = "/details", "/dt", "/de"
|
||||
@@ -822,66 +828,57 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
|
||||
elseif (command == "guid") then
|
||||
|
||||
local pass_guid = rest:match("^(%S*)%s*(.-)$")
|
||||
|
||||
if (not _detalhes.id_frame) then
|
||||
|
||||
local backdrop = {
|
||||
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
edgeFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
tile = true, edgeSize = 1, tileSize = 5,
|
||||
}
|
||||
|
||||
_detalhes.id_frame = CreateFrame("Frame", "DetailsID", UIParent)
|
||||
_detalhes.id_frame:SetHeight(14)
|
||||
_detalhes.id_frame:SetWidth(120)
|
||||
_detalhes.id_frame:SetPoint("center", UIParent, "center")
|
||||
_detalhes.id_frame:SetBackdrop(backdrop)
|
||||
|
||||
tinsert(UISpecialFrames, "DetailsID")
|
||||
|
||||
_detalhes.id_frame.texto = CreateFrame("editbox", nil, _detalhes.id_frame)
|
||||
_detalhes.id_frame.texto:SetPoint("topleft", _detalhes.id_frame, "topleft")
|
||||
_detalhes.id_frame.texto:SetAutoFocus(false)
|
||||
_detalhes.id_frame.texto:SetFontObject(GameFontHighlightSmall)
|
||||
_detalhes.id_frame.texto:SetHeight(14)
|
||||
_detalhes.id_frame.texto:SetWidth(120)
|
||||
_detalhes.id_frame.texto:SetJustifyH("CENTER")
|
||||
_detalhes.id_frame.texto:EnableMouse(true)
|
||||
_detalhes.id_frame.texto:SetBackdrop(ManualBackdrop)
|
||||
_detalhes.id_frame.texto:SetBackdropColor(0, 0, 0, 0.5)
|
||||
_detalhes.id_frame.texto:SetBackdropBorderColor(0.3, 0.3, 0.30, 0.80)
|
||||
_detalhes.id_frame.texto:SetText("") --localize-me
|
||||
_detalhes.id_frame.texto.perdeu_foco = nil
|
||||
|
||||
_detalhes.id_frame.texto:SetScript("OnEnterPressed", function()
|
||||
_detalhes.id_frame.texto:ClearFocus()
|
||||
_detalhes.id_frame:Hide()
|
||||
end)
|
||||
|
||||
_detalhes.id_frame.texto:SetScript("OnEscapePressed", function()
|
||||
_detalhes.id_frame.texto:ClearFocus()
|
||||
_detalhes.id_frame:Hide()
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
_detalhes.id_frame:Show()
|
||||
_detalhes.id_frame.texto:SetFocus()
|
||||
|
||||
if (pass_guid == "-") then
|
||||
local guid = UnitGUID("target")
|
||||
if (guid) then
|
||||
local g = _detalhes:GetNpcIdFromGuid (guid)
|
||||
_detalhes.id_frame.texto:SetText("" .. g)
|
||||
_detalhes.id_frame.texto:HighlightText()
|
||||
if (UnitExists("target")) then
|
||||
local serial = UnitGUID("target")
|
||||
if (serial) then
|
||||
local npcId = serial
|
||||
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)
|
||||
|
||||
tinsert(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
|
||||
|
||||
else
|
||||
print(pass_guid.. " -> " .. tonumber(pass_guid:sub(6, 10), 16))
|
||||
_detalhes.id_frame.texto:SetText(""..tonumber(pass_guid:sub(6, 10), 16))
|
||||
_detalhes.id_frame.texto:HighlightText()
|
||||
end
|
||||
|
||||
elseif (command == "profile") then
|
||||
@@ -1350,7 +1347,8 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
Details:ScrollDamage()
|
||||
|
||||
elseif (msg == "me" or msg == "ME" or msg == "Me" or msg == "mE") then
|
||||
local UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned
|
||||
Details.slash_me_used = true
|
||||
local UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned
|
||||
local role = UnitGroupRolesAssigned("player")
|
||||
if (role == "HEALER") then
|
||||
Details:OpenPlayerDetails(2)
|
||||
@@ -1674,6 +1672,9 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
elseif (msg == "generatespelllist") then
|
||||
Details.GenerateSpecSpellList()
|
||||
|
||||
elseif (msg == "generateracialslist") then
|
||||
Details.GenerateRacialSpellList()
|
||||
|
||||
elseif (msg == "survey") then
|
||||
Details.Survey.OpenSurveyPanel()
|
||||
|
||||
@@ -1840,22 +1841,24 @@ function Details.RefreshUserList (ignoreIfHidden)
|
||||
Details:UpdateUserPanel (newList)
|
||||
end
|
||||
|
||||
function Details:UpdateUserPanel (usersTable)
|
||||
|
||||
function Details:UpdateUserPanel(usersTable)
|
||||
if (not Details.UserPanel) then
|
||||
local frameWidth, frameHeight = 470, 605
|
||||
DetailsUserPanel = DetailsFramework:CreateSimplePanel(UIParent)
|
||||
DetailsUserPanel:SetSize(707, 505)
|
||||
DetailsUserPanel:SetSize(frameWidth, frameHeight)
|
||||
DetailsUserPanel:SetTitle("Details! Version Check")
|
||||
DetailsUserPanel.Data = {}
|
||||
DetailsUserPanel:ClearAllPoints()
|
||||
DetailsUserPanel:SetPoint("left", UIParent, "left", 10, 0)
|
||||
DetailsUserPanel:SetPoint("left", UIParent, "left", 5, 100)
|
||||
DetailsUserPanel:Hide()
|
||||
|
||||
DetailsFramework:ApplyStandardBackdrop(DetailsUserPanel)
|
||||
|
||||
Details.UserPanel = DetailsUserPanel
|
||||
|
||||
local scroll_width = 675
|
||||
local scroll_height = 450
|
||||
local scroll_lines = 21
|
||||
|
||||
local scroll_width = frameWidth - 30
|
||||
local scroll_height = 605 - 60
|
||||
local scroll_lines = 26
|
||||
local scroll_line_height = 20
|
||||
|
||||
local backdrop_color = {.2, .2, .2, 0.2}
|
||||
@@ -1869,9 +1872,9 @@ function Details:UpdateUserPanel (usersTable)
|
||||
|
||||
--header
|
||||
local headerTable = {
|
||||
{text = "User Name", width = 200},
|
||||
{text = "Realm", width = 200},
|
||||
{text = "Version", width = 200},
|
||||
{text = "User Name", width = 160},
|
||||
{text = "Realm", width = 130},
|
||||
{text = "Version", width = 140},
|
||||
}
|
||||
|
||||
local headerOptions = {
|
||||
|
||||
Reference in New Issue
Block a user