- Added import and export profiles.

- Improved import and export custom skins.
- Fixed shaman's sundering spell not showing in crowd control.
- Fixed sharing guild statistics.
This commit is contained in:
Tercio
2018-10-28 15:58:05 -03:00
parent c6c3cdca1a
commit 24eebefb6f
13 changed files with 3987 additions and 148 deletions
+80 -2
View File
@@ -1929,8 +1929,9 @@
classColor = RAID_CLASS_COLORS [className] and RAID_CLASS_COLORS [className].colorStr
end
local playerNameFormated = _detalhes:GetOnlyName (playerName)
tinsert (sortTable, {
"|c" .. classColor .. playerName .. "|r",
"|c" .. classColor .. playerNameFormated .. "|r",
_detalhes:comma_value (t.ps),
_detalhes:ToK2 (t.total),
_detalhes.gump:IntegerToTimer (t.length),
@@ -2018,8 +2019,9 @@
local className = select (2, GetClassInfo (player_class [playerTable [1]] or 0))
if (className) then
local playerNameFormated = _detalhes:GetOnlyName (playerTable[1])
local classColor = RAID_CLASS_COLORS [className] and RAID_CLASS_COLORS [className].colorStr
playerTable [1] = "|c" .. classColor .. playerTable [1] .. "|r"
playerTable [1] = "|c" .. classColor .. playerNameFormated .. "|r"
end
end
@@ -6968,3 +6970,79 @@ function Details:ScrollDamage()
DetailsScrollDamage:Show()
end
---------------------------------------------------------------------------------------------------------------------------------------
--> import export window
--show a window with a big text editor and 2 buttons: okay and cancel.
--cancel button always closes the window and okay calls the comfirm function passed in the argument
--default text is the text shown show the window is show()
function _detalhes:DumpString (text)
_detalhes:ShowImportWindow (text)
end
function _detalhes:ShowImportWindow (defaultText, confirmFunc, titleText)
if (not DetailsExportWindow) then
local importWindow = DetailsFramework:CreateSimplePanel (UIParent, 800, 610, "Details! Dump String", "DetailsExportWindow")
importWindow:SetFrameStrata ("FULLSCREEN")
importWindow:SetPoint ("center")
DetailsFramework:ApplyStandardBackdrop (importWindow, false, 1.2)
local importTextEditor = DetailsFramework:NewSpecialLuaEditorEntry (importWindow, 780, 540, "ImportEditor", "$parentEditor", true)
importTextEditor:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
importTextEditor:SetBackdropColor (.2, .2, .2, .5)
importTextEditor:SetBackdropBorderColor (0, 0, 0, 1)
importTextEditor:SetPoint ("topleft", importWindow, "topleft", 10, -30)
importTextEditor.scroll:SetBackdrop (nil)
importTextEditor.editbox:SetBackdrop (nil)
importTextEditor:SetBackdrop (nil)
DetailsFramework:ReskinSlider (importTextEditor.scroll)
if (not importTextEditor.__background) then
importTextEditor.__background = importTextEditor:CreateTexture (nil, "background")
end
importTextEditor:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
importTextEditor:SetBackdropBorderColor (0, 0, 0, 1)
importTextEditor.__background:SetColorTexture (0.2317647, 0.2317647, 0.2317647)
importTextEditor.__background:SetVertexColor (0.27, 0.27, 0.27)
importTextEditor.__background:SetAlpha (0.8)
importTextEditor.__background:SetVertTile (true)
importTextEditor.__background:SetHorizTile (true)
importTextEditor.__background:SetAllPoints()
--import button
local onClickImportButton = function()
if (DetailsExportWindow.ConfirmFunction) then
DetailsFramework:Dispatch (DetailsExportWindow.ConfirmFunction, importTextEditor:GetText())
end
importWindow:Hide()
end
local okayButton = DetailsFramework:CreateButton (importTextEditor, onClickImportButton, 120, 20, "Okay", -1, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), _detalhes.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")) --> localize-me
okayButton:SetIcon ([[Interface\BUTTONS\UI-Panel-BiggerButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9})
importTextEditor.OkayButton = okayButton
--cancel button
local cancelButton = DetailsFramework:CreateButton (importTextEditor, function() importWindow:Hide() end, 120, 20, "Cancel", -1, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), _detalhes.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")) --> localize-me
cancelButton:SetIcon ([[Interface\BUTTONS\UI-Panel-MinimizeButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9})
okayButton:SetPoint ("topright", importTextEditor, "bottomright", 0, -10)
cancelButton:SetPoint ("right", okayButton, "left", -20, 0)
end
DetailsExportWindow.ConfirmFunction = confirmFunc
DetailsExportWindow.ImportEditor:SetText (defaultText or "")
DetailsExportWindow:Show()
titleText = titleText or "Details! Dump String"
DetailsExportWindow.Title:SetText (titleText)
C_Timer.After (.2, function()
DetailsExportWindow.ImportEditor:SetFocus (true)
DetailsExportWindow.ImportEditor.editbox:HighlightText (0)
end)
end