Format the text in the breakdown player list using the same font, size and outline of the damage window

This commit is contained in:
Tercio Jose
2022-10-09 17:12:13 -03:00
parent 61644c755a
commit 9974a87119
92 changed files with 5980 additions and 5978 deletions
+1 -1
View File
@@ -662,7 +662,7 @@ there is two ways for do this:
end
end
table.sort (actorsAmount, function (a,b) return a.total > b.total end)
table.sort (actorsAmount, function(a,b) return a.total > b.total end)
2 - replacing the member "custom" on the actor:
+38 -38
View File
@@ -73,7 +73,7 @@ function DF:LoadAllSpells (hashMap, indexTable, allSpellsSameName)
C_Timer.After (0, function()
if (hashMap and not indexTable) then
for i = 1, CONST_MAX_SPELLS do
local spellName = GetSpellInfo (i)
local spellName = GetSpellInfo(i)
if (spellName) then
hashMap [lower (spellName)] = i
end
@@ -81,7 +81,7 @@ function DF:LoadAllSpells (hashMap, indexTable, allSpellsSameName)
elseif (not hashMap and indexTable) then
for i = 1, CONST_MAX_SPELLS do
local spellName = GetSpellInfo (i)
local spellName = GetSpellInfo(i)
if (spellName) then
indexTable [#indexTable+1] = lower (spellName)
end
@@ -91,7 +91,7 @@ function DF:LoadAllSpells (hashMap, indexTable, allSpellsSameName)
--DF_CALC_PERFORMANCE()
if (allSpellsSameName) then
for i = 1, CONST_MAX_SPELLS do
local spellName = GetSpellInfo (i)
local spellName = GetSpellInfo(i)
if (spellName) then
spellName = lower (spellName)
indexTable [#indexTable + 1] = spellName
@@ -108,7 +108,7 @@ function DF:LoadAllSpells (hashMap, indexTable, allSpellsSameName)
end
else
for i = 1, CONST_MAX_SPELLS do
local spellName = GetSpellInfo (i)
local spellName = GetSpellInfo(i)
if (spellName) then
spellName = lower (spellName)
indexTable [#indexTable + 1] = spellName
@@ -155,7 +155,7 @@ end
local AuraTrackerMetaFunctions = _G[DF.GlobalWidgetControlNames["aura_tracker"]]
--create panels
local on_profile_changed = function (self, newdb)
local on_profile_changed = function(self, newdb)
self.db = newdb
@@ -232,7 +232,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
-------------
local on_switch_tracking_method = function (self)
local on_switch_tracking_method = function(self)
local method = self.Method
f.db.aura_tracker.track_method = method
@@ -304,7 +304,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
--store a table with spell name as key and in the value an index table with spell IDs
local AllSpellsSameName = {}
local load_all_spells = function (self, capsule)
local load_all_spells = function(self, capsule)
if (not next (AllSpellsMap)) then
DF:LoadAllSpells (AllSpellsMap, AllSpellNames, AllSpellsSameName)
@@ -369,8 +369,8 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
debuff_name_blacklist_entry.tooltip = "Enter the debuff name using lower case letters."
f_auto.AddDebuffBlacklistTextBox = debuff_name_blacklist_entry
local same_name_spells_add = function (spellID, t)
local spellName = GetSpellInfo (spellID)
local same_name_spells_add = function(spellID, t)
local spellName = GetSpellInfo(spellID)
if (spellName) then
if (not next (AllSpellsMap)) then
load_all_spells()
@@ -389,11 +389,11 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
end
DF.AddSpellWithSameName = same_name_spells_add
local get_spellID_from_string = function (text)
local get_spellID_from_string = function(text)
--check if the user entered a spell ID
local isSpellID = tonumber (text)
if (isSpellID and isSpellID > 1 and isSpellID < 10000000) then
local isValidSpellID = GetSpellInfo (isSpellID)
local isValidSpellID = GetSpellInfo(isSpellID)
if (isValidSpellID) then
return isSpellID
else
@@ -691,7 +691,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
--options passed to the create aura panel
local width, height, row_height = options.width, options.height, options.row_height
local autoTrackList_LineOnEnter = function (self, capsule, value)
local autoTrackList_LineOnEnter = function(self, capsule, value)
local flag = self.Flag
value = value or self.SpellID
@@ -701,7 +701,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
GameCooltip2:SetOwner (self, "left", "right", 2, 0)
GameCooltip2:SetOption ("TextSize", 10)
local spellName, _, spellIcon = GetSpellInfo (value)
local spellName, _, spellIcon = GetSpellInfo(value)
if (spellName) then
GameCooltip2:AddLine (spellName .. " (" .. value .. ")")
GameCooltip2:AddIcon (spellIcon, 1, 1, 14, 14, .1, .9, .1, .9)
@@ -709,7 +709,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
GameCooltip2:Show()
else
local spellName = GetSpellInfo (value)
local spellName = GetSpellInfo(value)
if (spellName) then
local spellsWithSameName = db.aura_cache_by_name [lower (spellName)]
@@ -724,7 +724,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
GameCooltip2:SetOption ("TextSize", 10)
for i, spellID in ipairs (spellsWithSameName) do
local spellName, _, spellIcon = GetSpellInfo (spellID)
local spellName, _, spellIcon = GetSpellInfo(spellID)
if (spellName) then
GameCooltip2:AddLine (spellName .. " (" .. spellID .. ")")
GameCooltip2:AddIcon (spellIcon, 1, 1, 14, 14, .1, .9, .1, .9)
@@ -749,9 +749,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local backdropColor = {.8, .8, .8, 0.2}
local backdropColor_OnEnter = {.8, .8, .8, 0.4}
local createAuraScrollBox = function (parent, name, member, title, db, removeFunc)
local createAuraScrollBox = function(parent, name, member, title, db, removeFunc)
local updateFunc = function (self, data, offset, totalLines)
local updateFunc = function(self, data, offset, totalLines)
for i = 1, totalLines do
local index = i + offset
local auraTable = data [index]
@@ -776,21 +776,21 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
end
end
local lineOnEnter = function (self)
local lineOnEnter = function(self)
self:SetBackdropColor (unpack (backdropColor_OnEnter))
--GameTooltip:SetOwner (self, "ANCHOR_CURSOR")
--GameTooltip:SetSpellByID (self.SpellID)
--GameTooltip:SetSpellByID(self.SpellID)
--GameTooltip:AddLine (" ")
--GameTooltip:Show()
end
local lineOnLeave = function (self)
local lineOnLeave = function(self)
self:SetBackdropColor (unpack (backdropColor))
--GameTooltip:Hide()
end
local onRemoveClick = function (self)
local onRemoveClick = function(self)
local spellID = self:GetParent().SpellID
db [spellID] = nil
db ["".. (spellID or "")] = nil -- cleanup...
@@ -800,7 +800,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
end
end
local createLineFunc = function (self, index)
local createLineFunc = function(self, index)
local line = CreateFrame ("button", "$parentLine" .. index, self, "BackdropTemplate")
line:SetPoint ("topleft", self, "topleft", 1, - ((index - 1) * (lineHeight + 1)) - 1)
line:SetSize (scrollWidth - 2, lineHeight)
@@ -835,7 +835,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
end
local scroll = DF:CreateScrollBox (parent, name, updateFunc, db, scrollWidth, scrollHeight, lineAmount, lineHeight)
DF:ReskinSlider (scroll)
DF:ReskinSlider(scroll)
parent [member] = scroll
scroll.OriginalData = db
@@ -843,7 +843,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local t = {}
local added = {}
for spellID, flag in pairs (scroll.OriginalData) do
local spellName, _, spellIcon = GetSpellInfo (spellID)
local spellName, _, spellIcon = GetSpellInfo(spellID)
if (spellName and not added[tonumber(spellID) or 0]) then
local lowerSpellName = spellName:lower()
tinsert (t, {spellID, spellName, spellIcon, lowerSpellName, flag})
@@ -851,7 +851,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
end
end
table.sort (t, function (t1, t2) return t1[4] < t2[4] end)
table.sort (t, function(t1, t2) return t1[4] < t2[4] end)
self:SetData (t)
self:Refresh()
@@ -952,23 +952,23 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local backdrop_color = {.8, .8, .8, 0.2}
local backdrop_color_on_enter = {.8, .8, .8, 0.4}
local line_onenter = function (self)
local line_onenter = function(self)
self:SetBackdropColor (unpack (backdrop_color_on_enter))
local spellid = select (7, GetSpellInfo (self.value))
local spellid = select (7, GetSpellInfo(self.value))
if (spellid) then
GameTooltip:SetOwner (self, "ANCHOR_CURSOR")
GameTooltip:SetSpellByID (spellid)
GameTooltip:SetSpellByID(spellid)
GameTooltip:AddLine (" ")
GameTooltip:Show()
end
end
local line_onleave = function (self)
local line_onleave = function(self)
self:SetBackdropColor (unpack (backdrop_color))
GameTooltip:Hide()
end
local onclick_remove_button = function (self)
local onclick_remove_button = function(self)
local spell = self:GetParent().value
local data = self:GetParent():GetParent():GetData()
@@ -982,7 +982,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
self:GetParent():GetParent():Refresh()
end
local scroll_createline = function (self, index)
local scroll_createline = function(self, index)
local line = CreateFrame ("button", "$parentLine" .. index, self, "BackdropTemplate")
line:SetPoint ("topleft", self, "topleft", 1, -((index-1)*(scroll_line_height+1)) - 1)
line:SetSize (scroll_width - 2, scroll_line_height)
@@ -1013,13 +1013,13 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
return line
end
local scroll_refresh = function (self, data, offset, total_lines)
local scroll_refresh = function(self, data, offset, total_lines)
for i = 1, total_lines do
local index = i + offset
local aura = data [index]
if (aura) then
local line = self:GetLine (i)
local name, _, icon = GetSpellInfo (aura)
local name, _, icon = GetSpellInfo(aura)
line.value = aura
if (name) then
line.name:SetText (name)
@@ -1035,7 +1035,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local buffs_added = self:CreateScrollBox (f_manual, "$parentBuffsAdded", scroll_refresh, f.db.aura_tracker.buff, scroll_width, scroll_height, scroll_lines, scroll_line_height)
buffs_added:SetPoint ("topleft", f_manual, "topleft", 0, y)
DF:ReskinSlider (buffs_added)
DF:ReskinSlider(buffs_added)
for i = 1, scroll_lines do
buffs_added:CreateLine (scroll_createline)
@@ -1043,7 +1043,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local debuffs_added = self:CreateScrollBox (f_manual, "$parentDebuffsAdded", scroll_refresh, f.db.aura_tracker.debuff, scroll_width, scroll_height, scroll_lines, scroll_line_height)
debuffs_added:SetPoint ("topleft", f_manual, "topleft", width+30, y)
DF:ReskinSlider (debuffs_added)
DF:ReskinSlider(debuffs_added)
for i = 1, scroll_lines do
debuffs_added:CreateLine (scroll_createline)
@@ -1182,7 +1182,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local export_buff_button = self:CreateButton (f_manual, function()
local str = ""
for _, spellId in ipairs (f.db.aura_tracker.buff) do
local spellName = GetSpellInfo (spellId)
local spellName = GetSpellInfo(spellId)
if (spellName) then
str = str .. spellName .. "; "
end
@@ -1196,7 +1196,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local export_debuff_button = self:CreateButton (f_manual, function()
local str = ""
for _, spellId in ipairs (f.db.aura_tracker.debuff) do
local spellName = GetSpellInfo (spellId)
local spellName = GetSpellInfo(spellId)
if (spellName) then
str = str .. spellName .. "; "
end
@@ -1246,7 +1246,7 @@ function DF:GetAllPlayerSpells (include_lower_case)
local index = offset + i
local spellType, spellId = GetSpellBookItemInfo (index, "player")
if (spellType == "SPELL") then
local spellName = GetSpellInfo (spellId)
local spellName = GetSpellInfo(spellId)
tinsert (playerSpells, spellName)
if (include_lower_case) then
tinsert (playerSpells, lower (spellName))
+17 -17
View File
@@ -125,7 +125,7 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)
ButtonMetaFunctions.GetMembers["textfont"] = gmember_textfont --alias
ButtonMetaFunctions.GetMembers["textsize"] = gmember_textsize --alias
ButtonMetaFunctions.__index = function (_table, _member_requested)
ButtonMetaFunctions.__index = function(_table, _member_requested)
local func = ButtonMetaFunctions.GetMembers [_member_requested]
if (func) then
@@ -143,12 +143,12 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
--tooltip
local smember_tooltip = function (_object, _value)
local smember_tooltip = function(_object, _value)
return _object:SetTooltip (_value)
end
--show
local smember_show = function (_object, _value)
local smember_show = function(_object, _value)
if (_value) then
return _object:Show()
else
@@ -157,7 +157,7 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)
end
--hide
local smember_hide = function (_object, _value)
local smember_hide = function(_object, _value)
if (not _value) then
return _object:Show()
else
@@ -166,53 +166,53 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)
end
--frame width
local smember_width = function (_object, _value)
local smember_width = function(_object, _value)
return _object.button:SetWidth (_value)
end
--frame height
local smember_height = function (_object, _value)
local smember_height = function(_object, _value)
return _object.button:SetHeight (_value)
end
--text
local smember_text = function (_object, _value)
local smember_text = function(_object, _value)
return _object.button.text:SetText (_value)
end
--function
local smember_function = function (_object, _value)
local smember_function = function(_object, _value)
return rawset(_object, "func", _value)
end
--param1
local smember_param1 = function (_object, _value)
local smember_param1 = function(_object, _value)
return rawset(_object, "param1", _value)
end
--param2
local smember_param2 = function (_object, _value)
local smember_param2 = function(_object, _value)
return rawset(_object, "param2", _value)
end
--text color
local smember_textcolor = function (_object, _value)
local smember_textcolor = function(_object, _value)
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
return _object.button.text:SetTextColor (_value1, _value2, _value3, _value4)
end
--text font
local smember_textfont = function (_object, _value)
local smember_textfont = function(_object, _value)
return DF:SetFontFace (_object.button.text, _value)
end
--text size
local smember_textsize = function (_object, _value)
local smember_textsize = function(_object, _value)
return DF:SetFontSize (_object.button.text, _value)
end
--texture
local smember_texture = function (_object, _value)
local smember_texture = function(_object, _value)
if (type (_value) == "table") then
local _value1, _value2, _value3, _value4 = unpack (_value)
if (_value1) then
@@ -237,7 +237,7 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)
end
--locked
local smember_locked = function (_object, _value)
local smember_locked = function(_object, _value)
if (_value) then
_object.button:SetMovable (false)
return rawset(_object, "is_locked", true)
@@ -249,7 +249,7 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)
end
--text align
local smember_textalign = function (_object, _value)
local smember_textalign = function(_object, _value)
if (_value == "left" or _value == "<") then
_object.button.text:SetPoint ("left", _object.button, "left", 2, 0)
_object.capsule_textalign = "left"
@@ -282,7 +282,7 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)
ButtonMetaFunctions.SetMembers ["locked"] = smember_locked
ButtonMetaFunctions.SetMembers ["textalign"] = smember_textalign
ButtonMetaFunctions.__newindex = function (_table, _key, _value)
ButtonMetaFunctions.__newindex = function(_table, _key, _value)
local func = ButtonMetaFunctions.SetMembers [_key]
if (func) then
return func (_table, _value)
+102 -126
View File
@@ -1,6 +1,6 @@
local dversion = 377
local dversion = 379
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary(major, minor)
@@ -184,7 +184,7 @@ function DF:GetRoleByClassicTalentTree()
local MIN_SPECS = 4
--put the spec with more talent point to the top
table.sort(pointsPerSpec, function (t1, t2) return t1[2] > t2[2] end)
table.sort(pointsPerSpec, function(t1, t2) return t1[2] > t2[2] end)
--get the spec with more points spent
local spec = pointsPerSpec[1]
@@ -1374,6 +1374,7 @@ end
if (text) then
if (useColon) then
text = text .. ":"
return text
else
return text
end
@@ -1551,6 +1552,8 @@ end
end
end
local extraPaddingY = 0
if (not widgetTable.novolatile) then
--step a line
if (widgetTable.type == "blank" or widgetTable.type == "space") then
@@ -1667,6 +1670,13 @@ end
if (widgetTable.boxfirst or useBoxFirstOnAllWidgets) then
switch:SetPoint (currentXOffset, currentYOffset)
switch.hasLabel:SetPoint ("left", switch, "right", 2)
local nextWidgetTable = menuOptions[index+1]
if (nextWidgetTable) then
if (nextWidgetTable.type ~= "blank" and nextWidgetTable.type ~= "breakline" and nextWidgetTable.type ~= "toggle" and nextWidgetTable.type ~= "color") then
extraPaddingY = 4
end
end
else
switch.hasLabel:SetPoint (currentXOffset, currentYOffset)
switch:SetPoint ("left", switch.hasLabel, "right", 2)
@@ -1893,6 +1903,10 @@ end
end
end
if (extraPaddingY > 0) then
currentYOffset = currentYOffset - extraPaddingY
end
if (widgetTable.type == "breakline" or currentYOffset < height) then
currentYOffset = yOffset
currentXOffset = currentXOffset + maxColumnWidth + 20
@@ -2077,12 +2091,12 @@ end
local nextWidgetTable = menuOptions[index+1]
if (nextWidgetTable) then
if (nextWidgetTable.type ~= "blank" and nextWidgetTable.type ~= "breakline" and nextWidgetTable.type ~= "toggle" and nextWidgetTable.type ~= "color") then
extraPaddingY = 3
extraPaddingY = 4
end
end
else
label:SetPoint(currentXOffset, currentYOffset)
switch:SetPoint("left", label, "right", 2)
switch:SetPoint("left", label, "right", 2, 0)
end
switch.hasLabel = label
@@ -2396,7 +2410,7 @@ end
frame:RegisterEvent ("PLAYER_REGEN_DISABLED")
frame:RegisterEvent ("PLAYER_REGEN_ENABLED")
frame:SetScript ("OnEvent", function (self, event)
frame:SetScript ("OnEvent", function(self, event)
if (event == "PLAYER_REGEN_DISABLED") then
in_combat_background:Show()
in_combat_label:Show()
@@ -2424,7 +2438,7 @@ end
TutorialAlertFrame:SetFrameStrata ("TOOLTIP")
TutorialAlertFrame:Hide()
TutorialAlertFrame:SetScript ("OnMouseUp", function (self)
TutorialAlertFrame:SetScript ("OnMouseUp", function(self)
if (self.clickfunc and type (self.clickfunc) == "function") then
self.clickfunc()
end
@@ -2442,7 +2456,7 @@ end
TutorialAlertFrame:Show()
end
local refresh_options = function (self)
local refresh_options = function(self)
for _, widget in ipairs (self.widget_list) do
if (widget._get) then
if (widget.widget_type == "label") then
@@ -2467,7 +2481,7 @@ end
end
end
local get_frame_by_id = function (self, id)
local get_frame_by_id = function(self, id)
return self.widgetids [id]
end
@@ -3054,7 +3068,7 @@ local FrameshakeUpdateFrame = DetailsFrameworkFrameshakeControl or CreateFrame (
--> store the frame which has frame shakes registered
FrameshakeUpdateFrame.RegisteredFrames = FrameshakeUpdateFrame.RegisteredFrames or {}
FrameshakeUpdateFrame.RegisterFrame = function (newFrame)
FrameshakeUpdateFrame.RegisterFrame = function(newFrame)
--> add the frame into the registered frames to update
DF.table.addunique (FrameshakeUpdateFrame.RegisteredFrames, newFrame)
end
@@ -3062,7 +3076,7 @@ end
--forward declared
local frameshake_do_update
FrameshakeUpdateFrame:SetScript ("OnUpdate", function (self, deltaTime)
FrameshakeUpdateFrame:SetScript ("OnUpdate", function(self, deltaTime)
for i = 1, #FrameshakeUpdateFrame.RegisteredFrames do
local parent = FrameshakeUpdateFrame.RegisteredFrames [i]
--> check if there's a shake running
@@ -3079,7 +3093,7 @@ FrameshakeUpdateFrame:SetScript ("OnUpdate", function (self, deltaTime)
end)
local frameshake_shake_finished = function (parent, shakeObject)
local frameshake_shake_finished = function(parent, shakeObject)
if (shakeObject.IsPlaying) then
shakeObject.IsPlaying = false
shakeObject.TimeLeft = 0
@@ -3117,7 +3131,7 @@ local frameshake_shake_finished = function (parent, shakeObject)
end
--already declared above the update function
frameshake_do_update = function (parent, shakeObject, deltaTime)
frameshake_do_update = function(parent, shakeObject, deltaTime)
--> check delta time
deltaTime = deltaTime or 0
@@ -3193,12 +3207,12 @@ frameshake_do_update = function (parent, shakeObject, deltaTime)
end
end
local frameshake_stop = function (parent, shakeObject)
local frameshake_stop = function(parent, shakeObject)
frameshake_shake_finished (parent, shakeObject)
end
--> scale direction scales the X and Y coordinates, scale strength scales the amplitude and frequency
local frameshake_play = function (parent, shakeObject, scaleDirection, scaleAmplitude, scaleFrequency, scaleDuration)
local frameshake_play = function(parent, shakeObject, scaleDirection, scaleAmplitude, scaleFrequency, scaleDuration)
--> check if is already playing
if (shakeObject.TimeLeft > 0) then
@@ -3271,7 +3285,7 @@ local frameshake_play = function (parent, shakeObject, scaleDirection, scaleAmpl
frameshake_do_update (parent, shakeObject)
end
local frameshake_set_config = function (parent, shakeObject, duration, amplitude, frequency, absoluteSineX, absoluteSineY, scaleX, scaleY, fadeInTime, fadeOutTime, anchorPoints)
local frameshake_set_config = function(parent, shakeObject, duration, amplitude, frequency, absoluteSineX, absoluteSineY, scaleX, scaleY, fadeInTime, fadeOutTime, anchorPoints)
shakeObject.Amplitude = amplitude or shakeObject.Amplitude
shakeObject.Frequency = frequency or shakeObject.Frequency
shakeObject.Duration = duration or shakeObject.Duration
@@ -3348,7 +3362,7 @@ end
-----------------------------
--> glow overlay
local glow_overlay_play = function (self)
local glow_overlay_play = function(self)
if (not self:IsShown()) then
self:Show()
end
@@ -3361,7 +3375,7 @@ local glow_overlay_play = function (self)
end
end
local glow_overlay_stop = function (self)
local glow_overlay_stop = function(self)
if (self.animOut:IsPlaying()) then
self.animOut:Stop()
end
@@ -3373,7 +3387,7 @@ local glow_overlay_stop = function (self)
end
end
local glow_overlay_setcolor = function (self, antsColor, glowColor)
local glow_overlay_setcolor = function(self, antsColor, glowColor)
if (antsColor) then
local r, g, b, a = DF:ParseColors (antsColor)
self.ants:SetVertexColor (r, g, b, a)
@@ -3393,11 +3407,11 @@ local glow_overlay_setcolor = function (self, antsColor, glowColor)
end
end
local glow_overlay_onshow = function (self)
local glow_overlay_onshow = function(self)
glow_overlay_play (self)
end
local glow_overlay_onhide = function (self)
local glow_overlay_onhide = function(self)
glow_overlay_stop (self)
end
@@ -3437,7 +3451,7 @@ function DF:CreateGlowOverlay (parent, antsColor, glowColor)
end
--> custom glow with ants animation
local ants_set_texture_offset = function (self, leftOffset, rightOffset, topOffset, bottomOffset)
local ants_set_texture_offset = function(self, leftOffset, rightOffset, topOffset, bottomOffset)
leftOffset = leftOffset or 0
rightOffset = rightOffset or 0
topOffset = topOffset or 0
@@ -3469,7 +3483,7 @@ function DF:CreateAnts (parent, antTable, leftOffset, rightOffset, topOffset, bo
f.AntTable = antTable
f:SetScript ("OnUpdate", function (self, deltaTime)
f:SetScript ("OnUpdate", function(self, deltaTime)
AnimateTexCoords (t, self.AntTable.TextureWidth, self.AntTable.TextureHeight, self.AntTable.TexturePartsWidth, self.AntTable.TexturePartsHeight, self.AntTable.AmountParts, deltaTime, self.AntTable.Throttle or 0.025)
end)
@@ -3489,7 +3503,7 @@ local default_border_color1 = .5
local default_border_color2 = .3
local default_border_color3 = .1
local SetBorderAlpha = function (self, alpha1, alpha2, alpha3)
local SetBorderAlpha = function(self, alpha1, alpha2, alpha3)
self.Borders.Alpha1 = alpha1 or self.Borders.Alpha1
self.Borders.Alpha2 = alpha2 or self.Borders.Alpha2
self.Borders.Alpha3 = alpha3 or self.Borders.Alpha3
@@ -3505,7 +3519,7 @@ local SetBorderAlpha = function (self, alpha1, alpha2, alpha3)
end
end
local SetBorderColor = function (self, r, g, b)
local SetBorderColor = function(self, r, g, b)
for _, texture in ipairs (self.Borders.Layer1) do
texture:SetColorTexture (r, g, b)
end
@@ -3517,7 +3531,7 @@ local SetBorderColor = function (self, r, g, b)
end
end
local SetLayerVisibility = function (self, layer1Shown, layer2Shown, layer3Shown)
local SetLayerVisibility = function(self, layer1Shown, layer2Shown, layer3Shown)
for _, texture in ipairs (self.Borders.Layer1) do
texture:SetShown (layer1Shown)
@@ -3829,144 +3843,106 @@ function DF:CreateBorderWithSpread (parent, alpha1, alpha2, alpha3, size, spread
end
function DF:ReskinSlider (slider, heightOffset)
function DF:ReskinSlider(slider, heightOffset)
if (slider.slider) then
slider.cima:SetNormalTexture ([[Interface\Buttons\Arrow-Up-Up]])
slider.cima:SetPushedTexture ([[Interface\Buttons\Arrow-Up-Down]])
slider.cima:SetDisabledTexture ([[Interface\Buttons\Arrow-Up-Disabled]])
slider.cima:SetNormalTexture([[Interface\Buttons\Arrow-Up-Up]])
slider.cima:SetPushedTexture([[Interface\Buttons\Arrow-Up-Down]])
slider.cima:SetDisabledTexture([[Interface\Buttons\Arrow-Up-Disabled]])
slider.cima:GetNormalTexture():ClearAllPoints()
slider.cima:GetPushedTexture():ClearAllPoints()
slider.cima:GetDisabledTexture():ClearAllPoints()
slider.cima:GetNormalTexture():SetPoint ("center", slider.cima, "center", 1, 1)
slider.cima:GetPushedTexture():SetPoint ("center", slider.cima, "center", 1, 1)
slider.cima:GetDisabledTexture():SetPoint ("center", slider.cima, "center", 1, 1)
slider.cima:SetSize (16, 16)
--[=[
slider.cima:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]]})
slider.cima:SetBackdropColor (0, 0, 0, 0.3)
slider.cima:SetBackdropBorderColor (0, 0, 0, 1)
]=]
slider.baixo:SetNormalTexture ([[Interface\Buttons\Arrow-Down-Up]])
slider.baixo:SetPushedTexture ([[Interface\Buttons\Arrow-Down-Down]])
slider.baixo:SetDisabledTexture ([[Interface\Buttons\Arrow-Down-Disabled]])
slider.cima:GetNormalTexture():SetPoint("center", slider.cima, "center", 1, 1)
slider.cima:GetPushedTexture():SetPoint("center", slider.cima, "center", 1, 1)
slider.cima:GetDisabledTexture():SetPoint("center", slider.cima, "center", 1, 1)
slider.cima:SetSize(16, 16)
slider.baixo:SetNormalTexture([[Interface\Buttons\Arrow-Down-Up]])
slider.baixo:SetPushedTexture([[Interface\Buttons\Arrow-Down-Down]])
slider.baixo:SetDisabledTexture([[Interface\Buttons\Arrow-Down-Disabled]])
slider.baixo:GetNormalTexture():ClearAllPoints()
slider.baixo:GetPushedTexture():ClearAllPoints()
slider.baixo:GetDisabledTexture():ClearAllPoints()
slider.baixo:GetNormalTexture():SetPoint ("center", slider.baixo, "center", 1, -5)
slider.baixo:GetPushedTexture():SetPoint ("center", slider.baixo, "center", 1, -5)
slider.baixo:GetDisabledTexture():SetPoint ("center", slider.baixo, "center", 1, -5)
slider.baixo:SetSize (16, 16)
--[=[
slider.baixo:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]]})
slider.baixo:SetBackdropColor (0, 0, 0, 0.35)
slider.baixo:SetBackdropBorderColor (0, 0, 0, 1)
slider.slider:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]]})
slider.slider:SetBackdropColor (0, 0, 0, 0.35)
slider.slider:SetBackdropBorderColor (0, 0, 0, 1)
]=]
--slider.slider:Altura (164)
slider.slider:cimaPoint (0, 13)
slider.slider:baixoPoint (0, -13)
slider.slider.thumb:SetTexture ([[Interface\AddOns\Details\images\icons2]])
slider.slider.thumb:SetTexCoord (482/512, 492/512, 104/512, 120/512)
slider.slider.thumb:SetSize (12, 12)
slider.slider.thumb:SetVertexColor (0.6, 0.6, 0.6, 0.95)
slider.baixo:GetNormalTexture():SetPoint("center", slider.baixo, "center", 1, -5)
slider.baixo:GetPushedTexture():SetPoint("center", slider.baixo, "center", 1, -5)
slider.baixo:GetDisabledTexture():SetPoint("center", slider.baixo, "center", 1, -5)
slider.baixo:SetSize(16, 16)
slider.slider:cimaPoint(0, 13)
slider.slider:baixoPoint(0, -13)
slider.slider.thumb:SetTexture([[Interface\AddOns\Details\images\icons2]])
slider.slider.thumb:SetTexCoord(482/512, 492/512, 104/512, 120/512)
slider.slider.thumb:SetSize(12, 12)
slider.slider.thumb:SetVertexColor(0.6, 0.6, 0.6, 0.95)
else
--up button
local offset = 1 --space between the scrollbox and the scrollar
do
local normalTexture = slider.ScrollBar.ScrollUpButton.Normal
normalTexture:SetTexture ([[Interface\Buttons\Arrow-Up-Up]])
normalTexture:SetTexCoord (0, 1, .2, 1)
normalTexture:SetTexture([[Interface\Buttons\Arrow-Up-Up]])
normalTexture:SetTexCoord(0, 1, .2, 1)
normalTexture:SetPoint ("topleft", slider.ScrollBar.ScrollUpButton, "topleft", offset, 0)
normalTexture:SetPoint ("bottomright", slider.ScrollBar.ScrollUpButton, "bottomright", offset, 0)
normalTexture:SetPoint("topleft", slider.ScrollBar.ScrollUpButton, "topleft", offset, 0)
normalTexture:SetPoint("bottomright", slider.ScrollBar.ScrollUpButton, "bottomright", offset, 0)
local pushedTexture = slider.ScrollBar.ScrollUpButton.Pushed
pushedTexture:SetTexture ([[Interface\Buttons\Arrow-Up-Down]])
pushedTexture:SetTexCoord (0, 1, .2, 1)
pushedTexture:SetTexture([[Interface\Buttons\Arrow-Up-Down]])
pushedTexture:SetTexCoord(0, 1, .2, 1)
pushedTexture:SetPoint ("topleft", slider.ScrollBar.ScrollUpButton, "topleft", offset, 0)
pushedTexture:SetPoint ("bottomright", slider.ScrollBar.ScrollUpButton, "bottomright", offset, 0)
pushedTexture:SetPoint("topleft", slider.ScrollBar.ScrollUpButton, "topleft", offset, 0)
pushedTexture:SetPoint("bottomright", slider.ScrollBar.ScrollUpButton, "bottomright", offset, 0)
local disabledTexture = slider.ScrollBar.ScrollUpButton.Disabled
disabledTexture:SetTexture ([[Interface\Buttons\Arrow-Up-Disabled]])
disabledTexture:SetTexCoord (0, 1, .2, 1)
disabledTexture:SetAlpha (.5)
disabledTexture:SetTexture([[Interface\Buttons\Arrow-Up-Disabled]])
disabledTexture:SetTexCoord(0, 1, .2, 1)
disabledTexture:SetAlpha(.5)
disabledTexture:SetPoint ("topleft", slider.ScrollBar.ScrollUpButton, "topleft", offset, 0)
disabledTexture:SetPoint ("bottomright", slider.ScrollBar.ScrollUpButton, "bottomright", offset, 0)
disabledTexture:SetPoint("topleft", slider.ScrollBar.ScrollUpButton, "topleft", offset, 0)
disabledTexture:SetPoint("bottomright", slider.ScrollBar.ScrollUpButton, "bottomright", offset, 0)
slider.ScrollBar.ScrollUpButton:SetSize (16, 16)
--[=[
slider.ScrollBar.ScrollUpButton:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = "Interface\\Tooltips\\UI-Tooltip-Background"})
slider.ScrollBar.ScrollUpButton:SetBackdropColor (0, 0, 0, 0.3)
slider.ScrollBar.ScrollUpButton:SetBackdropBorderColor (0, 0, 0, 1)
]=]
--it was having problems with the texture anchor when calling ClearAllPoints() and setting new points different from the original
--now it is using the same points from the original with small offsets tp align correctly
slider.ScrollBar.ScrollUpButton:SetSize(16, 16)
end
--down button
do
local normalTexture = slider.ScrollBar.ScrollDownButton.Normal
normalTexture:SetTexture ([[Interface\Buttons\Arrow-Down-Up]])
normalTexture:SetTexCoord (0, 1, 0, .8)
normalTexture:SetTexture([[Interface\Buttons\Arrow-Down-Up]])
normalTexture:SetTexCoord(0, 1, 0, .8)
normalTexture:SetPoint ("topleft", slider.ScrollBar.ScrollDownButton, "topleft", offset, -4)
normalTexture:SetPoint ("bottomright", slider.ScrollBar.ScrollDownButton, "bottomright", offset, -4)
normalTexture:SetPoint("topleft", slider.ScrollBar.ScrollDownButton, "topleft", offset, -4)
normalTexture:SetPoint("bottomright", slider.ScrollBar.ScrollDownButton, "bottomright", offset, -4)
local pushedTexture = slider.ScrollBar.ScrollDownButton.Pushed
pushedTexture:SetTexture ([[Interface\Buttons\Arrow-Down-Down]])
pushedTexture:SetTexCoord (0, 1, 0, .8)
pushedTexture:SetTexture([[Interface\Buttons\Arrow-Down-Down]])
pushedTexture:SetTexCoord(0, 1, 0, .8)
pushedTexture:SetPoint ("topleft", slider.ScrollBar.ScrollDownButton, "topleft", offset, -4)
pushedTexture:SetPoint ("bottomright", slider.ScrollBar.ScrollDownButton, "bottomright", offset, -4)
pushedTexture:SetPoint("topleft", slider.ScrollBar.ScrollDownButton, "topleft", offset, -4)
pushedTexture:SetPoint("bottomright", slider.ScrollBar.ScrollDownButton, "bottomright", offset, -4)
local disabledTexture = slider.ScrollBar.ScrollDownButton.Disabled
disabledTexture:SetTexture ([[Interface\Buttons\Arrow-Down-Disabled]])
disabledTexture:SetTexCoord (0, 1, 0, .8)
disabledTexture:SetAlpha (.5)
disabledTexture:SetTexture([[Interface\Buttons\Arrow-Down-Disabled]])
disabledTexture:SetTexCoord(0, 1, 0, .8)
disabledTexture:SetAlpha(.5)
disabledTexture:SetPoint ("topleft", slider.ScrollBar.ScrollDownButton, "topleft", offset, -4)
disabledTexture:SetPoint ("bottomright", slider.ScrollBar.ScrollDownButton, "bottomright", offset, -4)
disabledTexture:SetPoint("topleft", slider.ScrollBar.ScrollDownButton, "topleft", offset, -4)
disabledTexture:SetPoint("bottomright", slider.ScrollBar.ScrollDownButton, "bottomright", offset, -4)
slider.ScrollBar.ScrollDownButton:SetSize (16, 16)
--[=[
slider.ScrollBar.ScrollDownButton:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = "Interface\\Tooltips\\UI-Tooltip-Background"})
slider.ScrollBar.ScrollDownButton:SetBackdropColor (0, 0, 0, 0.3)
slider.ScrollBar.ScrollDownButton:SetBackdropBorderColor (0, 0, 0, 1)
]=]
--<Anchor point="TOP" relativePoint="BOTTOM"/>
--slider.ScrollBar.ScrollDownButton:SetPoint ("top", slider.ScrollBar, "bottom", 0, 0)
end
--if the parent has a editbox, this is a code editor
if (slider:GetParent().editbox) then
slider.ScrollBar:SetPoint ("TOPLEFT", slider, "TOPRIGHT", 12 + offset, -6)
slider.ScrollBar:SetPoint ("BOTTOMLEFT", slider, "BOTTOMRIGHT", 12 + offset, 6 + (heightOffset and heightOffset*-1 or 0))
slider.ScrollBar:SetPoint("TOPLEFT", slider, "TOPRIGHT", 12 + offset, -6)
slider.ScrollBar:SetPoint("BOTTOMLEFT", slider, "BOTTOMRIGHT", 12 + offset, 6 + (heightOffset and heightOffset*-1 or 0))
else
slider.ScrollBar:SetPoint ("TOPLEFT", slider, "TOPRIGHT", 6, -16)
slider.ScrollBar:SetPoint ("BOTTOMLEFT", slider, "BOTTOMRIGHT", 6, 16 + (heightOffset and heightOffset*-1 or 0))
slider.ScrollBar:SetPoint("TOPLEFT", slider, "TOPRIGHT", 6, -16)
slider.ScrollBar:SetPoint("BOTTOMLEFT", slider, "BOTTOMRIGHT", 6, 16 + (heightOffset and heightOffset*-1 or 0))
end
slider.ScrollBar.ThumbTexture:SetColorTexture (.5, .5, .5, .3)
slider.ScrollBar.ThumbTexture:SetSize (12, 8)
--
--[=[
slider.ScrollBar:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = "Interface\\Tooltips\\UI-Tooltip-Background"})
slider.ScrollBar:SetBackdropColor (0, 0, 0, 0.35)
slider.ScrollBar:SetBackdropBorderColor (0, 0, 0, 1)
]=]
slider.ScrollBar.ThumbTexture:SetColorTexture(.5, .5, .5, .3)
slider.ScrollBar.ThumbTexture:SetSize(12, 8)
end
end
@@ -4004,7 +3980,7 @@ function DF:GetClassSpecIDs (class)
return specs_per_class [class]
end
local dispatch_error = function (context, errortext)
local dispatch_error = function(context, errortext)
DF:Msg ( (context or "<no context>") .. " |cFFFF9900error|r: " .. (errortext or "<no error given>"))
end
@@ -4074,7 +4050,7 @@ function DF_CALC_PERFORMANCE()
local F = CreateFrame ("frame")
local T = GetTime()
local J = false
F:SetScript ("OnUpdate", function (self, deltaTime)
F:SetScript ("OnUpdate", function(self, deltaTime)
if (not J) then
J = true
return
@@ -4646,7 +4622,7 @@ if (not DetailsFrameworkDeltaTimeFrame) then
end
local deltaTimeFrame = DetailsFrameworkDeltaTimeFrame
deltaTimeFrame:SetScript ("OnUpdate", function (self, deltaTime)
deltaTimeFrame:SetScript ("OnUpdate", function(self, deltaTime)
self.deltaTime = deltaTime
end)
@@ -4727,11 +4703,11 @@ DF.DebugMixin = {
debug = true,
CheckPoint = function (self, checkPointName, ...)
CheckPoint = function(self, checkPointName, ...)
print (self:GetName(), checkPointName, ...)
end,
CheckVisibilityState = function (self, widget)
CheckVisibilityState = function(self, widget)
self = widget or self
@@ -4744,7 +4720,7 @@ DF.DebugMixin = {
print ("shown:", self:IsShown(), "visible:", self:IsVisible(), "alpha:", self:GetAlpha(), "size:", width, height, "points:", numPoints)
end,
CheckStack = function (self)
CheckStack = function(self)
local stack = debugstack()
Details:Dump (stack)
end,
@@ -4973,7 +4949,7 @@ end
end
DF.DefaultSecureScriptEnvironmentHandle = {
__index = function (env, key)
__index = function(env, key)
if (forbiddenFunction[key]) then
return nil
+3 -3
View File
@@ -14,7 +14,7 @@ local HelpMetaFunctions = {}
local get_members_function_index = {}
HelpMetaFunctions.__index = function (_table, _member_requested)
HelpMetaFunctions.__index = function(_table, _member_requested)
local func = get_members_function_index [_member_requested]
if (func) then
@@ -31,7 +31,7 @@ local HelpMetaFunctions = {}
local set_members_function_index = {}
HelpMetaFunctions.__newindex = function (_table, _key, _value)
HelpMetaFunctions.__newindex = function(_table, _key, _value)
local func = set_members_function_index [_key]
if (func) then
return func (_table, _value)
@@ -83,7 +83,7 @@ function DF:NewHelp (parent, width, height, x, y, buttonWidth, buttonHeight, nam
local idx = getmetatable (helpButton).__index
for funcName, funcAddress in pairs (idx) do
if (not HelpMetaFunctions [funcName]) then
HelpMetaFunctions [funcName] = function (object, ...)
HelpMetaFunctions [funcName] = function(object, ...)
local x = loadstring ( "return _G."..object.button:GetName()..":"..funcName.."(...)")
return x (...)
end
+2 -2
View File
@@ -202,7 +202,7 @@ detailsFramework:Mixin(LabelMetaFunctions, detailsFramework.SetPointMixin)
LabelMetaFunctions.SetMembers["textsize"] = smember_textsize--alias
LabelMetaFunctions.SetMembers["shadow"] = smember_outline
LabelMetaFunctions.SetMembers["outline"] = smember_outline--alias
LabelMetaFunctions.SetMembers["rotation"] = smember_rotation--alias
LabelMetaFunctions.SetMembers["rotation"] = smember_rotation
LabelMetaFunctions.__newindex = function(object, key, value)
local func = LabelMetaFunctions.SetMembers[key]
@@ -296,7 +296,7 @@ detailsFramework:Mixin(LabelMetaFunctions, detailsFramework.SetPointMixin)
local idx = getmetatable(labelObject.label).__index
for funcName, funcAddress in pairs(idx) do
if (not LabelMetaFunctions[funcName]) then
LabelMetaFunctions[funcName] = function (object, ...)
LabelMetaFunctions[funcName] = function(object, ...)
local x = loadstring( "return _G['"..object.label:GetName().."']:"..funcName.."(...)")
return x(...)
end
+24 -9
View File
@@ -222,7 +222,7 @@ detailsFramework.SetPointMixin = {
--mixin for options functions
detailsFramework.OptionsFunctions = {
SetOption = function (self, optionName, optionValue)
SetOption = function(self, optionName, optionValue)
if (self.options) then
self.options [optionName] = optionValue
else
@@ -235,11 +235,11 @@ detailsFramework.OptionsFunctions = {
end
end,
GetOption = function (self, optionName)
GetOption = function(self, optionName)
return self.options and self.options [optionName]
end,
GetAllOptions = function (self)
GetAllOptions = function(self)
if (self.options) then
local optionsTable = {}
for key, _ in pairs (self.options) do
@@ -251,7 +251,7 @@ detailsFramework.OptionsFunctions = {
end
end,
BuildOptionsTable = function (self, defaultOptions, userOptions)
BuildOptionsTable = function(self, defaultOptions, userOptions)
self.options = self.options or {}
detailsFramework.table.deploy (self.options, userOptions or {})
detailsFramework.table.deploy (self.options, defaultOptions or {})
@@ -299,6 +299,7 @@ detailsFramework.PayloadMixin = {
detailsFramework.ScrollBoxFunctions = {
Refresh = function(self)
--hide all frames and tag as not in use
self._LinesInUse = 0
for index, frame in ipairs(self.Frames) do
frame:Hide()
frame._InUse = nil
@@ -322,13 +323,25 @@ detailsFramework.ScrollBoxFunctions = {
self:Show()
if (self.HideScrollBar) then
local frameName = self:GetName()
if (frameName) then
local frameName = self:GetName()
if (frameName) then
if (self.HideScrollBar) then
local scrollBar = _G[frameName .. "ScrollBar"]
if (scrollBar) then
scrollBar:Hide()
end
else
--[=[ --maybe in the future I visit this again
local scrollBar = _G[frameName .. "ScrollBar"]
local height = self:GetHeight()
local totalLinesRequired = #self.data
local linesShown = self._LinesInUse
local percent = linesShown / totalLinesRequired
local thumbHeight = height * percent
scrollBar.ThumbTexture:SetSize(12, thumbHeight)
print("thumbHeight:", thumbHeight)
--]=]
end
end
return self.Frames
@@ -367,6 +380,8 @@ detailsFramework.ScrollBoxFunctions = {
if (line) then
line._InUse = true
end
self._LinesInUse = self._LinesInUse + 1
return line
end,
@@ -538,10 +553,10 @@ detailsFramework.ScrollBoxFunctions = {
}
local SortMember = ""
local SortByMember = function (t1, t2)
local SortByMember = function(t1, t2)
return t1[SortMember] > t2[SortMember]
end
local SortByMemberReverse = function (t1, t2)
local SortByMemberReverse = function(t1, t2)
return t1[SortMember] < t2[SortMember]
end
+45 -45
View File
@@ -49,7 +49,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
------------------------------------------------------------------------------------------------------------
--> metatables
BarMetaFunctions.__call = function (_table, value)
BarMetaFunctions.__call = function(_table, value)
if (not value) then
return _table.statusbar:GetValue()
else
@@ -57,7 +57,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
end
end
BarMetaFunctions.__add = function (v1, v2)
BarMetaFunctions.__add = function(v1, v2)
if (_type (v1) == "table") then
local v = v1.statusbar:GetValue()
v = v + v2
@@ -69,7 +69,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
end
end
BarMetaFunctions.__sub = function (v1, v2)
BarMetaFunctions.__sub = function(v1, v2)
if (_type (v1) == "table") then
local v = v1.statusbar:GetValue()
v = v - v2
@@ -89,58 +89,58 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
return _object:GetTooltip()
end
--> shown
local gmember_shown = function (_object)
local gmember_shown = function(_object)
return _object.statusbar:IsShown()
end
--> frame width
local gmember_width = function (_object)
local gmember_width = function(_object)
return _object.statusbar:GetWidth()
end
--> frame height
local gmember_height = function (_object)
local gmember_height = function(_object)
return _object.statusbar:GetHeight()
end
--> value
local gmember_value = function (_object)
local gmember_value = function(_object)
return _object.statusbar:GetValue()
end
--> right text
local gmember_rtext = function (_object)
local gmember_rtext = function(_object)
return _object.textright:GetText()
end
--> left text
local gmember_ltext = function (_object)
local gmember_ltext = function(_object)
return _object.textleft:GetText()
end
--> left color
local gmember_color = function (_object)
local gmember_color = function(_object)
local r, g, b, a = _object._texture:GetVertexColor()
return r, g, b, a
end
--> icon
local gmember_icon = function (_object)
local gmember_icon = function(_object)
return _object._icon:GetTexture()
end
--> texture
local gmember_texture = function (_object)
local gmember_texture = function(_object)
return _object._texture:GetTexture()
end
--> font size
local gmember_textsize = function (_object)
local gmember_textsize = function(_object)
local _, fontsize = _object.textleft:GetFont()
return fontsize
end
--> font face
local gmember_textfont = function (_object)
local gmember_textfont = function(_object)
local fontface = _object.textleft:GetFont()
return fontface
end
--> font color
local gmember_textcolor = function (_object)
local gmember_textcolor = function(_object)
return _object.textleft:GetTextColor()
end
--> alpha
local gmember_alpha= function (_object)
local gmember_alpha= function(_object)
return _object:GetAlpha()
end
@@ -163,7 +163,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
BarMetaFunctions.GetMembers ["textcolor"] = gmember_textcolor --alias
BarMetaFunctions.GetMembers ["alpha"] = gmember_alpha
BarMetaFunctions.__index = function (_table, _member_requested)
BarMetaFunctions.__index = function(_table, _member_requested)
local func = BarMetaFunctions.GetMembers [_member_requested]
if (func) then
@@ -183,11 +183,11 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
--> tooltip
local smember_tooltip = function (_object, _value)
local smember_tooltip = function(_object, _value)
return _object:SetTooltip (_value)
end
--> show
local smember_shown = function (_object, _value)
local smember_shown = function(_object, _value)
if (_value) then
return _object:Show()
else
@@ -195,7 +195,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
end
end
--> hide
local smember_hide = function (_object, _value)
local smember_hide = function(_object, _value)
if (_value) then
return _object:Hide()
else
@@ -203,28 +203,28 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
end
end
--> width
local smember_width = function (_object, _value)
local smember_width = function(_object, _value)
return _object.statusbar:SetWidth (_value)
end
--> height
local smember_height = function (_object, _value)
local smember_height = function(_object, _value)
return _object.statusbar:SetHeight (_value)
end
--> statusbar value
local smember_value = function (_object, _value)
local smember_value = function(_object, _value)
_object.statusbar:SetValue (_value)
return _object.div:SetPoint ("left", _object.statusbar, "left", _value * (_object.statusbar:GetWidth()/100) - 16, 0)
end
--> right text
local smember_rtext = function (_object, _value)
local smember_rtext = function(_object, _value)
return _object.textright:SetText (_value)
end
--> left text
local smember_ltext = function (_object, _value)
local smember_ltext = function(_object, _value)
return _object.textleft:SetText (_value)
end
--> color
local smember_color = function (_object, _value)
local smember_color = function(_object, _value)
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
_object.statusbar:SetStatusBarColor (_value1, _value2, _value3, _value4)
@@ -236,12 +236,12 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
return _object._texture:SetVertexColor (_value1, _value2, _value3, _value4)
end
--> background color
local smember_backgroundcolor = function (_object, _value)
local smember_backgroundcolor = function(_object, _value)
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
return _object.background:SetVertexColor (_value1, _value2, _value3, _value4)
end
--> icon
local smember_icon = function (_object, _value)
local smember_icon = function(_object, _value)
if (type (_value) == "table") then
local _value1, _value2 = _unpack (_value)
_object._icon:SetTexture (_value1)
@@ -254,7 +254,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
return
end
--> texture
local smember_texture = function (_object, _value)
local smember_texture = function(_object, _value)
if (type (_value) == "table") then
local _value1, _value2 = _unpack (_value)
_object._texture:SetTexture (_value1)
@@ -284,7 +284,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
return
end
--> background texture
local smember_backgroundtexture = function (_object, _value)
local smember_backgroundtexture = function(_object, _value)
if (_value:find ("\\")) then
_object.background:SetTexture (_value)
else
@@ -298,28 +298,28 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
return
end
--> font face
local smember_textfont = function (_object, _value)
local smember_textfont = function(_object, _value)
DF:SetFontFace (_object.textleft, _value)
return DF:SetFontFace (_object.textright, _value)
end
--> font size
local smember_textsize = function (_object, _value)
local smember_textsize = function(_object, _value)
DF:SetFontSize (_object.textleft, _value)
return DF:SetFontSize (_object.textright, _value)
end
--> font color
local smember_textcolor = function (_object, _value)
local smember_textcolor = function(_object, _value)
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
_object.textleft:SetTextColor (_value1, _value2, _value3, _value4)
return _object.textright:SetTextColor (_value1, _value2, _value3, _value4)
end
--> outline (shadow)
local smember_outline = function (_object, _value)
local smember_outline = function(_object, _value)
DF:SetFontOutline (_object.textleft, _value)
return DF:SetFontOutline (_object.textright, _value)
end
--> alpha
local smember_alpha= function (_object, _value)
local smember_alpha= function(_object, _value)
return _object:SetAlpha (_value)
end
@@ -346,7 +346,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
BarMetaFunctions.SetMembers["outline"] = smember_outline --alias
BarMetaFunctions.SetMembers["alpha"] = smember_alpha
BarMetaFunctions.__newindex = function (_table, _key, _value)
BarMetaFunctions.__newindex = function(_table, _key, _value)
local func = BarMetaFunctions.SetMembers [_key]
if (func) then
@@ -488,7 +488,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
------------------------------------------------------------------------------------------------------------
--> scripts
local OnEnter = function (frame)
local OnEnter = function(frame)
local capsule = frame.MyObject
local kill = capsule:RunHooksForWidget ("OnEnter", frame, capsule)
if (kill) then
@@ -505,7 +505,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
end
local OnLeave = function (frame)
local OnLeave = function(frame)
local capsule = frame.MyObject
local kill = capsule:RunHooksForWidget ("OnLeave", frame, capsule)
if (kill) then
@@ -519,7 +519,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
end
end
local OnHide = function (frame)
local OnHide = function(frame)
local capsule = frame.MyObject
local kill = capsule:RunHooksForWidget ("OnHide", frame, capsule)
if (kill) then
@@ -527,7 +527,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
end
end
local OnShow = function (frame)
local OnShow = function(frame)
local capsule = frame.MyObject
local kill = capsule:RunHooksForWidget ("OnShow", frame, capsule)
if (kill) then
@@ -535,7 +535,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
end
end
local OnMouseDown = function (frame, button)
local OnMouseDown = function(frame, button)
local capsule = frame.MyObject
local kill = capsule:RunHooksForWidget ("OnMouseDown", frame, button, capsule)
if (kill) then
@@ -550,7 +550,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
end
end
local OnMouseUp = function (frame, button)
local OnMouseUp = function(frame, button)
local capsule = frame.MyObject
local kill = capsule:RunHooksForWidget ("OnMouseUp", frame, button, capsule)
if (kill) then
@@ -602,7 +602,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
end
end
local OnUpdate = function (self, elapsed)
local OnUpdate = function(self, elapsed)
--> percent of elapsed
local pct = abs (self.end_timer - GetTime() - self.tempo) / self.tempo
@@ -691,7 +691,7 @@ function DetailsFrameworkNormalBar_OnCreate (self)
return true
end
local build_statusbar = function (self)
local build_statusbar = function(self)
self:SetSize (300, 14)
@@ -808,7 +808,7 @@ function DF:NewBar (parent, container, name, member, w, h, value, texture_name)
local idx = getmetatable (BarObject.statusbar).__index
for funcName, funcAddress in pairs (idx) do
if (not BarMetaFunctions [funcName]) then
BarMetaFunctions [funcName] = function (object, ...)
BarMetaFunctions [funcName] = function(object, ...)
local x = loadstring ( "return _G['"..object.statusbar:GetName().."']:"..funcName.."(...)")
return x (...)
end
+311 -314
View File
File diff suppressed because it is too large Load Diff
+29 -29
View File
@@ -208,7 +208,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
DFSliderMetaFunctions.SetMembers["fractional"] = smember_fractional
DFSliderMetaFunctions.SetMembers["value"] = smember_value
DFSliderMetaFunctions.__newindex = function (object, key, value)
DFSliderMetaFunctions.__newindex = function(object, key, value)
local func = DFSliderMetaFunctions.SetMembers[key]
if (func) then
return func(object, value)
@@ -313,7 +313,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
------------------------------------------------------------------------------------------------------------
--> scripts
local OnEnter = function (slider)
local OnEnter = function(slider)
if (rawget (slider.MyObject, "lockdown")) then
return
end
@@ -344,7 +344,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
end
end
local OnLeave = function (slider)
local OnLeave = function(slider)
if (rawget (slider.MyObject, "lockdown")) then
return
@@ -412,23 +412,23 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
buttonPlus:SetFrameStrata (f:GetFrameStrata())
buttonMinor:SetFrameStrata (f:GetFrameStrata())
buttonPlus:SetScript ("OnEnter", function (self)
buttonPlus:SetScript ("OnEnter", function(self)
if (f.isGoingToHide) then
f:SetScript ("OnUpdate", nil)
f.isGoingToHide = false
end
end)
buttonMinor:SetScript ("OnEnter", function (self)
buttonMinor:SetScript ("OnEnter", function(self)
if (f.isGoingToHide) then
f:SetScript ("OnUpdate", nil)
f.isGoingToHide = false
end
end)
buttonPlus:SetScript ("OnLeave", function (self)
buttonPlus:SetScript ("OnLeave", function(self)
f:PrepareToHide()
end)
buttonMinor:SetScript ("OnLeave", function (self)
buttonMinor:SetScript ("OnLeave", function(self)
f:PrepareToHide()
end)
@@ -488,7 +488,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
end
buttonPlus:SetScript ("OnMouseUp", function (self)
buttonPlus:SetScript ("OnMouseUp", function(self)
if (not buttonPlus.got_click) then
plus_button_script()
end
@@ -496,7 +496,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
self:SetScript ("OnUpdate", nil)
end)
local on_update = function (self, elapsed)
local on_update = function(self, elapsed)
timer = timer + elapsed
if (timer > 0.4) then
change_timer = change_timer + elapsed
@@ -507,7 +507,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
end
end
end
buttonPlus:SetScript ("OnMouseDown", function (self)
buttonPlus:SetScript ("OnMouseDown", function(self)
timer = 0
change_timer = 0
self:SetScript ("OnUpdate", on_update)
@@ -539,7 +539,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
end
end
buttonMinor:SetScript ("OnMouseUp", function (self)
buttonMinor:SetScript ("OnMouseUp", function(self)
if (not buttonMinor.got_click) then
minor_button_script()
end
@@ -547,7 +547,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
self:SetScript ("OnUpdate", nil)
end)
local on_update = function (self, elapsed)
local on_update = function(self, elapsed)
timer = timer + elapsed
if (timer > 0.4) then
change_timer = change_timer + elapsed
@@ -558,13 +558,13 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
end
end
end
buttonMinor:SetScript ("OnMouseDown", function (self)
buttonMinor:SetScript ("OnMouseDown", function(self)
timer = 0
change_timer = 0
self:SetScript ("OnUpdate", on_update)
end)
local do_precision = function (text)
local do_precision = function(text)
if (type (text) == "string" and text:find ("%.")) then
local left, right = strsplit (".", text)
left = tonumber (left)
@@ -645,7 +645,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
end
end
local OnMouseDown = function (slider, button)
local OnMouseDown = function(slider, button)
slider.MyObject.IsValueChanging = true
local capsule = slider.MyObject
@@ -659,7 +659,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
end
end
local OnMouseUp = function (slider, button)
local OnMouseUp = function(slider, button)
slider.MyObject.IsValueChanging = nil
local capsule = slider.MyObject
@@ -669,7 +669,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
end
end
local OnHide = function (slider)
local OnHide = function(slider)
local capsule = slider.MyObject
local kill = capsule:RunHooksForWidget ("OnHide", slider, capsule)
if (kill) then
@@ -683,7 +683,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
end
end
local OnShow = function (slider)
local OnShow = function(slider)
local capsule = slider.MyObject
local kill = capsule:RunHooksForWidget ("OnShow", slider, capsule)
if (kill) then
@@ -694,7 +694,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
local table_insert = table.insert
local table_remove = table.remove
local OnValueChanged = function (slider)
local OnValueChanged = function(slider)
local amt
if (slider.MyObject.useDecimals) then
@@ -743,7 +743,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
------------------------------------------------------------------------------------------------------------
--> object constructor
local SwitchOnClick = function (self, button, forced_value, value)
local SwitchOnClick = function(self, button, forced_value, value)
local slider = self.MyObject
@@ -804,7 +804,7 @@ local SwitchOnClick = function (self, button, forced_value, value)
end
local default_switch_func = function (self, passed_value)
local default_switch_func = function(self, passed_value)
if (self.value) then
return false
else
@@ -812,11 +812,11 @@ local default_switch_func = function (self, passed_value)
end
end
local switch_get_value = function (self)
local switch_get_value = function(self)
return self.value
end
local switch_set_value = function (self, value)
local switch_set_value = function(self, value)
if (self.switch_func) then
value = self:switch_func (value)
end
@@ -824,11 +824,11 @@ local switch_set_value = function (self, value)
SwitchOnClick (self.widget, nil, true, value)
end
local switch_set_fixparameter = function (self, value)
local switch_set_fixparameter = function(self, value)
rawset (self, "FixedValue", value)
end
local switch_disable = function (self)
local switch_disable = function(self)
if (self.is_checkbox) then
self.checked_texture:Hide()
@@ -845,7 +845,7 @@ local switch_disable = function (self)
self:SetAlpha (.4)
rawset (self, "lockdown", true)
end
local switch_enable = function (self)
local switch_enable = function(self)
if (self.is_checkbox) then
if (rawget (self, "value")) then
self.checked_texture:Show()
@@ -866,11 +866,11 @@ local switch_enable = function (self)
return rawset (self, "lockdown", false)
end
local set_switch_func = function (self, newFunction)
local set_switch_func = function(self, newFunction)
self.OnSwitch = newFunction
end
local set_as_checkbok = function (self)
local set_as_checkbok = function(self)
if self.is_checkbox and self.checked_texture then return end
local checked = self:CreateTexture (self:GetName() .. "CheckTexture", "overlay")
checked:SetTexture ([[Interface\Buttons\UI-CheckBox-Check]])
@@ -1126,7 +1126,7 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
local idx = getmetatable (SliderObject.slider).__index
for funcName, funcAddress in pairs (idx) do
if (not DFSliderMetaFunctions [funcName]) then
DFSliderMetaFunctions [funcName] = function (object, ...)
DFSliderMetaFunctions [funcName] = function(object, ...)
local x = loadstring ( "return _G['"..object.slider:GetName().."']:"..funcName.."(...)")
return x (...)
end
+44 -44
View File
@@ -47,7 +47,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
------------------------------------------------------------------------------------------------------------
--> metatables
SplitBarMetaFunctions.__call = function (_table, value)
SplitBarMetaFunctions.__call = function(_table, value)
if (not value) then
return _table.statusbar:GetValue()
else
@@ -56,7 +56,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
end
end
SplitBarMetaFunctions.__add = function (v1, v2)
SplitBarMetaFunctions.__add = function(v1, v2)
if (_type (v1) == "table") then
local v = v1.statusbar:GetValue()
v = v + v2
@@ -70,7 +70,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
end
end
SplitBarMetaFunctions.__sub = function (v1, v2)
SplitBarMetaFunctions.__sub = function(v1, v2)
if (_type (v1) == "table") then
local v = v1.statusbar:GetValue()
v = v - v2
@@ -92,61 +92,61 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
return _object:GetTooltip()
end
--> shown
local gmember_shown = function (_object)
local gmember_shown = function(_object)
return _object.statusbar:IsShown()
end
--> frame width
local gmember_width = function (_object)
local gmember_width = function(_object)
return _object.statusbar:GetWidth()
end
--> frame height
local gmember_height = function (_object)
local gmember_height = function(_object)
return _object.statusbar:GetHeight()
end
--> value
local gmember_value = function (_object)
local gmember_value = function(_object)
return _object.statusbar:GetValue()
end
--> right text
local gmember_rtext = function (_object)
local gmember_rtext = function(_object)
return _object.textright:GetText()
end
--> left text
local gmember_ltext = function (_object)
local gmember_ltext = function(_object)
return _object.textleft:GetText()
end
--> right color
local gmember_rcolor = function (_object)
local gmember_rcolor = function(_object)
return _object.rightTexture.original_colors
end
--> left color
local gmember_lcolor = function (_object)
local gmember_lcolor = function(_object)
return _object.texture.original_colors
end
--> right icon
local gmember_ricon = function (_object)
local gmember_ricon = function(_object)
return _object.iconright:GetTexture()
end
--> left icon
local gmember_licon = function (_object)
local gmember_licon = function(_object)
return _object.iconleft:GetTexture()
end
--> texture
local gmember_texture = function (_object)
local gmember_texture = function(_object)
return _object.texture:GetTexture()
end
--> font size
local gmember_textsize = function (_object)
local gmember_textsize = function(_object)
local _, fontsize = _object.textleft:GetFont()
return fontsize
end
--> font face
local gmember_textfont = function (_object)
local gmember_textfont = function(_object)
local fontface = _object.textleft:GetFont()
return fontface
end
--> font color
local gmember_textcolor = function (_object)
local gmember_textcolor = function(_object)
return _object.textleft:GetTextColor()
end
@@ -170,7 +170,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
SplitBarMetaFunctions.GetMembers ["textfont"] = gmember_textfont --alias
SplitBarMetaFunctions.GetMembers ["textcolor"] = gmember_textcolor --alias
SplitBarMetaFunctions.__index = function (_table, _member_requested)
SplitBarMetaFunctions.__index = function(_table, _member_requested)
local func = SplitBarMetaFunctions.GetMembers [_member_requested]
if (func) then
@@ -188,11 +188,11 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> tooltip
local smember_tooltip = function (_object, _value)
local smember_tooltip = function(_object, _value)
return _object:SetTooltip (_value)
end
--> show
local smember_shown = function (_object, _value)
local smember_shown = function(_object, _value)
if (_value) then
return _object:Show()
else
@@ -200,7 +200,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
end
end
--> hide
local smember_hide = function (_object, _value)
local smember_hide = function(_object, _value)
if (_value) then
return _object:Hide()
else
@@ -208,34 +208,34 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
end
end
--> width
local smember_width = function (_object, _value)
local smember_width = function(_object, _value)
return _object.statusbar:SetWidth (_value)
end
--> height
local smember_height = function (_object, _value)
local smember_height = function(_object, _value)
return _object.statusbar:SetHeight (_value)
end
--> statusbar value
local smember_value = function (_object, _value)
local smember_value = function(_object, _value)
_object.statusbar:SetValue (_value)
return _object.spark:SetPoint ("left", _object.statusbar, "left", _value * (_object.statusbar:GetWidth()/100) - 18, 0)
end
--> right text
local smember_rtext = function (_object, _value)
local smember_rtext = function(_object, _value)
return _object.textright:SetText (_value)
end
--> left text
local smember_ltext = function (_object, _value)
local smember_ltext = function(_object, _value)
return _object.textleft:SetText (_value)
end
--> right color
local smember_rcolor = function (_object, _value)
local smember_rcolor = function(_object, _value)
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
_object.rightTexture.original_colors = {_value1, _value2, _value3, _value4}
return _object.rightTexture:SetVertexColor (_value1, _value2, _value3, _value4)
end
--> left color
local smember_lcolor = function (_object, _value)
local smember_lcolor = function(_object, _value)
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
_object.statusbar:SetStatusBarColor (_value1, _value2, _value3, _value4)
@@ -243,7 +243,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
return _object.texture:SetVertexColor (_value1, _value2, _value3, _value4)
end
--> right icon
local smember_ricon = function (_object, _value)
local smember_ricon = function(_object, _value)
if (type (_value) == "table") then
local _value1, _value2 = _unpack (_value)
_object.iconright:SetTexture (_value1)
@@ -256,7 +256,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
return
end
--> left icon
local smember_licon = function (_object, _value)
local smember_licon = function(_object, _value)
if (type (_value) == "table") then
local _value1, _value2 = _unpack (_value)
_object.iconleft:SetTexture (_value1)
@@ -269,7 +269,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
return
end
--> texture
local smember_texture = function (_object, _value)
local smember_texture = function(_object, _value)
if (type (_value) == "table") then
local _value1, _value2 = _unpack (_value)
_object.texture:SetTexture (_value1)
@@ -285,17 +285,17 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
return
end
--> font face
local smember_textfont = function (_object, _value)
local smember_textfont = function(_object, _value)
DF:SetFontFace (_object.textleft, _value)
return DF:SetFontFace (_object.textright, _value)
end
--> font size
local smember_textsize = function (_object, _value)
local smember_textsize = function(_object, _value)
DF:SetFontSize (_object.textleft, _value)
return DF:SetFontSize (_object.textright, _value)
end
--> font color
local smember_textcolor = function (_object, _value)
local smember_textcolor = function(_object, _value)
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
_object.textleft:SetTextColor (_value1, _value2, _value3, _value4)
return _object.textright:SetTextColor (_value1, _value2, _value3, _value4)
@@ -321,7 +321,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
SplitBarMetaFunctions.SetMembers ["textfont"] = smember_textfont --alias
SplitBarMetaFunctions.SetMembers ["textcolor"] = smember_textcolor --alias
SplitBarMetaFunctions.__newindex = function (_table, _key, _value)
SplitBarMetaFunctions.__newindex = function(_table, _key, _value)
local func = SplitBarMetaFunctions.SetMembers [_key]
if (func) then
return func (_table, _value)
@@ -562,7 +562,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
------------------------------------------------------------------------------------------------------------
--> scripts
local OnEnter = function (frame)
local OnEnter = function(frame)
local capsule = frame.MyObject
local kill = capsule:RunHooksForWidget ("OnEnter", frame, capsule)
if (kill) then
@@ -576,7 +576,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
end
end
local OnLeave = function (frame)
local OnLeave = function(frame)
local capsule = frame.MyObject
local kill = capsule:RunHooksForWidget ("OnLeave", frame, capsule)
if (kill) then
@@ -588,7 +588,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
end
end
local OnHide = function (frame)
local OnHide = function(frame)
local capsule = frame.MyObject
local kill = capsule:RunHooksForWidget ("OnHide", frame, capsule)
if (kill) then
@@ -596,7 +596,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
end
end
local OnShow = function (frame)
local OnShow = function(frame)
local capsule = frame.MyObject
local kill = capsule:RunHooksForWidget ("OnShow", frame, capsule)
if (kill) then
@@ -604,7 +604,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
end
end
local OnMouseDown = function (frame, button)
local OnMouseDown = function(frame, button)
local capsule = frame.MyObject
local kill = capsule:RunHooksForWidget ("OnMouseDown", frame, button, capsule)
if (kill) then
@@ -619,7 +619,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
end
end
local OnMouseUp = function (frame, button)
local OnMouseUp = function(frame, button)
local capsule = frame.MyObject
local kill = capsule:RunHooksForWidget ("OnMouseUp", frame, button, capsule)
if (kill) then
@@ -632,7 +632,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
end
end
local OnSizeChanged = function (statusbar)
local OnSizeChanged = function(statusbar)
statusbar.MyObject.spark:SetPoint ("left", statusbar, "left", statusbar:GetValue() * (statusbar:GetWidth()/100) - 18, 0)
statusbar.MyObject.rightTexture:SetWidth(statusbar:GetWidth() - statusbar.MyObject.texture:GetWidth())
end
@@ -651,7 +651,7 @@ function DF:CreateSplitBar(parent, width, height, member, name)
return DF:NewSplitBar(parent, nil, name, member, width, height)
end
local build_statusbar = function (self)
local build_statusbar = function(self)
self:SetSize (300, 14)
@@ -757,7 +757,7 @@ function DF:NewSplitBar (parent, container, name, member, w, h)
local idx = getmetatable (SplitBarObject.statusbar).__index
for funcName, funcAddress in pairs (idx) do
if (not SplitBarMetaFunctions [funcName]) then
SplitBarMetaFunctions [funcName] = function (object, ...)
SplitBarMetaFunctions [funcName] = function(object, ...)
local x = loadstring ( "return _G['"..object.statusbar:GetName().."']:"..funcName.."(...)")
return x (...)
end
+23 -23
View File
@@ -285,7 +285,7 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
------------------------------------------------------------------------------------------------------------
--> scripts and hooks
local OnEnter = function (textentry)
local OnEnter = function(textentry)
local capsule = textentry.MyObject
local kill = capsule:RunHooksForWidget ("OnEnter", textentry, capsule)
@@ -307,7 +307,7 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
end
end
local OnLeave = function (textentry)
local OnLeave = function(textentry)
local capsule = textentry.MyObject
local kill = capsule:RunHooksForWidget ("OnLeave", textentry, capsule)
@@ -326,7 +326,7 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
end
end
local OnHide = function (textentry)
local OnHide = function(textentry)
local capsule = textentry.MyObject
local kill = capsule:RunHooksForWidget ("OnHide", textentry, capsule)
@@ -335,7 +335,7 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
end
end
local OnShow = function (textentry)
local OnShow = function(textentry)
local capsule = textentry.MyObject
local kill = capsule:RunHooksForWidget ("OnShow", textentry, capsule)
@@ -377,7 +377,7 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
end
end
local OnEscapePressed = function (textentry)
local OnEscapePressed = function(textentry)
local capsule = textentry.MyObject
local kill = capsule:RunHooksForWidget ("OnEscapePressed", textentry, capsule, capsule.text)
@@ -451,7 +451,7 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
end
end
local OnTextChanged = function (textentry, byUser)
local OnTextChanged = function(textentry, byUser)
local capsule = textentry.MyObject
local kill = capsule:RunHooksForWidget ("OnTextChanged", textentry, byUser, capsule)
@@ -460,7 +460,7 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
end
end
local OnTabPressed = function (textentry)
local OnTabPressed = function(textentry)
local capsule = textentry.MyObject
@@ -582,7 +582,7 @@ function DF:NewTextEntry (parent, container, name, member, w, h, func, param1, p
local idx = getmetatable (TextEntryObject.editbox).__index
for funcName, funcAddress in pairs (idx) do
if (not TextEntryMetaFunctions [funcName]) then
TextEntryMetaFunctions [funcName] = function (object, ...)
TextEntryMetaFunctions [funcName] = function(object, ...)
local x = loadstring ( "return _G['"..object.editbox:GetName().."']:"..funcName.."(...)")
return x (...)
end
@@ -688,16 +688,16 @@ function DF:NewSpellEntry (parent, func, w, h, param1, param2, member, name)
return editbox
end
local function_gettext = function (self)
local function_gettext = function(self)
return self.editbox:GetText()
end
local function_settext = function (self, text)
local function_settext = function(self, text)
return self.editbox:SetText (text)
end
local function_clearfocus = function (self)
local function_clearfocus = function(self)
return self.editbox:ClearFocus()
end
local function_setfocus = function (self)
local function_setfocus = function(self)
return self.editbox:SetFocus (true)
end
@@ -812,7 +812,7 @@ local function ColorSelection ( self, ColorCode )
end
-- end of the block ---------------------
local get_last_word = function (self)
local get_last_word = function(self)
self.lastword = ""
local cursor_pos = self.editbox:GetCursorPosition()
local text = self.editbox:GetText()
@@ -828,7 +828,7 @@ local get_last_word = function (self)
end
--On Text Changed
local AutoComplete_OnTextChanged = function (editboxWidget, byUser, capsule)
local AutoComplete_OnTextChanged = function(editboxWidget, byUser, capsule)
capsule = capsule or editboxWidget.MyObject or editboxWidget
local chars_now = editboxWidget:GetText():len()
@@ -848,7 +848,7 @@ local AutoComplete_OnTextChanged = function (editboxWidget, byUser, capsule)
capsule.characters_count = chars_now
end
local AutoComplete_OnSpacePressed = function (editboxWidget, capsule)
local AutoComplete_OnSpacePressed = function(editboxWidget, capsule)
capsule = capsule or editboxWidget.MyObject or editboxWidget
-- if (not gotMatch) then
@@ -856,11 +856,11 @@ local AutoComplete_OnSpacePressed = function (editboxWidget, capsule)
-- end
end
local AutoComplete_OnEscapePressed = function (editboxWidget)
local AutoComplete_OnEscapePressed = function(editboxWidget)
editboxWidget.end_selection = nil
end
local AutoComplete_OnEnterPressed = function (editboxWidget)
local AutoComplete_OnEnterPressed = function(editboxWidget)
local capsule = editboxWidget.MyObject or editboxWidget
if (editboxWidget.end_selection) then
@@ -886,7 +886,7 @@ local AutoComplete_OnEnterPressed = function (editboxWidget)
end
local AutoComplete_OnEditFocusGained = function (editboxWidget)
local AutoComplete_OnEditFocusGained = function(editboxWidget)
local capsule = editboxWidget.MyObject or editboxWidget
capsule:GetLastWord()
--print ("last word:", editboxWidget.lastword)
@@ -895,7 +895,7 @@ local AutoComplete_OnEditFocusGained = function (editboxWidget)
capsule.characters_count = editboxWidget:GetText():len()
end
local OptimizeAutoCompleteTable = function (self, wordList)
local OptimizeAutoCompleteTable = function(self, wordList)
local optimizedTable = {}
local lower = string.lower
@@ -926,7 +926,7 @@ local OptimizeAutoCompleteTable = function (self, wordList)
wordList.Optimized = optimizedTable
end
local AutoComplete_OnChar = function (editboxWidget, char, capsule)
local AutoComplete_OnChar = function(editboxWidget, char, capsule)
if (char == "") then
return
end
@@ -1110,7 +1110,7 @@ function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent, show
scrollframe:SetPoint ("bottomright", borderframe, "bottomright", -10, 10)
--when the lua code field scrolls, make the lua field scroll too
scrollframe:SetScript ("OnVerticalScroll", function (self, offset)
scrollframe:SetScript ("OnVerticalScroll", function(self, offset)
scrollframeNumberLines:SetVerticalScroll(scrollframe:GetVerticalScroll())
scrollframeNumberLines.ScrollBar:Hide()
end)
@@ -1122,7 +1122,7 @@ function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent, show
scrollframeNumberLines.editbox:SetJustifyH ("left")
scrollframeNumberLines.editbox:SetJustifyV ("top")
scrollframeNumberLines:SetScript ("OnSizeChanged", function (self)
scrollframeNumberLines:SetScript ("OnSizeChanged", function(self)
scrollframeNumberLines.editbox:SetSize (self:GetSize())
scrollframeNumberLines.ScrollBar:Hide()
end)
@@ -1149,7 +1149,7 @@ function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent, show
borderframe.SetAsAutoComplete = TextEntryMetaFunctions.SetAsAutoComplete
scrollframe:SetScript ("OnSizeChanged", function (self)
scrollframe:SetScript ("OnSizeChanged", function(self)
scrollframe.editbox:SetSize (self:GetSize())
end)
+1 -1
View File
@@ -52,7 +52,7 @@ local TimeBarMetaFunctions = _G[DF.GlobalWidgetControlNames["timebar"]]
TimeBarMetaFunctions.SetMembers = TimeBarMetaFunctions.SetMembers or {}
TimeBarMetaFunctions.GetMembers = TimeBarMetaFunctions.GetMembers or {}
TimeBarMetaFunctions.__index = function (table, key)
TimeBarMetaFunctions.__index = function(table, key)
local func = TimeBarMetaFunctions.GetMembers[key]
if (func) then
return func(table, key)
+4 -4
View File
@@ -509,7 +509,7 @@ end
-- lookuptable (cached between calls)
local lshiftMask = {}
setmetatable(lshiftMask, {
__index = function (t, k)
__index = function(t, k)
local v = bit_lshift(1, k)
rawset(t, k, v)
return v
@@ -519,7 +519,7 @@ setmetatable(lshiftMask, {
-- lookuptable (cached between calls)
local lshiftMinusOneMask = {}
setmetatable(lshiftMinusOneMask, {
__index = function (t, k)
__index = function(t, k)
local v = bit_lshift(1, k) - 1
rawset(t, k, v)
return v
@@ -644,7 +644,7 @@ function LibCompress:DecompressHuffman(compressed)
local bitfield_len = 0
local map = {} -- only table not reused in Huffman decode.
setmetatable(map, {
__index = function (t, k)
__index = function(t, k)
local v = {}
rawset(t, k, v)
return v
@@ -696,7 +696,7 @@ function LibCompress:DecompressHuffman(compressed)
-- But do return an empty table to prevent runtime errors. (instead of returning nil)
local mt = {}
setmetatable(map, {
__index = function (t, k)
__index = function(t, k)
return mt
end
})
+9 -9
View File
@@ -480,13 +480,13 @@ end
return from > #s and "" or s:match(".*%S", from)
end
--
local titlecase = function (first, rest)
local titlecase = function(first, rest)
return first:upper()..rest:lower()
end
--
local have_repeated = false
local count_spaces = 0
local check_repeated = function (char)
local check_repeated = function(char)
if (char == " ") then
have_repeated = true
elseif (string.len (char) > 2) then
@@ -858,7 +858,7 @@ do
name:SetText (UnitName ("player"))
---
local OnClickFunction = function (button)
local OnClickFunction = function(button)
if (button.isAvatar) then
local avatar = NickTag.avatar_pool [button.IconID]
_G.AvatarPickFrameAvatarPreview:SetTexture ( avatar [1] )
@@ -884,7 +884,7 @@ do
okey:SetPoint ("bottomright", avatar_pick_frame, "bottomright", -37, 12)
okey:SetText ("Accept")
okey:SetFrameLevel (avatar_pick_frame:GetFrameLevel()+2)
okey:SetScript ("OnClick", function (self)
okey:SetScript ("OnClick", function(self)
avatar_pick_frame:Hide()
if (avatar_pick_frame.callback) then
avatar_pick_frame.callback (avatar_pick_frame.selected_avatar, {0, 1, 0, 1}, avatar_pick_frame.selected_background, avatar_pick_frame.selected_texcoord, avatar_pick_frame.selected_color)
@@ -895,7 +895,7 @@ do
change_color:SetText ("Color")
change_color:SetFrameLevel (avatar_pick_frame:GetFrameLevel()+2)
change_color:SetScript ("OnClick", function (self)
change_color:SetScript ("OnClick", function(self)
ColorPickerFrame.func = selectedColor
ColorPickerFrame.hasOpacity = false
ColorPickerFrame:SetParent (avatar_pick_frame)
@@ -940,7 +940,7 @@ do
background_list:SetWidth (275)
background_list:SetHeight (140)
local avatar_scroll_update = function (self)
local avatar_scroll_update = function(self)
local numMacroIcons = #NickTag.avatar_pool
local macroPopupIcon, macroPopupButton, index, texture
local macroPopupOffset = FauxScrollFrame_GetOffset (avatar_list)
@@ -964,7 +964,7 @@ do
end
FauxScrollFrame_Update (avatar_list, numMacroIcons , 3, 64)
end
local background_scroll_update = function (self)
local background_scroll_update = function(self)
local numMacroIcons = #NickTag.background_pool
local macroPopupIcon, macroPopupButton, index, texture
local macroPopupOffset = FauxScrollFrame_GetOffset (background_list)
@@ -989,10 +989,10 @@ do
FauxScrollFrame_Update (background_list, numMacroIcons , 3, 40)
end
avatar_list:SetScript ("OnVerticalScroll", function (self, offset)
avatar_list:SetScript ("OnVerticalScroll", function(self, offset)
FauxScrollFrame_OnVerticalScroll (avatar_list, offset, 64, avatar_scroll_update)
end)
background_list:SetScript ("OnVerticalScroll", function (self, offset)
background_list:SetScript ("OnVerticalScroll", function(self, offset)
FauxScrollFrame_OnVerticalScroll (background_list, offset, 40, background_scroll_update)
end)
+41 -35
View File
@@ -46,6 +46,9 @@
return Details.gameVersionPrefix .. Details.build_counter .. "." .. Details.acounter .. "." .. alphaId .. "(" .. Details.game_version .. ")"
end
--namespace for the player breakdown window
Details.PlayerBreakdown = {}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> initialization stuff
local _
@@ -938,42 +941,45 @@ do
--> register textures and fonts for shared media
local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
--default bars
SharedMedia:Register ("statusbar", "Details D'ictum", [[Interface\AddOns\Details\images\bar4]])
SharedMedia:Register ("statusbar", "Details Vidro", [[Interface\AddOns\Details\images\bar4_vidro]])
SharedMedia:Register ("statusbar", "Details D'ictum (reverse)", [[Interface\AddOns\Details\images\bar4_reverse]])
--flat bars
SharedMedia:Register ("statusbar", "Details Serenity", [[Interface\AddOns\Details\images\bar_serenity]])
SharedMedia:Register ("statusbar", "BantoBar", [[Interface\AddOns\Details\images\BantoBar]])
SharedMedia:Register ("statusbar", "Skyline", [[Interface\AddOns\Details\images\bar_skyline]])
SharedMedia:Register ("statusbar", "WorldState Score", [[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]])
SharedMedia:Register ("statusbar", "DGround", [[Interface\AddOns\Details\images\bar_background]])
SharedMedia:Register ("statusbar", "Details Flat", [[Interface\AddOns\Details\images\bar_background]])
SharedMedia:Register ("statusbar", "Splitbar", [[Interface\AddOns\Details\images\bar_textures\split_bar]])
SharedMedia:Register ("statusbar", "Details2020", [[Interface\AddOns\Details\images\bar_textures\texture2020]])
--window bg and bar border
SharedMedia:Register ("background", "Details Ground", [[Interface\AddOns\Details\images\background]])
SharedMedia:Register ("border", "Details BarBorder 1", [[Interface\AddOns\Details\images\border_1]])
SharedMedia:Register ("border", "Details BarBorder 2", [[Interface\AddOns\Details\images\border_2]])
SharedMedia:Register ("border", "Details BarBorder 3", [[Interface\AddOns\Details\images\border_3]])
SharedMedia:Register ("border", "1 Pixel", [[Interface\Buttons\WHITE8X8]])
--misc fonts
SharedMedia:Register ("font", "Oswald", [[Interface\Addons\Details\fonts\Oswald-Regular.ttf]])
SharedMedia:Register ("font", "Nueva Std Cond", [[Interface\Addons\Details\fonts\Nueva Std Cond.ttf]])
SharedMedia:Register ("font", "Accidental Presidency", [[Interface\Addons\Details\fonts\Accidental Presidency.ttf]])
SharedMedia:Register ("font", "TrashHand", [[Interface\Addons\Details\fonts\TrashHand.TTF]])
SharedMedia:Register ("font", "Harry P", [[Interface\Addons\Details\fonts\HARRYP__.TTF]])
SharedMedia:Register ("font", "FORCED SQUARE", [[Interface\Addons\Details\fonts\FORCED SQUARE.ttf]])
SharedMedia:Register ("sound", "d_gun1", [[Interface\Addons\Details\sounds\sound_gun2.ogg]])
SharedMedia:Register ("sound", "d_gun2", [[Interface\Addons\Details\sounds\sound_gun3.ogg]])
SharedMedia:Register ("sound", "d_jedi1", [[Interface\Addons\Details\sounds\sound_jedi1.ogg]])
SharedMedia:Register ("sound", "d_whip1", [[Interface\Addons\Details\sounds\sound_whip1.ogg]])
SharedMedia:Register("statusbar", "Details D'ictum", [[Interface\AddOns\Details\images\bar4]])
SharedMedia:Register("statusbar", "Details Vidro", [[Interface\AddOns\Details\images\bar4_vidro]])
SharedMedia:Register("statusbar", "Details D'ictum (reverse)", [[Interface\AddOns\Details\images\bar4_reverse]])
SharedMedia:Register ("sound", "Details Threat Warning Volume 1", [[Interface\Addons\Details\sounds\threat_warning_1.ogg]])
SharedMedia:Register ("sound", "Details Threat Warning Volume 2", [[Interface\Addons\Details\sounds\threat_warning_2.ogg]])
SharedMedia:Register ("sound", "Details Threat Warning Volume 3", [[Interface\Addons\Details\sounds\threat_warning_3.ogg]])
SharedMedia:Register ("sound", "Details Threat Warning Volume 4", [[Interface\Addons\Details\sounds\threat_warning_4.ogg]])
--flat bars
SharedMedia:Register("statusbar", "Details Serenity", [[Interface\AddOns\Details\images\bar_serenity]])
SharedMedia:Register("statusbar", "BantoBar", [[Interface\AddOns\Details\images\BantoBar]])
SharedMedia:Register("statusbar", "Skyline", [[Interface\AddOns\Details\images\bar_skyline]])
SharedMedia:Register("statusbar", "WorldState Score", [[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]])
SharedMedia:Register("statusbar", "DGround", [[Interface\AddOns\Details\images\bar_background]])
SharedMedia:Register("statusbar", "Details Flat", [[Interface\AddOns\Details\images\bar_background]])
SharedMedia:Register("statusbar", "Splitbar", [[Interface\AddOns\Details\images\bar_textures\split_bar]])
SharedMedia:Register("statusbar", "Details2020", [[Interface\AddOns\Details\images\bar_textures\texture2020]])
SharedMedia:Register("statusbar", "Left White Gradient", [[Interface\AddOns\Details\images\bar_textures\gradient_white_10percent_left]])
--window bg and bar order
SharedMedia:Register("background", "Details Ground", [[Interface\AddOns\Details\images\background]])
SharedMedia:Register("border", "Details BarBorder 1", [[Interface\AddOns\Details\images\border_1]])
SharedMedia:Register("border", "Details BarBorder 2", [[Interface\AddOns\Details\images\border_2]])
SharedMedia:Register("border", "Details BarBorder 3", [[Interface\AddOns\Details\images\border_3]])
SharedMedia:Register("border", "1 Pixel", [[Interface\Buttons\WHITE8X8]])
--misc fonts
SharedMedia:Register("font", "Oswald", [[Interface\Addons\Details\fonts\Oswald-Regular.ttf]])
SharedMedia:Register("font", "Nueva Std Cond", [[Interface\Addons\Details\fonts\Nueva Std Cond.ttf]])
SharedMedia:Register("font", "Accidental Presidency", [[Interface\Addons\Details\fonts\Accidental Presidency.ttf]])
SharedMedia:Register("font", "TrashHand", [[Interface\Addons\Details\fonts\TrashHand.TTF]])
SharedMedia:Register("font", "Harry P", [[Interface\Addons\Details\fonts\HARRYP__.TTF]])
SharedMedia:Register("font", "FORCED SQUARE", [[Interface\Addons\Details\fonts\FORCED SQUARE.ttf]])
SharedMedia:Register("sound", "d_gun1", [[Interface\Addons\Details\sounds\sound_gun2.ogg]])
SharedMedia:Register("sound", "d_gun2", [[Interface\Addons\Details\sounds\sound_gun3.ogg]])
SharedMedia:Register("sound", "d_jedi1", [[Interface\Addons\Details\sounds\sound_jedi1.ogg]])
SharedMedia:Register("sound", "d_whip1", [[Interface\Addons\Details\sounds\sound_whip1.ogg]])
SharedMedia:Register("sound", "Details Threat Warning Volume 1", [[Interface\Addons\Details\sounds\threat_warning_1.ogg]])
SharedMedia:Register("sound", "Details Threat Warning Volume 2", [[Interface\Addons\Details\sounds\threat_warning_2.ogg]])
SharedMedia:Register("sound", "Details Threat Warning Volume 3", [[Interface\Addons\Details\sounds\threat_warning_3.ogg]])
SharedMedia:Register("sound", "Details Threat Warning Volume 4", [[Interface\Addons\Details\sounds\threat_warning_4.ogg]])
+3 -3
View File
@@ -40,7 +40,7 @@
--> api functions
--combat (container type, actor name)
_detalhes.call_combate = function (self, class_type, name)
_detalhes.call_combate = function(self, class_type, name)
local container = self[class_type]
local index_mapa = container._NameIndexTable [name]
local actor = container._ActorTable [index_mapa]
@@ -664,7 +664,7 @@
tabela_combate.shadow = nil
end
combate.__sub = function (combate1, combate2)
combate.__sub = function(combate1, combate2)
if (combate1 ~= _detalhes.tabela_overall) then
return
@@ -739,7 +739,7 @@
end
combate.__add = function (combate1, combate2)
combate.__add = function(combate1, combate2)
local all_containers = {combate2 [class_type_dano]._ActorTable, combate2 [class_type_cura]._ActorTable, combate2 [class_type_e_energy]._ActorTable, combate2 [class_type_misc]._ActorTable}
local custom_combat
+18 -18
View File
@@ -169,7 +169,7 @@
--> get the attribute
local attribute = custom_object:GetAttribute() --"damagedone"
--> get the custom function (actor, source, target, spellid)
--> get the custom function(actor, source, target, spellid)
local func = atributo_custom [attribute]
--> get the combat container
@@ -249,9 +249,9 @@
if (actor.id) then
if (actor.id == 1) then
actor.report_name = GetSpellLink (6603)
actor.report_name = GetSpellLink(6603)
elseif (actor.id > 10) then
actor.report_name = GetSpellLink (actor.id)
actor.report_name = GetSpellLink(actor.id)
else
actor.report_name = actor.nome
end
@@ -755,7 +755,7 @@
function atributo_custom:ResetCustomActorContainer()
for _, actor in _ipairs (self._ActorTable) do
actor.value = actor.value - _math_floor (actor.value)
--actor.value = _detalhes:GetOrderNumber (actor.nome)
--actor.value = _detalhes:GetOrderNumber(actor.nome)
end
end
@@ -880,7 +880,7 @@
if (icon_cache [actor.nome]) then
newActor.icon = icon_cache [actor.nome]
else
local _, _, icon = _GetSpellInfo (actor.id)
local _, _, icon = _GetSpellInfo(actor.id)
if (icon) then
icon_cache [actor.nome] = icon
newActor.icon = icon
@@ -924,7 +924,7 @@
}, {__index = atributo_custom})
end
local custom_sort = function (t1, t2)
local custom_sort = function(t1, t2)
return t1.value > t2.value
end
function atributo_custom:Sort (container)
@@ -964,7 +964,7 @@
end
if (actor.id) then
_detalhes:AddTooltipSpellHeaderText (select (1, _GetSpellInfo (actor.id)), "yellow", 1, select (3, _GetSpellInfo (actor.id)), 0.90625, 0.109375, 0.15625, 0.875)
_detalhes:AddTooltipSpellHeaderText (select (1, _GetSpellInfo(actor.id)), "yellow", 1, select (3, _GetSpellInfo(actor.id)), 0.90625, 0.109375, 0.15625, 0.875)
else
_detalhes:AddTooltipSpellHeaderText (custom_object:GetName(), "yellow", 1, custom_object:GetIcon(), 0.90625, 0.109375, 0.15625, 0.875)
end
@@ -1272,7 +1272,7 @@
if (debuff_uptime_container) then
local focus_potion = debuff_uptime_container [DETAILS_FOCUS_POTION_ID]
if (focus_potion) then
local name, _, icon = GetSpellInfo (DETAILS_FOCUS_POTION_ID)
local name, _, icon = GetSpellInfo(DETAILS_FOCUS_POTION_ID)
GameCooltip:AddLine (name, 1) --> can use only 1 focus potion (can't be pre-potion)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
@@ -1286,7 +1286,7 @@
local potionUsed = buff_uptime_container [spellId]
if (potionUsed) then
local name, _, icon = GetSpellInfo (spellId)
local name, _, icon = GetSpellInfo(spellId)
GameCooltip:AddLine (name, potionUsed.activedamt)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
@@ -1367,28 +1367,28 @@
local hs = actor:GetSpell (6262)
if (hs) then
GameCooltip:AddLine (select (1, GetSpellInfo(6262)), _detalhes:ToK(hs.total))
GameCooltip:AddIcon (select (3, GetSpellInfo (6262)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddIcon (select (3, GetSpellInfo(6262)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
end
local pot = actor:GetSpell (DETAILS_HEALTH_POTION_ID)
if (pot) then
GameCooltip:AddLine (select (1, GetSpellInfo(DETAILS_HEALTH_POTION_ID)), _detalhes:ToK(pot.total))
GameCooltip:AddIcon (select (3, GetSpellInfo (DETAILS_HEALTH_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddIcon (select (3, GetSpellInfo(DETAILS_HEALTH_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
end
local pot = actor:GetSpell (DETAILS_HEALTH_POTION2_ID)
if (pot) then
GameCooltip:AddLine (select (1, GetSpellInfo(DETAILS_HEALTH_POTION2_ID)), _detalhes:ToK(pot.total))
GameCooltip:AddIcon (select (3, GetSpellInfo (DETAILS_HEALTH_POTION2_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddIcon (select (3, GetSpellInfo(DETAILS_HEALTH_POTION2_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
end
local pot = actor:GetSpell (DETAILS_REJU_POTION_ID)
if (pot) then
GameCooltip:AddLine (select (1, GetSpellInfo(DETAILS_REJU_POTION_ID)), _detalhes:ToK(pot.total))
GameCooltip:AddIcon (select (3, GetSpellInfo (DETAILS_REJU_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddIcon (select (3, GetSpellInfo(DETAILS_REJU_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
end
@@ -1591,7 +1591,7 @@
table.sort (spells, _detalhes.Sort2)
for index, spell in ipairs (spells) do
local name, _, icon = GetSpellInfo (spell [1])
local name, _, icon = GetSpellInfo(spell [1])
GameCooltip:AddLine (name, spell [2])
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
@@ -1733,7 +1733,7 @@
table.sort (spells, _detalhes.Sort2)
for index, spell in ipairs (spells) do
local name, _, icon = GetSpellInfo (spell [1])
local name, _, icon = GetSpellInfo(spell [1])
GameCooltip:AddLine (name, spell [2])
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
@@ -1894,9 +1894,9 @@
local spell_cast = misc_actor.spell_cast and misc_actor.spell_cast [spell.id]
if (not spell_cast and misc_actor.spell_cast) then
local spellname = GetSpellInfo (spell.id)
local spellname = GetSpellInfo(spell.id)
for casted_spellid, amount in pairs (misc_actor.spell_cast) do
local casted_spellname = GetSpellInfo (casted_spellid)
local casted_spellname = GetSpellInfo(casted_spellid)
if (casted_spellname == spellname) then
spell_cast = amount .. " (|cFFFFFF00?|r)"
end
@@ -2388,7 +2388,7 @@
for i, t in ipairs (sortedList) do
local spellID, total = unpack (t)
if (total > 1) then
local spellName, _, spellIcon = Details.GetSpellInfo (spellID)
local spellName, _, spellIcon = Details.GetSpellInfo(spellID)
local spellPercent = total / playerTotal * 100
local formatedSpellPercent = format("%.1f", spellPercent)
+1765 -1773
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -13,7 +13,7 @@ do
_error.__tostring = function()
return _error.errortext
end
_error.__call = function (_this)
_error.__call = function(_this)
print (_this.errortext)
end
+19 -19
View File
@@ -70,7 +70,7 @@ local keyName
function atributo_heal:NovaTabela (serial, nome, link)
local alphabetical = _detalhes:GetOrderNumber (nome)
local alphabetical = _detalhes:GetOrderNumber(nome)
--> constructor
local _new_healActor = {
@@ -978,7 +978,7 @@ function _detalhes:CloseShields (combat)
for spellid, owner_table in _pairs (spellid_table) do
local spellname = GetSpellInfo (spellid)
local spellname = GetSpellInfo(spellid)
for owner, amount in _pairs (owner_table) do
if (amount > 0) then
@@ -1095,7 +1095,7 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown)
break
end
local spellName, _, spellIcon = _GetSpellInfo (spellObject.id)
local spellName, _, spellIcon = _GetSpellInfo(spellObject.id)
GameCooltip:AddLine (spellName .. ": ", FormatTooltipNumber (_, spellTotal) .. " (" .. _cstr ("%.1f", spellTotal / totalDenied) .."%)")
@@ -1175,7 +1175,7 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown)
break
end
local spellName, _, spellIcon = _GetSpellInfo (spellID)
local spellName, _, spellIcon = _GetSpellInfo(spellID)
GameCooltip:AddLine (spellName .. ": ", FormatTooltipNumber (_, spellTotal) .. " (" .. _cstr ("%.1f", spellTotal / totalDenied) .."%)")
@@ -1261,7 +1261,7 @@ function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra, keydown)
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
end
_table_sort (meus_curadores, function (a, b) return a[2] > b[2] end)
_table_sort (meus_curadores, function(a, b) return a[2] > b[2] end)
local max = #meus_curadores
if (max > 9) then
max = 9
@@ -1339,7 +1339,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
--add actor spells
for _spellid, _skill in _pairs (ActorSkillsContainer) do
local SkillName, _, SkillIcon = _GetSpellInfo (_spellid)
local SkillName, _, SkillIcon = _GetSpellInfo(_spellid)
if (_skill [skill_key] > 0 or _skill.anti_heal) then
_table_insert (ActorHealingTable, {
_spellid,
@@ -1360,7 +1360,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
if (petActor) then
for _spellid, _skill in _pairs (petActor:GetActorSpells()) do
if (_skill [skill_key] > 0) then
local SkillName, _, SkillIcon = _GetSpellInfo (_spellid)
local SkillName, _, SkillIcon = _GetSpellInfo(_spellid)
local petName = petName:gsub ((" <.*"), "")
ActorHealingTable [#ActorHealingTable+1] = {
_spellid,
@@ -1739,7 +1739,7 @@ function atributo_heal:MontaInfoOverHealing()
local barras = info.barras1
for spellid, tabela in _pairs (tabela) do
local nome, _, icone = _GetSpellInfo (spellid)
local nome, _, icone = _GetSpellInfo(spellid)
_table_insert (minhas_curas, {spellid, tabela.overheal, tabela.overheal/total*100, nome, icone})
end
@@ -1751,7 +1751,7 @@ function atributo_heal:MontaInfoOverHealing()
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
for _spellid, _skill in _pairs (PetSkillsContainer) do --> da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo (_spellid)
local nome, _, icone = _GetSpellInfo(_spellid)
_table_insert (minhas_curas, {_spellid, _skill.overheal, _skill.overheal/total*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
end
end
@@ -1888,7 +1888,7 @@ function atributo_heal:MontaInfoHealingDone()
end
for spellid, tabela in _pairs (tabela) do
local nome, rank, icone = _GetSpellInfo (spellid)
local nome, rank, icone = _GetSpellInfo(spellid)
_table_insert (minhas_curas, {
spellid,
tabela.total,
@@ -1911,7 +1911,7 @@ function atributo_heal:MontaInfoHealingDone()
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
for _spellid, _skill in _pairs (PetSkillsContainer) do --> da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo (_spellid)
local nome, _, icone = _GetSpellInfo(_spellid)
_table_insert (minhas_curas, {
_spellid,
_skill.total,
@@ -2049,7 +2049,7 @@ function atributo_heal:MontaTooltipAlvos (thisLine, index, instancia)
for spellid, tabela in _pairs (container) do
for target_name, amount in _pairs (tabela ["targets" .. targets_key]) do
if (target_name == inimigo) then
local nome, _, icone = _GetSpellInfo (spellid)
local nome, _, icone = _GetSpellInfo(spellid)
habilidades [#habilidades+1] = {nome, amount, icone}
end
end
@@ -2065,7 +2065,7 @@ function atributo_heal:MontaTooltipAlvos (thisLine, index, instancia)
for target_name, amount in _pairs (_skill ["targets" .. targets_key]) do
if (target_name == inimigo) then
local nome, _, icone = _GetSpellInfo (_spellid)
local nome, _, icone = _GetSpellInfo(_spellid)
habilidades [#habilidades+1] = {nome, amount, icone}
end
end
@@ -2161,7 +2161,7 @@ function atributo_heal:MontaDetalhesHealingTaken (nome, barra)
for spellid, tabela in _pairs (conteudo) do --> da foreach em cada spellid do container
if (tabela.targets [actor]) then
local spell_nome, _, icone = _GetSpellInfo (spellid)
local spell_nome, _, icone = _GetSpellInfo(spellid)
_table_insert (minhas_magias, {spellid, tabela.targets [actor], tabela.targets [actor] / total*100, spell_nome, icone})
end
end
@@ -2221,7 +2221,7 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
end
--> icone direito superior
local _, _, icone = _GetSpellInfo (spellid)
local _, _, icone = _GetSpellInfo(spellid)
info.spell_icone:SetTexture (icone)
local total = self.total
@@ -2278,9 +2278,9 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
local spell_cast = misc_actor.spell_cast and misc_actor.spell_cast [spellid]
if (not spell_cast and misc_actor.spell_cast) then
local spellname = GetSpellInfo (spellid)
local spellname = GetSpellInfo(spellid)
for casted_spellid, amount in _pairs (misc_actor.spell_cast) do
local casted_spellname = GetSpellInfo (casted_spellid)
local casted_spellname = GetSpellInfo(casted_spellid)
if (casted_spellname == spellname) then
spell_cast = amount .. " (|cFFFFFF00?|r)"
end
@@ -2702,7 +2702,7 @@ function atributo_heal:ColetarLixo (lastevent)
return _detalhes:ColetarLixo (class_type, lastevent)
end
atributo_heal.__add = function (tabela1, tabela2)
atributo_heal.__add = function(tabela1, tabela2)
--> tempo decorrido
local tempo = (tabela2.end_time or time()) - tabela2.start_time
@@ -2805,7 +2805,7 @@ atributo_heal.__add = function (tabela1, tabela2)
return tabela1
end
atributo_heal.__sub = function (tabela1, tabela2)
atributo_heal.__sub = function(tabela1, tabela2)
--> tempo decorrido
local tempo = (tabela2.end_time or time()) - tabela2.start_time
+472 -472
View File
File diff suppressed because it is too large Load Diff
+11 -11
View File
@@ -66,7 +66,7 @@ function atributo_energy:NovaTabela (serial, nome, link)
--> constructor
local alphabetical = _detalhes:GetOrderNumber (nome)
local alphabetical = _detalhes:GetOrderNumber(nome)
local _new_energyActor = {
@@ -137,7 +137,7 @@ end
local power_table = {0, 1, 3, 6}
local power_type
local sort_energy = function (t1, t2)
local sort_energy = function(t1, t2)
if (t1.powertype == power_type and t2.powertype == power_type) then
return t1.received > t2.received
elseif (t1.powertype == power_type) then
@@ -149,11 +149,11 @@ local sort_energy = function (t1, t2)
end
end
local sort_energyalternate = function (t1, t2)
local sort_energyalternate = function(t1, t2)
return t1.alternatepower > t2.alternatepower
end
local sort_energy_group = function (t1, t2)
local sort_energy_group = function(t1, t2)
if (t1.grupo and t2.grupo) then
if (t1.powertype == power_type and t2.powertype == power_type) then
return t1.received > t2.received
@@ -175,7 +175,7 @@ local sort_energy_group = function (t1, t2)
end
end
local sort_alternateenergy_group = function (t1, t2)
local sort_alternateenergy_group = function(t1, t2)
if (t1.grupo and t2.grupo) then
return t1.alternatepower > t2.alternatepower
else
@@ -924,7 +924,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
break
end
local nome_magia, _, icone_magia = _GetSpellInfo (spell [1])
local nome_magia, _, icone_magia = _GetSpellInfo(spell [1])
GameCooltip:AddLine (nome_magia, FormatTooltipNumber (_, spell [2]).." (".._cstr("%.1f", (spell [2]/total_regenerado) * 100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar (false, spell [2] / energy_tooltips_table [1][2] * 100)
@@ -1013,7 +1013,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
for i = 1, #allGeneratorSpells do
local thisGenerator = allGeneratorSpells [i]
local spellName, _, spellIcon = GetSpellInfo (thisGenerator[1].id)
local spellName, _, spellIcon = GetSpellInfo(thisGenerator[1].id)
GameCooltip:AddLine (spellName, FormatTooltipNumber (_, thisGenerator[2]) .. " (|cFFFF5555overflow: " .. FormatTooltipNumber (_, thisGenerator[3]) .. "|r | " .. _cstr ("%.1f", (thisGenerator[2] / allGenerated) * 100).."%)")
GameCooltip:AddIcon (spellIcon, nil, nil, icon_size.W, icon_size.H, .1, .9, .1, .9)
_detalhes:AddTooltipBackgroundStatusbar()
@@ -1122,7 +1122,7 @@ function atributo_energy:MontaInfoRegenRecebido()
self:FocusLock (barra, tabela[1])
local spellname, _, spellicon = _GetSpellInfo (tabela [1])
local spellname, _, spellicon = _GetSpellInfo(tabela [1])
local percent = tabela [2] / total_regenerado * 100
self:UpdadeInfoBar (barra, index, tabela[1], spellname, tabela[2], _detalhes:comma_value (tabela[2]), max_, percent, spellicon, true)
@@ -1343,7 +1343,7 @@ function atributo_energy:MontaTooltipAlvos (esta_barra, index)
break
end
local spellname, _, spellicon = _GetSpellInfo (spell [1])
local spellname, _, spellicon = _GetSpellInfo(spell [1])
GameTooltip:AddDoubleLine(spellname .. ": ", _detalhes:comma_value (spell [2]) .. " (" .. _cstr ("%.1f", (spell [2] / total_regenerado) * 100).."%)", 1, 1, 1, 1, 1, 1)
GameTooltip:AddTexture(spellicon)
end
@@ -1542,7 +1542,7 @@ function _detalhes.clear:c_atributo_energy (este_jogador)
_detalhes.clear:c_container_habilidades (este_jogador.spells)
end
atributo_energy.__add = function (tabela1, tabela2)
atributo_energy.__add = function(tabela1, tabela2)
if (not tabela1.powertype) then
tabela1.powertype = tabela2.powertype
@@ -1580,7 +1580,7 @@ atributo_energy.__add = function (tabela1, tabela2)
return tabela1
end
atributo_energy.__sub = function (tabela1, tabela2)
atributo_energy.__sub = function(tabela1, tabela2)
if (not tabela1.powertype) then
tabela1.powertype = tabela2.powertype
+1 -1
View File
@@ -52,7 +52,7 @@
function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spellName)
--print (self.id, GetSpellInfo (self.id))
--print (self.id, GetSpellInfo(self.id))
if (spellID == "BUFF_OR_DEBUFF") then
+42 -42
View File
@@ -159,9 +159,9 @@ end
--try to find a spell with the same name and get the amount of casts of that spell object
if (not spell_cast and misc_actor.spell_cast) then
local spellname = GetSpellInfo (spellId)
local spellname = GetSpellInfo(spellId)
for casted_spellid, amount in pairs (misc_actor.spell_cast) do
local casted_spellname = GetSpellInfo (casted_spellid)
local casted_spellname = GetSpellInfo(casted_spellid)
if (casted_spellname == spellname) then
return amount, true
end
@@ -379,7 +379,7 @@ end
--[1] true damage/ false heal [2] spellid [3] amount [4] time [5] current health [6] source
local report_table = {}
local ReportSingleDeathFunc = function (IsCurrent, IsReverse, AmtLines)
local ReportSingleDeathFunc = function(IsCurrent, IsReverse, AmtLines)
AmtLines = AmtLines + 1
@@ -426,13 +426,13 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
if (evento [1] and type (evento [1]) == "boolean") then --> damage
if (evento [3]) then
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
local spellname, _, spellicon = _GetSpellInfo (evento [2])
local spellname, _, spellicon = _GetSpellInfo(evento [2])
local spelllink
if (evento [2] == 1) then
spelllink = GetSpellLink (6603)
spelllink = GetSpellLink(6603)
elseif (evento [2] > 10) then
spelllink = GetSpellLink (evento [2])
spelllink = GetSpellLink(evento [2])
else
spelllink = spellname
end
@@ -453,9 +453,9 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
if (amount > _detalhes.deathlog_healingdone_min) then
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
local spelllink = GetSpellLink (evento [2])
local spelllink = GetSpellLink(evento [2])
local source = _detalhes:GetOnlyName (evento [6])
local spellname, _, spellicon = _GetSpellInfo (evento [2])
local spellname, _, spellicon = _GetSpellInfo(evento [2])
local hp = _math_floor (evento [5] / max_health * 100)
if (hp > 100) then
@@ -472,9 +472,9 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
elseif (type (evento [1]) == "number" and evento [1] == 4) then --> debuff
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
local spelllink = GetSpellLink (evento [2])
local spelllink = GetSpellLink(evento [2])
local source = _detalhes:GetOnlyName (evento [6])
local spellname, _, spellicon = _GetSpellInfo (evento [2])
local spellname, _, spellicon = _GetSpellInfo(evento [2])
local stacks = evento [3]
local hp = _math_floor (evento [5] / max_health * 100)
if (hp > 100) then
@@ -509,7 +509,7 @@ function atributo_misc:ReportSingleCooldownLine (misc_actor, instancia)
for i, spell in ipairs (cooldowns_used) do
local spelllink = GetSpellLink (spell [1])
local spelllink = GetSpellLink(spell [1])
reportar [#reportar+1] = spelllink .. ": " .. spell [2]
for target_name, amount in pairs (spell[3].targets) do
@@ -523,18 +523,18 @@ function atributo_misc:ReportSingleCooldownLine (misc_actor, instancia)
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
end
local buff_format_name = function (spellid)
local buff_format_name = function(spellid)
if (_type (spellid) == "string") then
return spellid
end
return _detalhes:GetSpellLink (spellid)
return _detalhes:GetSpellLink(spellid)
end
local buff_format_amount = function (t)
local buff_format_amount = function(t)
local total, percent = unpack (t)
local m, s = _math_floor (total / 60), _math_floor (total % 60)
return _cstr ("%.1f", percent) .. "% (" .. m .. "m " .. s .. "s)"
end
local sort_buff_report = function (t1, t2)
local sort_buff_report = function(t1, t2)
return t1[2][1] > t2[2][1]
end
@@ -1096,7 +1096,7 @@ function atributo_misc:ToolTipCC (instancia, numero, barra)
for _spellid, _tabela in pairs (habilidades) do
--> quantidade
local nome_magia, _, icone_magia = _GetSpellInfo (_spellid)
local nome_magia, _, icone_magia = _GetSpellInfo(_spellid)
GameCooltip:AddLine (nome_magia, _tabela.cc_break .. " (" .. _cstr ("%.1f", _tabela.cc_break / meu_total * 100) .. "%)")
GameCooltip:AddIcon (icone_magia, nil, nil, lineHeight, lineHeight, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
@@ -1104,7 +1104,7 @@ function atributo_misc:ToolTipCC (instancia, numero, barra)
--> o que quebrou
local quebrou_oque = _tabela.cc_break_oque
for spellid_quebrada, amt_quebrada in pairs (_tabela.cc_break_oque) do
local nome_magia, _, icone_magia = _GetSpellInfo (spellid_quebrada)
local nome_magia, _, icone_magia = _GetSpellInfo(spellid_quebrada)
GameCooltip:AddLine (nome_magia, amt_quebrada .. " ")
GameCooltip:AddIcon ([[Interface\Buttons\UI-GroupLoot-Pass-Down]], nil, 1, 14, 14)
GameCooltip:AddIcon (icone_magia, nil, 2, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
@@ -1163,7 +1163,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
if (#meus_dispells > 0) then
for i = 1, min (25, #meus_dispells) do
local esta_habilidade = meus_dispells[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
@@ -1185,7 +1185,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
if (#buffs_dispelados > 0) then
for i = 1, min (25, #buffs_dispelados) do
local esta_habilidade = buffs_dispelados[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
@@ -1482,7 +1482,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
local string_output = "pre-potion: " --> localize-me
for playername, potspellid in pairs (pot_usage) do
local name, _, icon = _GetSpellInfo (potspellid)
local name, _, icon = _GetSpellInfo(potspellid)
local _, class = UnitClass (playername)
local class_color = ""
if (class and RAID_CLASS_COLORS [class]) then
@@ -1554,7 +1554,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
local string_output = "pre-potion: "
for playername, potspellid in pairs (pot_usage) do
local name, _, icon = _GetSpellInfo (potspellid)
local name, _, icon = _GetSpellInfo(potspellid)
local _, class = UnitClass (playername)
local class_color = ""
if (class and RAID_CLASS_COLORS [class]) then
@@ -1595,7 +1595,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
if (in_or_out == "BUFF_UPTIME_IN") then
local string_output = "pre-potion: "
for playername, potspellid in pairs (pot_usage) do
local name, _, icon = _GetSpellInfo (potspellid)
local name, _, icon = _GetSpellInfo(potspellid)
local _, class = UnitClass (playername)
local class_color = ""
if (class and RAID_CLASS_COLORS [class]) then
@@ -1614,7 +1614,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
end
end
local Sort2Reverse = function (a, b)
local Sort2Reverse = function(a, b)
return a[2] < b[2]
end
@@ -1651,7 +1651,7 @@ function atributo_misc:ToolTipDebuffUptime (instancia, numero, barra)
local esta_habilidade = debuffs_usados[i]
if (esta_habilidade[2] > 0) then
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
local minutos, segundos = _math_floor (esta_habilidade[2]/60), _math_floor (esta_habilidade[2]%60)
if (esta_habilidade[2] >= _combat_time) then
@@ -1762,7 +1762,7 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
if (#cooldowns_usados > 0) then
for i = 1, min (25, #cooldowns_usados) do
local esta_habilidade = cooldowns_usados[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
@@ -1844,7 +1844,7 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
if (#meus_ress > 0) then
for i = 1, min (3, #meus_ress) do
local esta_habilidade = meus_ress[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2] .. " (" .. _cstr ("%.1f", floor (esta_habilidade[2]) / floor (meu_total) * 100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, lineHeight, lineHeight, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
@@ -1926,7 +1926,7 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
if (#meus_interrupts > 0) then
for i = 1, min (25, #meus_interrupts) do
local esta_habilidade = meus_interrupts[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2].." (".._cstr("%.1f", floor (esta_habilidade[2])/floor (meu_total)*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
@@ -1949,7 +1949,7 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
if (#habilidades_interrompidas > 0) then
for i = 1, min (25, #habilidades_interrompidas) do
local esta_habilidade = habilidades_interrompidas[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2].." (".._cstr("%.1f", floor (esta_habilidade[2])/floor (meu_total)*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
@@ -2047,7 +2047,7 @@ function atributo_misc:MontaInfoInterrupt()
--player
for _spellid, _tabela in pairs (minha_tabela) do --> da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo (_spellid)
local nome, _, icone = _GetSpellInfo(_spellid)
_table_insert (meus_interrupts, {_spellid, _tabela.counter, _tabela.counter/meu_total*100, nome, icone})
end
--pet
@@ -2058,7 +2058,7 @@ function atributo_misc:MontaInfoInterrupt()
if (PetActor and PetActor.interrupt and PetActor.interrupt > 0) then
local PetSkillsContainer = PetActor.interrupt_spells._ActorTable
for _spellid, _skill in pairs (PetSkillsContainer) do --> da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo (_spellid)
local nome, _, icone = _GetSpellInfo(_spellid)
_table_insert (meus_interrupts, {_spellid, _skill.counter, _skill.counter/meu_total*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
end
end
@@ -2190,7 +2190,7 @@ function atributo_misc:MontaDetalhesInterrupt (spellid, barra)
end
--> icone direito superior
local nome, _, icone = _GetSpellInfo (spellid)
local nome, _, icone = _GetSpellInfo(spellid)
local infospell = {nome, nil, icone}
_detalhes.playerDetailWindow.spell_icone:SetTexture (infospell[3])
@@ -2227,7 +2227,7 @@ function atributo_misc:MontaDetalhesInterrupt (spellid, barra)
barra.textura:SetValue (tabela[2]/max_*100) --> muito mais rapido...
end
local nome, _, icone = _GetSpellInfo (tabela[1])
local nome, _, icone = _GetSpellInfo(tabela[1])
barra.lineText1:SetText (index..instancia.divisores.colocacao..nome) --seta o texto da esqueda
barra.lineText4:SetText (tabela[2] .." ".. instancia.divisores.abre .._cstr("%.1f", tabela[2]/total*100) .."%".. instancia.divisores.fecha) --seta o texto da direita
@@ -2274,7 +2274,7 @@ function atributo_misc:MontaTooltipAlvos (esta_barra, index)
GameTooltip:AddLine (" ")
for index, tabela in ipairs (habilidades) do
local nome, rank, icone = _GetSpellInfo (tabela[1])
local nome, rank, icone = _GetSpellInfo(tabela[1])
if (index < 8) then
GameTooltip:AddDoubleLine (index..". |T"..icone..":0|t "..nome, tabela[2].." (".._cstr("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
else
@@ -2327,12 +2327,12 @@ end
end
end
local refresh_alvos = function (container1, container2)
local refresh_alvos = function(container1, container2)
for target_name, amount in pairs (container2) do
container1 [target_name] = container1 [target_name] or 0
end
end
local refresh_habilidades = function (container1, container2)
local refresh_habilidades = function(container1, container2)
for spellid, habilidade in pairs (container2._ActorTable) do
local habilidade_shadow = container1:PegaHabilidade (spellid, true, nil, true)
refresh_alvos (habilidade_shadow.targets , habilidade.targets)
@@ -2443,7 +2443,7 @@ function atributo_misc:r_onlyrefresh_shadow (actor)
end
local somar_keys = function (habilidade, habilidade_tabela1)
local somar_keys = function(habilidade, habilidade_tabela1)
for key, value in pairs (habilidade) do
if (_type (value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
@@ -2452,12 +2452,12 @@ local somar_keys = function (habilidade, habilidade_tabela1)
end
end
end
local somar_alvos = function (container1, container2)
local somar_alvos = function(container1, container2)
for target_name, amount in pairs (container2) do
container1 [target_name] = (container1 [target_name] or 0) + amount
end
end
local somar_habilidades = function (container1, container2)
local somar_habilidades = function(container1, container2)
for spellid, habilidade in pairs (container2._ActorTable) do
local habilidade_tabela1 = container1:PegaHabilidade (spellid, true, nil, false)
somar_alvos (habilidade_tabela1.targets, habilidade.targets)
@@ -2526,7 +2526,7 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object)
if (actor.cooldowns_defensive) then
if (not shadow.cooldowns_defensive_targets) then
shadow.cooldowns_defensive = _detalhes:GetOrderNumber (actor.nome)
shadow.cooldowns_defensive = _detalhes:GetOrderNumber(actor.nome)
shadow.cooldowns_defensive_targets = {}
shadow.cooldowns_defensive_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
end
@@ -2854,7 +2854,7 @@ function _detalhes.clear:c_atributo_misc (este_jogador)
end
atributo_misc.__add = function (tabela1, tabela2)
atributo_misc.__add = function(tabela1, tabela2)
if (tabela2.spell_cast) then
for spellid, amount in pairs (tabela2.spell_cast) do
@@ -3110,7 +3110,7 @@ atributo_misc.__add = function (tabela1, tabela2)
return tabela1
end
local subtrair_keys = function (habilidade, habilidade_tabela1)
local subtrair_keys = function(habilidade, habilidade_tabela1)
for key, value in pairs (habilidade) do
if (_type (value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
@@ -3120,7 +3120,7 @@ local subtrair_keys = function (habilidade, habilidade_tabela1)
end
end
atributo_misc.__sub = function (tabela1, tabela2)
atributo_misc.__sub = function(tabela1, tabela2)
if (tabela2.spell_cast) then
for spellid, amount in pairs (tabela2.spell_cast) do
+4 -4
View File
@@ -436,7 +436,7 @@
local pet_text_object = _G ["DetailsPetOwnerFinderTextLeft2"] --not in use
local follower_text_object = _G ["DetailsPetOwnerFinderTextLeft3"] --not in use
local find_pet_found_owner = function (ownerName, serial, nome, flag, self)
local find_pet_found_owner = function(ownerName, serial, nome, flag, self)
local ownerGuid = _UnitGUID (ownerName)
if (ownerGuid) then
_detalhes.tabela_pets:Adicionar (serial, nome, flag, ownerGuid, ownerName, 0x00000417)
@@ -453,7 +453,7 @@
end
--> check pet owner name with correct declension for ruRU locale (from user 'denis-kam' on github)
local find_name_declension = function (petTooltip, playerName)
local find_name_declension = function(petTooltip, playerName)
--> 2 - male, 3 - female
for gender = 3, 2, -1 do
for declensionSet = 1, GetNumDeclensionSets(playerName, gender) do
@@ -469,7 +469,7 @@
return false
end
local find_pet_owner = function (serial, nome, flag, self)
local find_pet_owner = function(serial, nome, flag, self)
if (not _detalhes.tabela_vigente) then
return
end
@@ -851,7 +851,7 @@
end
local bykey
local sort = function (t1, t2)
local sort = function(t1, t2)
return (t1 [bykey] or 0) > (t2 [bykey] or 0)
end
+4 -4
View File
@@ -57,7 +57,7 @@ end
local temp_table = {}
local target_func = function (main_table)
local target_func = function(main_table)
local i = 1
for name, amount in _pairs (main_table) do
local t = temp_table [i]
@@ -73,7 +73,7 @@ local target_func = function (main_table)
end
end
local spells_used_func = function (main_table, target)
local spells_used_func = function(main_table, target)
local i = 1
for spellid, spell_table in _pairs (main_table) do
local target_amount = spell_table.targets [target]
@@ -134,7 +134,7 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
return
else
local name, _, icon = _GetSpellInfo (spellid)
local name, _, icon = _GetSpellInfo(spellid)
GameCooltip:AddLine (name)
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
@@ -193,7 +193,7 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
break
end
local name, _, icon = _GetSpellInfo (t[1])
local name, _, icon = _GetSpellInfo(t[1])
GameCooltip:AddLine (name, FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
+4 -4
View File
@@ -50,7 +50,7 @@
local temp_table = {}
local target_func = function (main_table)
local target_func = function(main_table)
local i = 1
for name, amount in _pairs (main_table) do
local t = temp_table [i]
@@ -66,7 +66,7 @@
end
end
local spells_used_func = function (main_table, target)
local spells_used_func = function(main_table, target)
local i = 1
for spellid, spell_table in _pairs (main_table) do
local target_amount = spell_table.targets [target]
@@ -127,7 +127,7 @@
return
else
local name, _, icon = _GetSpellInfo (spellid)
local name, _, icon = _GetSpellInfo(spellid)
GameCooltip:AddLine (name)
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
@@ -186,7 +186,7 @@
break
end
local name, _, icon = _GetSpellInfo (t[1])
local name, _, icon = _GetSpellInfo(t[1])
GameCooltip:AddLine (name, FormatTooltipNumber (_, t[2]))
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
+4 -4
View File
@@ -94,7 +94,7 @@
-- try get the current encounter name during the encounter
local boss_found_not_registered = function (t, ZoneName, ZoneMapID, DifficultyID)
local boss_found_not_registered = function(t, ZoneName, ZoneMapID, DifficultyID)
local boss_table = {
index = 0,
@@ -112,7 +112,7 @@
Details.tabela_vigente.is_boss = boss_table
end
local boss_found = function (index, name, zone, mapid, diff, encounterid)
local boss_found = function(index, name, zone, mapid, diff, encounterid)
local mapID = C_Map.GetBestMapForUnit ("player")
local ejid
@@ -1408,7 +1408,7 @@
end
end
local fight_component = function (energy_container, misc_container, name)
local fight_component = function(energy_container, misc_container, name)
local on_energy = energy_container._ActorTable [energy_container._NameIndexTable [name]]
if (on_energy) then
on_energy.fight_component = true
@@ -1876,7 +1876,7 @@
DetailsFramework:ApplyStandardBackdrop(panel)
panel:SetScript("OnMouseDown", function (self, button)
panel:SetScript("OnMouseDown", function(self, button)
if (button == "RightButton") then
panel:Hide()
end
+8 -8
View File
@@ -32,7 +32,7 @@ end
_detalhes.chat_embed = _detalhes:CreateEventListener()
_detalhes.chat_embed.startup = true
_detalhes.chat_embed.hook_settabname = function (frame, name, doNotSave)
_detalhes.chat_embed.hook_settabname = function(frame, name, doNotSave)
if (not doNotSave) then
if (_detalhes.chat_tab_embed.enabled and _detalhes.chat_tab_embed.tab_name ~= "") then
if (_detalhes.chat_tab_embed_onframe == frame) then
@@ -42,7 +42,7 @@ end
end
end
end
_detalhes.chat_embed.hook_closetab = function (frame, fallback)
_detalhes.chat_embed.hook_closetab = function(frame, fallback)
if (_detalhes.chat_tab_embed.enabled and _detalhes.chat_tab_embed.tab_name ~= "") then
if (_detalhes.chat_tab_embed_onframe == frame) then
_detalhes.chat_tab_embed.enabled = false
@@ -967,7 +967,7 @@ function _detalhes.storage:DBGuildSync()
end
local OnlyFromCurrentRaidTier = true
local encounter_is_current_tier = function (encounterID)
local encounter_is_current_tier = function(encounterID)
if (OnlyFromCurrentRaidTier) then
local mapID = _detalhes:GetInstanceIdFromEncounterId (encounterID)
if (mapID) then
@@ -982,7 +982,7 @@ local encounter_is_current_tier = function (encounterID)
return true
end
local have_encounter = function (db, ID)
local have_encounter = function(db, ID)
local minTime = ID - 120
local maxTime = ID + 120
@@ -1006,7 +1006,7 @@ local have_encounter = function (db, ID)
return false
end
local have_recent_requested_encounter = function (ID)
local have_recent_requested_encounter = function(ID)
local minTime = ID - 120
local maxTime = ID + 120
@@ -1992,7 +1992,7 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
end
_detalhes.ilevel.CalcItemLevel = ilvl_core.CalcItemLevel
inspect_frame:SetScript ("OnEvent", function (self, event, ...)
inspect_frame:SetScript ("OnEvent", function(self, event, ...)
local guid = select (1, ...)
if (inspecting [guid]) then
@@ -2068,7 +2068,7 @@ function ilvl_core:GetItemLevel (unitid, guid, is_forced, try_number)
--NotifyInspect (unitid)
end
local NotifyInspectHook = function (unitid)
local NotifyInspectHook = function(unitid)
local unit = unitid:gsub ("%d+", "")
if ((IsInRaid() or IsInGroup()) and (_detalhes:GetZoneType() == "raid" or _detalhes:GetZoneType() == "party")) then
@@ -2441,7 +2441,7 @@ if (DetailsFramework.IsWotLKWow()) then
local MIN_SPECS = 4
--put the spec with more talent point to the top
table.sort (pointsPerSpec, function (t1, t2) return t1[2] > t2[2] end)
table.sort (pointsPerSpec, function(t1, t2) return t1[2] > t2[2] end)
--get the spec with more points spent
local spec = pointsPerSpec[1]
+16 -16
View File
@@ -567,7 +567,7 @@
-- /run local f=CreateFrame("frame");f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");f:SetScript("OnEvent",function(self, ...) local a = select(6, ...);if (a=="<chr name>")then print (...) end end)
-- /run local f=CreateFrame("frame");f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");f:SetScript("OnEvent",function(self, ...) local a = select(3, ...);print (a);if (a=="SPELL_CAST_SUCCESS")then print (...) end end)
local who_aggro = function (self)
local who_aggro = function(self)
if ((_detalhes.LastPullMsg or 0) + 30 > time()) then
_detalhes.WhoAggroTimer = nil
return
@@ -594,7 +594,7 @@
local lastRecordFound = {id = 0, diff = 0, combatTime = 0}
_detalhes.PrintEncounterRecord = function (self)
_detalhes.PrintEncounterRecord = function(self)
--> this block won't execute if the storage isn't loaded
--> self is a timer reference from C_Timer
@@ -1005,7 +1005,7 @@
else
if (who_name:find ("%[")) then
damage_cache [who_name] = este_jogador
local _, _, icon = _GetSpellInfo (spellid or 1)
local _, _, icon = _GetSpellInfo(spellid or 1)
este_jogador.spellicon = icon
else
--_detalhes:Msg ("Unknown actor with unknown serial ", spellname, who_name)
@@ -1434,7 +1434,7 @@
else
if (who_name:find ("%[")) then
damage_cache [who_name] = este_jogador
local _, _, icon = _GetSpellInfo (spellid or 1)
local _, _, icon = _GetSpellInfo(spellid or 1)
este_jogador.spellicon = icon
end
end
@@ -1639,7 +1639,7 @@
else
if (who_name:find ("%[")) then
damage_cache [who_name] = este_jogador
local _, _, icon = _GetSpellInfo (spellid or 1)
local _, _, icon = _GetSpellInfo(spellid or 1)
este_jogador.spellicon = icon
else
--_detalhes:Msg ("Unknown actor with unknown serial ", spellname, who_name)
@@ -3501,7 +3501,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
--AlternatePowerEnableFrame:RegisterEvent ("PLAYER_REGEN_ENABLED")
AlternatePowerEnableFrame.IsRunning = false
AlternatePowerEnableFrame:SetScript ("OnEvent", function (self, event)
AlternatePowerEnableFrame:SetScript ("OnEvent", function(self, event)
if (event == "UNIT_POWER_BAR_SHOW") then
AlternatePowerMonitorFrame:RegisterEvent ("UNIT_POWER_UPDATE") --> 8.0
AlternatePowerEnableFrame.IsRunning = true
@@ -3511,7 +3511,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
end)
AlternatePowerMonitorFrame:SetScript ("OnEvent", function (self, event, unitID, powerType)
AlternatePowerMonitorFrame:SetScript ("OnEvent", function(self, event, unitID, powerType)
if (powerType == "ALTERNATE") then
local actorName = _detalhes:GetCLName (unitID)
if (actorName) then
@@ -3706,7 +3706,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
------------------------------------------------------------------------------------------------
--> build containers on the fly
if (not este_jogador.cooldowns_defensive) then
este_jogador.cooldowns_defensive = _detalhes:GetOrderNumber (who_name)
este_jogador.cooldowns_defensive = _detalhes:GetOrderNumber(who_name)
este_jogador.cooldowns_defensive_targets = {}
este_jogador.cooldowns_defensive_spells = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades
end
@@ -3825,7 +3825,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
--> build containers on the fly
if (not este_jogador.interrupt) then
este_jogador.interrupt = _detalhes:GetOrderNumber (who_name)
este_jogador.interrupt = _detalhes:GetOrderNumber(who_name)
este_jogador.interrupt_targets = {}
este_jogador.interrupt_spells = container_habilidades:NovoContainer (container_misc)
este_jogador.interrompeu_oque = {}
@@ -3864,7 +3864,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
if (meu_dono) then
if (not meu_dono.interrupt) then
meu_dono.interrupt = _detalhes:GetOrderNumber (who_name)
meu_dono.interrupt = _detalhes:GetOrderNumber(who_name)
meu_dono.interrupt_targets = {}
meu_dono.interrupt_spells = container_habilidades:NovoContainer (container_misc)
meu_dono.interrompeu_oque = {}
@@ -4033,7 +4033,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
if (not este_jogador.dispell) then
--> constri aqui a tabela dele
este_jogador.dispell = _detalhes:GetOrderNumber (who_name)
este_jogador.dispell = _detalhes:GetOrderNumber(who_name)
este_jogador.dispell_targets = {}
este_jogador.dispell_spells = container_habilidades:NovoContainer (container_misc)
este_jogador.dispell_oque = {}
@@ -4089,7 +4089,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
--> verifica se tem dono e adiciona o interrupt para o dono
if (meu_dono) then
if (not meu_dono.dispell) then
meu_dono.dispell = _detalhes:GetOrderNumber (who_name)
meu_dono.dispell = _detalhes:GetOrderNumber(who_name)
meu_dono.dispell_targets = {}
meu_dono.dispell_spells = container_habilidades:NovoContainer (container_misc)
meu_dono.dispell_oque = {}
@@ -4140,7 +4140,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
--> build containers on the fly
if (not este_jogador.ress) then
este_jogador.ress = _detalhes:GetOrderNumber (who_name)
este_jogador.ress = _detalhes:GetOrderNumber(who_name)
este_jogador.ress_targets = {}
este_jogador.ress_spells = container_habilidades:NovoContainer (container_misc) --> cria o container das habilidades usadas para interromper
end
@@ -4255,7 +4255,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
if (not este_jogador.cc_break) then
--> constri aqui a tabela dele
este_jogador.cc_break = _detalhes:GetOrderNumber (who_name)
este_jogador.cc_break = _detalhes:GetOrderNumber(who_name)
este_jogador.cc_break_targets = {}
este_jogador.cc_break_spells = container_habilidades:NovoContainer (container_misc)
este_jogador.cc_break_oque = {}
@@ -5831,7 +5831,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
local saver = CreateFrame ("frame", nil, UIParent)
saver:RegisterEvent ("PLAYER_LOGOUT")
saver:SetScript ("OnEvent", function (...)
saver:SetScript ("OnEvent", function(...)
--save the time played on this class, run protected
pcall(function()
local className = select(2, UnitClass("player"))
@@ -6348,7 +6348,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> battleground parser
_detalhes.pvp_parser_frame:SetScript ("OnEvent", function (self, event)
_detalhes.pvp_parser_frame:SetScript ("OnEvent", function(self, event)
self:ReadPvPData()
end)
+8 -8
View File
@@ -237,7 +237,7 @@
["STATUSBAR"] = 0
}
local OnEnableFunction = function (self)
local OnEnableFunction = function(self)
self.__parent.Enabled = true
--self = frame __parent = plugin object
local instance = _detalhes:GetInstance (self.__parent.instance_id)
@@ -247,14 +247,14 @@
_detalhes:SendEvent ("SHOW", self.__parent)
end
local OnDisableFunction = function (self)
local OnDisableFunction = function(self)
_detalhes:SendEvent ("HIDE", self.__parent)
if (bit.band (self.__parent.__options, DETAILSPLUGIN_ALWAYSENABLED) == 0) then
self.__parent.Enabled = false
end
end
local BuildDefaultStatusBarMembers = function (self)
local BuildDefaultStatusBarMembers = function(self)
self.childs = {}
self.__index = self
function self:Setup()
@@ -272,10 +272,10 @@
print ("Thank You Sir!===================")
end
local register_event_func = function (self, event)
local register_event_func = function(self, event)
self.Frame:RegisterEvent (event)
end
local unregister_event_func = function (self, event)
local unregister_event_func = function(self, event)
self.Frame:UnregisterEvent (event)
end
@@ -544,7 +544,7 @@
end)
f:SetScript ("OnMouseDown", function (self, button)
f:SetScript ("OnMouseDown", function(self, button)
if (button == "RightButton") then
f.ClosePlugin()
end
@@ -588,7 +588,7 @@
--> re set the point of the frame within the main plugin window
f.RefreshFrame (pluginObject.__var_Frame)
C_Timer.After (0.016, function ()
C_Timer.After (0.016, function()
f.RefreshFrame (pluginObject.__var_Frame)
end)
@@ -637,7 +637,7 @@
return newButton
end
local on_hide = function (self)
local on_hide = function(self)
DetailsPluginContainerWindow.ClosePlugin()
end
+10 -10
View File
@@ -300,9 +300,9 @@
local spellname
if (spellid > 10) then
spellname = GetSpellLink (extraSpellID)
spellname = GetSpellLink(extraSpellID)
else
spellname = _GetSpellInfo (extraSpellID)
spellname = _GetSpellInfo(extraSpellID)
end
if (channel == "RAID") then
@@ -342,9 +342,9 @@
local spellname
if (spellid > 10) then
spellname = GetSpellLink (extraSpellID)
spellname = GetSpellLink(extraSpellID)
else
spellname = _GetSpellInfo (extraSpellID)
spellname = _GetSpellInfo(extraSpellID)
end
if (custom ~= "") then
@@ -416,9 +416,9 @@
local spellname
if (spellid > 10) then
spellname = GetSpellLink (spellid)
spellname = GetSpellLink(spellid)
else
spellname = _GetSpellInfo (spellid)
spellname = _GetSpellInfo(spellid)
end
local custom = _detalhes.announce_cooldowns.custom
@@ -478,9 +478,9 @@
local spellname
if (spellid > 10) then
spellname = GetSpellLink (spellid)
spellname = GetSpellLink(spellid)
else
spellname = _GetSpellInfo (spellid)
spellname = _GetSpellInfo(spellid)
end
if (second < 10) then
@@ -578,9 +578,9 @@
if (type (this_death[1]) == "boolean" and this_death[1] and this_death[4]+5 > time) then
local spelllink
if (this_death [2] > 10) then
spelllink = GetSpellLink (this_death [2])
spelllink = GetSpellLink(this_death [2])
else
spelllink = "[" .. _GetSpellInfo (this_death [2]) .. "]"
spelllink = "[" .. _GetSpellInfo(this_death [2]) .. "]"
end
spells = spelllink .. ": " .. _detalhes:ToK2 (_math_floor (this_death [3])) .. " " .. spells
last = o-1
+13 -13
View File
@@ -204,7 +204,7 @@
--> select a new plugin in for an instance anchor
local ChoosePlugin = function (_, _, index, current_child, anchor)
local ChoosePlugin = function(_, _, index, current_child, anchor)
GameCooltip:Close()
@@ -294,7 +294,7 @@
local on_enter_backdrop = {bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16}
local OnEnter = function (frame)
local OnEnter = function(frame)
--|TTexturePath: size X: size Y: point offset Y X : texture size : coordx1 L : coordx2 R : coordy1 T : coordy2 B |t
-- left click: 0.0019531:0.1484375:0.4257813:0.6210938 right click: 0.0019531:0.1484375:0.6269531:0.8222656
@@ -322,7 +322,7 @@
end
--> on leave
local OnLeave = function (frame)
local OnLeave = function(frame)
frame:SetBackdrop (nil)
@@ -333,7 +333,7 @@
return true
end
local OnMouseUp = function (frame, mouse)
local OnMouseUp = function(frame, mouse)
if (mouse == "LeftButton") then
if (not frame.child.Setup) then
@@ -814,7 +814,7 @@ do
_detalhes.gump:NewLabel (window, nil, "$parentSegmentOptionLabel", "segmentOptionLabel", Loc ["STRING_PLUGIN_SEGMENTTYPE"])
window.segmentOptionLabel:SetPoint (10, -15)
local onSelectSegmentType = function (_, child, thistype)
local onSelectSegmentType = function(_, child, thistype)
child.options.segmentType = thistype
PSegment:Change()
end
@@ -1003,7 +1003,7 @@ do
_detalhes.gump:NewLabel (window, nil, "$parentClockTypeLabel", "ClockTypeLabel", Loc ["STRING_PLUGIN_CLOCKTYPE"])
window.ClockTypeLabel:SetPoint (10, -15)
local onSelectClockType = function (_, child, thistype)
local onSelectClockType = function(_, child, thistype)
child.options.timeType = thistype
_detalhes:ClockPluginTick()
end
@@ -1358,7 +1358,7 @@ do
myframe.widget:RegisterEvent ("PLAYER_MONEY")
myframe.widget:RegisterEvent ("PLAYER_ENTERING_WORLD")
myframe.widget:SetScript ("OnEvent", function (event)
myframe.widget:SetScript ("OnEvent", function(event)
if (event == "PLAYER_ENTERING_WORLD") then
return PGold:ScheduleTimer ("GoldPluginTick", 10)
end
@@ -1417,7 +1417,7 @@ do
_detalhes.gump:NewLabel (window, _, "$parentTimeTypeLabel", "TimeTypeLabel", Loc ["STRING_PLUGIN_CLOCKTYPE"])
window.TimeTypeLabel:SetPoint (10, -15)
local onSelectClockType = function (_, child, thistype)
local onSelectClockType = function(_, child, thistype)
child.options.timeType = thistype
child:UpdateClock()
end
@@ -1492,7 +1492,7 @@ end)
_detalhes.gump:NewLabel (window, _, "$parentTextStyleLabel", "textstyle", Loc ["STRING_PLUGINOPTIONS_TEXTSTYLE"])
window.textstyle:SetPoint (10, -15)
local onSelectTextStyle = function (_, child, style)
local onSelectTextStyle = function(_, child, style)
window.instance.StatusBar.left.options.textStyle = style
window.instance.StatusBar.center.options.textStyle = style
@@ -1564,7 +1564,7 @@ end)
window.fonsizeSlider:SetPoint ("left", window.fonsizeLabel, "right", 2)
window.fonsizeSlider:SetThumbSize (50)
--window.fonsizeSlider.useDecimals = true
window.fonsizeSlider:SetHook ("OnValueChange", function (self, child, amount)
window.fonsizeSlider:SetHook ("OnValueChange", function(self, child, amount)
--_detalhes.StatusBar:ApplyOptions (child, "textsize", amount)
_detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.left, "textsize", amount)
_detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.center, "textsize", amount)
@@ -1572,7 +1572,7 @@ end)
end)
--> text font
local onSelectFont = function (_, child, fontName)
local onSelectFont = function(_, child, fontName)
--_detalhes.StatusBar:ApplyOptions (child, "textface", fontName)
_detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.left, "textface", fontName)
@@ -1605,7 +1605,7 @@ end)
_detalhes.gump:NewSlider (window, _, "$parentSliderAlignX", "alignXSlider", 160, 20, -20, 20, 1, 0)
window.alignXSlider:SetPoint ("left", window.alignXLabel, "right", 2)
window.alignXSlider:SetThumbSize (40)
window.alignXSlider:SetHook ("OnValueChange", function (self, child, amount)
window.alignXSlider:SetHook ("OnValueChange", function(self, child, amount)
_detalhes.StatusBar:ApplyOptions (child, "textxmod", amount)
end)
@@ -1616,7 +1616,7 @@ end)
_detalhes.gump:NewSlider (window, _, "$parentSliderAlignY", "alignYSlider", 160, 20, -10, 10, 1, 0)
window.alignYSlider:SetPoint ("left", window.alignYLabel, "right", 2)
window.alignYSlider:SetThumbSize (40)
window.alignYSlider:SetHook ("OnValueChange", function (self, child, amount)
window.alignYSlider:SetHook ("OnValueChange", function(self, child, amount)
_detalhes.StatusBar:ApplyOptions (child, "textymod", amount)
end)
+1 -1
View File
@@ -171,7 +171,7 @@ end
local next_check = 0.8
--check if the mouse is still interacting with the menu or with the button
button:SetScript ("OnUpdate", function (self, elapsed)
button:SetScript ("OnUpdate", function(self, elapsed)
next_check = next_check - elapsed
if (next_check < 0) then
+2 -2
View File
@@ -26,7 +26,7 @@
timeMachine.ligada = false
local calc_for_pvp = function (self)
local calc_for_pvp = function(self)
for tipo, tabela in _pairs (self.tabelas) do
for nome, jogador in _ipairs (tabela) do
if (jogador) then
@@ -45,7 +45,7 @@
end
end
local calc_for_pve = function (self)
local calc_for_pve = function(self)
for tipo, tabela in _pairs (self.tabelas) do
for nome, jogador in _ipairs (tabela) do
if (jogador) then
+10 -10
View File
@@ -336,7 +336,7 @@
end
--> get the fractional number representing the alphabetical letter
function _detalhes:GetOrderNumber (who_name)
function _detalhes:GetOrderNumber(who_name)
--local name = upper (who_name .. "zz")
--local byte1 = _math_abs (_string_byte (name, 2)-91)/1000000
--return byte1 + _math_abs (_string_byte (name, 1)-91)/10000
@@ -727,10 +727,10 @@
local arguments_cache = {}
local parameters_cache = {}
local replace_arg = function (i)
local replace_arg = function(i)
return arguments_cache [tonumber(i)]
end
local run_function = function (str)
local run_function = function(str)
--> cache functions
local func, errortext = function_cache [str]
if (not func) then
@@ -1330,7 +1330,7 @@ end
end
--> work around to solve the UI Frame Flashes
local onFinish = function (self)
local onFinish = function(self)
if (self.showWhenDone) then
self.frame:SetAlpha (1)
else
@@ -1343,12 +1343,12 @@ end
end
end
local stop = function (self)
local stop = function(self)
local FlashAnimation = self.FlashAnimation
FlashAnimation:Stop()
end
local flash = function (self, fadeInTime, fadeOutTime, flashDuration, showWhenDone, flashInHoldTime, flashOutHoldTime, loopType)
local flash = function(self, fadeInTime, fadeOutTime, flashDuration, showWhenDone, flashInHoldTime, flashOutHoldTime, loopType)
local FlashAnimation = self.FlashAnimation
@@ -1407,7 +1407,7 @@ end
local fade_OUT_finished_func = function (frame)
local fade_OUT_finished_func = function(frame)
if (frame:IsShown() and frame.fading_out) then
frame.hidden = false
frame.faded = false
@@ -1417,17 +1417,17 @@ end
end
end
local just_fade_func = function (frame)
local just_fade_func = function(frame)
frame.hidden = false
frame.faded = true
frame.fading_in = false
end
local anim_OUT_alpha_func = function (frame)
local anim_OUT_alpha_func = function(frame)
frame.fading_out = false
end
local anim_IN_alpha_func = function (frame)
local anim_IN_alpha_func = function(frame)
frame.fading_in = false
end
+15 -15
View File
@@ -153,7 +153,7 @@
end
--> simple left and right animations by delta time
local animation_left_simple = function (self, deltaTime)
local animation_left_simple = function(self, deltaTime)
self.inicio = self.inicio - (animation_speed * deltaTime)
self:SetValue (self.inicio)
if (self.inicio-1 <= self.fim) then
@@ -162,7 +162,7 @@
end
end
local animation_right_simple = function (self, deltaTime)
local animation_right_simple = function(self, deltaTime)
self.inicio = self.inicio + (animation_speed * deltaTime)
self:SetValue (self.inicio)
if (self.inicio+0.1 >= self.fim) then
@@ -172,7 +172,7 @@
end
--> animation with acceleration
local animation_left_with_accel = function (self, deltaTime)
local animation_left_with_accel = function(self, deltaTime)
local distance = self.inicio - self.fim
-- DefaultSpeed * max of ( min of (Distance / TriggerSpeed , MaxSpeed) , LowSpeed )
@@ -186,7 +186,7 @@
end
end
local animation_right_with_accel = function (self, deltaTime)
local animation_right_with_accel = function(self, deltaTime)
local distance = self.fim - self.inicio
local calcAnimationSpeed = animation_speed * _math_max (_math_min (distance/animation_speed_hightravel_trigger, animation_speed_hightravel_maxspeed), animation_speed_lowtravel_minspeed)
@@ -1165,14 +1165,14 @@
mmoc_title:SetPoint ("topleft", mmoc, "topright", 5, 0)
mmoc_desc:SetPoint ("topleft", mmoc_title, "bottomleft", 0, -1)
local on_enter = function (self, capsule)
local on_enter = function(self, capsule)
capsule.image:SetDesaturated (false)
end
local on_leave = function (self, capsule)
local on_leave = function(self, capsule)
capsule.image:SetDesaturated (true)
end
local on_click = function (_, _, website)
local on_click = function(_, _, website)
if (website == 1) then
_detalhes:CopyPaste ([[http://www.wowinterface.com/downloads/addcomment.php?action=addcomment&fileid=23056]])
@@ -1229,7 +1229,7 @@
f.options_button:SetPoint ("topleft", f, "topleft", 10, -100)
f.options_button:SetHeight (170)
f.options_button:SetWidth (170)
f.options_button:SetScript ("OnClick", function (self)
f.options_button:SetScript ("OnClick", function(self)
local lower_instance = _detalhes:GetLowerInstanceNumber()
if (not lower_instance) then
--> no window opened?
@@ -1253,7 +1253,7 @@
f.new_window_button:SetText (Loc ["STRING_MINIMAPMENU_NEWWINDOW"])
f.new_window_button:SetPoint ("topleft", f, "topleft", 10, -125)
f.new_window_button:SetWidth (170)
f.new_window_button:SetScript ("OnClick", function (self)
f.new_window_button:SetScript ("OnClick", function(self)
_detalhes:CriarInstancia (_, true)
end)
@@ -1304,7 +1304,7 @@
updatewindow_frame.close:SetPoint ("bottomleft", updatewindow_frame, "bottomleft", 8, 4)
updatewindow_frame.close:SetText ("Close")
updatewindow_frame.close:SetScript ("OnClick", function (self)
updatewindow_frame.close:SetScript ("OnClick", function(self)
DetailsUpdateDialog:Hide()
editbox:ClearFocus()
end)
@@ -1339,7 +1339,7 @@
HotCornerIgnore = true,
OnClick = function (self, button)
OnClick = function(self, button)
if (button == "LeftButton") then
if (IsControlKeyDown()) then
@@ -1452,7 +1452,7 @@
end
end,
OnTooltipShow = function (tooltip)
OnTooltipShow = function(tooltip)
tooltip:AddLine ("Details!", 1, 1, 1)
if (_detalhes.minimap.onclick_what_todo == 1) then
tooltip:AddLine (Loc ["STRING_MINIMAP_TOOLTIP1"])
@@ -1477,7 +1477,7 @@
function _detalhes:DoRegisterHotCorner()
--register lib-hotcorners
local on_click_on_hotcorner_button = function (frame, button)
local on_click_on_hotcorner_button = function(frame, button)
if (_detalhes.hotcorner_topleft.onclick_what_todo == 1) then
local lower_instance = _detalhes:GetLowerInstanceNumber()
if (not lower_instance) then
@@ -1493,11 +1493,11 @@
end
end
local quickclick_func1 = function (frame, button)
local quickclick_func1 = function(frame, button)
_detalhes.tabela_historico:resetar()
end
local quickclick_func2 = function (frame, button)
local quickclick_func2 = function(frame, button)
local lower_instance = _detalhes:GetLowerInstanceNumber()
if (not lower_instance) then
local instance = _detalhes:GetInstance (1)
+12 -12
View File
@@ -140,7 +140,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
end
end)
new_button:SetScript ("OnMouseUp", function (self, button)
new_button:SetScript ("OnMouseUp", function(self, button)
if (not self:IsEnabled()) then
return
end
@@ -324,7 +324,7 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
end
end
local EnterPress = function (byScript)
local EnterPress = function(byScript)
if (editbox.EnterHook) then
editbox.EnterHook()
@@ -444,13 +444,13 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
end
end)
editbox:SetScript ("OnChar", function (self, text)
editbox:SetScript ("OnChar", function(self, text)
if (editbox.InputHook) then
editbox:InputHook (text)
end
end)
editbox:SetScript ("OnTextChanged", function (self, userChanged)
editbox:SetScript ("OnTextChanged", function(self, userChanged)
if (editbox.TextChangeedHook and userChanged) then
editbox:TextChangeedHook (userChanged)
end
@@ -463,13 +463,13 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
end
end)
editbox.SetNext = function (_, NextBox)
editbox.SetNext = function(_, NextBox)
if (NextBox) then
editbox.next = NextBox
end
end
editbox.SetLabel = function (_, Label)
editbox.SetLabel = function(_, Label)
if (Label) then
editbox.label = Label
editbox.label:SetTextColor (.8, .8, .8, 1)
@@ -608,14 +608,14 @@ function gump:NewScrollBar2 (master, slave, x, y)
self:SetScript ("OnUpdate", nil)
end)
--> isso aqui pra quando o slider ativar, o scroll fica na posio zero
botao_cima:SetScript ("OnEnable", function (self)
botao_cima:SetScript ("OnEnable", function(self)
local current = slider_gump:GetValue()
if (current == 0) then
botao_cima:Disable()
end
end)
slider_gump:SetScript ("OnValueChanged", function (self)
slider_gump:SetScript ("OnValueChanged", function(self)
local current = self:GetValue()
master:SetVerticalScroll (current)
@@ -635,22 +635,22 @@ function gump:NewScrollBar2 (master, slave, x, y)
end)
slider_gump:SetScript ("OnShow", function (self)
slider_gump:SetScript ("OnShow", function(self)
botao_cima:Show()
botao_baixo:Show()
end)
slider_gump:SetScript ("OnDisable", function (self)
slider_gump:SetScript ("OnDisable", function(self)
botao_cima:Disable()
botao_baixo:Disable()
end)
slider_gump:SetScript ("OnEnable", function (self)
slider_gump:SetScript ("OnEnable", function(self)
botao_cima:Enable()
botao_baixo:Enable()
end)
master:SetScript ("OnMouseWheel", function (self, delta)
master:SetScript ("OnMouseWheel", function(self, delta)
if (not slider_gump:IsEnabled()) then
return
end
+10 -10
View File
@@ -40,7 +40,7 @@ function Details:CreateAPI2Frame()
local api = Details.API_Description.namespaces[1].api
--on select api on the menu
local onSelectAPI = function (self)
local onSelectAPI = function(self)
local apiName = apiFunctionNames [self.index]
if (not apiName) then
Details:Msg ("API name not found:", apiName)
@@ -124,7 +124,7 @@ function Details:CreateAPI2Frame()
end
--menu scroll
local apiMenuScrollRefresh = function (self, data, offset, total_lines)
local apiMenuScrollRefresh = function(self, data, offset, total_lines)
for i = 1, total_lines do
local index = i + offset
local apiName = data [index]
@@ -147,11 +147,11 @@ function Details:CreateAPI2Frame()
end
local api2ScrollMenu = DetailsFramework:CreateScrollBox (Api2Frame, "$parentApi2MenuScroll", apiMenuScrollRefresh, apiFunctionNames, scrollWidth, scrollHeight, lineAmount, lineHeight)
DetailsFramework:ReskinSlider (api2ScrollMenu)
DetailsFramework:ReskinSlider(api2ScrollMenu)
api2ScrollMenu:SetPoint ("topleft", Api2Frame, "topleft", 10, yStart)
Api2Frame.scrollMenu = api2ScrollMenu
local lineOnEnter = function (self)
local lineOnEnter = function(self)
self:SetBackdropColor (unpack (backdropColorOnEnter))
local apiName = apiFunctionNames [self.index]
@@ -171,7 +171,7 @@ function Details:CreateAPI2Frame()
GameCooltip2:ShowCooltip()
end
local lineOnLeave = function (self)
local lineOnLeave = function(self)
if (currentSelected == self.index) then
self:SetBackdropColor (unpack (backdropColorSelected))
else
@@ -183,7 +183,7 @@ function Details:CreateAPI2Frame()
--create lines
for i = 1, lineAmount do
api2ScrollMenu:CreateLine (function (self, index)
api2ScrollMenu:CreateLine (function(self, index)
local line = CreateFrame ("button", "$parentLine" .. index, self, "BackdropTemplate")
line:SetPoint ("topleft", self, "topleft", 1, -((index-1)*(lineHeight+1)) - 1)
line:SetSize (scrollWidth - 2, lineHeight)
@@ -245,7 +245,7 @@ function Details:CreateAPI2Frame()
parametersHeader.required:SetPoint ("left", parametersHeader, "left", space2, 0)
parametersHeader.default:SetPoint ("left", parametersHeader, "left", space3, 0)
local parameterOnEnter = function (self)
local parameterOnEnter = function(self)
GameCooltip2:Preset(2)
GameCooltip2:SetOwner (self)
@@ -259,7 +259,7 @@ function Details:CreateAPI2Frame()
self:SetBackdropColor (unpack (backdropColorOnEnter))
end
local parameterOnLeave = function (self)
local parameterOnLeave = function(self)
GameCooltip2:Hide()
self:SetBackdropColor (unpack (backdropColor))
end
@@ -307,10 +307,10 @@ function Details:CreateAPI2Frame()
returnHeader.name:SetPoint ("left", returnHeader, "left", 2, 0)
returnHeader.typeData:SetPoint ("left", returnHeader, "left", space1, 0)
local returnOnEnter = function (self)
local returnOnEnter = function(self)
self:SetBackdropColor (unpack (backdropColorOnEnter))
end
local returnOnLeave = function (self)
local returnOnLeave = function(self)
self:SetBackdropColor (unpack (backdropColor))
end
+1 -1
View File
@@ -96,7 +96,7 @@ local libwindow = LibStub("LibWindow-1.1")
f:RegisterEvent ("PLAYER_REGEN_DISABLED")
f:RegisterEvent ("PLAYER_REGEN_ENABLED")
f:SetScript ("OnEvent", function (self, event, ...)
f:SetScript ("OnEvent", function(self, event, ...)
if (event == "PLAYER_REGEN_DISABLED") then
f.StartNewBenchmark()
+5 -5
View File
@@ -14,7 +14,7 @@ function Details:OpenBookmarkConfig()
panel:SetBackdropColor(.1, .1, .1, .9)
panel.blocks = {}
local clear_func = function (self, button, id)
local clear_func = function(self, button, id)
if (Details.switch.table [id]) then
Details.switch.table [id].atributo = nil
Details.switch.table [id].sub_atributo = nil
@@ -23,7 +23,7 @@ function Details:OpenBookmarkConfig()
end
end
local select_attribute = function (_, _, _, attribute, sub_atribute)
local select_attribute = function(_, _, _, attribute, sub_atribute)
if (not sub_atribute) then
return
end
@@ -34,7 +34,7 @@ function Details:OpenBookmarkConfig()
end
local cooltip_color = {.1, .1, .1, .3}
local set_att = function (self, button, id)
local set_att = function(self, button, id)
panel.selecting_slot = id
GameCooltip:Reset()
GameCooltip:SetType (3)
@@ -52,11 +52,11 @@ function Details:OpenBookmarkConfig()
local button_backdrop = {bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 64, insets = {left=0, right=0, top=0, bottom=0}}
local set_onenter = function (self, capsule)
local set_onenter = function(self, capsule)
self:SetBackdropColor (1, 1, 1, 0.9)
capsule.icon:SetBlendMode ("ADD")
end
local set_onleave = function (self, capsule)
local set_onleave = function(self, capsule)
self:SetBackdropColor (0, 0, 0, 0.5)
capsule.icon:SetBlendMode ("BLEND")
end
+2 -2
View File
@@ -34,7 +34,7 @@ function Details:OpenBrokerTextEditor()
end)
local option_selected = 1
local onclick= function (_, _, value)
local onclick= function(_, _, value)
option_selected = value
end
local AddOptions = {
@@ -172,7 +172,7 @@ function Details:OpenBrokerTextEditor()
self:HighlightText( Start, #ColorCode + ( #Replacement - #Selection ) + #COLOR_END + End );
end
local color_func = function (_, r, g, b, a)
local color_func = function(_, r, g, b, a)
local hex = Details:hex (a*255)..Details:hex (r*255)..Details:hex (g*255)..Details:hex (b*255)
ColorSelection ( textentry.editbox, "|c" .. hex)
end
+13 -13
View File
@@ -379,7 +379,7 @@ end
{--enable ocd
type = "toggle",
get = function() return Details.ocd_tracker.enabled end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
if (value) then
Details.CooldownTracking.EnableTracker()
else
@@ -393,7 +393,7 @@ end
{--show only in group
type = "toggle",
get = function() return Details.ocd_tracker.show_conditions.only_in_group end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.show_conditions.only_in_group = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -404,7 +404,7 @@ end
{--show only inside instances
type = "toggle",
get = function() return Details.ocd_tracker.show_conditions.only_inside_instance end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.show_conditions.only_inside_instance = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -414,7 +414,7 @@ end
{--lock frame
type = "toggle",
get = function() return Details.ocd_tracker.framme_locked end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.framme_locked = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -427,7 +427,7 @@ end
{--filter: show raid wide defensive cooldowns
type = "toggle",
get = function() return Details.ocd_tracker.filters["defensive-raid"] end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.filters["defensive-raid"] = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -438,7 +438,7 @@ end
{--filter: show target defensive cooldowns
type = "toggle",
get = function() return Details.ocd_tracker.filters["defensive-target"] end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.filters["defensive-target"] = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -449,7 +449,7 @@ end
{--filter: show personal defensive cooldowns
type = "toggle",
get = function() return Details.ocd_tracker.filters["defensive-personal"] end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.filters["defensive-personal"] = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -460,7 +460,7 @@ end
{--filter: show ofensive cooldowns
type = "toggle",
get = function() return Details.ocd_tracker.filters["ofensive"] end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.filters["ofensive"] = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -471,7 +471,7 @@ end
{--filter: show utility cooldowns
type = "toggle",
get = function() return Details.ocd_tracker.filters["utility"] end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.filters["utility"] = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -482,7 +482,7 @@ end
{--filter: show interrupt cooldowns
type = "toggle",
get = function() return Details.ocd_tracker.filters["interrupt"] end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.filters["interrupt"] = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -495,7 +495,7 @@ end
{--bar width
type = "range",
get = function() return Details.ocd_tracker.width end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.width = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -509,7 +509,7 @@ end
{--bar height
type = "range",
get = function() return Details.ocd_tracker.height end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.height = value
Details.CooldownTracking.RefreshCooldownFrames()
end,
@@ -523,7 +523,7 @@ end
{--bar height
type = "range",
get = function() return Details.ocd_tracker.lines_per_column end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.ocd_tracker.lines_per_column = floor(value)
Details.CooldownTracking.RefreshCooldownFrames()
end,
+5 -5
View File
@@ -19,7 +19,7 @@ function Details:OpenClassColorsConfig()
local y = -50
local callback = function (button, r, g, b, a, self)
local callback = function(button, r, g, b, a, self)
self.MyObject.my_texture:SetVertexColor (r, g, b)
Details.class_colors [self.MyObject.my_class][1] = r
Details.class_colors [self.MyObject.my_class][2] = g
@@ -27,13 +27,13 @@ function Details:OpenClassColorsConfig()
Details:RefreshMainWindow (-1, true)
end
local set_color = function (self, button, class, index)
local set_color = function(self, button, class, index)
local current_class_color = Details.class_colors [class]
local r, g, b = unpack (current_class_color)
DF:ColorPick (self, r, g, b, 1, callback)
end
local reset_color = function (self, button, class, index)
local reset_color = function(self, button, class, index)
local color_table = RAID_CLASS_COLORS [class]
local r, g, b = color_table.r, color_table.g, color_table.b
self.MyObject.my_texture:SetVertexColor (r, g, b)
@@ -43,12 +43,12 @@ function Details:OpenClassColorsConfig()
Details:RefreshMainWindow (-1, true)
end
local on_enter = function (self, capsule)
local on_enter = function(self, capsule)
--Details:CooltipPreset (1)
--GameCooltip:AddLine ("right click to reset")
--GameCooltip:Show (self)
end
local on_leave = function (self, capsule)
local on_leave = function(self, capsule)
--GameCooltip:Hide()
end
+16 -16
View File
@@ -52,7 +52,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
local testUsing = "arena" --mythicdungeon
--> frame strata options
local set_frame_strata = function (_, _, strata)
local set_frame_strata = function(_, _, strata)
Details.realtime_dps_meter.frame_settings.strata = strata
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end
@@ -64,7 +64,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
strataTable [5] = {value = "DIALOG", label = "DIALOG", onclick = set_frame_strata}
--> font options
local set_font_shadow= function (_, _, shadow)
local set_font_shadow= function(_, _, shadow)
Details.realtime_dps_meter.font_shadow = shadow
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end
@@ -73,7 +73,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
fontShadowTable [2] = {value = "OUTLINE", label = "Outline", onclick = set_font_shadow}
fontShadowTable [3] = {value = "THICKOUTLINE", label = "Thick Outline", onclick = set_font_shadow}
local on_select_text_font = function (self, fixed_value, value)
local on_select_text_font = function(self, fixed_value, value)
Details.realtime_dps_meter.font_face = value
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end
@@ -99,7 +99,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "toggle",
get = function() return Details.realtime_dps_meter.enabled end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.enabled = not Details.realtime_dps_meter.enabled
Details:LoadFramesForBroadcastTools()
end,
@@ -111,7 +111,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "toggle",
get = function() return Details.realtime_dps_meter.frame_settings.locked end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.frame_settings.locked = not Details.realtime_dps_meter.frame_settings.locked
Details:UpdateTheRealCurrentDPSFrame(testUsing)
lockCallback()
@@ -124,7 +124,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "toggle",
get = function() return Details.realtime_dps_meter.frame_settings.show_title end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.frame_settings.show_title = not Details.realtime_dps_meter.frame_settings.show_title
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end,
@@ -138,7 +138,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
get = function()
return {Details.realtime_dps_meter.frame_settings.backdrop_color[1], Details.realtime_dps_meter.frame_settings.backdrop_color[2], Details.realtime_dps_meter.frame_settings.backdrop_color[3], Details.realtime_dps_meter.frame_settings.backdrop_color[4]}
end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local color = Details.realtime_dps_meter.frame_settings.backdrop_color
color[1], color[2], color[3], color[4] = r, g, b, a
Details:UpdateTheRealCurrentDPSFrame(testUsing)
@@ -158,7 +158,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "range",
get = function() return Details.realtime_dps_meter.sample_size end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.sample_size = value
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end,
@@ -173,7 +173,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "range",
get = function() return Details.realtime_dps_meter.frame_settings.width end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.frame_settings.width = value
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end,
@@ -187,7 +187,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "range",
get = function() return Details.realtime_dps_meter.frame_settings.height end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.frame_settings.height = value
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end,
@@ -205,7 +205,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "toggle",
get = function() return Details.realtime_dps_meter.arena_enabled end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.arena_enabled = not Details.realtime_dps_meter.arena_enabled
Details:LoadFramesForBroadcastTools()
end,
@@ -216,7 +216,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "toggle",
get = function() return Details.realtime_dps_meter.mythic_dungeon_enabled end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.mythic_dungeon_enabled = not Details.realtime_dps_meter.mythic_dungeon_enabled
Details:LoadFramesForBroadcastTools()
end,
@@ -231,7 +231,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "range",
get = function() return Details.realtime_dps_meter.font_size end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.realtime_dps_meter.font_size = value
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end,
@@ -247,7 +247,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
get = function()
return {Details.realtime_dps_meter.font_color[1], Details.realtime_dps_meter.font_color[2], Details.realtime_dps_meter.font_color[3], Details.realtime_dps_meter.font_color[4]}
end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local color = Details.realtime_dps_meter.font_color
color[1], color[2], color[3], color[4] = r, g, b, a
Details:UpdateTheRealCurrentDPSFrame(testUsing)
@@ -275,7 +275,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
{
type = "range",
get = function() return _detalhes.realtime_dps_meter.text_offset end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
_detalhes.realtime_dps_meter.text_offset = value
Details:UpdateTheRealCurrentDPSFrame(testUsing)
end,
@@ -673,7 +673,7 @@ function Details:CreateCurrentDpsFrame(parent, name)
_detalhes:UpdateTheRealCurrentDPSFrame()
local on_tick = function (self, deltaTime)
local on_tick = function(self, deltaTime)
self.NextUpdate = self.NextUpdate - deltaTime
if (self.NextUpdate <= 0) then
+27 -27
View File
@@ -171,7 +171,7 @@
custom_window:SetSize (850, 500)
custom_window:EnableMouse (true)
custom_window:SetMovable (true)
custom_window:SetScript ("OnMouseDown", function (self, button)
custom_window:SetScript ("OnMouseDown", function(self, button)
if (button == "LeftButton") then
if (not self.moving) then
self.moving = true
@@ -183,7 +183,7 @@
end
end
end)
custom_window:SetScript ("OnMouseUp", function (self)
custom_window:SetScript ("OnMouseUp", function(self)
if (self.moving) then
self.moving = false
self:StopMovingOrSizing()
@@ -742,10 +742,10 @@
local menu_up_frame = _CreateFrame ("frame", nil, custom_window)
menu_up_frame:SetFrameLevel (custom_window:GetFrameLevel()+2)
local onenter = function (self)
local onenter = function(self)
--self.icontexture:SetVertexColor (1, 1, 1, 1)
end
local onleave = function (self)
local onleave = function(self)
--self.icontexture:SetVertexColor (.9, .9, .9, 1)
end
@@ -768,7 +768,7 @@
custom_window.menu [index] = {circle = circle, icon = texture, button = button}
end
local build_menu = function (self, button, func, param2)
local build_menu = function(self, button, func, param2)
GameCooltip:Reset()
for index, custom_object in _ipairs (_detalhes.custom) do
@@ -792,21 +792,21 @@
end
--> edit button
local start_edit = function (_, _, custom_object, index)
local start_edit = function(_, _, custom_object, index)
GameCooltip:Hide()
DetailsCustomPanel:StartEdit (custom_object)
end
custom_window:CreateMenuButton (Loc ["STRING_CUSTOM_EDIT"], "Interface\\ICONS\\INV_Inscription_RunescrollOfFortitude_Red", build_menu, start_edit, nil, nil, "Edit", {0.07, 0.93, 0.07, 0.93})
--> remove button
local remove_display = function (_, _, custom_object, index)
local remove_display = function(_, _, custom_object, index)
GameCooltip:Hide()
DetailsCustomPanel:RemoveDisplay (custom_object, index)
end
custom_window:CreateMenuButton (Loc ["STRING_CUSTOM_REMOVE"], "Interface\\ICONS\\Spell_BrokenHeart", build_menu, remove_display, nil, nil, "Remove", {1, 0, 0, 1})
--> export button
local export_display = function (_, _, custom_object, index)
local export_display = function(_, _, custom_object, index)
GameCooltip:Hide()
local export_object = {}
@@ -863,7 +863,7 @@
custom_window:CreateMenuButton (Loc ["STRING_CUSTOM_EXPORT"], "Interface\\ICONS\\INV_Misc_Gift_01", build_menu, export_display, nil, nil, "Export", {0.00, 0.9, 0.07, 0.93}) --> localize
--> import buttonRaceChange
local import_display = function (_, _, custom_object, index)
local import_display = function(_, _, custom_object, index)
GameCooltip:Hide()
if (not custom_window.ImportBox) then
@@ -951,11 +951,11 @@
attribute_box:SetSize (180, 260)
attribute_box:Hide()
local button_onenter = function (self)
local button_onenter = function(self)
self:SetBackdropColor (.3, .3, .3, .3)
self.icon:SetBlendMode ("ADD")
end
local button_onleave = function (self)
local button_onleave = function(self)
self:SetBackdropColor (0, 0, 0, .2)
self.icon:SetBlendMode ("BLEND")
end
@@ -1064,7 +1064,7 @@
local icon_label = gump:NewLabel (box0, box0, "$parenIconLabel", "icon", Loc ["STRING_CUSTOM_ICON"], "GameFontHighlightLeft") --> localize-me
icon_label:SetPoint ("topleft", desc_label, "bottomleft", 0, -12)
local pickicon_callback = function (texture)
local pickicon_callback = function(texture)
box0.icontexture:SetTexture (texture)
end
@@ -1166,7 +1166,7 @@
modelFrameBackground:Hide()
modelFrameBackgroundIcon:Hide()
local selectedEncounterActor = function (actorName, model)
local selectedEncounterActor = function(actorName, model)
source_field:SetText (actorName)
source_dropdown:Select (4, true)
box1.sourceentry:Enable()
@@ -1176,7 +1176,7 @@
local actorsFrameButtons = {}
local buttonMouseOver = function (button)
local buttonMouseOver = function(button)
button.MyObject.image:SetBlendMode ("ADD")
button.MyObject.line:SetBlendMode ("ADD")
button.MyObject.label:SetTextColor (1, 1, 1, 1)
@@ -1192,7 +1192,7 @@
modelFrame:SetDisplayInfo (button.MyObject.model)
end
local buttonMouseOut = function (button)
local buttonMouseOut = function(button)
button.MyObject.image:SetBlendMode ("BLEND")
button.MyObject.line:SetBlendMode ("BLEND")
button.MyObject.label:SetTextColor (.8, .8, .8, .8)
@@ -1200,7 +1200,7 @@
modelFrame:Hide()
end
local EncounterSelect = function (_, _, instanceId, bossIndex, ej_id)
local EncounterSelect = function(_, _, instanceId, bossIndex, ej_id)
DetailsCustomSpellsFrame:Hide()
DetailsCustomActorsFrame:Hide()
@@ -1374,7 +1374,7 @@
local modelFrameTexture = modelFrame:CreateTexture (nil, "background")
modelFrameTexture:SetAllPoints()
local selectedEncounterActor = function (actorName)
local selectedEncounterActor = function(actorName)
target_field:SetText (actorName)
target_dropdown:Select (4, true)
box1.targetentry:Enable()
@@ -1384,7 +1384,7 @@
local actorsFrameButtons = {}
local buttonMouseOver = function (button)
local buttonMouseOver = function(button)
button.MyObject.image:SetBlendMode ("ADD")
button.MyObject.line:SetBlendMode ("ADD")
button.MyObject.label:SetTextColor (1, 1, 1, 1)
@@ -1400,7 +1400,7 @@
modelFrame:SetDisplayInfo (button.MyObject.model)
end
local buttonMouseOut = function (button)
local buttonMouseOut = function(button)
button.MyObject.image:SetBlendMode ("BLEND")
button.MyObject.line:SetBlendMode ("BLEND")
button.MyObject.label:SetTextColor (.8, .8, .8, .8)
@@ -1409,7 +1409,7 @@
modelFrame:Hide()
end
local EncounterSelect = function (_, _, instanceId, bossIndex, ej_id)
local EncounterSelect = function(_, _, instanceId, bossIndex, ej_id)
DetailsCustomSpellsFrame:Hide()
DetailsCustomActorsFrame:Show()
@@ -1549,8 +1549,8 @@
spellsFrame:SetPoint ("topleft", custom_window, "topright", 5, 0)
spellsFrame:Hide()
local selectedEncounterSpell = function (spellId)
local _, _, icon = _GetSpellInfo (spellId)
local selectedEncounterSpell = function(spellId)
local _, _, icon = _GetSpellInfo(spellId)
spellid_entry:SetText (spellId)
box0.icontexture:SetTexture (icon)
spellsFrame:Hide()
@@ -1559,7 +1559,7 @@
local spellsFrameButtons = {}
local buttonMouseOver = function (button)
local buttonMouseOver = function(button)
button.MyObject.image:SetBlendMode ("ADD")
button.MyObject.line:SetBlendMode ("ADD")
button.MyObject.label:SetTextColor (1, 1, 1, 1)
@@ -1568,14 +1568,14 @@
_detalhes:GameTooltipSetSpellByID (button.MyObject.spellid)
GameTooltip:Show()
end
local buttonMouseOut = function (button)
local buttonMouseOut = function(button)
button.MyObject.image:SetBlendMode ("BLEND")
button.MyObject.line:SetBlendMode ("BLEND")
button.MyObject.label:SetTextColor (.8, .8, .8, .8)
GameTooltip:Hide()
end
local EncounterSelect = function (_, _, instanceId, bossIndex)
local EncounterSelect = function(_, _, instanceId, bossIndex)
DetailsCustomSpellsFrame:Show()
DetailsCustomActorsFrame:Hide()
@@ -1626,7 +1626,7 @@
x = x + 100
end
local nome_magia, _, icone_magia = _GetSpellInfo (spell)
local nome_magia, _, icone_magia = _GetSpellInfo(spell)
thisButton.image:SetTexture (icone_magia)
thisButton.label:SetText (nome_magia)
thisButton:SetClickFunction (selectedEncounterSpell, spell)
@@ -1774,7 +1774,7 @@
end
end
local font_change = function (_, _, increase)
local font_change = function(_, _, increase)
if (increase) then
local file, size, flags = code_editor.editbox:GetFont()
code_editor.font_size = code_editor.font_size + 1
+2 -2
View File
@@ -30,7 +30,7 @@ function Details:Dump (...)
text_editor.editbox:SetBackdrop (nil)
text_editor:SetBackdrop (nil)
DetailsFramework:ReskinSlider (text_editor.scroll)
DetailsFramework:ReskinSlider(text_editor.scroll)
if (not text_editor.__background) then
text_editor.__background = text_editor:CreateTexture (nil, "background")
@@ -95,7 +95,7 @@ function _detalhes:ShowImportWindow (defaultText, confirmFunc, titleText)
importTextEditor.editbox:SetBackdrop (nil)
importTextEditor:SetBackdrop (nil)
DetailsFramework:ReskinSlider (importTextEditor.scroll)
DetailsFramework:ReskinSlider(importTextEditor.scroll)
if (not importTextEditor.__background) then
importTextEditor.__background = importTextEditor:CreateTexture (nil, "background")
+33 -33
View File
@@ -26,7 +26,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
--> frame strata options
local set_frame_strata = function (_, _, strata)
local set_frame_strata = function(_, _, strata)
Details.event_tracker.frame.strata = strata
Details:UpdateEventTrackerFrame()
end
@@ -38,7 +38,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
strataTable [5] = {value = "DIALOG", label = "DIALOG", onclick = set_frame_strata}
--> font options
local set_font_shadow= function (_, _, shadow)
local set_font_shadow= function(_, _, shadow)
Details.event_tracker.font_shadow = shadow
Details:UpdateEventTrackerFrame()
end
@@ -47,13 +47,13 @@ function Details:OpenEventTrackerOptions (from_options_panel)
fontShadowTable [2] = {value = "OUTLINE", label = "Outline", onclick = set_font_shadow}
fontShadowTable [3] = {value = "THICKOUTLINE", label = "Thick Outline", onclick = set_font_shadow}
local on_select_text_font = function (self, fixed_value, value)
local on_select_text_font = function(self, fixed_value, value)
Details.event_tracker.font_face = value
Details:UpdateEventTrackerFrame()
end
--> texture options
local set_bar_texture = function (_, _, value)
local set_bar_texture = function(_, _, value)
Details.event_tracker.line_texture = value
Details:UpdateEventTrackerFrame()
end
@@ -64,7 +64,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
for name, texturePath in pairs (textures) do
texTable [#texTable + 1] = {value = name, label = name, statusbar = texturePath, onclick = set_bar_texture}
end
table.sort (texTable, function (t1, t2) return t1.label < t2.label end)
table.sort (texTable, function(t1, t2) return t1.label < t2.label end)
--> options table
local options = {
@@ -74,7 +74,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
{
type = "toggle",
get = function() return Details.event_tracker.enabled end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.event_tracker.enabled = not Details.event_tracker.enabled
Details:LoadFramesForBroadcastTools()
end,
@@ -86,7 +86,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
{
type = "toggle",
get = function() return Details.event_tracker.frame.locked end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.event_tracker.frame.locked = not Details.event_tracker.frame.locked
Details:UpdateEventTrackerFrame()
end,
@@ -98,7 +98,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
{
type = "toggle",
get = function() return Details.event_tracker.frame.show_title end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.event_tracker.frame.show_title = not Details.event_tracker.frame.show_title
Details:UpdateEventTrackerFrame()
end,
@@ -112,7 +112,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
get = function()
return {Details.event_tracker.frame.backdrop_color[1], Details.event_tracker.frame.backdrop_color[2], Details.event_tracker.frame.backdrop_color[3], Details.event_tracker.frame.backdrop_color[4]}
end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local color = Details.event_tracker.frame.backdrop_color
color[1], color[2], color[3], color[4] = r, g, b, a
Details:UpdateEventTrackerFrame()
@@ -134,7 +134,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
{
type = "range",
get = function() return Details.event_tracker.line_height end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.event_tracker.line_height = value
Details:UpdateEventTrackerFrame()
end,
@@ -157,7 +157,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
get = function()
return {Details.event_tracker.line_color[1], Details.event_tracker.line_color[2], Details.event_tracker.line_color[3], Details.event_tracker.line_color[4]}
end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local color = Details.event_tracker.line_color
color[1], color[2], color[3], color[4] = r, g, b, a
Details:UpdateEventTrackerFrame()
@@ -170,7 +170,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
{
type = "range",
get = function() return Details.event_tracker.font_size end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.event_tracker.font_size = value
Details:UpdateEventTrackerFrame()
end,
@@ -186,7 +186,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
get = function()
return {Details.event_tracker.font_color[1], Details.event_tracker.font_color[2], Details.event_tracker.font_color[3], Details.event_tracker.font_color[4]}
end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local color = Details.event_tracker.font_color
color[1], color[2], color[3], color[4] = r, g, b, a
Details:UpdateEventTrackerFrame()
@@ -264,13 +264,13 @@ function Details:CreateEventTrackerFrame(parent, name)
local left_resize, right_resize = DF:CreateResizeGrips (f)
left_resize:SetScript ("OnMouseDown", function (self)
left_resize:SetScript ("OnMouseDown", function(self)
if (not f.resizing and not _detalhes.event_tracker.frame.locked) then
f.resizing = true
f:StartSizing ("bottomleft")
end
end)
left_resize:SetScript ("OnMouseUp", function (self)
left_resize:SetScript ("OnMouseUp", function(self)
if (f.resizing) then
f.resizing = false
f:StopMovingOrSizing()
@@ -278,13 +278,13 @@ function Details:CreateEventTrackerFrame(parent, name)
_detalhes.event_tracker.frame.height = f:GetHeight()
end
end)
right_resize:SetScript ("OnMouseDown", function (self)
right_resize:SetScript ("OnMouseDown", function(self)
if (not f.resizing and not _detalhes.event_tracker.frame.locked) then
f.resizing = true
f:StartSizing ("bottomright")
end
end)
right_resize:SetScript ("OnMouseUp", function (self)
right_resize:SetScript ("OnMouseUp", function(self)
if (f.resizing) then
f.resizing = false
f:StopMovingOrSizing()
@@ -293,7 +293,7 @@ function Details:CreateEventTrackerFrame(parent, name)
end
end)
f:SetScript ("OnSizeChanged", function (self)
f:SetScript ("OnSizeChanged", function(self)
end)
@@ -306,7 +306,7 @@ function Details:CreateEventTrackerFrame(parent, name)
local header_size = 20
--> on tick script
local lineOnTick = function (self, deltaTime)
local lineOnTick = function(self, deltaTime)
--> when this event occured on combat log
local gameTime = self.GameTime
@@ -331,7 +331,7 @@ function Details:CreateEventTrackerFrame(parent, name)
end
--> create a line on the scroll frame
local scroll_createline = function (self, index)
local scroll_createline = function(self, index)
local line = CreateFrame ("frame", "$parentLine" .. index, self,"BackdropTemplate")
line:EnableMouse (false)
@@ -412,7 +412,7 @@ function Details:CreateEventTrackerFrame(parent, name)
local ABILITYTABLE_ISENEMY = 9
local ABILITYTABLE_TARGETSERIAL = 10
local get_spec_or_class = function (serial, name)
local get_spec_or_class = function(serial, name)
local class
local spec = _detalhes.cached_specs [serial]
if (not spec) then
@@ -430,7 +430,7 @@ function Details:CreateEventTrackerFrame(parent, name)
return spec, class
end
local get_player_icon = function (spec, class)
local get_player_icon = function(spec, class)
if (spec) then
return [[Interface\AddOns\Details\images\spec_icons_normal]], unpack (_detalhes.class_specs_coords [spec])
elseif (class) then
@@ -440,7 +440,7 @@ function Details:CreateEventTrackerFrame(parent, name)
end
end
local add_role_and_class_color = function (player_name, player_serial)
local add_role_and_class_color = function(player_name, player_serial)
--> get the actor object
local actor = _detalhes.tabela_vigente[1]:GetActor (player_name)
@@ -492,7 +492,7 @@ function Details:CreateEventTrackerFrame(parent, name)
return availableSpace
end
local shrink_string = function (fontstring, size)
local shrink_string = function(fontstring, size)
local text = fontstring:GetText()
local loops = 20
while (fontstring:GetStringWidth() > size and loops > 0) do
@@ -505,7 +505,7 @@ function Details:CreateEventTrackerFrame(parent, name)
end
--refresh the scroll frame
local scroll_refresh = function (self, data, offset, total_lines)
local scroll_refresh = function(self, data, offset, total_lines)
local textSize = get_text_size()
@@ -529,7 +529,7 @@ function Details:CreateEventTrackerFrame(parent, name)
end
if (ability [ABILITYTABLE_SPELLTYPE] == SPELLTYPE_COOLDOWN) then
local spellName, _, spellIcon = GetSpellInfo (ability [ABILITYTABLE_SPELLID])
local spellName, _, spellIcon = GetSpellInfo(ability [ABILITYTABLE_SPELLID])
line.RightIcon:SetTexture (spellIcon)
line.RightIcon:SetTexCoord (.06, .94, .06, .94)
@@ -545,7 +545,7 @@ function Details:CreateEventTrackerFrame(parent, name)
line.ActionIcon:SetTexCoord (0, 0.125, 0, 1)
elseif (ability [ABILITYTABLE_SPELLTYPE] == SPELLTYPE_OFFENSIVE) then
local spellName, _, spellIcon = GetSpellInfo (ability [ABILITYTABLE_SPELLID])
local spellName, _, spellIcon = GetSpellInfo(ability [ABILITYTABLE_SPELLID])
line.RightIcon:SetTexture (spellIcon)
line.RightIcon:SetTexCoord (.06, .94, .06, .94)
line.RightText:SetText (spellName)
@@ -554,7 +554,7 @@ function Details:CreateEventTrackerFrame(parent, name)
line.ActionIcon:SetTexCoord (0.127, 0.25, 0, 1)
elseif (ability [ABILITYTABLE_SPELLTYPE] == SPELLTYPE_INTERRUPT) then
local spellNameInterrupted, _, spellIconInterrupted = GetSpellInfo (ability [ABILITYTABLE_EXTRASPELLID])
local spellNameInterrupted, _, spellIconInterrupted = GetSpellInfo(ability [ABILITYTABLE_EXTRASPELLID])
line.RightIcon:SetTexture (spellIconInterrupted)
line.RightIcon:SetTexCoord (.06, .94, .06, .94)
line.RightText:SetText (spellNameInterrupted)
@@ -563,7 +563,7 @@ function Details:CreateEventTrackerFrame(parent, name)
line.ActionIcon:SetTexCoord (0.251, 0.375, 0, 1)
elseif (ability [ABILITYTABLE_SPELLTYPE] == SPELLTYPE_CROWDCONTROL) then
local spellName, _, spellIcon = GetSpellInfo (ability [ABILITYTABLE_SPELLID])
local spellName, _, spellIcon = GetSpellInfo(ability [ABILITYTABLE_SPELLID])
line.RightIcon:SetTexture (spellIcon)
line.RightIcon:SetTexCoord (.06, .94, .06, .94)
@@ -612,7 +612,7 @@ function Details:CreateEventTrackerFrame(parent, name)
scrollframe:SetPoint ("bottomright", f, "bottomright", 0, 0)
--> update line - used by 'UpdateWorldTrackerLines' function
local update_line = function (line)
local update_line = function(line)
--> get the line index
local index = line.Index
@@ -730,20 +730,20 @@ function Details:CreateEventTrackerFrame(parent, name)
local OBJECT_TYPE_ENEMY = 0x00000040
--> combat parser
local is_player = function (flag)
local is_player = function(flag)
if (not flag) then
return false
end
return bit.band (flag, OBJECT_TYPE_PLAYER) ~= 0
end
local is_enemy = function (flag)
local is_enemy = function(flag)
if (not flag) then
return false
end
return bit.band (flag, OBJECT_TYPE_ENEMY) ~= 0
end
combatLog:SetScript ("OnEvent", function (self, event)
combatLog:SetScript ("OnEvent", function(self, event)
local time, token, hidding, caster_serial, caster_name, caster_flags, caster_flags2, target_serial, target_name, target_flags, target_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool = CombatLogGetCurrentEventInfo()
local added = false
+30 -30
View File
@@ -200,8 +200,8 @@ function Details:OpenForge()
{name = L["STRING_FORGE_HEADER_FLAG"], width = 100, type = "entry", func = no_func},
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
fill_fillrows = function (index, self)
fill_gettotal = function(self) return #self.module.data end,
fill_fillrows = function(index, self)
local data = self.module.data [index]
if (data) then
return {
@@ -283,8 +283,8 @@ function Details:OpenForge()
{name = L["STRING_FORGE_HEADER_FLAG"], width = 100, type = "entry", func = no_func},
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
fill_fillrows = function (index, self)
fill_gettotal = function(self) return #self.module.data end,
fill_fillrows = function(index, self)
local data = self.module.data [index]
if (data) then
return {
@@ -351,8 +351,8 @@ function Details:OpenForge()
{name = L["STRING_FORGE_HEADER_FLAG"], width = 100, type = "entry", func = no_func},
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
fill_fillrows = function (index, self)
fill_gettotal = function(self) return #self.module.data end,
fill_fillrows = function(index, self)
local data = self.module.data [index]
if (data) then
return {
@@ -382,21 +382,21 @@ function Details:OpenForge()
end
end
local spell_open_aura_creator = function (row)
local spell_open_aura_creator = function(row)
local data = all_modules [1].data [row]
local spellid = data[1]
local spellname, _, spellicon = GetSpellInfo (spellid)
local spellname, _, spellicon = GetSpellInfo(spellid)
Details:OpenAuraPanel (spellid, spellname, spellicon, data[3])
end
local spell_encounter_open_aura_creator = function (row)
local spell_encounter_open_aura_creator = function(row)
local data = all_modules [2].data [row]
local spellID = data[1]
local encounterID = data [2]
local enemyName = data [3]
local encounterName = data [4]
local spellname, _, spellicon = GetSpellInfo (spellID)
local spellname, _, spellicon = GetSpellInfo(spellID)
Details:OpenAuraPanel (spellID, spellname, spellicon, encounterID)
end
@@ -464,7 +464,7 @@ function Details:OpenForge()
if (can_add ) then
if (filter_name ~= "") then
local spellName = GetSpellInfo (spellID)
local spellName = GetSpellInfo(spellID)
if (spellName) then
spellName = lower (spellName)
if (not spellName:find (lower_FilterSpellName)) then
@@ -497,8 +497,8 @@ function Details:OpenForge()
----{name = L["STRING_FORGE_HEADER_CREATEAURA"], width = 86, type = "button", func = spell_open_aura_creator, icon = [[Interface\AddOns\WeakAuras\Media\Textures\icon]], notext = true, iconalign = "center"},
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
fill_fillrows = function (index, self)
fill_gettotal = function(self) return #self.module.data end,
fill_fillrows = function(index, self)
local data = self.module.data [index]
if (data) then
local events = ""
@@ -509,7 +509,7 @@ function Details:OpenForge()
end
events = events:sub (1, #events - 3)
end
local spellName, _, spellIcon = GetSpellInfo (data[1])
local spellName, _, spellIcon = GetSpellInfo(data[1])
local classColor = RAID_CLASS_COLORS [data[2]] and RAID_CLASS_COLORS [data[2]].colorStr or "FFFFFFFF"
return {
index,
@@ -599,7 +599,7 @@ function Details:OpenForge()
if (can_add ) then
if (filter_name ~= "") then
local spellName = GetSpellInfo (spellID)
local spellName = GetSpellInfo(spellID)
if (spellName) then
spellName = lower (spellName)
if (not spellName:find (lower_FilterSpellName)) then
@@ -643,8 +643,8 @@ function Details:OpenForge()
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
fill_fillrows = function (index, self)
fill_gettotal = function(self) return #self.module.data end,
fill_fillrows = function(index, self)
local data = self.module.data [index]
if (data) then
@@ -745,8 +745,8 @@ function Details:OpenForge()
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
fill_fillrows = function (index, self)
fill_gettotal = function(self) return #self.module.data end,
fill_fillrows = function(index, self)
local data = self.module.data[index]
if (data) then
local npcId = data[1]
@@ -768,12 +768,12 @@ function Details:OpenForge()
-----------------------------------------------
local dbm_open_aura_creator = function (row)
local dbm_open_aura_creator = function(row)
local data = all_modules [4].data [row]
local spellname, spellicon, _
if (type (data [7]) == "number") then
spellname, _, spellicon = GetSpellInfo (data [7])
spellname, _, spellicon = GetSpellInfo(data [7])
else
if (data [7]) then
local spellid = data[7]:gsub ("ej", "")
@@ -862,8 +862,8 @@ function Details:OpenForge()
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
fill_fillrows = function (index, self)
fill_gettotal = function(self) return #self.module.data end,
fill_fillrows = function(index, self)
local data = self.module.data [index]
if (data) then
local encounter_id = data.id
@@ -874,7 +874,7 @@ function Details:OpenForge()
local spellName, _, spellIcon
if (abilityID) then
if (abilityID > 0) then
spellName, _, spellIcon = GetSpellInfo (abilityID)
spellName, _, spellIcon = GetSpellInfo(abilityID)
end
end
@@ -897,7 +897,7 @@ function Details:OpenForge()
-----------------------------------------------
local bw_open_aura_creator = function (row)
local bw_open_aura_creator = function(row)
local data = all_modules [5].data [row]
@@ -909,7 +909,7 @@ function Details:OpenForge()
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = DetailsFramework.EncounterJournal.EJ_GetSectionInfo (abs (spellid))
spellname, spellicon = title, abilityIcon
else
spellname, _, spellicon = GetSpellInfo (spellid)
spellname, _, spellicon = GetSpellInfo(spellid)
end
Details:OpenAuraPanel (data [2], spellname, spellicon, data.id, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = data [2], text = "Next " .. spellname .. " In", text_size = 72, icon = spellicon})
@@ -993,8 +993,8 @@ function Details:OpenForge()
--{name = L["STRING_FORGE_HEADER_CREATEAURA"], width = 120, type = "button", func = bw_open_aura_creator, icon = [[Interface\AddOns\WeakAuras\Media\Textures\icon]], notext = true, iconalign = "center"},
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
fill_fillrows = function (index, self)
fill_gettotal = function(self) return #self.module.data end,
fill_fillrows = function(index, self)
local data = self.module.data [index]
if (data) then
local encounter_id = data.id
@@ -1005,7 +1005,7 @@ function Details:OpenForge()
local spellName, _, spellIcon
if (abilityID) then
if (abilityID > 0) then
spellName, _, spellIcon = GetSpellInfo (abilityID)
spellName, _, spellIcon = GetSpellInfo(abilityID)
end
end
@@ -1029,7 +1029,7 @@ function Details:OpenForge()
local select_module = function (a, b, module_number)
local select_module = function(a, b, module_number)
if (current_module ~= module_number) then
local module = all_modules [current_module]
+8 -8
View File
@@ -49,29 +49,29 @@ function Details.OpenMacrosWindow()
local macrosAvailable = Details.MacroList
local OnEnterMacroButton = function (self)
local OnEnterMacroButton = function(self)
self:SetBackdropColor (unpack (scrollbox_line_backdrop_color_onenter))
end
local onLeaveMacroButton = function (self)
local onLeaveMacroButton = function(self)
self:SetBackdropColor (unpack (scrollbox_line_backdrop_color))
end
local updateMacroLine = function (self, index, title, desc, macroText)
local updateMacroLine = function(self, index, title, desc, macroText)
self.Title:SetText (title)
self.Desc:SetText (desc)
self.MacroTextEntry:SetText (macroText)
end
local textEntryOnFocusGained = function (self)
local textEntryOnFocusGained = function(self)
self:HighlightText()
end
local textEntryOnFocusLost = function (self)
local textEntryOnFocusLost = function(self)
self:HighlightText (0, 0)
end
local refreshMacroScrollbox = function (self, data, offset, totalLines)
local refreshMacroScrollbox = function(self, data, offset, totalLines)
for i = 1, totalLines do
local index = i + offset
local macro = macrosAvailable [index]
@@ -82,7 +82,7 @@ function Details.OpenMacrosWindow()
end
end
local macroListCreateLine = function (self, index)
local macroListCreateLine = function(self, index)
--create a new line
local line = CreateFrame ("button", "$parentLine" .. index, self,"BackdropTemplate")
@@ -132,7 +132,7 @@ function Details.OpenMacrosWindow()
macroScrollbox:SetBackdropColor (0, 0, 0, 0)
macroScrollbox:SetBackdropBorderColor (0, 0, 0, 1)
f.MacroScrollbox = macroScrollbox
DF:ReskinSlider (macroScrollbox)
DF:ReskinSlider(macroScrollbox)
macroScrollbox.__background:Hide()
+955 -971
View File
File diff suppressed because it is too large Load Diff
+41 -44
View File
@@ -1,11 +1,10 @@
local Details = _G.Details
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local g = Details.gump
local Details = _G.Details
local Loc = LibStub("AceLocale-3.0"):GetLocale( "Details" )
local gump = Details.gump
local _
function Details:OpenNewsWindow(textToShow, dumpValues, keeptext)
Details.latest_news_saw = Details.userversion
local newsFrame = Details:CreateOrOpenNewsWindow()
@@ -15,30 +14,30 @@ function Details:OpenNewsWindow(textToShow, dumpValues, keeptext)
newsFrame:Show()
return
end
if (textToShow and type (textToShow) == "table") then
DetailsNewsWindowLower:SetSize (450, 5000)
DetailsNewsWindowSlider:SetMinMaxValues (0, 5000)
DetailsNewsWindowText:SetHeight (5000)
local s = ""
for _, text in ipairs (textToShow) do
if (type (text) == "string" or type (text) == "number") then
s = s .. text .. "\n"
DetailsNewsWindowLower:SetSize(450, 5000)
DetailsNewsWindowSlider:SetMinMaxValues(0, 5000)
DetailsNewsWindowText:SetHeight(5000)
local returnString = ""
for _, text in ipairs(textToShow) do
if (type(text) == "string" or type(text) == "number") then
returnString = returnString .. text .. "\n"
end
end
if (dumpValues) then
s = Details.table.dump (textToShow)
returnString = Details.table.dump(textToShow)
end
if (keeptext) then
newsFrame:Text ((DetailsNewsWindowText:GetText() or "") .. "\n\n" .. s)
newsFrame:Text((DetailsNewsWindowText:GetText() or "") .. "\n\n" .. returnString)
else
if (dumpValues) then
newsFrame.DumpTableFrame:SetText (s)
newsFrame.DumpTableFrame:SetText (returnString)
else
newsFrame:Text (s)
newsFrame:Text (returnString)
end
end
else
@@ -62,10 +61,8 @@ end
function Details:CreateOrOpenNewsWindow()
local frame = _G.DetailsNewsWindow
if (not frame) then
--build news frame
if (not frame) then
frame = DetailsFramework:CreateSimplePanel(UIParent, 480, 560, "Details! Damage Meter " .. Details.version, "DetailsNewsWindow", panel_options, db)
tinsert(UISpecialFrames, "DetailsNewsWindow")
frame:SetPoint("left", UIParent, "left", 10, 0)
@@ -83,30 +80,30 @@ function Details:CreateOrOpenNewsWindow()
frame.imageFrame.texture = frame.imageFrame:CreateTexture(nil, "overlay")
frame.imageFrame.texture:SetPoint("topleft", frame.imageFrame, "topleft")
local dumpFrame = g:CreateTextEntry(frame, function()end, 500, 612, "DumpTable", "$parentDumpTable")
dumpFrame.editbox:SetMultiLine (true)
local dumpFrame = gump:CreateTextEntry(frame, function()end, 500, 612, "DumpTable", "$parentDumpTable")
dumpFrame.editbox:SetMultiLine(true)
dumpFrame:SetPoint("topleft", frame, "topleft", 8, -68)
dumpFrame:SetBackdrop(nil)
dumpFrame.editbox:SetBackdrop(nil)
dumpFrame.editbox:SetJustifyH("left")
dumpFrame.editbox:SetJustifyV("top")
frame.DumpTableFrame = dumpFrame
local frame_upper = CreateFrame("scrollframe", nil, frame, "BackdropTemplate")
local frame_lower = CreateFrame("frame", "DetailsNewsWindowLower", frame_upper, "BackdropTemplate")
frame_lower:SetSize (450, 2000)
frame_upper:SetPoint ("topleft", frame, "topleft", 10, -30)
frame_upper:SetWidth(445)
frame_upper:SetHeight(500)
frame_upper:SetBackdrop({
frame.DumpTableFrame = dumpFrame
local frameUpper = CreateFrame("scrollframe", nil, frame, "BackdropTemplate")
local frameLower = CreateFrame("frame", "DetailsNewsWindowLower", frameUpper, "BackdropTemplate")
frameLower:SetSize (450, 2000)
frameUpper:SetPoint ("topleft", frame, "topleft", 10, -30)
frameUpper:SetWidth(445)
frameUpper:SetHeight(500)
frameUpper:SetBackdrop({
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
tile = true, tileSize = 16,
insets = {left = 1, right = 1, top = 0, bottom = 1},})
frame_upper:SetBackdropColor (.1, .1, .1, .3)
frame_upper:SetScrollChild (frame_lower)
frameUpper:SetBackdropColor (.1, .1, .1, .3)
frameUpper:SetScrollChild (frameLower)
local slider = CreateFrame ("slider", "DetailsNewsWindowSlider", frame, "BackdropTemplate")
slider.bg = slider:CreateTexture (nil, "background")
@@ -120,15 +117,15 @@ function Details:CreateOrOpenNewsWindow()
slider:SetThumbTexture (slider.thumb)
slider:SetOrientation ("vertical");
slider:SetSize (16, 499)
slider:SetPoint ("topleft", frame_upper, "topright")
slider:SetPoint ("topleft", frameUpper, "topright")
slider:SetMinMaxValues (0, 2000)
slider:SetValue(0)
slider:SetScript("OnValueChanged", function (self)
frame_upper:SetVerticalScroll (self:GetValue())
slider:SetScript("OnValueChanged", function(self)
frameUpper:SetVerticalScroll (self:GetValue())
end)
frame_upper:EnableMouseWheel (true)
frame_upper:SetScript("OnMouseWheel", function (self, delta)
frameUpper:EnableMouseWheel (true)
frameUpper:SetScript("OnMouseWheel", function(self, delta)
local current = slider:GetValue()
if (IsShiftKeyDown() and (delta > 0)) then
slider:SetValue(0)
@@ -142,8 +139,8 @@ function Details:CreateOrOpenNewsWindow()
end)
--> text box
local texto = frame_lower:CreateFontString("DetailsNewsWindowText", "overlay", "GameFontNormal")
texto:SetPoint("topleft", frame_lower, "topleft")
local texto = frameLower:CreateFontString("DetailsNewsWindowText", "overlay", "GameFontNormal")
texto:SetPoint("topleft", frameLower, "topleft")
texto:SetJustifyH("left")
texto:SetJustifyV("top")
texto:SetTextColor(1, 1, 1)
File diff suppressed because it is too large Load Diff
+20 -20
View File
@@ -42,13 +42,13 @@ function Details.OpenPlaterIntegrationWindow()
--> anchor text function
local anchor_names = {"Top Left", "Left", "Bottom Left", "Bottom", "Bottom Right", "Right", "Top Right", "Top", "Center", "Inner Left", "Inner Right", "Inner Top", "Inner Bottom"}
local build_anchor_side_table = function (member)
local build_anchor_side_table = function(member)
local t = {}
for i = 1, 13 do
tinsert (t, {
label = anchor_names[i],
value = i,
onclick = function (_, _, value)
onclick = function(_, _, value)
Details.plater [member].side = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -67,7 +67,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "toggle",
get = function() return Details.plater.realtime_dps_enabled end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_enabled = value
Details:RefreshPlaterIntegration()
@@ -87,7 +87,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.realtime_dps_size end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_size = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -106,7 +106,7 @@ function Details.OpenPlaterIntegrationWindow()
local color = Details.plater.realtime_dps_color
return {color [1], color [2], color [3], color [4]}
end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local color = Details.plater.realtime_dps_color
color[1], color[2], color[3], color[4] = r, g, b, a
if (Plater) then
@@ -121,7 +121,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "toggle",
get = function() return Details.plater.realtime_dps_shadow end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_shadow = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -143,7 +143,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.realtime_dps_anchor.x end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_anchor.x = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -159,7 +159,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.realtime_dps_anchor.y end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_anchor.y = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -179,7 +179,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "toggle",
get = function() return Details.plater.realtime_dps_player_enabled end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_player_enabled = value
Details:RefreshPlaterIntegration()
@@ -199,7 +199,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.realtime_dps_player_size end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_player_size = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -218,7 +218,7 @@ function Details.OpenPlaterIntegrationWindow()
local color = Details.plater.realtime_dps_player_color
return {color [1], color [2], color [3], color [4]}
end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local color = Details.plater.realtime_dps_player_color
color[1], color[2], color[3], color[4] = r, g, b, a
if (Plater) then
@@ -233,7 +233,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "toggle",
get = function() return Details.plater.realtime_dps_player_shadow end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_player_shadow = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -255,7 +255,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.realtime_dps_player_anchor.x end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_player_anchor.x = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -271,7 +271,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.realtime_dps_player_anchor.y end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.realtime_dps_player_anchor.y = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -291,7 +291,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "toggle",
get = function() return Details.plater.damage_taken_enabled end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.damage_taken_enabled = value
Details:RefreshPlaterIntegration()
@@ -311,7 +311,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.damage_taken_size end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.damage_taken_size = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -330,7 +330,7 @@ function Details.OpenPlaterIntegrationWindow()
local color = Details.plater.damage_taken_color
return {color [1], color [2], color [3], color [4]}
end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local color = Details.plater.damage_taken_color
color[1], color[2], color[3], color[4] = r, g, b, a
if (Plater) then
@@ -345,7 +345,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "toggle",
get = function() return Details.plater.damage_taken_shadow end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.damage_taken_shadow = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -367,7 +367,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.damage_taken_anchor.x end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.damage_taken_anchor.x = value
if (Plater) then
Plater.UpdateAllPlates()
@@ -383,7 +383,7 @@ function Details.OpenPlaterIntegrationWindow()
{
type = "range",
get = function() return Details.plater.damage_taken_anchor.y end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Details.plater.damage_taken_anchor.y = value
if (Plater) then
Plater.UpdateAllPlates()
File diff suppressed because it is too large Load Diff
+57 -25
View File
@@ -1,10 +1,10 @@
local Details = _G.Details
local DF = _G.DetailsFramework
local detailsFramework = _G.DetailsFramework
local breakdownWindowPlayerList = {}
local unpack = _G.unpack
local unpack = table.unpack or unpack
local C_Timer = _G.C_Timer
local tinsert = _G.tinsert
@@ -15,16 +15,17 @@
local scrollbox_line_backdrop_color_selected = {.6, .6, .1, 0.7}
local scrollbox_line_backdrop_color_highlight = {.9, .9, .9, 0.5}
local player_scroll_size = {180, 288}
function breakdownWindowPlayerList.CreatePlayerListFrame()
local f = _G.DetailsPlayerDetailsWindow
local refreshPlayerList = function(self, data, offset, totalLines)
--update the scroll
local topResult = data[1]
if (topResult) then
topResult = topResult.total
end
for i = 1, totalLines do
local index = i + offset
local playerObject = data[index]
@@ -36,20 +37,20 @@
end
end
end
local lineOnClick = function(self)
if (self.playerObject ~= Details:GetPlayerObjectFromBreakdownWindow()) then
Details:OpenPlayerBreakdown(Details:GetActiveWindowFromBreakdownWindow(), self.playerObject)
f.playerScrollBox:Refresh()
end
end
local lineOnEnter = function(self)
self:SetBackdropColor(unpack(scrollbox_line_backdrop_color_highlight))
self.specIcon:SetBlendMode("ADD")
self.roleIcon:SetBlendMode("ADD")
end
local lineOnLeave = function(self)
if (self.isSelected) then
self:SetBackdropColor(unpack(scrollbox_line_backdrop_color_selected))
@@ -78,7 +79,6 @@
self.specIcon:SetTexCoord(.1, .9, .1, .9)
else
local specIcon, L, R, T, B = Details:GetSpecIcon(self.playerObject.spec, false)
local specId, specName, specDescription, specIconId, specClass
if (specIcon) then
self.specIcon:SetTexture(specIcon)
@@ -87,7 +87,7 @@
if (DetailsFramework.IsTimewalkWoW()) then
specRole = "NONE"
else
specId, specName, specDescription, specIconId, specRole, specClass = _G.GetSpecializationInfoByID(self.playerObject.spec)
specRole = select(5, _G.GetSpecializationInfoByID(self.playerObject.spec))
end
else
self.specIcon:SetTexture("")
@@ -106,14 +106,14 @@
else
self.roleIcon:SetTexture("")
end
--do not show the role icon
self.roleIcon:SetTexture("")
--set the player name
self.playerName:SetText(Details:GetOnlyName(self.playerObject.nome))
self.rankText:SetText(self.index)
--set the player class name
self.className:SetText(string.lower(_G.UnitClass(self.playerObject.nome) or self.playerObject:Class()))
@@ -124,6 +124,21 @@
self.totalStatusBar:SetValue(self.playerObject.total)
end
--get a Details! window
local lowerInstanceId = Details:GetLowerInstanceNumber()
local fontFile
local fontSize
local fontOutline
if (lowerInstanceId) then
local instance = Details:GetInstance(lowerInstanceId)
if (instance) then
fontFile = instance.row_info.font_face
fontSize = instance.row_info.font_size
fontOutline = instance.row_info.textL_outline
end
end
local createPlayerLine = function(self, index)
--create a new line
local line = _G.CreateFrame("button", "$parentLine" .. index, self, "BackdropTemplate")
@@ -144,18 +159,29 @@
local specIcon = line:CreateTexture("$parentSpecIcon", "artwork")
specIcon:SetSize(player_line_height, player_line_height)
specIcon:SetAlpha(0.71)
local roleIcon = line:CreateTexture("$parentRoleIcon", "overlay")
roleIcon:SetSize((player_line_height-2) / 2, (player_line_height-2) / 2)
roleIcon:SetAlpha(0.71)
local playerName = DF:CreateLabel(line, "", "GameFontNormal")
local playerName = detailsFramework:CreateLabel(line, "", 11, "white", "GameFontNormal")
if (fontFile) then
playerName.fontface = fontFile
end
if (fontSize) then
playerName.fontsize = fontSize
end
if (fontOutline) then
playerName.outline = fontOutline
end
playerName.textcolor = {1, 1, 1, .9}
playerName.textsize = 11
local className = DF:CreateLabel(line, "", "GameFontNormal")
local className = detailsFramework:CreateLabel(line, "", "GameFontNormal")
className.textcolor = {.95, .8, .2, 0}
className.textsize = 9
local rankText = DF:CreateLabel(line, "", "GameFontNormal")
local rankText = detailsFramework:CreateLabel(line, "", "GameFontNormal")
rankText.textcolor = {.3, .3, .3, .7}
rankText.textsize = 13
@@ -184,9 +210,9 @@
return line
end
local playerScroll = DF:CreateScrollBox(f, "$parentPlayerScrollBox", refreshPlayerList, {}, player_scroll_size[1] + 22, player_scroll_size[2], scrollbox_lines, player_line_height)
DF:ReskinSlider (playerScroll)
local playerScroll = detailsFramework:CreateScrollBox(f, "$parentPlayerScrollBox", refreshPlayerList, {}, player_scroll_size[1] + 22, player_scroll_size[2], scrollbox_lines, player_line_height)
detailsFramework:ReskinSlider(playerScroll)
playerScroll.ScrollBar:ClearAllPoints()
playerScroll.ScrollBar:SetPoint("topright", playerScroll, "topright", -2, -17)
playerScroll.ScrollBar:SetPoint("bottomright", playerScroll, "bottomright", -2, 17)
@@ -196,12 +222,12 @@
playerScroll:SetBackdropColor(0, 0, 0, 0.2)
playerScroll:SetBackdropBorderColor(0, 0, 0, 1)
f.playerScrollBox = playerScroll
--create the scrollbox lines
for i = 1, scrollbox_lines do
playerScroll:CreateLine(createPlayerLine)
end
local classIds = {
WARRIOR = 1,
PALADIN = 2,
@@ -221,21 +247,23 @@
function breakdownWindowPlayerList.BuildPlayerList()
local segment = Details:GetCombatFromBreakdownWindow()
local playerTable = {}
if (segment) then
local displayType = Details:GetDisplayTypeFromBreakdownWindow()
local containerType = displayType == 1 and DETAILS_ATTRIBUTE_DAMAGE or DETAILS_ATTRIBUTE_HEAL
local container = segment:GetContainer(containerType)
for index, playerObject in container:ListActors() do
if (playerObject:IsPlayer()) then
local unitClassID = classIds [playerObject:Class()] or 13
local unitName = playerObject:Name()
local playerPosition = (((unitClassID or 0) + 128) ^ 4) + tonumber (string.byte (unitName, 1) .. "" .. string.byte (unitName, 2))
local playerPosition = (((unitClassID or 0) + 128) ^ 4) + tonumber (string.byte(unitName, 1) .. "" .. string.byte(unitName, 2))
tinsert(playerTable, {playerObject, playerPosition, playerObject.total})
end
end
end
table.sort(playerTable, DF.SortOrder3)
table.sort(playerTable, detailsFramework.SortOrder3)
local resultTable = {}
for i = 1, #playerTable do
@@ -263,5 +291,9 @@
end)
end
breakdownWindowPlayerList.CreatePlayerListFrame()
function Details.PlayerBreakdown.CreatePlayerListFrame()
if (not Details.PlayerBreakdown.playerListFrameCreated) then
breakdownWindowPlayerList.CreatePlayerListFrame()
Details.PlayerBreakdown.playerListFrameCreated = true
end
end
+1 -1
View File
@@ -48,7 +48,7 @@ function Details:OpenProfiler()
--> get the new profile name
local current_profile = Details:GetCurrentProfileName()
local on_select_profile = function (_, _, profilename)
local on_select_profile = function(_, _, profilename)
if (profilename ~= Details:GetCurrentProfileName()) then
Details:ApplyProfile (profilename)
if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown()) then
+2 -2
View File
@@ -37,7 +37,7 @@ local textentry = DF:NewSpecialLuaEditorEntry (panel, scrollWidth, 555, "editbox
textentry:SetPoint ("topleft", panel, "topleft", 10, y)
DF:ApplyStandardBackdrop (textentry)
DF:SetFontSize (textentry.editbox, 14)
DF:ReskinSlider (textentry.scroll)
DF:ReskinSlider(textentry.scroll)
local arg1_button = DF:NewButton (panel, nil, "$parentButton1", nil, 80, 20, function() textentry.editbox:Insert ("{data1}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "1"), 1)
local arg2_button = DF:NewButton (panel, nil, "$parentButton2", nil, 80, 20, function() textentry.editbox:Insert ("{data2}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "2"), 1)
@@ -157,7 +157,7 @@ local function ColorSelection ( self, ColorCode )
self:HighlightText( Start, #ColorCode + ( #Replacement - #Selection ) + #COLOR_END + End );
end
local color_func = function (_, r, g, b, a)
local color_func = function(_, r, g, b, a)
local hex = Details:hex (a*255)..Details:hex (r*255)..Details:hex (g*255)..Details:hex (b*255)
ColorSelection ( textentry.editbox, "|c" .. hex)
end
+3 -3
View File
@@ -42,7 +42,7 @@ function Details.OpenRunCodeWindow()
code_editor.editbox:SetBackdrop (nil)
code_editor:SetBackdrop (nil)
DF:ReskinSlider (code_editor.scroll)
DF:ReskinSlider(code_editor.scroll)
if (not code_editor.__background) then
code_editor.__background = code_editor:CreateTexture (nil, "background")
@@ -74,7 +74,7 @@ function Details.OpenRunCodeWindow()
errortext_label:SetPoint ("left", errortext_frame, "left", 3, 0)
code_editor.NextCodeCheck = 0.33
code_editor:HookScript ("OnUpdate", function (self, deltaTime)
code_editor:HookScript ("OnUpdate", function(self, deltaTime)
code_editor.NextCodeCheck = code_editor.NextCodeCheck - deltaTime
if (code_editor.NextCodeCheck < 0) then
@@ -97,7 +97,7 @@ function Details.OpenRunCodeWindow()
end)
--> script selector
local on_select_CodeType_option = function (self, fixedParameter, value)
local on_select_CodeType_option = function(self, fixedParameter, value)
--> set the current editing code type
f.EditingCode = Details.RunCodeTypes [value].Value
f.EditingCodeKey = Details.RunCodeTypes [value].ProfileKey
+3 -3
View File
@@ -103,7 +103,7 @@ function Details:ScrollDamage()
end
end
local lineOnEnter = function (self)
local lineOnEnter = function(self)
if (self.IsCritical) then
self:SetBackdropColor(unpack(backdrop_color_is_critical_on_enter))
else
@@ -119,7 +119,7 @@ function Details:ScrollDamage()
end
end
local lineOnLeave = function (self)
local lineOnLeave = function(self)
if (self.IsCritical) then
self:SetBackdropColor(unpack(backdrop_color_is_critical))
else
@@ -207,7 +207,7 @@ function Details:ScrollDamage()
local combatLogReader = CreateFrame("frame")
local playerSerial = UnitGUID("player")
combatLogReader:SetScript("OnEvent", function (self)
combatLogReader:SetScript("OnEvent", function(self)
local timew, token, hidding, sourceSerial, sourceName, sourceFlag, sourceFlag2, targetSerial, targetName, targetFlag, targetFlag2, spellID, spellName, spellType, amount, overKill, school, resisted, blocked, absorbed, isCritical = CombatLogGetCurrentEventInfo()
if (sourceSerial == playerSerial) then
if (token == "SPELL_DAMAGE" or token == "SPELL_PERIODIC_DAMAGE" or token == "RANGE_DAMAGE" or token == "DAMAGE_SHIELD") then
+14 -14
View File
@@ -263,7 +263,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
--> report results
function f.BuildReport()
if (f.LatestResourceTable) then
local reportFunc = function (IsCurrent, IsReverse, AmtLines)
local reportFunc = function(IsCurrent, IsReverse, AmtLines)
local bossName = f.select_boss.label:GetText()
local bossDiff = f.select_diff.label:GetText()
local guildName = f.select_guild.label:GetText()
@@ -363,7 +363,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
--> select raid:
local onRaidSelect = function (_, _, raid)
local onRaidSelect = function(_, _, raid)
Details.rank_window.last_raid = raid
f:UpdateDropdowns (true)
on_select()
@@ -376,7 +376,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
raid_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select boss:
local on_boss_select = function (_, _, boss)
local on_boss_select = function(_, _, boss)
on_select()
end
local build_boss_list = function()
@@ -387,7 +387,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
boss_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select difficulty:
local on_diff_select = function (_, _, diff)
local on_diff_select = function(_, _, diff)
Details.rank_window.last_difficulty = diff
on_select()
end
@@ -400,7 +400,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
diff_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select role:
local on_role_select = function (_, _, role)
local on_role_select = function(_, _, role)
on_select()
end
local build_role_list = function()
@@ -414,7 +414,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
role_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select guild:
local on_guild_select = function (_, _, guild)
local on_guild_select = function(_, _, guild)
on_select()
end
local build_guild_list = function()
@@ -425,7 +425,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
guild_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select playerbase:
local on_player_select = function (_, _, player)
local on_player_select = function(_, _, player)
on_select()
end
local build_player_list = function()
@@ -439,7 +439,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
player_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--> select player:
local onPlayer2Select = function (_, _, player)
local onPlayer2Select = function(_, _, player)
f.latest_player_selected = player
f:BuildPlayerTable (player)
end
@@ -551,7 +551,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
end
table.sort (bossList, function (t1, t2) return t1.label < t2.label end)
table.sort (bossList, function(t1, t2) return t1.label < t2.label end)
diff_dropdown:Refresh()
@@ -632,7 +632,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
end
table.sort (bossList, function (t1, t2) return t1.label < t2.label end)
table.sort (bossList, function(t1, t2) return t1.label < t2.label end)
boss_dropdown:Refresh()
end
@@ -690,7 +690,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
--> update graphic
if (not f.gframe) then
local onenter = function (self)
local onenter = function(self)
GameCooltip:Reset()
GameCooltip:SetType ("tooltip")
GameCooltip:Preset (2)
@@ -703,7 +703,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
GameCooltip:SetOwner (self.ball.tooltip_anchor)
GameCooltip:Show()
end
local onleave = function (self)
local onleave = function(self)
GameCooltip:Hide()
end
f.gframe = DF:CreateGFrame (f, 650, 400, 35, onenter, onleave, "gframe", "$parentGF")
@@ -795,7 +795,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
t [1] = i .. ". " .. t [1]
end
fillpanel:SetFillFunction (function (index) return sortTable [index] end)
fillpanel:SetFillFunction (function(index) return sortTable [index] end)
fillpanel:SetTotalFunction (function() return #sortTable end)
fillpanel:UpdateRows (header)
fillpanel:Refresh()
@@ -870,7 +870,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
end
fillpanel:SetFillFunction (function (index) return players [index] end)
fillpanel:SetFillFunction (function(index) return players [index] end)
fillpanel:SetTotalFunction (function() return #players end)
fillpanel:UpdateRows (header)
+8 -8
View File
@@ -98,7 +98,7 @@ do
end
end
local on_click_all_switch_button = function (self, button)
local on_click_all_switch_button = function(self, button)
if (button == "LeftButton") then
local attribute = self.attribute
local subAttribute = self.sub_attribute
@@ -175,7 +175,7 @@ do
end
end
local create_all_switch_button = function (attribute, sub_attribute, x, y)
local create_all_switch_button = function(attribute, sub_attribute, x, y)
local button = CreateFrame ("button", "DetailsAllAttributesFrame" .. attribute .. sub_attribute, allDisplaysFrame)
button:SetSize (130, 16)
button.texture = button:CreateTexture (nil, "overlay")
@@ -488,7 +488,7 @@ function Details.switch:ShowMe(instancia)
elseif (IsShiftKeyDown()) then
if (not Details.switch.segments_blocks) then
local segment_switch = function (self, button, segment)
local segment_switch = function(self, button, segment)
if (button == "LeftButton") then
Details.switch.current_instancia:TrocaTabela (segment)
Details.switch.CloseMe()
@@ -497,26 +497,26 @@ function Details.switch:ShowMe(instancia)
end
end
local hide_label = function (self)
local hide_label = function(self)
self.texture:Hide()
self.button:Hide()
self.background:Hide()
self:Hide()
end
local show_label = function (self)
local show_label = function(self)
self.texture:Show()
self.button:Show()
self.background:Show()
self:Show()
end
local on_enter = function (self)
local on_enter = function(self)
--self.MyObject.this_background:SetBlendMode ("ADD")
--self.MyObject.boss_texture:SetBlendMode ("ADD")
end
local on_leave = function (self)
local on_leave = function(self)
self.MyObject.this_background:SetBlendMode ("BLEND")
self.MyObject.boss_texture:SetBlendMode ("BLEND")
end
@@ -1078,7 +1078,7 @@ end
local scroll = CreateFrame ("scrollframe", "DetailsSwitchPanelScroll", DetailsSwitchPanel, "FauxScrollFrameTemplate")
scroll:SetAllPoints()
scroll:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 20, Details.switch.Update) end) --altura
scroll:SetScript ("OnVerticalScroll", function(self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 20, Details.switch.Update) end) --altura
scroll.ScrollBar:Hide()
scroll.ScrollBar.ScrollUpButton:Hide()
scroll.ScrollBar.ScrollDownButton:Hide()
+16 -16
View File
@@ -68,7 +68,7 @@ local text_dispell_prototype = {
["events"] = "COMBAT_LOG_EVENT_UNFILTERED, ENCOUNTER_START",
["use_spellName"] = false,
["use_spellId"] = false,
["custom"] = "function (event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)\n if (event == \"COMBAT_LOG_EVENT_UNFILTERED\") then\n \n if ((token == \"SPELL_DISPEL\" or token == \"SPELL_STOLEN\") and extraSpellID == 159947) then\n aura_env.dispelled = aura_env.dispelled + 1\n aura_env.dispels_by [who_name] = (aura_env.dispels_by [who_name] or 0) + 1\n \n aura_env.text = aura_env.text .. \"|cffd2e8ff\" .. who_name .. \" (\" .. aura_env.dispels_by [who_name] .. \") \".. \"|r\\n\"\n \n if (select (2, aura_env.text:gsub (\"\\n\", \"\")) == 9) then\n aura_env.text = aura_env.text:gsub (\".-\\n\", \"\", 1)\n end\n return true\n end \n else\n aura_env.text = \"\"\n aura_env.success = 0\n aura_env.dispelled = 0\n wipe (aura_env.dispels_by)\n return true \n end\nend",
["custom"] = "function(event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)\n if (event == \"COMBAT_LOG_EVENT_UNFILTERED\") then\n \n if ((token == \"SPELL_DISPEL\" or token == \"SPELL_STOLEN\") and extraSpellID == 159947) then\n aura_env.dispelled = aura_env.dispelled + 1\n aura_env.dispels_by [who_name] = (aura_env.dispels_by [who_name] or 0) + 1\n \n aura_env.text = aura_env.text .. \"|cffd2e8ff\" .. who_name .. \" (\" .. aura_env.dispels_by [who_name] .. \") \".. \"|r\\n\"\n \n if (select (2, aura_env.text:gsub (\"\\n\", \"\")) == 9) then\n aura_env.text = aura_env.text:gsub (\".-\\n\", \"\", 1)\n end\n return true\n end \n else\n aura_env.text = \"\"\n aura_env.success = 0\n aura_env.dispelled = 0\n wipe (aura_env.dispels_by)\n return true \n end\nend",
["spellIds"] = {
},
["use_message"] = true,
@@ -176,7 +176,7 @@ local text_interrupt_prototype = {
},
["use_spellName"] = false,
["use_spellId"] = false,
["custom"] = "function (evento, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)\n \n if (evento == \"COMBAT_LOG_EVENT_UNFILTERED\") then\n \n if (token == \"SPELL_CAST_SUCCESS\" and spellid == 165416) then\n aura_env.success = aura_env.success + 1\n aura_env.text = aura_env.text .. \"SUCCESS! (\" .. aura_env.success .. \")\\n\"\n \n return true\n \n elseif (token == \"SPELL_INTERRUPT\" and extraSpellID == 165416) then\n aura_env.interrupted = aura_env.interrupted + 1\n aura_env.text = aura_env.text .. who_name .. \" (\" .. aura_env.interrupted .. \") \".. \"\\n\"\n return true\n end\n else\n aura_env.text = \"\"\n aura_env.success = 0\n aura_env.interrupted = 0\n return true \n end\n \nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
["custom"] = "function(evento, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)\n \n if (evento == \"COMBAT_LOG_EVENT_UNFILTERED\") then\n \n if (token == \"SPELL_CAST_SUCCESS\" and spellid == 165416) then\n aura_env.success = aura_env.success + 1\n aura_env.text = aura_env.text .. \"SUCCESS! (\" .. aura_env.success .. \")\\n\"\n \n return true\n \n elseif (token == \"SPELL_INTERRUPT\" and extraSpellID == 165416) then\n aura_env.interrupted = aura_env.interrupted + 1\n aura_env.text = aura_env.text .. who_name .. \" (\" .. aura_env.interrupted .. \") \".. \"\\n\"\n return true\n end\n else\n aura_env.text = \"\"\n aura_env.success = 0\n aura_env.interrupted = 0\n return true \n end\n \nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
["events"] = "COMBAT_LOG_EVENT_UNFILTERED, ENCOUNTER_START",
["use_message"] = true,
["unevent"] = "timed",
@@ -1457,7 +1457,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
new_aura = _detalhes.table.copy ({}, text_interrupt_prototype)
new_aura.trigger.custom = [[
function (event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
function(event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
if (token == "SPELL_CAST_SUCCESS" and spellid == @spellid) then
aura_env.success = aura_env.success + 1
@@ -1502,7 +1502,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
new_aura = _detalhes.table.copy ({}, text_dispell_prototype)
new_aura.trigger.custom = [[
function (event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
function(event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
if ((token == "SPELL_DISPEL" or token == "SPELL_STOLEN") and extraSpellID == @spellid) then
aura_env.dispelled = aura_env.dispelled + 1
@@ -1958,7 +1958,7 @@ local empty_other_values = {}
function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, triggertype, auratype, other_values)
if (not spellname) then
spellname = select (1, GetSpellInfo (spellid))
spellname = select (1, GetSpellInfo(spellid))
end
wipe (empty_other_values)
@@ -2008,7 +2008,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
LibWindow.MakeDraggable (f)
LibWindow.SavePosition (f)
f:SetScript ("OnMouseDown", function (self, button)
f:SetScript ("OnMouseDown", function(self, button)
if (button == "RightButton") then
f:Hide()
end
@@ -2059,7 +2059,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
f.name = name_textentry
--aura type
local on_select_aura_type = function (_, _, aura_type)
local on_select_aura_type = function(_, _, aura_type)
if (f.UpdateLabels) then
f:UpdateLabels()
end
@@ -2090,7 +2090,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
local AuraTypeBorderColor = {.3, .3, .3, 0.5}
local AuraTypeBorderSelectedColor = {1, 1, 1, 0.4}
local OnSelectAuraType = function (self, fixedParam, auraType, noUpdate)
local OnSelectAuraType = function(self, fixedParam, auraType, noUpdate)
if (type (auraType) == "number") then
if (auraType == 1) then
@@ -2156,7 +2156,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
--trigger list
--target
local on_select_aura_trigger = function (_, _, aura_trigger)
local on_select_aura_trigger = function(_, _, aura_trigger)
if (f.UpdateLabels) then
f:UpdateLabels()
end
@@ -2204,7 +2204,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
{name = "Spell Dispell", value = 42},
}
local SetTriggerState = function (triggerID)
local SetTriggerState = function(triggerID)
for i = 1, #triggerList do
triggerList[i].checkBox:SetValue (false)
if (triggerList[i].value == triggerID) then
@@ -2216,7 +2216,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
f.SetTriggerState = SetTriggerState
f.TriggerList = triggerList
local OnChangeTriggerState = function (self, triggerID, state)
local OnChangeTriggerState = function(self, triggerID, state)
SetTriggerState (triggerID)
aura_on:SetValue (triggerID)
@@ -2276,7 +2276,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
--aura icon
local icon_label = fw:CreateLabel (f, "Icon: ", nil, nil, "GameFontNormal")
local icon_button_func = function (texture)
local icon_button_func = function(texture)
f.IconButton.icon.texture = texture
end
local icon_pick_button = fw:NewButton (f, nil, "$parentIconButton", "IconButton", 20, 20, function() fw:IconPick (icon_button_func, true) end)
@@ -2305,7 +2305,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
stack_slider.tooltip = "Minimum amount of stacks to trigger the aura."
--sound effect
local play_sound = function (self, fixedParam, file)
local play_sound = function(self, fixedParam, file)
if (type (file) == "table") then
PlaySoundFile (file.sound_path, "Master")
else
@@ -2313,10 +2313,10 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
end
end
local sort = function (t1, t2)
local sort = function(t1, t2)
return t1.name < t2.name
end
local titlecase = function (first, rest)
local titlecase = function(first, rest)
return first:upper()..rest:lower()
end
local iconsize = {14, 14}
@@ -2473,7 +2473,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
local folder_texcoord = {435/512, 469/512, 189/512, 241/512}
local folder_iconsize = {14, 14}
local sort_func = function (t1, t2) return t1.label < t2.label end
local sort_func = function(t1, t2) return t1.label < t2.label end
local weakauras_folder_options = function()
local t = {}
+17 -17
View File
@@ -141,7 +141,7 @@ function _detalhes:OpenWelcomeWindow()
local f = CreateFrame ("frame")
local got = false
f:SetScript ("OnUpdate", function (self, elapsed)
f:SetScript ("OnUpdate", function(self, elapsed)
if (not got and not InCombatLockdown()) then
local r = math.random
for i = 1, 2500000 do
@@ -295,7 +295,7 @@ local window_openned_at = time()
skins_image:SetTexCoord (0, 0.41796875, 0, 0.259765625) --0, 0, 214 133
--skin
local onSelectSkin = function (_, _, skin_name)
local onSelectSkin = function(_, _, skin_name)
local instance1 = _detalhes:GetInstance (1)
if (instance1 and instance1:IsEnabled()) then
instance1:ChangeSkin (skin_name)
@@ -340,7 +340,7 @@ local window_openned_at = time()
local allAlphabetCheckBoxes = {}
local allAlphabetLabels = {}
local onSelectAlphabet = function (self, fixedParameter, value)
local onSelectAlphabet = function(self, fixedParameter, value)
if (not value) then
self:SetValue (true)
@@ -488,7 +488,7 @@ local window_openned_at = time()
local buttonWidth = 160
-- create second window button
local new_window = function (self)
local new_window = function(self)
if (#_detalhes.tabela_instancias == 1) then
local newwindow = _detalhes:CreateInstance (true)
newwindow.baseframe:SetPoint ("topleft", _detalhes.tabela_instancias[1].baseframe, "topright", 50, 0)
@@ -510,7 +510,7 @@ local window_openned_at = time()
-- window color
window.editing_window = nil
local windowcolor_callback = function (button, r, g, b, a)
local windowcolor_callback = function(button, r, g, b, a)
local instance = window.editing_window
if (instance.menu_alpha.enabled and a ~= instance.color[4]) then
@@ -562,7 +562,7 @@ local window_openned_at = time()
window.BarHeightSlider:SetPoint ("left", window.BarHeightLabel, "right", 2, 0)
window.BarHeightSlider:SetTemplate (g:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"))
window.BarHeightSlider:SetHook ("OnValueChange", function (self, _, amount)
window.BarHeightSlider:SetHook ("OnValueChange", function(self, _, amount)
local instance1 = Details:GetInstance (1)
local instance2 = Details:GetInstance (2)
@@ -582,7 +582,7 @@ local window_openned_at = time()
window.TextSizeSlider:SetPoint ("left", window.TextSizeLabel, "right", 2, 0)
window.TextSizeSlider:SetTemplate (g:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"))
window.TextSizeSlider:SetHook ("OnValueChange", function (self, _, amount)
window.TextSizeSlider:SetHook ("OnValueChange", function(self, _, amount)
local instance1 = Details:GetInstance (1)
local instance2 = Details:GetInstance (2)
@@ -595,7 +595,7 @@ local window_openned_at = time()
end)
--font
local onSelectFont = function (_, instance, fontName)
local onSelectFont = function(_, instance, fontName)
local instance1 = Details:GetInstance (1)
local instance2 = Details:GetInstance (2)
@@ -613,7 +613,7 @@ local window_openned_at = time()
for name, fontPath in pairs (fontObjects) do
fontTable[#fontTable+1] = {value = name, label = name, icon = font_select_icon, texcoord = font_select_texcoord, onclick = onSelectFont, font = fontPath, descfont = name, desc = Loc ["STRING_MUSIC_DETAILS_ROBERTOCARLOS"]}
end
table.sort (fontTable, function (t1, t2) return t1.label < t2.label end)
table.sort (fontTable, function(t1, t2) return t1.label < t2.label end)
return fontTable
end
@@ -633,7 +633,7 @@ local window_openned_at = time()
window.ShowPercentCheckBox:SetFixedParameter (1)
window.ShowPercentCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.ShowPercentCheckBox.OnSwitch = function (self, fixedParameter, value)
window.ShowPercentCheckBox.OnSwitch = function(self, fixedParameter, value)
local instance1 = Details:GetInstance (1)
local instance2 = Details:GetInstance (2)
@@ -995,7 +995,7 @@ local window_openned_at = time()
window.updatespeedSlider:SetTemplate (g:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"))
window.updatespeedSlider:SetThumbSize (50)
window.updatespeedSlider.useDecimals = true
local updateColor = function (slider, value)
local updateColor = function(slider, value)
if (value < 1) then
slider.amt:SetTextColor (1, value, 0)
elseif (value > 1) then
@@ -1005,7 +1005,7 @@ local window_openned_at = time()
end
end
window.updatespeedSlider:SetHook("OnValueChange", function (self, _, amount)
window.updatespeedSlider:SetHook("OnValueChange", function(self, _, amount)
Details:SetWindowUpdateSpeed(amount)
updateColor(self, amount)
end)
@@ -1023,7 +1023,7 @@ local window_openned_at = time()
--
g:NewSwitch (window, _, "$parentAnimateSlider", "animateSlider", 60, 20, _, _, _detalhes.use_row_animations) -- ltext, rtext, defaultv
window.animateSlider:SetPoint ("left",window.animateLabel, "right", 2, 0)
window.animateSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue (false, true)
window.animateSlider.OnSwitch = function(self, _, value) --> slider, fixedValue, sliderValue (false, true)
_detalhes:SetUseAnimations (value)
end
@@ -1038,7 +1038,7 @@ local window_openned_at = time()
--
g:NewSwitch (window, _, "$parentDpsHpsSlider", "DpsHpsSlider", 60, 20, _, _, _detalhes:GetInstance(1).row_info.fast_ps_update) -- ltext, rtext, defaultv
window.DpsHpsSlider:SetPoint ("left",window.DpsHpsLabel, "right", 2, 0)
window.DpsHpsSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue (false, true)
window.DpsHpsSlider.OnSwitch = function(self, _, value) --> slider, fixedValue, sliderValue (false, true)
_detalhes:GetInstance(1):FastPSUpdate (value)
end
@@ -1053,7 +1053,7 @@ local window_openned_at = time()
--
-- g:NewSlider (window, _, "$parentSlider", "segmentsSlider", 120, 20, 1, 25, 1, _detalhes.segments_amount) -- min, max, step, defaultv
-- window.segmentsSlider:SetPoint ("left", window.segmentsLabel, "right", 2, 0)
-- window.segmentsSlider:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue
-- window.segmentsSlider:SetHook ("OnValueChange", function(self, _, amount) --> slider, fixedValue, sliderValue
-- _detalhes.segments_amount = math.floor (amount)
-- end)
-- window.segmentsSlider.tooltip = Loc ["STRING_WELCOME_22"]
@@ -1283,7 +1283,7 @@ local window_openned_at = time()
bg_string:SetPoint ("right", bookmark_frame, "right", 0, 0)
bg_string:SetPoint ("center", bmf_string, "center", 0, 0)
bookmark_frame:SetScript ("OnMouseDown", function (self, button)
bookmark_frame:SetScript ("OnMouseDown", function(self, button)
if (button == "RightButton") then
_detalhes.switch:ShowMe (instance1)
self:Hide()
@@ -1375,7 +1375,7 @@ local window_openned_at = time()
micro_image1:SetTexCoord (326/512, 1, 85/512, 185/512)
local tooltip_frame = CreateFrame ("frame", nil, window)
tooltip_frame:SetScript ("OnShow", function (self)
tooltip_frame:SetScript ("OnShow", function(self)
_detalhes.tabela_historico:resetar()
created_test_bars = 0
+14 -14
View File
@@ -8,7 +8,7 @@ This is a high level API for Details! Damage Meter
--]=]
--local helpers
local getCombatObject = function (segmentNumber)
local getCombatObject = function(segmentNumber)
local combatObject
--select which segment to use, use low level variables for performance
@@ -23,12 +23,12 @@ local getCombatObject = function (segmentNumber)
return combatObject
end
local getActorObjectFromCombat = function (combatObject, containerID, actorName)
local getActorObjectFromCombat = function(combatObject, containerID, actorName)
local index = combatObject [containerID]._NameIndexTable [actorName]
return combatObject [containerID]._ActorTable [index]
end
local getUnitName = function (unitId)
local getUnitName = function(unitId)
local unitName, serverName = UnitName (unitId)
if (unitName) then
if (serverName and serverName ~= "") then
@@ -42,7 +42,7 @@ local getUnitName = function (unitId)
end
--return the spell object and the spellId
local getSpellObject = function (playerObject, spellId, isLiteral)
local getSpellObject = function(playerObject, spellId, isLiteral)
local parameterType = type (spellId)
if (parameterType == "number" and isLiteral) then
@@ -57,7 +57,7 @@ local getSpellObject = function (playerObject, spellId, isLiteral)
elseif (parameterType == "number") then
--passed a number but with literal off, transform the spellId into a spell name
local spellName = GetSpellInfo (spellid)
local spellName = GetSpellInfo(spellid)
if (spellName) then
passedSpellName = spellName:lower()
end
@@ -65,7 +65,7 @@ local getSpellObject = function (playerObject, spellId, isLiteral)
if (passedSpellName) then
for thisSpellId, spellObject in pairs (playerObject.spells._ActorTable) do
local spellName = Details.GetSpellInfo (thisSpellId)
local spellName = Details.GetSpellInfo(thisSpellId)
if (spellName) then
if (spellName:lower() == passedSpellName) then
return spellObject, thisSpellId
@@ -938,14 +938,14 @@ function Details.UnitDamageSpellInfo (unitId, spellId, isLiteral, segment)
local miscPlayerObject = getActorObjectFromCombat (combatObject, 4, unitName)
if (miscPlayerObject) then
local spellName = GetSpellInfo (spellId)
local spellName = GetSpellInfo(spellId)
local castedAmount = miscPlayerObject.spell_cast and miscPlayerObject.spell_cast [spellId]
if (castedAmount) then
spellInfo.casted = castedAmount
else
for castedSpellId, castedAmount in pairs (miscPlayerObject.spell_cast) do
local castedSpellName = GetSpellInfo (castedSpellId)
local castedSpellName = GetSpellInfo(castedSpellId)
if (castedSpellName == spellName) then
spellInfo.casted = castedAmount
break
@@ -1211,10 +1211,10 @@ function Details.UnitDamageTakenFromSpell (unitId, spellId, isLiteral, segment)
end
end
else
local spellName = GetSpellInfo (spellId) or spellId
local spellName = GetSpellInfo(spellId) or spellId
for i = 1, #damageContainer._ActorTable do
for thisSpellId, spellObject in pairs (damageContainer._ActorTable [i].spells._ActorTable) do
local thisSpellName = GetSpellInfo (thisSpellId)
local thisSpellName = GetSpellInfo(thisSpellId)
if (thisSpellName == spellName) then
totalDamageTaken = totalDamageTaken + (spellObject.targets [unitName] or 0)
end
@@ -1669,14 +1669,14 @@ function Details.UnitHealingSpellInfo (unitId, spellId, isLiteral, segment)
local miscPlayerObject = getActorObjectFromCombat (combatObject, 4, unitName)
if (miscPlayerObject) then
local spellName = GetSpellInfo (spellId)
local spellName = GetSpellInfo(spellId)
local castedAmount = miscPlayerObject.spell_cast and miscPlayerObject.spell_cast [spellId]
if (castedAmount) then
spellInfo.casted = castedAmount
else
for castedSpellId, castedAmount in pairs (miscPlayerObject.spell_cast) do
local castedSpellName = GetSpellInfo (castedSpellId)
local castedSpellName = GetSpellInfo(castedSpellId)
if (castedSpellName == spellName) then
spellInfo.casted = castedAmount
break
@@ -1950,10 +1950,10 @@ function Details.UnitHealingTakenFromSpell (unitId, spellId, isLiteral, segment)
end
end
else
local spellName = GetSpellInfo (spellId) or spellId
local spellName = GetSpellInfo(spellId) or spellId
for i = 1, #healingContainer._ActorTable do
for thisSpellId, spellObject in pairs (healingContainer._ActorTable [i].spells._ActorTable) do
local thisSpellName = GetSpellInfo (thisSpellId)
local thisSpellName = GetSpellInfo(thisSpellId)
if (thisSpellName == spellName) then
totalHealingTaken = totalHealingTaken + (spellObject.targets [unitName] or 0)
end
+2 -2
View File
@@ -105,7 +105,7 @@ function Details:CreateCallbackListeners()
local current_table_bigwigs = {}
local event_frame = CreateFrame ("frame", nil, UIParent, "BackdropTemplate")
event_frame:SetScript ("OnEvent", function (self, event, ...)
event_frame:SetScript ("OnEvent", function(self, event, ...)
if (event == "ENCOUNTER_START") then
local encounterID, encounterName, difficultyID, raidSize = select (1, ...)
current_encounter = encounterID
@@ -142,7 +142,7 @@ function Details:CreateCallbackListeners()
event_frame:RegisterEvent ("PLAYER_REGEN_ENABLED")
if (_G.DBM) then
local dbm_timer_callback = function (bar_type, id, msg, timer, icon, bartype, spellId, colorId, modid)
local dbm_timer_callback = function(bar_type, id, msg, timer, icon, bartype, spellId, colorId, modid)
local spell = tostring (spellId)
if (spell and not current_table_dbm [spell]) then
current_table_dbm [spell] = {spell, id, msg, timer, icon, bartype, spellId, colorId, modid}
+1 -1
View File
@@ -48,7 +48,7 @@
--> register a new buff name
function _detalhes.Buffs:NewBuff (BuffName, BuffId)
if (not BuffName) then
BuffName = GetSpellInfo (BuffId)
BuffName = GetSpellInfo(BuffId)
end
if (_detalhes.Buffs.BuffsTable [BuffName]) then
return false
+9 -9
View File
@@ -23,7 +23,7 @@ detailsOnDeathMenu.warningLabel.textcolor = "red"
detailsOnDeathMenu.warningLabel:SetPoint ("bottomleft", detailsOnDeathMenu, "bottomleft", 5, 2)
detailsOnDeathMenu.warningLabel:Hide()
detailsOnDeathMenu:SetScript ("OnEvent", function (self, event, ...)
detailsOnDeathMenu:SetScript ("OnEvent", function(self, event, ...)
if (event == "ENCOUNTER_END") then
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
end
@@ -130,10 +130,10 @@ detailsOnDeathMenu.breakdownButton.CoolTip = {
end
end, --> called when user mouse over the frame
OnEnterFunc = function (self)
OnEnterFunc = function(self)
detailsOnDeathMenu.button_mouse_over = true
end,
OnLeaveFunc = function (self)
OnLeaveFunc = function(self)
detailsOnDeathMenu.button_mouse_over = false
end,
FixedValue = "none",
@@ -171,10 +171,10 @@ detailsOnDeathMenu.enduranceButton.CoolTip = {
end
end, --> called when user mouse over the frame
OnEnterFunc = function (self)
OnEnterFunc = function(self)
detailsOnDeathMenu.button_mouse_over = true
end,
OnLeaveFunc = function (self)
OnLeaveFunc = function(self)
detailsOnDeathMenu.button_mouse_over = false
end,
FixedValue = "none",
@@ -203,10 +203,10 @@ detailsOnDeathMenu.spellsButton.CoolTip = {
GameCooltip2:AddLine ("Open your player Details! breakdown.")
end, --> called when user mouse over the frame
OnEnterFunc = function (self)
OnEnterFunc = function(self)
detailsOnDeathMenu.button_mouse_over = true
end,
OnLeaveFunc = function (self)
OnLeaveFunc = function(self)
detailsOnDeathMenu.button_mouse_over = false
end,
FixedValue = "none",
@@ -289,7 +289,7 @@ function detailsOnDeathMenu.ShowPanel()
end
end
hooksecurefunc ("StaticPopup_Show", function (which, text_arg1, text_arg2, data, insertedFrame)
hooksecurefunc ("StaticPopup_Show", function(which, text_arg1, text_arg2, data, insertedFrame)
if (which == "DEATH") then
if (detailsOnDeathMenu.Debug) then
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
@@ -297,7 +297,7 @@ hooksecurefunc ("StaticPopup_Show", function (which, text_arg1, text_arg2, data,
end
end)
hooksecurefunc ("StaticPopup_Hide", function (which, data)
hooksecurefunc ("StaticPopup_Hide", function(which, data)
if (which == "DEATH") then
detailsOnDeathMenu:Hide()
end
+7 -7
View File
@@ -5,7 +5,7 @@ local textAlpha = 0.9
local AceLocale = LibStub ("AceLocale-3.0")
local L = AceLocale:GetLocale ( "Details" )
local on_deathrecap_line_enter = function (self)
local on_deathrecap_line_enter = function(self)
if (self.spellid) then
GameTooltip:SetOwner (self, "ANCHOR_RIGHT")
Details:GameTooltipSetSpellByID (self.spellid)
@@ -19,7 +19,7 @@ local on_deathrecap_line_enter = function (self)
end
end
local on_deathrecap_line_leave = function (self)
local on_deathrecap_line_leave = function(self)
GameTooltip:Hide()
self:SetBackdropColor (.3, .3, .3, 0)
self.backgroundTextureOverlay:Hide()
@@ -29,7 +29,7 @@ local on_deathrecap_line_leave = function (self)
self.lifePercent:SetAlpha (textAlpha)
end
local create_deathrecap_line = function (parent, n)
local create_deathrecap_line = function(parent, n)
local line = CreateFrame ("frame", "DetailsDeathRecapLine" .. n, parent, "BackdropTemplate")
line:SetPoint ("topleft", parent, "topleft", 10, (-24 * n) - 17)
line:SetPoint ("topright", parent, "topright", -10, (-24 * n) - 17)
@@ -155,7 +155,7 @@ local create_deathrecap_line = function (parent, n)
return line
end
local OpenDetailsDeathRecapAtSegment = function (segment)
local OpenDetailsDeathRecapAtSegment = function(segment)
Details.OpenDetailsDeathRecap (segment, RecapID)
end
@@ -393,7 +393,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
for i = #events, 1, -1 do
tinsert (BiggestDamageHits, events [i])
end
table.sort (BiggestDamageHits, function (t1, t2)
table.sort (BiggestDamageHits, function(t1, t2)
return t1[3] > t2[3]
end)
for i = #BiggestDamageHits, 1, -1 do
@@ -460,7 +460,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
end
end
table.sort (BiggestDamageHits, function (t1, t2)
table.sort (BiggestDamageHits, function(t1, t2)
return t1[4] > t2[4]
end)
@@ -475,7 +475,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
local evType = event [1]
local hp = min (floor (event [5] / maxHP * 100), 100)
local spellName, _, spellIcon = Details.GetSpellInfo (event [2])
local spellName, _, spellIcon = Details.GetSpellInfo(event [2])
local amount = event [3]
local eventTime = event [4]
local source = event [6]
+8 -8
View File
@@ -28,7 +28,7 @@ function mythicDungeonCharts:Debug (...)
end
end
local addPlayerDamage = function (unitName, unitRealm)
local addPlayerDamage = function(unitName, unitRealm)
--get the combatlog name
local CLName
@@ -134,7 +134,7 @@ local addPlayerDamage = function (unitName, unitRealm)
end
end
local tickerCallback = function (tickerObject)
local tickerCallback = function(tickerObject)
--check if is inside the dungeon
local inInstance = IsInInstance();
@@ -319,7 +319,7 @@ function mythicDungeonCharts.ShowReadyPanel()
f.DiscartButton:SetPoint ("right", f.ShowButton, "left", -5, 0)
--disable feature check box (dont show this again)
local on_switch_enable = function (self, _, value)
local on_switch_enable = function(self, _, value)
_detalhes.mythic_plus.show_damage_graphic = not value
end
local notAgainSwitch, notAgainLabel = DetailsFramework:CreateSwitch (f, on_switch_enable, not _detalhes.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, Loc ["STRING_MINITUTORIAL_BOOKMARK4"], DetailsFramework:GetTemplate ("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft")
@@ -502,7 +502,7 @@ function mythicDungeonCharts.ShowChart()
end)
--> replace the default click function
local minimize_func = function (self)
local minimize_func = function(self)
if (f.IsMinimized) then
f.IsMinimized = false
fMinimized:Hide()
@@ -523,7 +523,7 @@ function mythicDungeonCharts.ShowChart()
--enabled box
-- /run _G.DetailsMythicDungeonChartHandler.ShowChart(); DetailsMythicDungeonChartFrame.ShowChartFrame()
local on_switch_enable = function (_, _, state)
local on_switch_enable = function(_, _, state)
_detalhes.mythic_plus.show_damage_graphic = state
end
local enabledSwitch, enabledLabel = Details.gump:CreateSwitch (f, on_switch_enable, _detalhes.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, "Enabled", Details.gump:GetTemplate ("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft")
@@ -698,14 +698,14 @@ function mythicDungeonCharts.ShowChart()
end
local showID = 0
local HideTooltip = function (ticker)
local HideTooltip = function(ticker)
if (showID == ticker.ShowID) then
GameCooltip2:Hide()
mythicDungeonCharts.Frame.BossWidgetsFrame.GraphPin:Hide()
mythicDungeonCharts.Frame.BossWidgetsFrame.GraphPinGlow:Hide()
end
end
local PixelFrameOnEnter = function (self)
local PixelFrameOnEnter = function(self)
local playerName = self.PlayerName
--get the percent from the pixel height relative to the chart window
local dps = self.Height / mythicDungeonCharts.Frame.ChartFrame:GetHeight()
@@ -731,7 +731,7 @@ local PixelFrameOnEnter = function (self)
GameCooltip2:Show()
showID = showID + 1
end
local PixelFrameOnLeave = function (self)
local PixelFrameOnLeave = function(self)
local timer = C_Timer.NewTimer (1, HideTooltip)
timer.ShowID = showID
end
+2 -2
View File
@@ -238,7 +238,7 @@ local common_events = {
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> internal functions
local dispatch_error = function (name, errortext)
local dispatch_error = function(name, errortext)
_detalhes:Msg ((name or "<no context>"), " |cFFFF9900error|r: ", errortext)
end
@@ -323,7 +323,7 @@ local common_events = {
end
end
--if no function (only registred the event) sent the event to OnDetailsEvent
--if no function(only registred the event) sent the event to OnDetailsEvent
else
if (PluginObject.Enabled and PluginObject.__enabled) then
_detalhes:QuickDispatchEventWithContext (PluginObject, PluginObject.OnDetailsEvent, event, ...)
+1 -1
View File
@@ -40,7 +40,7 @@ function immersionFrame.CheckIfCanEnableImmersion()
end
--check events
immersionFrame:SetScript("OnEvent", function (_, event, ...)
immersionFrame:SetScript("OnEvent", function(_, event, ...)
if (event == "ZONE_CHANGED_NEW_AREA") then
C_Timer.After(3, immersionFrame.CheckIfCanEnableImmersion)
end
+1 -1
View File
@@ -814,7 +814,7 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent (contextObject, eve
end
end
DetailsMythicPlusFrame:SetScript ("OnEvent", function (_, event, ...)
DetailsMythicPlusFrame:SetScript ("OnEvent", function(_, event, ...)
if (event == "START_TIMER") then
DetailsMythicPlusFrame.LastTimer = GetTime()
+2 -2
View File
@@ -18,7 +18,7 @@ PLATER_DPS_SAMPLE_SIZE = CONST_BUFFER_SIZE * CONST_REALTIME_UPDATE_TIME
plater_integration_frame.OnTickFrame = CreateFrame ("frame", "DetailsPlaterFrameOnTicker", UIParent, "BackdropTemplate")
--> on tick function
plater_integration_frame.OnTickFrameFunc = function (self, deltaTime)
plater_integration_frame.OnTickFrameFunc = function(self, deltaTime)
if (self.NextUpdate < 0) then
for targetGUID, damageTable in pairs (plater_integration_frame.DamageTaken) do
@@ -96,7 +96,7 @@ function plater_integration_frame.AddDamageToGUID (sourceGUID, targetGUID, time,
end
end
plater_integration_frame:SetScript ("OnEvent", function (self)
plater_integration_frame:SetScript ("OnEvent", function(self)
local time, token, hidding, sourceGUID, sourceName, sourceFlag, sourceFlag2, targetGUID, targetName, targetFlag, targetFlag2, spellID, spellName, spellType, amount, overKill, school, resisted, blocked, absorbed, isCritical = CombatLogGetCurrentEventInfo()
--> tamage taken by the GUID unit
+1 -1
View File
@@ -203,7 +203,7 @@ function _detalhes:CreatePanicWarning()
_detalhes.instance_load_failed:SetPoint ("topright", UIParent, "topright", 0, -250)
end
local safe_load = function (func, param1, ...)
local safe_load = function(func, param1, ...)
local okey, errortext = pcall (func, param1, ...)
if (not okey) then
if (not _detalhes.instance_load_failed) then
+1 -1
View File
@@ -56,7 +56,7 @@
--> install default animations
do
local fade_func = function (row, state)
local fade_func = function(row, state)
if (state) then
Details.FadeHandler.Fader (row, "out")
else
+8 -8
View File
@@ -525,7 +525,7 @@ local _
},
},
callback = function (skin, instance, just_updating)
callback = function(skin, instance, just_updating)
--none
end,
@@ -748,7 +748,7 @@ local _
["bg_b"] = 0.0941,
},
callback = function (skin, instance, just_updating)
callback = function(skin, instance, just_updating)
--none
end,
@@ -1110,7 +1110,7 @@ local _
right_corner_anchor_bottom = {96, 0},
--[[ callback function execute after all changes on the window, first argument is this skin table, second is the instance where the skin was applied --]]
callback = function (self, instance) end,
callback = function(self, instance) end,
--[[ control_script is a OnUpdate script, it start right after all changes on the window and also after the callback --]]
--[[ control_script_on_start run before the control_script, use it to reset values if needed --]]
control_script_on_start = nil,
@@ -1372,7 +1372,7 @@ local _
right_corner_anchor_bottom = {96, 0},
--[[ callback function execute after all changes on the window, first argument is this skin table, second is the instance where the skin was applied --]]
callback = function (self, instance) end,
callback = function(self, instance) end,
--[[ control_script is a OnUpdate script, it start right after all changes on the window and also after the callback --]]
--[[ control_script_on_start run before the control_script, use it to reset values if needed --]]
control_script_on_start = nil,
@@ -1623,7 +1623,7 @@ local _
right_corner_anchor_bottom = {96, 0},
--[[ callback function execute after all changes on the window, first argument is this skin table, second is the instance where the skin was applied --]]
callback = function (self, instance) end,
callback = function(self, instance) end,
--[[ control_script is a OnUpdate script, it start right after all changes on the window and also after the callback --]]
--[[ control_script_on_start run before the control_script, use it to reset values if needed --]]
control_script_on_start = nil,
@@ -1811,7 +1811,7 @@ local _
right_corner_anchor_bottom = {95, 0},
--[[ callback function execute after all changes on the window, first argument is this skin table, second is the instance where the skin was applied --]]
callback = function (self, instance) end,
callback = function(self, instance) end,
--[[ control_script is a OnUpdate script, it start right after all changes on the window and also after the callback --]]
--[[ control_script_on_start run before the control_script, use it to reset values if needed --]]
control_script_on_start = nil,
@@ -2509,7 +2509,7 @@ local _
["bars_inverted"] = false,
},
callback = function (skin, instance, just_updating)
callback = function(skin, instance, just_updating)
--none
end,
@@ -2793,7 +2793,7 @@ local _
["bars_sort_direction"] = 1,
},
callback = function (skin, instance, just_updating)
callback = function(skin, instance, just_updating)
--none
end,
+11 -11
View File
@@ -674,7 +674,7 @@ function SlashCmdList.DETAILS (msg, editbox)
if (playerActor and playerActor.buff_uptime_spells and playerActor.buff_uptime_spells._ActorTable) then
for spellid, spellTable in pairs (playerActor.buff_uptime_spells._ActorTable) do
local spellname = GetSpellInfo (spellid)
local spellname = GetSpellInfo(spellid)
if (spellname) then
print (spellid, spellname, spellTable.uptime)
end
@@ -692,7 +692,7 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "imageedit") then
local callback = function (width, height, overlayColor, alpha, texCoords)
local callback = function(width, height, overlayColor, alpha, texCoords)
print (width, height, alpha)
print ("overlay: ", unpack (overlayColor))
print ("crop: ", unpack (texCoords))
@@ -798,7 +798,7 @@ function SlashCmdList.DETAILS (msg, editbox)
Details.id_frame.texto:SetText ("")
Details.id_frame.texto.perdeu_foco = nil
Details.id_frame.texto:SetScript ("OnEnterPressed", function ()
Details.id_frame.texto:SetScript ("OnEnterPressed", function()
Details.id_frame.texto:ClearFocus()
Details.id_frame:Hide()
end)
@@ -855,7 +855,7 @@ function SlashCmdList.DETAILS (msg, editbox)
_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:SetScript ("OnEnterPressed", function()
_detalhes.id_frame.texto:ClearFocus()
_detalhes.id_frame:Hide()
end)
@@ -1300,7 +1300,7 @@ function SlashCmdList.DETAILS (msg, editbox)
-- https://www.dropbox.com/s/ulyeqa2z0ummlu7/1024.tga?dl=0
local time = 0
a:SetScript ("OnUpdate", function (self, deltaTime)
a:SetScript ("OnUpdate", function(self, deltaTime)
time = time + deltaTime
--texture:SetSize (math.random (50, 300), math.random (50, 300))
@@ -1318,7 +1318,7 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "alert") then
--local instancia = _detalhes.tabela_instancias [1]
local f = function (a, b, c, d, e, f, g) print (a, b, c, d, e, f, g) end
local f = function(a, b, c, d, e, f, g) print (a, b, c, d, e, f, g) end
--instancia:InstanceAlert (Loc ["STRING_PLEASE_WAIT"], {[[Interface\COMMON\StreamCircle]], 22, 22, true}, 5, {f, 1, 2, 3, 4, 5})
local lower_instance = _detalhes:GetLowerInstanceNumber()
@@ -1796,7 +1796,7 @@ function Details:UpdateUserPanel (usersTable)
DetailsUserPanel.Header = DetailsFramework:CreateHeader (DetailsUserPanel, headerTable, headerOptions)
DetailsUserPanel.Header:SetPoint ("topleft", DetailsUserPanel, "topleft", 5, headerY)
local scroll_refresh = function (self, data, offset, total_lines)
local scroll_refresh = function(self, data, offset, total_lines)
--store user names shown
local userShown = {}
@@ -1819,7 +1819,7 @@ function Details:UpdateUserPanel (usersTable)
end
end
local lineOnEnter = function (self)
local lineOnEnter = function(self)
if (self.IsCritical) then
self:SetBackdropColor (unpack (backdrop_color_is_critical_on_enter))
else
@@ -1827,7 +1827,7 @@ function Details:UpdateUserPanel (usersTable)
end
end
local lineOnLeave = function (self)
local lineOnLeave = function(self)
if (self.IsCritical) then
self:SetBackdropColor (unpack (backdrop_color_is_critical))
else
@@ -1837,7 +1837,7 @@ function Details:UpdateUserPanel (usersTable)
GameTooltip:Hide()
end
local scroll_createline = function (self, index)
local scroll_createline = function(self, index)
local line = CreateFrame ("button", "$parentLine" .. index, self, "BackdropTemplate")
line:SetPoint ("topleft", self, "topleft", 3, -((index-1)*(scroll_line_height+1)) - 1)
line:SetSize (scroll_width - 2, scroll_line_height)
@@ -1873,7 +1873,7 @@ function Details:UpdateUserPanel (usersTable)
end
local usersScroll = DetailsFramework:CreateScrollBox (DetailsUserPanel, "$parentUsersScroll", scroll_refresh, DetailsUserPanel.Data, scroll_width, scroll_height, scroll_lines, scroll_line_height)
DetailsFramework:ReskinSlider (usersScroll)
DetailsFramework:ReskinSlider(usersScroll)
usersScroll:SetPoint ("topleft", DetailsUserPanel, "topleft", 5, scrollY)
Details.UserPanel.ScrollBox = usersScroll
+32 -32
View File
@@ -49,7 +49,7 @@ do
spellIcon = [[Interface\ICONS\INV_Weapon_Bow_07]]
else
spellName, _, spellIcon = GetSpellInfo (spell)
spellName, _, spellIcon = GetSpellInfo(spell)
end
if (not spellName) then
@@ -62,7 +62,7 @@ do
--> reset spell cache
function _detalhes:ClearSpellCache()
_detalhes.spellcache = _setmetatable ({},
{__index = function (tabela, valor)
{__index = function(tabela, valor)
local esta_magia = _rawget (tabela, valor)
if (esta_magia) then
return esta_magia
@@ -74,7 +74,7 @@ do
if (is_classic_exp) then
cache = {GetSpellInfoClassic(valor)}
else
cache = {_GetSpellInfo (valor)}
cache = {_GetSpellInfo(valor)}
end
tabela [valor] = cache
return cache
@@ -90,7 +90,7 @@ do
--> built-in overwrites
for spellId, spellTable in pairs (_detalhes.SpellOverwrite) do
local name, _, icon = _GetSpellInfo (spellId)
local name, _, icon = _GetSpellInfo(spellId)
_rawset (_detalhes.spellcache, spellId, {spellTable.name or name, 1, spellTable.icon or icon})
end
@@ -101,7 +101,7 @@ do
end
end
local lightOfTheMartyr_Name, _, lightOfTheMartyr_Icon = _GetSpellInfo (196917)
local lightOfTheMartyr_Name, _, lightOfTheMartyr_Icon = _GetSpellInfo(196917)
lightOfTheMartyr_Name = lightOfTheMartyr_Name or "Deprecated Spell - Light of the Martyr"
lightOfTheMartyr_Icon = lightOfTheMartyr_Icon or ""
@@ -154,30 +154,30 @@ do
[7] = {name = Loc ["STRING_ENVIRONMENTAL_LAVA"], icon = [[Interface\ICONS\Ability_Rhyolith_Volcano]]},
[8] = {name = Loc ["STRING_ENVIRONMENTAL_SLIME"], icon = [[Interface\ICONS\Ability_Creature_Poison_02]]},
[98021] = {name = Loc ["STRING_SPIRIT_LINK_TOTEM"]},
[108271] = {name = GetSpellInfo (108271), icon = "Interface\\Addons\\Details\\images\\icon_astral_shift"},
[108271] = {name = GetSpellInfo(108271), icon = "Interface\\Addons\\Details\\images\\icon_astral_shift"},
[196917] = {name = lightOfTheMartyr_Name .. " (" .. Loc ["STRING_DAMAGE"] .. ")", icon = lightOfTheMartyr_Icon},
--> bfa trinkets (deprecated)
[278155] = {name = GetSpellInfo (278155) .. " (Trinket)"}, --[Twitching Tentacle of Xalzaix]
[279664] = {name = GetSpellInfo (279664) .. " (Trinket)"}, --[Vanquished Tendril of G'huun]
[278227] = {name = GetSpellInfo (278227) .. " (Trinket)"}, --[T'zane's Barkspines]
[278383] = {name = GetSpellInfo (278383) .. " (Trinket)"}, --[Azurethos' Singed Plumage]
[278862] = {name = GetSpellInfo (278862) .. " (Trinket)"}, --[Drust-Runed Icicle]
[278359] = {name = GetSpellInfo (278359) .. " (Trinket)"}, --[Doom's Hatred]
[278812] = {name = GetSpellInfo (278812) .. " (Trinket)"}, --[Lion's Grace]
[270827] = {name = GetSpellInfo (270827) .. " (Trinket)"}, --[Vessel of Skittering Shadows]
[271071] = {name = GetSpellInfo (271071) .. " (Trinket)"}, --[Conch of Dark Whispers]
[270925] = {name = GetSpellInfo (270925) .. " (Trinket)"}, --[Hadal's Nautilus]
[271115] = {name = GetSpellInfo (271115) .. " (Trinket)"}, --[Ignition Mage's Fuse]
[271462] = {name = GetSpellInfo (271462) .. " (Trinket)"}, --[Rotcrusted Voodoo Doll]
[271465] = {name = GetSpellInfo (271465) .. " (Trinket)"}, --[Rotcrusted Voodoo Doll]
[268998] = {name = GetSpellInfo (268998) .. " (Trinket)"}, --[Balefire Branch]
[271671] = {name = GetSpellInfo (271671) .. " (Trinket)"}, --[Lady Waycrest's Music Box]
[277179] = {name = GetSpellInfo (277179) .. " (Trinket)"}, --[Dread Gladiator's Medallion]
[277187] = {name = GetSpellInfo (277187) .. " (Trinket)"}, --[Dread Gladiator's Emblem]
[277181] = {name = GetSpellInfo (277181) .. " (Trinket)"}, --[Dread Gladiator's Insignia]
[277185] = {name = GetSpellInfo (277185) .. " (Trinket)"}, --[Dread Gladiator's Badge]
[278057] = {name = GetSpellInfo (278057) .. " (Trinket)"}, --[Vigilant's Bloodshaper]
[278155] = {name = GetSpellInfo(278155) .. " (Trinket)"}, --[Twitching Tentacle of Xalzaix]
[279664] = {name = GetSpellInfo(279664) .. " (Trinket)"}, --[Vanquished Tendril of G'huun]
[278227] = {name = GetSpellInfo(278227) .. " (Trinket)"}, --[T'zane's Barkspines]
[278383] = {name = GetSpellInfo(278383) .. " (Trinket)"}, --[Azurethos' Singed Plumage]
[278862] = {name = GetSpellInfo(278862) .. " (Trinket)"}, --[Drust-Runed Icicle]
[278359] = {name = GetSpellInfo(278359) .. " (Trinket)"}, --[Doom's Hatred]
[278812] = {name = GetSpellInfo(278812) .. " (Trinket)"}, --[Lion's Grace]
[270827] = {name = GetSpellInfo(270827) .. " (Trinket)"}, --[Vessel of Skittering Shadows]
[271071] = {name = GetSpellInfo(271071) .. " (Trinket)"}, --[Conch of Dark Whispers]
[270925] = {name = GetSpellInfo(270925) .. " (Trinket)"}, --[Hadal's Nautilus]
[271115] = {name = GetSpellInfo(271115) .. " (Trinket)"}, --[Ignition Mage's Fuse]
[271462] = {name = GetSpellInfo(271462) .. " (Trinket)"}, --[Rotcrusted Voodoo Doll]
[271465] = {name = GetSpellInfo(271465) .. " (Trinket)"}, --[Rotcrusted Voodoo Doll]
[268998] = {name = GetSpellInfo(268998) .. " (Trinket)"}, --[Balefire Branch]
[271671] = {name = GetSpellInfo(271671) .. " (Trinket)"}, --[Lady Waycrest's Music Box]
[277179] = {name = GetSpellInfo(277179) .. " (Trinket)"}, --[Dread Gladiator's Medallion]
[277187] = {name = GetSpellInfo(277187) .. " (Trinket)"}, --[Dread Gladiator's Emblem]
[277181] = {name = GetSpellInfo(277181) .. " (Trinket)"}, --[Dread Gladiator's Insignia]
[277185] = {name = GetSpellInfo(277185) .. " (Trinket)"}, --[Dread Gladiator's Badge]
[278057] = {name = GetSpellInfo(278057) .. " (Trinket)"}, --[Vigilant's Bloodshaper]
}
end
@@ -204,7 +204,7 @@ do
local t = _detalhes.savedCustomSpells[index]
if (t) then
local spellid = t [1]
local name, _, icon = _GetSpellInfo (spellid)
local name, _, icon = _GetSpellInfo(spellid)
if (defaultSpellCustomization [spellid]) then
name = defaultSpellCustomization [spellid].name
@@ -236,7 +236,7 @@ do
end
if (not already_have) then
local name, _, icon = GetSpellInfo (spellid)
local name, _, icon = GetSpellInfo(spellid)
_detalhes:UserCustomSpellAdd (spellid, t.name or name or "Unknown", t.icon or icon or [[Interface\InventoryItems\WoWUnknownItem01]])
end
@@ -246,7 +246,7 @@ do
local spelltable = _detalhes.savedCustomSpells [i]
local spellid = spelltable [1]
if (spellid > 10) then
local exists = _GetSpellInfo (spellid)
local exists = _GetSpellInfo(spellid)
if (not exists) then
tremove (_detalhes.savedCustomSpells, i)
end
@@ -274,7 +274,7 @@ do
local t = _detalhes.savedCustomSpells [index]
if (t) then
local spellid = t [1]
local name, _, icon = _GetSpellInfo (spellid)
local name, _, icon = _GetSpellInfo(spellid)
if (name) then
_rawset (_detalhes.spellcache, spellid, {name, 1, icon})
end
@@ -286,12 +286,12 @@ do
--> overwrite for API GetSpellInfo function
_detalhes.getspellinfo = function (spellid) return _unpack (_detalhes.spellcache[spellid]) end
_detalhes.getspellinfo = function(spellid) return _unpack (_detalhes.spellcache[spellid]) end
_detalhes.GetSpellInfo = _detalhes.getspellinfo
--> overwrite SpellInfo if the spell is a DoT, so Details.GetSpellInfo will return the name modified
function _detalhes:SpellIsDot (spellid)
local spellName, rank, spellIcon = _GetSpellInfo (spellid)
local spellName, rank, spellIcon = _GetSpellInfo(spellid)
if (spellName) then
_rawset (_detalhes.spellcache, spellid, {spellName .. Loc ["STRING_DOT"], rank, spellIcon})
+2 -2
View File
@@ -3902,7 +3902,7 @@ do
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
_detalhes.SpellOverwrite = {
--[124464] = {name = GetSpellInfo (124464) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> shadow word: pain mastery proc (priest)
--[124464] = {name = GetSpellInfo(124464) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> shadow word: pain mastery proc (priest)
}
_detalhes.spells_school = {
@@ -3971,7 +3971,7 @@ local MiscContainerNames = {
"cc_break_spells",
"ress_spells",
}
local SplitLoadFunc = function (self, deltaTime)
local SplitLoadFunc = function(self, deltaTime)
--which container it will iterate on this tick
local container = Details.tabela_vigente and Details.tabela_vigente [SplitLoadFrame.NextActorContainer] and Details.tabela_vigente [SplitLoadFrame.NextActorContainer]._ActorTable
+10 -8
View File
@@ -32,15 +32,17 @@ end
function Details:CreateTestBars (alphabet, isArena)
local current_combat = Details:GetCombat ("current")
local pclass = select (2, UnitClass ("player"))
local actors_name = {
{"Spiro", "EVOKER"},
{"Spiro", "EVOKER"},
{"Spiro", "EVOKER"},
{"Spiro", "EVOKER"},
{"Spiro", "EVOKER"},
{"Spiro", "EVOKER"},
{"Drakaris", "EVOKER"},
{"Spiro", "EVOKER", 1467},
{"Spiro", "EVOKER", 1467},
{"Spiro", "EVOKER", 1467},
{"Spiro", "EVOKER", 1467},
{"Spiro", "EVOKER", 1468},
{"Spiro", "EVOKER", 1468},
{"Spiro", "EVOKER", 1468},
{"Spiro", "EVOKER", 1468},
{"Drakaris", "EVOKER", 1468},
{"Ragnaros", "MAGE", 63},
{"The Lich King", "DEATHKNIGHT", },
{"Your Neighbor", "SHAMAN", },
+1 -1
View File
@@ -214,7 +214,7 @@
return data_captured
end
local exec_user_func = function (func, attributes, data, this_second)
local exec_user_func = function(func, attributes, data, this_second)
local okey, result = _pcall (func, attributes)
if (not okey) then
Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

@@ -17,7 +17,7 @@ local f = CreateFrame ("frame", nil, UIParent)
f:Hide()
f:RegisterEvent ("ADDON_LOADED")
f:SetScript ("OnEvent", function (self, event, addonName)
f:SetScript ("OnEvent", function(self, event, addonName)
if (addonName == "Details_DataStorage") then
@@ -52,7 +52,7 @@ local class_type_misc = _detalhes.atributos.misc --> misc
--> main combat object
local _combat_object
local sort_by_name = function (t1, t2) return t1.nome < t2.nome end
local sort_by_name = function(t1, t2) return t1.nome < t2.nome end
local CLASS_ICON_TCOORDS = _G.CLASS_ICON_TCOORDS
@@ -132,7 +132,7 @@ local function CreatePluginFrames (data)
EncounterDetails:WasEncounter()
end
local damage_done_func = function (support_table, time_table, tick_second)
local damage_done_func = function(support_table, time_table, tick_second)
local current_total_damage = _detalhes.tabela_vigente.totals_grupo[1]
local current_damage = current_total_damage - support_table.last_damage
time_table [tick_second] = current_damage
@@ -273,7 +273,7 @@ local function CreatePluginFrames (data)
local current_table_bigwigs = {}
local event_frame = CreateFrame ("frame", nil, UIParent, "BackdropTemplate")
event_frame:SetScript ("OnEvent", function (self, event, ...)
event_frame:SetScript ("OnEvent", function(self, event, ...)
if (event == "ENCOUNTER_START") then
local encounterID, encounterName, difficultyID, raidSize = select (1, ...)
current_encounter = encounterID
@@ -316,7 +316,7 @@ local function CreatePluginFrames (data)
--EncounterDetails.DBM_timers
if (_G.DBM) then
local dbm_timer_callback = function (bar_type, id, msg, timer, icon, bartype, spellId, colorId, modid)
local dbm_timer_callback = function(bar_type, id, msg, timer, icon, bartype, spellId, colorId, modid)
--print (bar_type, id, msg, timer, icon, bartype, spellId, colorId, modid)
local spell = tostring (spellId)
if (spell and not current_table_dbm [spell]) then
@@ -591,7 +591,7 @@ local function CreatePluginFrames (data)
end
local sort_damage_from = function (a, b)
local sort_damage_from = function(a, b)
if (a[3] ~= "PET" and b[3] ~= "PET") then
return a[2] > b[2]
elseif (a[3] == "PET" and b[3] ~= "PET") then
@@ -638,7 +638,7 @@ end
end
local evtype = event [1]
local spellname, _, spellicon = _GetSpellInfo (event [2])
local spellname, _, spellicon = _GetSpellInfo(event [2])
local amount = event [3]
local time = event [4]
local source = event [6]
@@ -714,7 +714,7 @@ end
GameCooltip:AddStatusBar (0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
if (battleress) then
local nome_magia, _, icone_magia = _GetSpellInfo (battleress [2])
local nome_magia, _, icone_magia = _GetSpellInfo(battleress [2])
GameCooltip:AddLine ("+" .. _cstr ("%.1f", battleress[4] - hora_da_morte) .. "s " .. nome_magia .. " (" .. battleress[6] .. ")", "", 1, "white")
GameCooltip:AddIcon ("Interface\\Glues\\CharacterSelect\\Glues-AddOn-Icons", 1, 1, nil, nil, .75, 1, 0, 1)
GameCooltip:AddStatusBar (0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
@@ -722,7 +722,7 @@ end
if (lastcooldown) then
if (lastcooldown[3] == 1) then
local nome_magia, _, icone_magia = _GetSpellInfo (lastcooldown [2])
local nome_magia, _, icone_magia = _GetSpellInfo(lastcooldown [2])
GameCooltip:AddLine (_cstr ("%.1f", lastcooldown[4] - hora_da_morte) .. "s " .. nome_magia .. " (" .. Loc ["STRING_LAST_COOLDOWN"] .. ")")
GameCooltip:AddIcon (icone_magia)
else
@@ -776,10 +776,10 @@ local function DispellInfo (dispell, barra)
end
end
local spellname = GetSpellInfo (barra.spellid)
local spellname = GetSpellInfo(barra.spellid)
if (spellname) then
GameTooltip:SetOwner (GameCooltipFrame1, "ANCHOR_NONE")
GameTooltip:SetSpellByID (barra.spellid)
GameTooltip:SetSpellByID(barra.spellid)
GameTooltip:SetPoint ("topright", GameCooltipFrame1, "topleft", -2, 0)
GameTooltip:Show()
end
@@ -798,7 +798,7 @@ local function KickBy (magia, barra)
_table_sort (tabela_jogadores, _detalhes.Sort2)
local spellName, _, spellIcon = GetSpellInfo (barra.lineText1:GetText())
local spellName, _, spellIcon = GetSpellInfo(barra.lineText1:GetText())
GameCooltip:AddLine (barra.lineText1:GetText())
if (spellIcon) then
GameCooltip:AddIcon (spellIcon, nil, 1, EncounterDetails.CooltipLineHeight, EncounterDetails.CooltipLineHeight, 5/64, 59/64, 5/64, 59/64)
@@ -819,10 +819,10 @@ local function KickBy (magia, barra)
GameCooltip:AddStatusBar (100, 1, .3, .3, .3, .3, false, false, false)
end
local spellname = GetSpellInfo (barra.spellid)
local spellname = GetSpellInfo(barra.spellid)
if (spellname) then
GameTooltip:SetOwner (GameCooltipFrame1, "ANCHOR_NONE")
GameTooltip:SetSpellByID (barra.spellid)
GameTooltip:SetSpellByID(barra.spellid)
GameTooltip:SetPoint ("topright", GameCooltipFrame1, "topleft", -2, 0)
GameTooltip:Show()
end
@@ -878,10 +878,10 @@ local function EnemySkills (habilidade, barra)
end
end
local spellname = GetSpellInfo (barra.spellid)
local spellname = GetSpellInfo(barra.spellid)
if (spellname) then
GameTooltip:SetOwner (GameCooltipFrame1, "ANCHOR_NONE")
GameTooltip:SetSpellByID (barra.spellid)
GameTooltip:SetSpellByID(barra.spellid)
GameTooltip:SetPoint ("right", barra, "left", -2, 0)
GameTooltip:Show()
end
@@ -930,7 +930,7 @@ local function DamageTakenDetails (jogador, barra)
local topDamage = meus_agressores[1] and meus_agressores[1][2]
for i = 1, max do
local nome_magia, _, icone_magia = _GetSpellInfo (meus_agressores[i][1])
local nome_magia, _, icone_magia = _GetSpellInfo(meus_agressores[i][1])
if (meus_agressores[i][1] == 1) then
nome_magia = "*"..meus_agressores[i][3]
@@ -1016,7 +1016,7 @@ local backdrop_bar_onleave = {bgFile = [[Interface\AddOns\Details\images\backgro
function EncounterDetails:SetRowScripts (barra, index, container)
barra:SetScript ("OnMouseDown", function (self)
barra:SetScript ("OnMouseDown", function(self)
if (self.fading_in) then
return
end
@@ -1031,7 +1031,7 @@ function EncounterDetails:SetRowScripts (barra, index, container)
end)
barra:SetScript ("OnMouseUp", function (self)
barra:SetScript ("OnMouseUp", function(self)
if (self.fading_in) then
return
@@ -1053,7 +1053,7 @@ function EncounterDetails:SetRowScripts (barra, index, container)
end)
barra:SetScript ("OnEnter", --> MOUSE OVER
function (self)
function(self)
--> aqui 1
if (container.fading_in or container.faded) then
return
@@ -1096,7 +1096,7 @@ function EncounterDetails:SetRowScripts (barra, index, container)
end)
barra:SetScript ("OnLeave", --> MOUSE OUT
function (self)
function(self)
self:SetScript ("OnUpdate", nil)
@@ -1525,7 +1525,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
barra.t:SetVertexColor (1, .8, .8, .8)
end
local nome_magia, _, icone_magia = _GetSpellInfo (habilidade[4])
local nome_magia, _, icone_magia = _GetSpellInfo(habilidade[4])
barra.lineText1:SetText (nome_magia) -- .. " (|cFFa0a0a0" .. habilidade[4] .. "|r)
barra.lineText4:SetText (ToK (_, habilidade[1]))
@@ -1905,7 +1905,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
local spellid = tabela [3]
local nome_magia, _, icone_magia = _GetSpellInfo (tabela [3])
local nome_magia, _, icone_magia = _GetSpellInfo(tabela [3])
local successful = 0
--> pegar quantas vezes a magia passou com sucesso.
for _, enemy_actor in _ipairs (DamageContainer._ActorTable) do
@@ -2017,7 +2017,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
barra:SetWidth (160)
end
local nome_magia, _, icone_magia = _GetSpellInfo (tabela [3])
local nome_magia, _, icone_magia = _GetSpellInfo(tabela [3])
barra.lineText1:SetText (nome_magia)
barra.lineText4:SetText (tabela [2])
@@ -2129,7 +2129,7 @@ local events_to_track = {
}
local enemy_spell_pool
local CLEvents = function (self, event)
local CLEvents = function(self, event)
local time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, school, aura_type = CombatLogGetCurrentEventInfo()
+63 -63
View File
@@ -36,7 +36,7 @@ do
backdropbordercolor = {.9, .7, 0, 1},
}
local set_backdrop = function (frame)
local set_backdrop = function(frame)
frame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tileSize = 64, tile = true})
frame:SetBackdropColor (0, 0, 0, .2)
frame:SetBackdropBorderColor (0, 0, 0, 1)
@@ -46,14 +46,14 @@ do
local BGColorDefault_Hover = {0.5, 0.5, 0.5, 0.7}
local BackdropDefault = {bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}
_detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
_detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
--> options panel
EncounterDetails.SetBarBackdrop_OnEnter = function (self)
EncounterDetails.SetBarBackdrop_OnEnter = function(self)
self:SetBackdropColor (unpack (BGColorDefault_Hover))
end
EncounterDetails.SetBarBackdrop_OnLeave = function (self)
EncounterDetails.SetBarBackdrop_OnLeave = function(self)
self:SetBackdropColor (unpack (BGColorDefault))
end
@@ -84,7 +84,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
-- 4 = always show
-- 5 = automatic show when have at least 1 encounter with boss
local set = function (_, _, value)
local set = function(_, _, value)
EncounterDetails.db.show_icon = value
if (value == 1) then
if (EncounterDetails:GetZoneType() == "raid") then
@@ -131,14 +131,14 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
{
type = "toggle",
get = function() return EncounterDetails.db.hide_on_combat end,
set = function (self, fixedparam, value) EncounterDetails.db.hide_on_combat = value end,
set = function(self, fixedparam, value) EncounterDetails.db.hide_on_combat = value end,
desc = "Encounter Breakdown window automatically close when you enter in combat.",
name = "Hide on Combat"
},
{
type = "range",
get = function() return EncounterDetails.db.max_emote_segments end,
set = function (self, fixedparam, value) EncounterDetails.db.max_emote_segments = value end,
set = function(self, fixedparam, value) EncounterDetails.db.max_emote_segments = value end,
min = 1,
max = 10,
step = 1,
@@ -149,7 +149,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
{
type = "range",
get = function() return EncounterDetails.db.window_scale end,
set = function (self, fixedparam, value) EncounterDetails.db.window_scale = value; EncounterDetails:RefreshScale() end,
set = function(self, fixedparam, value) EncounterDetails.db.window_scale = value; EncounterDetails:RefreshScale() end,
min = 0.65,
max = 1.50,
step = 0.1,
@@ -499,7 +499,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
vRowFrame:SetHeight (43)
vRowFrame:SetFrameLevel (g:GetFrameLevel()+2)
vRowFrame:SetScript ("OnEnter", function (frame)
vRowFrame:SetScript ("OnEnter", function(frame)
if (vRowFrame.dead[1] and vRowFrame.dead[1][3] and vRowFrame.dead[1][3][2]) then
@@ -519,7 +519,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
for i = #death[1], 1, -1 do
local this_hit = death[1][i]
if (type (this_hit[1]) == "boolean" and this_hit[1]) then
local spellname, _, spellicon = _GetSpellInfo (this_hit[2])
local spellname, _, spellicon = _GetSpellInfo(this_hit[2])
local t = death [2] - this_hit [4]
GameCooltip:AddLine ("-" .. _cstr ("%.1f", t) .. " " .. spellname .. " (" .. this_hit[6] .. ")", EncounterDetails:comma_value (this_hit [3]))
GameCooltip:AddIcon (spellicon, 1, 1, 12, 12, 0.1, 0.9, 0.1, 0.9)
@@ -538,7 +538,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
end
end)
vRowFrame:SetScript ("OnLeave", function (frame)
vRowFrame:SetScript ("OnLeave", function(frame)
_detalhes.popup:ShowMe (false)
end)
@@ -701,7 +701,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
t:Hide()
tinsert (spark_container, t)
end
local get_spark = function (index)
local get_spark = function(index)
local spark = spark_container [index]
if (not spark) then
create_spark()
@@ -716,7 +716,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
end
end
local phase_on_enter = function (self)
local phase_on_enter = function(self)
local spark1 = get_spark (1)
local spark2 = get_spark (2)
@@ -830,7 +830,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
end
end
local phase_on_leave = function (self)
local phase_on_leave = function(self)
table.wipe (self.damage_actors)
table.wipe (self.heal_actors)
@@ -843,11 +843,11 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
phase_panel:Hide()
end
local phase_on_click = function (self, button)
local phase_on_click = function(self, button)
if (button == "LeftButton") then
local result = {}
local reportFunc = function (IsCurrent, IsReverse, AmtLines)
local reportFunc = function(IsCurrent, IsReverse, AmtLines)
AmtLines = AmtLines + 1
if (#result > AmtLines) then
for i = #result, AmtLines+1, -1 do
@@ -867,7 +867,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
elseif (button == "RightButton") then
local result = {}
local reportFunc = function (IsCurrent, IsReverse, AmtLines)
local reportFunc = function(IsCurrent, IsReverse, AmtLines)
AmtLines = AmtLines + 1
if (#result > AmtLines) then
for i = #result, AmtLines+1, -1 do
@@ -1103,7 +1103,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
----
BossFrame:SetScript ("OnMouseDown",
function (self, botao)
function(self, botao)
if (botao == "LeftButton") then
self:StartMoving()
self.isMoving = true
@@ -1113,7 +1113,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
end)
BossFrame:SetScript ("OnMouseUp",
function (self)
function(self)
if (self.isMoving) then
self:StopMovingOrSizing()
self.isMoving = false
@@ -1204,7 +1204,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
BossFrame.buttonSwitchBossEmotes:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
end
BossFrame.switch = function (to, _, to2)
BossFrame.switch = function(to, _, to2)
if (type (to) == "string") then
to = to
elseif (type (to2) == "string") then
@@ -1433,7 +1433,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
local CONST_EMOTES_MAX_LINES = 32
local refresh_emotes = function (self)
local refresh_emotes = function(self)
--update emote scroll
local offset = FauxScrollFrame_GetOffset (self)
@@ -1512,17 +1512,17 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
tinsert (BossFrame.EmoteWidgets, bar_div_emotes)
scrollframe = CreateFrame ("ScrollFrame", "EncounterDetails_EmoteScroll", BossFrame, "FauxScrollFrameTemplate, BackdropTemplate")
scrollframe:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 14, refresh_emotes) end)
scrollframe:SetScript ("OnVerticalScroll", function(self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 14, refresh_emotes) end)
scrollframe:SetPoint ("topleft", BossFrame, "topleft", 249, -75)
scrollframe:SetPoint ("bottomright", BossFrame, "bottomright", -33, 42)
scrollframe.Update = refresh_emotes
scrollframe:Hide()
_detalhes.gump:ReskinSlider (scrollframe, 3)
_detalhes.gump:ReskinSlider(scrollframe, 3)
--
tinsert (BossFrame.EmoteWidgets, scrollframe)
local row_on_enter = function (self)
local row_on_enter = function(self)
self:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16})
self:SetBackdropColor (1, 1, 1, .6)
if (self.righttext:IsTruncated()) then
@@ -1532,13 +1532,13 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
GameCooltip:Show()
end
end
local row_on_leave = function (self)
local row_on_leave = function(self)
self:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16})
self:SetBackdropColor (1, 1, 1, .3)
GameCooltip:Hide()
end
local row_on_mouse_up = function (self)
local row_on_mouse_up = function(self)
--report
local text = self.righttext:GetText()
local time = self.lefttext:GetText()
@@ -1552,7 +1552,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
-- replace links
for _, spellid in text:gmatch ("(|Hspell:)(.-)(|h)") do
local spell = tonumber (spellid)
local link = GetSpellLink (spell)
local link = GetSpellLink(spell)
text = text:gsub ("(|Hspell).*(|h)", link)
end
-- remove unit links
@@ -1605,7 +1605,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
local emotes_segment_label = DetailsFrameWork:CreateLabel (BossFrame, "Segment:", 11, nil, "GameFontHighlightSmall")
emotes_segment_label:SetPoint ("topleft", BossFrame, "topleft", 10, -85)
local on_emote_Segment_select = function (_, _, segment)
local on_emote_Segment_select = function(_, _, segment)
FauxScrollFrame_SetOffset (scrollframe, 0)
emote_segment = segment
scrollframe:Update()
@@ -1679,7 +1679,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
-- report button
local report_emote_button = DetailsFrameWork:NewButton (BossFrame, nil, "$parentReportEmoteButton", "ReportEmoteButton", 180, 20, function()
local reportFunc = function (IsCurrent, IsReverse, AmtLines)
local reportFunc = function(IsCurrent, IsReverse, AmtLines)
local segment = EncounterDetails.charsaved.emotes and EncounterDetails.charsaved.emotes [emote_segment]
if (segment) then
@@ -1702,7 +1702,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
-- replace links
for _, spellid in text:gmatch ("(|Hspell:)(.-)(|h)") do
local spell = tonumber (spellid)
local link = GetSpellLink (spell)
local link = GetSpellLink(spell)
text = text:gsub ("(|Hspell).*(|h)", link)
end
-- remove unit links
@@ -1761,15 +1761,15 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
local spell_blocks = {}
local bossmods_blocks = {}
local on_focus_gain = function (self)
local on_focus_gain = function(self)
self:HighlightText()
end
local on_focus_lost = function (self)
local on_focus_lost = function(self)
self:HighlightText (0, 0)
end
local on_enter_spell = function (self)
local on_enter_spell = function(self)
if (self.MyObject._spellid) then
GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT")
@@ -1790,17 +1790,17 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
end
end
local on_leave_spell = function (self, capsule)
local on_leave_spell = function(self, capsule)
GameTooltip:Hide()
self:SetBackdropColor (.3, .3, .3, .5)
end
local create_aura_func = function (self, button, spellid, encounter_id)
local create_aura_func = function(self, button, spellid, encounter_id)
local name, _, icon = EncounterDetails.getspellinfo (spellid)
EncounterDetails:OpenAuraPanel (spellid, name, self and self.MyObject._icon.texture, encounter_id)
end
local info_onenter = function (self)
local info_onenter = function(self)
local spellid = self._spellid
local info = EncounterDetails.EnemySpellPool [spellid]
@@ -1823,7 +1823,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
self:SetBackdropColor (1, 1, 1, .5)
end
local info_onleave = function (self)
local info_onleave = function(self)
GameCooltip:Hide()
self:SetBackdropColor (.3, .3, .3, .5)
end
@@ -2055,7 +2055,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
end
end
local refresh_spellauras = function (self)
local refresh_spellauras = function(self)
local pool = EncounterDetails_SpellAurasScroll.spell_pool
local encounter_id = EncounterDetails_SpellAurasScroll.encounter_id
@@ -2098,7 +2098,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
end
local spell_scrollframe = CreateFrame ("ScrollFrame", "EncounterDetails_SpellAurasScroll", BossFrame, "FauxScrollFrameTemplate, BackdropTemplate")
spell_scrollframe:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 14, refresh_spellauras) end)
spell_scrollframe:SetScript ("OnVerticalScroll", function(self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 14, refresh_spellauras) end)
spell_scrollframe:SetPoint ("topleft", BossFrame, "topleft", 200, -75)
spell_scrollframe:SetPoint ("bottomright", BossFrame, "bottomright", -33, 42)
spell_scrollframe.Update = refresh_spellauras
@@ -2111,7 +2111,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
local bossmods_scrollframe = CreateFrame ("ScrollFrame", "EncounterDetails_BossModsScroll", BossFrame, "FauxScrollFrameTemplate, BackdropTemplate")
bossmods_scrollframe:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll(self, offset, 14, refresh_bossmods_timers) end)
bossmods_scrollframe:SetScript ("OnVerticalScroll", function(self, offset) FauxScrollFrame_OnVerticalScroll(self, offset, 14, refresh_bossmods_timers) end)
bossmods_scrollframe:SetPoint ("topleft", BossFrame, "topleft", 10, -75)
bossmods_scrollframe:SetPoint ("bottomleft", BossFrame, "bottomleft", 250, 42)
bossmods_scrollframe.Update = refresh_bossmods_timers
@@ -2141,7 +2141,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = C_EncounterJournal.GetSectionInfo (abs (int_spell))
tinsert (t, {label = title, value = {timer_table [2], title, timer_table [5] or abilityIcon, timer_table.id}, icon = timer_table [5] or abilityIcon, onclick = on_select_bw_bar})
else
local spellname, _, spellicon = _GetSpellInfo (int_spell)
local spellname, _, spellicon = _GetSpellInfo(int_spell)
tinsert (t, {label = spellname, value = {timer_table [2], spellname, timer_table [5] or spellicon, timer_table.id}, icon = timer_table [5] or spellicon, onclick = on_select_bw_bar})
end
@@ -2193,7 +2193,7 @@ function PhaseFrame:ClearAll()
PhaseFrame:ClearPhaseBars()
end
local selectSegment = function (_, _, phaseSelected)
local selectSegment = function(_, _, phaseSelected)
PhaseFrame ["OnSelectPhase"] (phaseSelected)
end
@@ -2263,9 +2263,9 @@ local DamageLabel = _detalhes.gump:CreateLabel (PhaseFrame, "Damage Done")
local HealLabel = _detalhes.gump:CreateLabel (PhaseFrame, "Healing Done")
local PhaseTimersLabel = _detalhes.gump:CreateLabel (PhaseFrame, "Time Spent on Each Phase")
local report_damage = function (IsCurrent, IsReverse, AmtLines)
local report_damage = function(IsCurrent, IsReverse, AmtLines)
local result = {}
local reportFunc = function (IsCurrent, IsReverse, AmtLines)
local reportFunc = function(IsCurrent, IsReverse, AmtLines)
AmtLines = AmtLines + 1
if (#result > AmtLines) then
for i = #result, AmtLines+1, -1 do
@@ -2290,7 +2290,7 @@ Report_DamageButton.textsize = 9
local report_healing = function()
local result = {}
local reportFunc = function (IsCurrent, IsReverse, AmtLines)
local reportFunc = function(IsCurrent, IsReverse, AmtLines)
AmtLines = AmtLines + 1
if (#result > AmtLines) then
for i = #result, AmtLines+1, -1 do
@@ -2325,7 +2325,7 @@ for i = 1, 10 do
tinsert (PhaseFrame.PhaseButtons, button)
end
local ScrollRefresh = function (self, data, offset, total_lines)
local ScrollRefresh = function(self, data, offset, total_lines)
local formatToK = Details:GetCurrentToKFunction()
local removeRealm = _detalhes.GetOnlyName
@@ -2353,15 +2353,15 @@ local ScrollRefresh = function (self, data, offset, total_lines)
end
end
local line_onenter = function (self)
local line_onenter = function(self)
self:SetBackdropColor (unpack (BGColorDefault_Hover))
end
local line_onleave = function (self)
local line_onleave = function(self)
self:SetBackdropColor (unpack (BGColorDefault))
end
local ScrollCreateLine = function (self, index)
local ScrollCreateLine = function(self, index)
local line = CreateFrame ("button", "$parentLine" .. index, self,"BackdropTemplate")
line:SetPoint ("topleft", self, "topleft", 0, -((index-1)*(ScrollLineHeight+1)))
line:SetSize (ScrollWidth, ScrollLineHeight)
@@ -2406,8 +2406,8 @@ local Heal_Scroll = _detalhes.gump:CreateScrollBox (PhaseFrame, "$parentHealScro
Damage_Scroll:SetPoint ("topleft", DamageLabel.widget, "bottomleft", 0, -4)
Heal_Scroll:SetPoint ("topleft", HealLabel.widget, "bottomleft", 0, -4)
_detalhes.gump:ReskinSlider (Damage_Scroll, 4)
_detalhes.gump:ReskinSlider (Heal_Scroll, 4)
_detalhes.gump:ReskinSlider(Damage_Scroll, 4)
_detalhes.gump:ReskinSlider(Heal_Scroll, 4)
for i = 1, ScrollLineAmount do
Damage_Scroll:CreateLine (ScrollCreateLine)
@@ -2429,15 +2429,15 @@ Heal_Scroll:SetBackdropColor (0, 0, 0, .4)
PhaseFrame.PhasesBars = {}
PhaseFrame.PhasesSegmentCompare = {}
local PhaseBarOnEnter = function (self)
local PhaseBarOnEnter = function(self)
PhaseFrame:UpdateSegmentCompareBars (self.phase)
self:SetBackdropColor (unpack (BGColorDefault_Hover))
end
local PhaseBarOnLeave = function (self)
local PhaseBarOnLeave = function(self)
PhaseFrame:ClearSegmentCompareBars()
self:SetBackdropColor (unpack (BGColorDefault))
end
local PhaseBarOnClick = function (self)
local PhaseBarOnClick = function(self)
--report
end
@@ -2532,7 +2532,7 @@ function PhaseFrame:GetPhaseTimers (segment, ordered)
for phase, _ in pairs (t) do
tinsert (order, phase)
end
table.sort (order, function (a, b) return a < b end)
table.sort (order, function(a, b) return a < b end)
return order, t
end
@@ -2613,7 +2613,7 @@ end
--> Selecionar o segmento
local buildSegmentosMenu = function (self)
local buildSegmentosMenu = function(self)
local historico = _detalhes.tabela_historico.tabelas
local return_table = {}
@@ -2715,7 +2715,7 @@ end
container_damagetaken_window.slider:cimaPoint (0, 1)
container_damagetaken_window.slider:baixoPoint (0, -1)
container_damagetaken_frame.slider = container_damagetaken_window.slider
_detalhes.gump:ReskinSlider (container_damagetaken_window)
_detalhes.gump:ReskinSlider(container_damagetaken_window)
container_damagetaken_window.gump = container_damagetaken_frame
container_damagetaken_frame.window = container_damagetaken_window
@@ -2768,7 +2768,7 @@ end
container_habilidades_window.slider:cimaPoint (0, 1)
container_habilidades_window.slider:baixoPoint (0, -1)
container_habilidades_frame.slider = container_habilidades_window.slider
_detalhes.gump:ReskinSlider (container_habilidades_window)
_detalhes.gump:ReskinSlider(container_habilidades_window)
container_habilidades_window.gump = container_habilidades_frame
container_habilidades_frame.window = container_habilidades_window
@@ -2814,7 +2814,7 @@ end
container_adds_window.slider:cimaPoint (0, 1)
container_adds_window.slider:baixoPoint (0, -1)
container_adds_frame.slider = container_adds_window.slider
_detalhes.gump:ReskinSlider (container_adds_window)
_detalhes.gump:ReskinSlider(container_adds_window)
container_adds_window.gump = container_adds_frame
container_adds_frame.window = container_adds_window
@@ -2859,7 +2859,7 @@ end
container_interrupt_window.slider:cimaPoint (0, 1)
container_interrupt_window.slider:baixoPoint (0, -1)
container_interrupt_frame.slider = container_interrupt_window.slider
_detalhes.gump:ReskinSlider (container_interrupt_window)
_detalhes.gump:ReskinSlider(container_interrupt_window)
container_interrupt_window.gump = container_interrupt_frame
@@ -2905,7 +2905,7 @@ end
container_dispell_window.slider:cimaPoint (0, 1)
container_dispell_window.slider:baixoPoint (0, -1)
container_dispell_frame.slider = container_dispell_window.slider
_detalhes.gump:ReskinSlider (container_dispell_window)
_detalhes.gump:ReskinSlider(container_dispell_window)
container_dispell_window.gump = container_dispell_frame
container_dispell_frame.window = container_dispell_window
@@ -2955,7 +2955,7 @@ end
container_dead_window.slider:cimaPoint (0, 1)
container_dead_window.slider:baixoPoint (0, -1)
container_dead_frame.slider = container_dead_window.slider
_detalhes.gump:ReskinSlider (container_dead_window)
_detalhes.gump:ReskinSlider(container_dead_window)
container_dead_window.gump = container_dead_frame
container_dead_frame.window = container_dead_window
@@ -2983,7 +2983,7 @@ end
["CHAT_MSG_MONSTER_YELL"] = 7,
}
emote_frame:SetScript ("OnEvent", function (...)
emote_frame:SetScript ("OnEvent", function(...)
if (not EncounterDetails.current_whisper_table) then
return
@@ -727,7 +727,7 @@ local CreatePluginFrames = function()
raidCheckFrame:SetScript("OnUpdate", updateRaidCheckFrame)
end)
DetailsRaidCheck.ToolbarButton:SetScript("OnLeave", function (self)
DetailsRaidCheck.ToolbarButton:SetScript("OnLeave", function(self)
raidCheckFrame:SetScript("OnUpdate", nil)
raidCheckFrame:Hide()
end)
@@ -903,21 +903,21 @@ local buildOptionsPanel = function()
{
type = "toggle",
get = function() return DetailsRaidCheck.db.pre_pot_healers end,
set = function (self, fixedparam, value) DetailsRaidCheck.db.pre_pot_healers = value end,
set = function(self, fixedparam, value) DetailsRaidCheck.db.pre_pot_healers = value end,
desc = "If enabled, pre potion for healers are also shown.",
name = "Track Healers Pre Pot"
},
{
type = "toggle",
get = function() return DetailsRaidCheck.db.pre_pot_tanks end,
set = function (self, fixedparam, value) DetailsRaidCheck.db.pre_pot_tanks = value end,
set = function(self, fixedparam, value) DetailsRaidCheck.db.pre_pot_tanks = value end,
desc = "If enabled, pre potion for tanks are also shown.",
name = "Track Tank Pre Pot"
},
{
type = "toggle",
get = function() return DetailsRaidCheck.db.mythic_1_4 end,
set = function (self, fixedparam, value) DetailsRaidCheck.db.mythic_1_4 = value end,
set = function(self, fixedparam, value) DetailsRaidCheck.db.mythic_1_4 = value end,
desc = "When raiding on Mythic difficult, only check the first 4 groups.",
name = "Mythic 1-4 Group Only"
},
@@ -928,21 +928,21 @@ local buildOptionsPanel = function()
{
type = "toggle",
get = function() return DetailsRaidCheck.db.food_tier1 end,
set = function (self, fixedparam, value) DetailsRaidCheck.db.food_tier1 = value end,
set = function(self, fixedparam, value) DetailsRaidCheck.db.food_tier1 = value end,
desc = "Consider players using Tier 1 food.",
name = "Food Tier 1 [41]"
},
{
type = "toggle",
get = function() return DetailsRaidCheck.db.food_tier2 end,
set = function (self, fixedparam, value) DetailsRaidCheck.db.food_tier2 = value end,
set = function(self, fixedparam, value) DetailsRaidCheck.db.food_tier2 = value end,
desc = "Consider players using Tier 2 food.",
name = "Food Tier 2 [55]"
},
{
type = "toggle",
get = function() return DetailsRaidCheck.db.food_tier3 end,
set = function (self, fixedparam, value) DetailsRaidCheck.db.food_tier3 = value end,
set = function(self, fixedparam, value) DetailsRaidCheck.db.food_tier3 = value end,
desc = "Consider players using Tier 3 food.",
name = "Food Tier 3 [>= 75]"
},
+52 -52
View File
@@ -148,7 +148,7 @@ local function CreatePluginFrames()
titlebar.text = titlebar:CreateFontString (nil, "overlay", "GameFontNormal")
titlebar.text:SetPoint ("center", titlebar, "center")
titlebar.text:SetText ("Details! Streamer: Action Tracker")
titlebar:SetScript ("OnEnter", function (self)
titlebar:SetScript ("OnEnter", function(self)
GameTooltip:SetOwner (self)
GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT")
GameTooltip:AddLine ("|cFFFF7700Left Click|r: Open Options\n|cFFFF7700Right Click|r: Lock the Frame\n|cFFFF7700Slash Command|r: /streamer")
@@ -158,14 +158,14 @@ local function CreatePluginFrames()
GameTooltip:Hide()
end)
SOF:SetScript ("OnMouseDown", function (self)
SOF:SetScript ("OnMouseDown", function(self)
end)
SOF:SetScript ("OnMouseUp", function (self)
SOF:SetScript ("OnMouseUp", function(self)
end)
titlebar:SetScript ("OnMouseDown", function (self, button)
titlebar:SetScript ("OnMouseDown", function(self, button)
if (not SOF.moving and not StreamOverlay.db.main_frame_locked) then
SOF:StartMoving()
SOF.moving = true
@@ -173,7 +173,7 @@ local function CreatePluginFrames()
end
end)
titlebar:SetScript ("OnMouseUp", function (self, button)
titlebar:SetScript ("OnMouseUp", function(self, button)
if (SOF.movingAt) then
if (SOF.moving) then
@@ -262,13 +262,13 @@ local function CreatePluginFrames()
left_resize:GetHighlightTexture():SetTexCoord (1, 0, 0, 1)
left_resize:GetPushedTexture():SetTexCoord (1, 0, 0, 1)
left_resize:SetScript ("OnMouseDown", function (self)
left_resize:SetScript ("OnMouseDown", function(self)
if (not SOF.resizing and not StreamOverlay.db.main_frame_locked) then
SOF.resizing = true
SOF:StartSizing ("bottomleft")
end
end)
left_resize:SetScript ("OnMouseUp", function (self)
left_resize:SetScript ("OnMouseUp", function(self)
if (SOF.resizing) then
SOF.resizing = false
SOF:StopMovingOrSizing()
@@ -277,13 +277,13 @@ local function CreatePluginFrames()
StreamOverlay:SaveWindowSizeAnLocation()
end
end)
right_resize:SetScript ("OnMouseDown", function (self)
right_resize:SetScript ("OnMouseDown", function(self)
if (not SOF.resizing and not StreamOverlay.db.main_frame_locked) then
SOF.resizing = true
SOF:StartSizing ("bottomright")
end
end)
right_resize:SetScript ("OnMouseUp", function (self)
right_resize:SetScript ("OnMouseUp", function(self)
if (SOF.resizing) then
SOF.resizing = false
SOF:StopMovingOrSizing()
@@ -293,17 +293,17 @@ local function CreatePluginFrames()
end
end)
SOF:SetScript ("OnSizeChanged", function (self)
SOF:SetScript ("OnSizeChanged", function(self)
StreamOverlay:Refresh()
end)
SOF:SetScript ("OnMouseDown", function (self)
SOF:SetScript ("OnMouseDown", function(self)
if (not SOF.moving and not StreamOverlay.db.main_frame_locked) then
SOF:StartMoving()
SOF.moving = true
end
end)
SOF:SetScript ("OnMouseUp", function (self)
SOF:SetScript ("OnMouseUp", function(self)
if (SOF.moving) then
SOF.moving = false
SOF:StopMovingOrSizing()
@@ -315,7 +315,7 @@ local function CreatePluginFrames()
--> scroll frame
local autoscroll = CreateFrame ("scrollframe", "Details_StreamOverlayScrollFrame", SOF, "FauxScrollFrameTemplate, BackdropTemplate")
autoscroll:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 20, StreamOverlay.UpdateLines) end)
autoscroll:SetScript ("OnVerticalScroll", function(self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 20, StreamOverlay.UpdateLines) end)
--> looks like this isn't working
function StreamOverlay:ClearAll()
@@ -960,11 +960,11 @@ local DefaultCoords = {0, 1, 0, 1}
local DefaultColor = {r=1, g=1, b=1}
local PetCoords = {0.25, 0.49609375, 0.75, 1}
local parse_target_name = function (target)
local parse_target_name = function(target)
return StreamOverlay:GetOnlyName (target)
end
local parse_target_icon = function (targetObject, target)
local parse_target_icon = function(targetObject, target)
local icon2, icon2coords, pclass
if (targetObject) then
local role = targetObject.role
@@ -1022,7 +1022,7 @@ local parse_target_icon = function (targetObject, target)
return icon2, icon2coords, pclass
end
local parse_target_color = function (class)
local parse_target_color = function(class)
local color2 = RAID_CLASS_COLORS [class]
return color2
end
@@ -1040,7 +1040,7 @@ function StreamOverlay:CastStart (castGUID)
end
local icon, backgroundcolor, bordercolor = StreamOverlay:GetSpellInformation (spellid)
local spellname, _, spellicon = GetSpellInfo (spellid)
local spellname, _, spellicon = GetSpellInfo(spellid)
local targetObject = Details:GetActor ("current", 1, target) or Details:GetActor ("current", 2, target)
local icon2, icon2coords, class = parse_target_icon (targetObject, target)
@@ -1078,7 +1078,7 @@ function StreamOverlay:CastFinished (castid)
--just casted a instant spell
local icon, backgroundcolor, bordercolor = StreamOverlay:GetSpellInformation (spellid)
local spellname, _, spellicon = GetSpellInfo (spellid)
local spellname, _, spellicon = GetSpellInfo(spellid)
local targetObject = Details:GetActor ("current", 1, target) or Details:GetActor ("current", 2, target)
@@ -1346,7 +1346,7 @@ APM_FRAME:SetScript ("OnEvent", function()
ACTIONS = ACTIONS + 1
end)
eventFrame:SetScript ("OnEvent", function (self, event, ...)
eventFrame:SetScript ("OnEvent", function(self, event, ...)
if (event ~= "UNIT_SPELLCAST_SENT" and event ~= "UNIT_SPELLCAST_SUCCEEDED" and ACTIONS_EVENT_TIME [event] ~= GetTime()) then
ACTIONS = ACTIONS + 1
ACTIONS_EVENT_TIME [event] = GetTime()
@@ -1355,7 +1355,7 @@ eventFrame:SetScript ("OnEvent", function (self, event, ...)
if (event == "UNIT_SPELLCAST_SENT") then
local unitID, target, castGUID, spellID = ...
--local unitID, spell, rank, target, id = ...
local spell = GetSpellInfo (spellID)
local spell = GetSpellInfo(spellID)
if (unitID == "player") then
CastsTable [castGUID] = {Target = target or "", Id = castGUID, CastStart = GetTime()}
@@ -1447,7 +1447,7 @@ eventFrame:SetScript ("OnEvent", function (self, event, ...)
elseif (event == "UNIT_SPELLCAST_SUCCEEDED") then
--local unitID, spell, rank, id, spellID = ...
local unitID, castGUID, spellID = ...
local spell = GetSpellInfo (spellID)
local spell = GetSpellInfo(spellID)
if (unitID == "player" and CastsTable[castGUID] and not channelspells [spell]) then
if (CastsTable[castGUID].HasCastTime and not CastsTable[castGUID].IsChanneled) then
@@ -1466,7 +1466,7 @@ eventFrame:SetScript ("OnEvent", function (self, event, ...)
end)
local format_time = function (v) return "-" .. format ("%.2f", v) end
local format_time = function(v) return "-" .. format ("%.2f", v) end
--when the player die, show the events before the death
function StreamOverlay.OnDeath (_, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, death_table, last_cooldown, death_at_combattime, max_health)
@@ -1576,14 +1576,14 @@ screen_frame:SetBackdropColor (.1, .1, .1, .9)
screen_frame:SetMovable (true)
screen_frame:Hide()
screen_frame:SetPoint ("center", UIParent, "center")
screen_frame:SetScript ("OnMouseDown", function (self)
screen_frame:SetScript ("OnMouseDown", function(self)
if (not screen_frame.moving and not StreamOverlay.db.main_frame_locked) then
screen_frame:StartMoving()
screen_frame.moving = true
screen_frame.movingAt = GetTime()
end
end)
screen_frame:SetScript ("OnMouseUp", function (self)
screen_frame:SetScript ("OnMouseUp", function(self)
if (screen_frame.movingAt) then
if (screen_frame.moving) then
screen_frame.moving = false
@@ -1599,7 +1599,7 @@ screen_frame:SetScript ("OnMouseUp", function (self)
StreamOverlay.OpenOptionsPanel()
end
end)
screen_frame:SetScript ("OnEnter", function (self)
screen_frame:SetScript ("OnEnter", function(self)
GameTooltip:SetOwner (self)
GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT")
GameTooltip:AddLine ("|cFFFF7700Left Click|r: Open Options\n|cFFFF7700Slash Command|r: /streamer")
@@ -1790,7 +1790,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
for name, fontPath in pairs(fontObjects) do
fontTable[#fontTable+1] = {value = name, label = name, onclick = setFontFace, font = fontPath, descfont = name}
end
table.sort(fontTable, function (t1, t2) return t1.label < t2.label end)
table.sort(fontTable, function(t1, t2) return t1.label < t2.label end)
-- select arrow
local arrows = {
@@ -1831,7 +1831,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
--
local setWindowStrataCallback = function (_, _, strata)
local setWindowStrataCallback = function(_, _, strata)
StreamOverlay.db.main_frame_strata = strata
SOF:SetFrameStrata(strata)
StreamerOverlayDpsHpsFrame:SetFrameStrata(strata)
@@ -1868,7 +1868,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
desc = "Can't move or interact within the frame when it's locked.",
order = 1,
get = function() return StreamOverlay.db.main_frame_locked end,
set = function (self, fixedParam, val)
set = function(self, fixedParam, val)
StreamOverlay:SetLocked (not StreamOverlay.db.main_frame_locked)
end,
},
@@ -1879,7 +1879,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
desc = "Show/Hide minimap icon.",
order = 1,
get = function() return not StreamOverlay.db.minimap.hide end,
set = function (self, fixedParam, val)
set = function(self, fixedParam, val)
StreamOverlay.db.minimap.hide = not StreamOverlay.db.minimap.hide
if (LDBIcon) then
LDBIcon:Refresh ("DetailsStreamer", StreamOverlay.db.minimap)
@@ -1890,7 +1890,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "color",
get = function() return StreamOverlay.db.main_frame_color end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
StreamOverlay:SetBackgroundColor (r, g, b, a)
end,
desc = "Color used on the background.",
@@ -1900,7 +1900,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "range",
get = function() return StreamOverlay.db.scale or 1 end,
set = function (self, fixedparam, value) StreamOverlay.db.scale = value; StreamOverlay.Frame:SetScale(value) end,
set = function(self, fixedparam, value) StreamOverlay.db.scale = value; StreamOverlay.Frame:SetScale(value) end,
min = 0.6,
max = 2,
step = 0.1,
@@ -1914,7 +1914,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "range",
get = function() return StreamOverlay.db.row_height end,
set = function (self, fixedparam, value) StreamOverlay.db.row_height = value; StreamOverlay:RefreshAllBattleLineStyle() end,
set = function(self, fixedparam, value) StreamOverlay.db.row_height = value; StreamOverlay:RefreshAllBattleLineStyle() end,
min = 10,
max = 30,
step = 1,
@@ -1925,7 +1925,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "range",
get = function() return StreamOverlay.db.row_spacement end,
set = function (self, fixedparam, value) StreamOverlay.db.row_spacement = value; StreamOverlay:RefreshAllBattleLineStyle() end,
set = function(self, fixedparam, value) StreamOverlay.db.row_spacement = value; StreamOverlay:RefreshAllBattleLineStyle() end,
min = 8,
max = 31,
step = 1,
@@ -1944,7 +1944,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "color",
get = function() return StreamOverlay.db.row_color end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local c = StreamOverlay.db.row_color
c[1], c[2], c[3], c[4] = r, g, b, a
StreamOverlay:RefreshAllBattleLineStyle()
@@ -1958,7 +1958,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "range",
get = function() return StreamOverlay.db.font_size end,
set = function (self, fixedparam, value) StreamOverlay.db.font_size = value; StreamOverlay:RefreshAllBattleLineStyle() end,
set = function(self, fixedparam, value) StreamOverlay.db.font_size = value; StreamOverlay:RefreshAllBattleLineStyle() end,
min = 8,
max = 32,
step = 1,
@@ -1977,7 +1977,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "color",
get = function() return StreamOverlay.db.font_color end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local c = StreamOverlay.db.font_color
c[1], c[2], c[3], c[4] = r, g, b, a
StreamOverlay:RefreshAllBattleLineStyle()
@@ -1994,7 +1994,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
desc = "Show in the screen your current Dps or Hps.",
order = 1,
get = function() return StreamOverlay.db.per_second.enabled end,
set = function (self, fixedParam, val)
set = function(self, fixedParam, val)
StreamOverlay.db.per_second.enabled = not StreamOverlay.db.per_second.enabled
-- update hps dps frame
StreamOverlay:UpdateDpsHpsFrameConfig()
@@ -2012,7 +2012,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "range",
get = function() return StreamOverlay.db.per_second.size end,
set = function (self, fixedparam, value) StreamOverlay.db.per_second.size = value;
set = function(self, fixedparam, value) StreamOverlay.db.per_second.size = value;
-- update hps dps frame
StreamOverlay:UpdateDpsHpsFrameConfig()
end,
@@ -2026,7 +2026,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "range",
get = function() return StreamOverlay.db.per_second.scale end,
set = function (self, fixedparam, value) StreamOverlay.db.per_second.scale = value;
set = function(self, fixedparam, value) StreamOverlay.db.per_second.scale = value;
-- update hps dps frame
StreamOverlay:UpdateDpsHpsFrameConfig()
end,
@@ -2041,7 +2041,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "range",
get = function() return StreamOverlay.db.per_second.update_speed end,
set = function (self, fixedparam, value) StreamOverlay.db.per_second.update_speed = value;
set = function(self, fixedparam, value) StreamOverlay.db.per_second.update_speed = value;
-- update hps dps frame
StreamOverlay:UpdateDpsHpsFrameConfig()
end,
@@ -2059,7 +2059,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
desc = "Enable text shadow.",
order = 1,
get = function() return StreamOverlay.db.per_second.font_shadow end,
set = function (self, fixedParam, val)
set = function(self, fixedParam, val)
StreamOverlay.db.per_second.font_shadow = not StreamOverlay.db.per_second.font_shadow
-- update hps dps frame
StreamOverlay:UpdateDpsHpsFrameConfig()
@@ -2071,7 +2071,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "range",
get = function() return StreamOverlay.db.square_amount end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
StreamOverlay.db.square_amount = value
StreamOverlay:Refresh()
end,
@@ -2084,7 +2084,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "range",
get = function() return StreamOverlay.db.square_size end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
StreamOverlay.db.square_size = value
StreamOverlay:RefreshAllBoxesStyle()
end,
@@ -2115,7 +2115,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "range",
get = function() return StreamOverlay.db.arrow_size end,
set = function (self, fixedparam, value) StreamOverlay.db.arrow_size = value; StreamOverlay:RefreshAllBattleLineStyle() end,
set = function(self, fixedparam, value) StreamOverlay.db.arrow_size = value; StreamOverlay:RefreshAllBattleLineStyle() end,
min = 6,
max = 32,
step = 1,
@@ -2126,7 +2126,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "color",
get = function() return StreamOverlay.db.arrow_color end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local c = StreamOverlay.db.arrow_color
c[1], c[2], c[3], c[4] = r, g, b, a
StreamOverlay:RefreshAllBattleLineStyle()
@@ -2138,7 +2138,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "range",
get = function() return StreamOverlay.db.arrow_anchor_x end,
set = function (self, fixedparam, value) StreamOverlay.db.arrow_anchor_x = value; StreamOverlay:RefreshAllBattleLineStyle() end,
set = function(self, fixedparam, value) StreamOverlay.db.arrow_anchor_x = value; StreamOverlay:RefreshAllBattleLineStyle() end,
min = -16,
max = 16,
step = 1,
@@ -2149,7 +2149,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "range",
get = function() return StreamOverlay.db.arrow_anchor_y end,
set = function (self, fixedparam, value) StreamOverlay.db.arrow_anchor_y = value; StreamOverlay:RefreshAllBattleLineStyle() end,
set = function(self, fixedparam, value) StreamOverlay.db.arrow_anchor_y = value; StreamOverlay:RefreshAllBattleLineStyle() end,
min = -16,
max = 16,
step = 1,
@@ -2162,7 +2162,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "range",
get = function() return StreamOverlay.db.main_frame_size[1] end,
set = function (self, fixedparam, value) StreamOverlay.db.main_frame_size[1] = value; StreamOverlay:RestoreWindowSizeAndLocation() end,
set = function(self, fixedparam, value) StreamOverlay.db.main_frame_size[1] = value; StreamOverlay:RestoreWindowSizeAndLocation() end,
min = 150,
max = 800,
step = 1,
@@ -2173,7 +2173,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
{
type = "range",
get = function() return StreamOverlay.db.main_frame_size[2] end,
set = function (self, fixedparam, value) StreamOverlay.db.main_frame_size[2] = value; StreamOverlay:RestoreWindowSizeAndLocation() end,
set = function(self, fixedparam, value) StreamOverlay.db.main_frame_size[2] = value; StreamOverlay:RestoreWindowSizeAndLocation() end,
min = 40,
max = 1024,
step = 1,
@@ -2196,7 +2196,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
desc = "Show or hide the spark at bars",
order = 1,
get = function() return StreamOverlay.db.use_spark end,
set = function (self, fixedParam, val)
set = function(self, fixedParam, val)
StreamOverlay.db.use_spark = not StreamOverlay.db.use_spark
@@ -2543,7 +2543,7 @@ function StreamOverlay:CreateMinimapIcon()
type = "data source",
icon = [[Interface\MINIMAP\MOVIERECORDINGICON]],
OnClick = function (self, button)
OnClick = function(self, button)
if (button == "LeftButton") then
StreamOverlay.OpenOptionsPanel()
elseif (button == "RightButton") then
@@ -2554,7 +2554,7 @@ function StreamOverlay:CreateMinimapIcon()
end
end,
OnTooltipShow = function (tooltip)
OnTooltipShow = function(tooltip)
tooltip:AddLine ("Details!: Action Tracker", 1, 1, 1)
tooltip:AddLine ("|cFFFF7700Left Click|r: open options.")
tooltip:AddLine ("|cFFFF7700Right Click|r: hide this icon.")
@@ -259,7 +259,7 @@ local function CreatePluginFrames (data)
return newrow
end
local absoluteSort = function (table1, table2)
local absoluteSort = function(table1, table2)
if (table1[6] > table2[6]) then
return true
else
@@ -267,7 +267,7 @@ local function CreatePluginFrames (data)
end
end
local relativeSort = function (table1, table2)
local relativeSort = function(table1, table2)
if (table1[2] > table2[2]) then
return true
else
@@ -528,7 +528,7 @@ local function CreatePluginFrames (data)
end
if gougeThreshold and ((not threatActor) or (threatActor[6] < gougeThreshold)) then
local spellName, _, spellTexture = GetSpellInfo (gougeSpellId)
local spellName, _, spellTexture = GetSpellInfo(gougeSpellId)
thisRow._icon:SetTexture (spellTexture)
thisRow._icon:SetTexCoord (0, 1, 0, 1)
@@ -736,7 +736,7 @@ local build_options_panel = function()
{
type = "range",
get = function() return ThreatMeter.saveddata.updatespeed end,
set = function (self, fixedparam, value) ThreatMeter.saveddata.updatespeed = value end,
set = function(self, fixedparam, value) ThreatMeter.saveddata.updatespeed = value end,
min = 0.2,
max = 3,
step = 0.2,
@@ -747,14 +747,14 @@ local build_options_panel = function()
{
type = "toggle",
get = function() return ThreatMeter.saveddata.useplayercolor end,
set = function (self, fixedparam, value) ThreatMeter.saveddata.useplayercolor = value end,
set = function(self, fixedparam, value) ThreatMeter.saveddata.useplayercolor = value end,
desc = "When enabled, your bar get the following color.",
name = "Player Color Enabled"
},
{
type = "color",
get = function() return ThreatMeter.saveddata.playercolor end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local current = ThreatMeter.saveddata.playercolor
current[1], current[2], current[3], current[4] = r, g, b, a
end,
@@ -764,7 +764,7 @@ local build_options_panel = function()
{
type = "toggle",
get = function() return ThreatMeter.saveddata.useclasscolors end,
set = function (self, fixedparam, value) ThreatMeter.saveddata.useclasscolors = value end,
set = function(self, fixedparam, value) ThreatMeter.saveddata.useclasscolors = value end,
desc = "When enabled, threat bars uses the class color of the character.",
name = "Use Class Colors"
},
@@ -774,14 +774,14 @@ local build_options_panel = function()
{
type = "toggle",
get = function() return ThreatMeter.saveddata.usefocus end,
set = function (self, fixedparam, value) ThreatMeter.saveddata.usefocus = value end,
set = function(self, fixedparam, value) ThreatMeter.saveddata.usefocus = value end,
desc = "Show threat for the focus target if there's one.",
name = "Track Focus Target (if any)"
},
{
type = "toggle",
get = function() return not ThreatMeter.saveddata.hide_pull_bar end,
set = function (self, fixedparam, value) ThreatMeter.saveddata.hide_pull_bar = not value end,
set = function(self, fixedparam, value) ThreatMeter.saveddata.hide_pull_bar = not value end,
desc = "Show Pull Aggro Bar",
name = "Show Pull Aggro Bar"
},
@@ -805,7 +805,7 @@ local build_options_panel = function()
{
type = "toggle",
get = function() return ThreatMeter.saveddata.playSound end,
set = function (self, fixedparam, value) ThreatMeter.saveddata.playSound = value end,
set = function(self, fixedparam, value) ThreatMeter.saveddata.playSound = value end,
desc = "Except for tanks",
name = "Play Audio On High Threat"
},
+19 -19
View File
@@ -311,7 +311,7 @@ local function CreatePluginFrames (data)
end
end
local SetTank = function (self, index)
local SetTank = function(self, index)
local name = Vanguard.TankList [index]
self.tankname:SetText (Vanguard:GetOnlyName (name))
self.tankname_string = name
@@ -354,22 +354,22 @@ local function CreatePluginFrames (data)
self.unitFrame.castBar:SetTexture (SharedMedia:Fetch("statusbar", Vanguard.db.tank_block_texture))
end
local debuff_on_enter = function (self)
local debuff_on_enter = function(self)
if (self.spellid) then
--self.texture:SetBlendMode ("ADD")
GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT")
GameTooltip:SetSpellByID (self.spellid)
GameTooltip:SetSpellByID(self.spellid)
GameTooltip:Show()
end
end
local debuff_on_leave = function (self)
local debuff_on_leave = function(self)
--self.texture:SetBlendMode ("BLEND")
if (self.spellid) then
GameTooltip:Hide()
end
end
local on_click = function (self, button)
local on_click = function(self, button)
if (button == "LeftButton") then
Vanguard.OpenOptionsPanel()
@@ -928,7 +928,7 @@ end
local build_options_panel = function()
local options_frame = Vanguard:CreatePluginOptionsFrame ("VanguardOptionsWindow", "Vanguard Options", 1)
local tank_texture_set = function (_, _, value)
local tank_texture_set = function(_, _, value)
Vanguard.db.tank_block_texture = value;
Vanguard:ResetBars()
Vanguard:RefreshTanks()
@@ -944,7 +944,7 @@ local build_options_panel = function()
for name, texturePath in pairs (textures) do
texTable[#texTable+1] = {value = name, label = name, iconsize = texture_icon_size, statusbar = texturePath, onclick = tank_texture_set, icon = texture_icon, texcoord = texture_texcoord}
end
table.sort (texTable, function (t1, t2) return t1.label < t2.label end)
table.sort (texTable, function(t1, t2) return t1.label < t2.label end)
local tank_texture_menu = texTable
@@ -969,14 +969,14 @@ local build_options_panel = function()
{
type = "toggle",
get = function() return Vanguard.db.show_inc_bars end,
set = function (self, fixedparam, value) Vanguard.db.show_inc_bars = value; Vanguard:ResetBars() end,
set = function(self, fixedparam, value) Vanguard.db.show_inc_bars = value; Vanguard:ResetBars() end,
--desc = "Shows the incoming heal vs incoming damage.",
name = "Show Incoming Damage"
},
{
type = "range",
get = function() return Vanguard.db.bar_height end,
set = function (self, fixedparam, value)
set = function(self, fixedparam, value)
Vanguard.db.bar_height = value
Vanguard:ResetBars()
Vanguard:RefreshTanks()
@@ -992,26 +992,26 @@ local build_options_panel = function()
{
type = "toggle",
get = function() return Vanguard.db.show_health_bar end,
set = function (self, fixedparam, value) Vanguard.db.show_health_bar = value; Vanguard:RefreshTanks(); Vanguard:ResetBars() end,
set = function(self, fixedparam, value) Vanguard.db.show_health_bar = value; Vanguard:RefreshTanks(); Vanguard:ResetBars() end,
name = "Show Health Bar"
},
{
type = "toggle",
get = function() return Vanguard.db.show_cast_bar end,
set = function (self, fixedparam, value) Vanguard.db.show_cast_bar = value; Vanguard:RefreshTanks(); Vanguard:ResetBars() end,
set = function(self, fixedparam, value) Vanguard.db.show_cast_bar = value; Vanguard:RefreshTanks(); Vanguard:ResetBars() end,
name = "Show Cast Bar"
},
{
type = "toggle",
get = function() return Vanguard.db.show_power_bar end,
set = function (self, fixedparam, value) Vanguard.db.show_power_bar = value; Vanguard:RefreshTanks(); Vanguard:ResetBars() end,
set = function(self, fixedparam, value) Vanguard.db.show_power_bar = value; Vanguard:RefreshTanks(); Vanguard:ResetBars() end,
name = "Show Power Bar"
},
{
type = "range",
get = function() return Vanguard.db.tank_block_size end,
set = function (self, fixedparam, value) Vanguard.db.tank_block_size = value; Vanguard:RefreshTanks() end,
set = function(self, fixedparam, value) Vanguard.db.tank_block_size = value; Vanguard:RefreshTanks() end,
min = 70,
max = 250,
step = 1,
@@ -1021,7 +1021,7 @@ local build_options_panel = function()
{
type = "range",
get = function() return Vanguard.db.tank_block_size_height end,
set = function (self, fixedparam, value) Vanguard.db.tank_block_size_height = value; Vanguard:RefreshTanks() end,
set = function(self, fixedparam, value) Vanguard.db.tank_block_size_height = value; Vanguard:RefreshTanks() end,
min = 10,
max = 100,
step = 1,
@@ -1030,7 +1030,7 @@ local build_options_panel = function()
{
type = "range",
get = function() return Vanguard.db.tank_block_castbar_size_height end,
set = function (self, fixedparam, value) Vanguard.db.tank_block_castbar_size_height = value; Vanguard:RefreshTanks() end,
set = function(self, fixedparam, value) Vanguard.db.tank_block_castbar_size_height = value; Vanguard:RefreshTanks() end,
min = 10,
max = 60,
step = 1,
@@ -1039,7 +1039,7 @@ local build_options_panel = function()
{
type = "range",
get = function() return Vanguard.db.tank_block_powerbar_size_height end,
set = function (self, fixedparam, value) Vanguard.db.tank_block_powerbar_size_height = value; Vanguard:RefreshTanks() end,
set = function(self, fixedparam, value) Vanguard.db.tank_block_powerbar_size_height = value; Vanguard:RefreshTanks() end,
min = 10,
max = 60,
step = 1,
@@ -1048,7 +1048,7 @@ local build_options_panel = function()
{
type = "color",
get = function() return Vanguard.db.tank_block_color end,
set = function (self, r, g, b, a)
set = function(self, r, g, b, a)
local current = Vanguard.db.tank_block_color;
current[1], current[2], current[3], current[4] = r, g, b, a;
Vanguard:RefreshTanks()
@@ -1061,7 +1061,7 @@ local build_options_panel = function()
{
type = "range",
get = function() return Vanguard.db.aura_offset_y end,
set = function (self, fixedparam, value) Vanguard.db.aura_offset_y = value; Vanguard.RefreshWidgets() end,
set = function(self, fixedparam, value) Vanguard.db.aura_offset_y = value; Vanguard.RefreshWidgets() end,
min = -20,
max = 20,
step = 1,
@@ -1070,7 +1070,7 @@ local build_options_panel = function()
{
type = "range",
get = function() return Vanguard.db.aura_timer_text_size end,
set = function (self, fixedparam, value) Vanguard.db.aura_timer_text_size = value; Vanguard.RefreshWidgets() end,
set = function(self, fixedparam, value) Vanguard.db.aura_timer_text_size = value; Vanguard.RefreshWidgets() end,
min = 6,
max = 24,
step = 1,