Updated LibOpenRaid and DetailsFramework
This commit is contained in:
@@ -152,7 +152,7 @@ checkTop is for some special cases when the top value needs to be calculated imm
|
||||
nameComplement is a string to add on the end of the actor's name, for instance, in cases where the actor is a spell and its name is generated by the container.
|
||||
returns the current value for the actor.
|
||||
|
||||
container:SetValue (actor, amount, nameComplement)
|
||||
container:SetValue(actor, amount, nameComplement)
|
||||
actor is any actor object or any other table containing a member "name" or "id", e.g. {name = "Jeff"} {id = 186451}
|
||||
amount is the amount to set to this actor on the container.
|
||||
nameComplement is a string to add on the end of the actor's name, for instance, in cases where the actor is a spell and its name is generated by the container.
|
||||
|
||||
@@ -756,7 +756,7 @@ checkTop is for some special cases when the top value needs to be calculated imm
|
||||
nameComplement is a string to add on the end of the actor's name, for instance, in cases where the actor is a spell and its name is generated by the container.
|
||||
returns the current value for the actor.
|
||||
|
||||
container:SetValue (actor, amount, nameComplement)
|
||||
container:SetValue(actor, amount, nameComplement)
|
||||
actor is any actor object or any other table containing a member "name" or "id", e.g. {name = "Jeff"} {id = 186451}
|
||||
amount is the amount to set to this actor on the container.
|
||||
nameComplement is a string to add on the end of the actor's name, for instance, in cases where the actor is a spell and its name is generated by the container.
|
||||
|
||||
+171
-171
@@ -50,22 +50,22 @@ function DF:LoadAllSpells (hashMap, indexTable, allSpellsSameName)
|
||||
--pre checking which tables to fill to avoid checking if the table exists during the gigantic loop for performance
|
||||
|
||||
if (not DF.LoadingAuraAlertFrame) then
|
||||
DF.LoadingAuraAlertFrame = CreateFrame ("frame", "DetailsFrameworkLoadingAurasAlert", UIParent, "BackdropTemplate")
|
||||
DF.LoadingAuraAlertFrame:SetSize (340, 75)
|
||||
DF.LoadingAuraAlertFrame:SetPoint ("center")
|
||||
DF.LoadingAuraAlertFrame = CreateFrame("frame", "DetailsFrameworkLoadingAurasAlert", UIParent, "BackdropTemplate")
|
||||
DF.LoadingAuraAlertFrame:SetSize(340, 75)
|
||||
DF.LoadingAuraAlertFrame:SetPoint("center")
|
||||
DF.LoadingAuraAlertFrame:SetFrameStrata ("TOOLTIP")
|
||||
DF:ApplyStandardBackdrop (DF.LoadingAuraAlertFrame)
|
||||
DF.LoadingAuraAlertFrame:SetBackdropBorderColor (1, 0.8, 0.1)
|
||||
DF.LoadingAuraAlertFrame:SetBackdropBorderColor(1, 0.8, 0.1)
|
||||
|
||||
DF.LoadingAuraAlertFrame.IsLoadingLabel1 = DF:CreateLabel (DF.LoadingAuraAlertFrame, "We are currently loading spell names and spell IDs")
|
||||
DF.LoadingAuraAlertFrame.IsLoadingLabel2 = DF:CreateLabel (DF.LoadingAuraAlertFrame, "This may take only a few seconds")
|
||||
DF.LoadingAuraAlertFrame.IsLoadingLabel1 = DF:CreateLabel(DF.LoadingAuraAlertFrame, "We are currently loading spell names and spell IDs")
|
||||
DF.LoadingAuraAlertFrame.IsLoadingLabel2 = DF:CreateLabel(DF.LoadingAuraAlertFrame, "This may take only a few seconds")
|
||||
DF.LoadingAuraAlertFrame.IsLoadingImage1 = DF:CreateImage (DF.LoadingAuraAlertFrame, [[Interface\DialogFrame\UI-Dialog-Icon-AlertOther]], 32, 32)
|
||||
DF.LoadingAuraAlertFrame.IsLoadingLabel1.align = "center"
|
||||
DF.LoadingAuraAlertFrame.IsLoadingLabel2.align = "center"
|
||||
|
||||
DF.LoadingAuraAlertFrame.IsLoadingLabel1:SetPoint ("center", 16, 10)
|
||||
DF.LoadingAuraAlertFrame.IsLoadingLabel2:SetPoint ("center", 16, -5)
|
||||
DF.LoadingAuraAlertFrame.IsLoadingImage1:SetPoint ("left", 10, 0)
|
||||
DF.LoadingAuraAlertFrame.IsLoadingLabel1:SetPoint("center", 16, 10)
|
||||
DF.LoadingAuraAlertFrame.IsLoadingLabel2:SetPoint("center", 16, -5)
|
||||
DF.LoadingAuraAlertFrame.IsLoadingImage1:SetPoint("left", 10, 0)
|
||||
end
|
||||
|
||||
DF.LoadingAuraAlertFrame:Show()
|
||||
@@ -181,16 +181,16 @@ local on_profile_changed = function(self, newdb)
|
||||
self.f_auto:Show()
|
||||
self.f_manual:Hide()
|
||||
|
||||
self.AutomaticTrackingCheckbox:SetValue (true)
|
||||
self.ManualTrackingCheckbox:SetValue (false)
|
||||
self.AutomaticTrackingCheckbox:SetValue(true)
|
||||
self.ManualTrackingCheckbox:SetValue(false)
|
||||
self.desc_label.text = self.LocTexts.AUTOMATIC_DESC
|
||||
|
||||
elseif (newdb.aura_tracker.track_method == 0x2) then
|
||||
self.f_auto:Hide()
|
||||
self.f_manual:Show()
|
||||
|
||||
self.AutomaticTrackingCheckbox:SetValue (false)
|
||||
self.ManualTrackingCheckbox:SetValue (true)
|
||||
self.AutomaticTrackingCheckbox:SetValue(false)
|
||||
self.ManualTrackingCheckbox:SetValue(true)
|
||||
self.desc_label.text = self.LocTexts.MANUAL_DESC
|
||||
end
|
||||
end
|
||||
@@ -210,24 +210,24 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
|
||||
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
|
||||
local f = CreateFrame ("frame", name, parent, "BackdropTemplate")
|
||||
local f = CreateFrame("frame", name, parent, "BackdropTemplate")
|
||||
f.db = db
|
||||
f.OnProfileChanged = on_profile_changed
|
||||
f.LocTexts = texts
|
||||
options = options or {}
|
||||
self.table.deploy (options, aura_panel_defaultoptions)
|
||||
|
||||
local f_auto = CreateFrame ("frame", "$parent_Automatic", f, "BackdropTemplate")
|
||||
local f_manual = CreateFrame ("frame", "$parent_Manual", f, "BackdropTemplate")
|
||||
f_auto:SetPoint ("topleft", f, "topleft", 0, -24)
|
||||
f_manual:SetPoint ("topleft", f, "topleft", 0, -24)
|
||||
f_auto:SetSize (600, 600)
|
||||
f_manual:SetSize (600, 600)
|
||||
local f_auto = CreateFrame("frame", "$parent_Automatic", f, "BackdropTemplate")
|
||||
local f_manual = CreateFrame("frame", "$parent_Manual", f, "BackdropTemplate")
|
||||
f_auto:SetPoint("topleft", f, "topleft", 0, -24)
|
||||
f_manual:SetPoint("topleft", f, "topleft", 0, -24)
|
||||
f_auto:SetSize(600, 600)
|
||||
f_manual:SetSize(600, 600)
|
||||
f.f_auto = f_auto
|
||||
f.f_manual = f_manual
|
||||
|
||||
--check if the texts table is valid and also deploy default values into the table in case some value is nil
|
||||
texts = (type (texts == "table") and texts) or default_text_for_aura_frame
|
||||
texts = (type(texts == "table") and texts) or default_text_for_aura_frame
|
||||
DF.table.deploy (texts, default_text_for_aura_frame)
|
||||
|
||||
-------------
|
||||
@@ -243,52 +243,52 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
if (method == 0x1) then
|
||||
f_auto:Show()
|
||||
f_manual:Hide()
|
||||
f.AutomaticTrackingCheckbox:SetValue (true)
|
||||
f.ManualTrackingCheckbox:SetValue (false)
|
||||
f.AutomaticTrackingCheckbox:SetValue(true)
|
||||
f.ManualTrackingCheckbox:SetValue(false)
|
||||
f.desc_label.text = texts.AUTOMATIC_DESC
|
||||
|
||||
elseif (method == 0x2) then
|
||||
f_auto:Hide()
|
||||
f_manual:Show()
|
||||
f.AutomaticTrackingCheckbox:SetValue (false)
|
||||
f.ManualTrackingCheckbox:SetValue (true)
|
||||
f.AutomaticTrackingCheckbox:SetValue(false)
|
||||
f.ManualTrackingCheckbox:SetValue(true)
|
||||
f.desc_label.text = texts.MANUAL_DESC
|
||||
end
|
||||
end
|
||||
|
||||
local background_method_selection = CreateFrame ("frame", nil, f, "BackdropTemplate")
|
||||
background_method_selection:SetHeight (82)
|
||||
background_method_selection:SetPoint ("topleft", f, "topleft", 0, 0)
|
||||
background_method_selection:SetPoint ("topright", f, "topright", 0, 0)
|
||||
local background_method_selection = CreateFrame("frame", nil, f, "BackdropTemplate")
|
||||
background_method_selection:SetHeight(82)
|
||||
background_method_selection:SetPoint("topleft", f, "topleft", 0, 0)
|
||||
background_method_selection:SetPoint("topright", f, "topright", 0, 0)
|
||||
DF:ApplyStandardBackdrop (background_method_selection)
|
||||
|
||||
local tracking_method_label = self:CreateLabel (background_method_selection, texts.METHOD, 12, "orange")
|
||||
tracking_method_label:SetPoint ("topleft", background_method_selection, "topleft", 6, -4)
|
||||
local tracking_method_label = self:CreateLabel(background_method_selection, texts.METHOD, 12, "orange")
|
||||
tracking_method_label:SetPoint("topleft", background_method_selection, "topleft", 6, -4)
|
||||
|
||||
f.desc_label = self:CreateLabel (background_method_selection, "", 10, "silver")
|
||||
f.desc_label:SetPoint ("left", background_method_selection, "left", 130, 0)
|
||||
f.desc_label = self:CreateLabel(background_method_selection, "", 10, "silver")
|
||||
f.desc_label:SetPoint("left", background_method_selection, "left", 130, 0)
|
||||
f.desc_label:SetJustifyV ("top")
|
||||
|
||||
local automatic_tracking_checkbox = DF:CreateSwitch (background_method_selection, on_switch_tracking_method, f.db.aura_tracker.track_method == 0x1, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"))
|
||||
automatic_tracking_checkbox.Method = 0x1
|
||||
automatic_tracking_checkbox:SetAsCheckBox()
|
||||
automatic_tracking_checkbox:SetSize (24, 24)
|
||||
automatic_tracking_checkbox:SetSize(24, 24)
|
||||
f.AutomaticTrackingCheckbox = automatic_tracking_checkbox
|
||||
|
||||
local automatic_tracking_label = DF:CreateLabel (background_method_selection, "Automatic")
|
||||
automatic_tracking_label:SetPoint ("left", automatic_tracking_checkbox, "right", 2, 0)
|
||||
local automatic_tracking_label = DF:CreateLabel(background_method_selection, "Automatic")
|
||||
automatic_tracking_label:SetPoint("left", automatic_tracking_checkbox, "right", 2, 0)
|
||||
|
||||
local manual_tracking_checkbox = DF:CreateSwitch (background_method_selection, on_switch_tracking_method, f.db.aura_tracker.track_method == 0x2, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"))
|
||||
manual_tracking_checkbox.Method = 0x2
|
||||
manual_tracking_checkbox:SetAsCheckBox()
|
||||
manual_tracking_checkbox:SetSize (24, 24)
|
||||
manual_tracking_checkbox:SetSize(24, 24)
|
||||
f.ManualTrackingCheckbox = manual_tracking_checkbox
|
||||
|
||||
local manual_tracking_label = DF:CreateLabel (background_method_selection, "Manual")
|
||||
manual_tracking_label:SetPoint ("left", manual_tracking_checkbox, "right", 2, 0)
|
||||
local manual_tracking_label = DF:CreateLabel(background_method_selection, "Manual")
|
||||
manual_tracking_label:SetPoint("left", manual_tracking_checkbox, "right", 2, 0)
|
||||
|
||||
automatic_tracking_checkbox:SetPoint ("topleft", tracking_method_label, "bottomleft", 0, -6)
|
||||
manual_tracking_checkbox:SetPoint ("topleft", automatic_tracking_checkbox, "bottomleft", 0, -6)
|
||||
automatic_tracking_checkbox:SetPoint("topleft", tracking_method_label, "bottomleft", 0, -6)
|
||||
manual_tracking_checkbox:SetPoint("topleft", automatic_tracking_checkbox, "bottomleft", 0, -6)
|
||||
|
||||
|
||||
-------- anchors points
|
||||
@@ -342,30 +342,30 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
local textEntryWidth = 120
|
||||
|
||||
--create the background
|
||||
local background_add_blacklist = CreateFrame ("frame", nil, f_auto, "BackdropTemplate")
|
||||
background_add_blacklist:SetSize (textEntryWidth + 10, 135)
|
||||
local background_add_blacklist = CreateFrame("frame", nil, f_auto, "BackdropTemplate")
|
||||
background_add_blacklist:SetSize(textEntryWidth + 10, 135)
|
||||
DF:ApplyStandardBackdrop (background_add_blacklist)
|
||||
background_add_blacklist.__background:SetVertexColor (0.47, 0.27, 0.27)
|
||||
|
||||
local background_add_tracklist = CreateFrame ("frame", nil, f_auto, "BackdropTemplate")
|
||||
background_add_tracklist:SetSize (textEntryWidth + 10, 135)
|
||||
local background_add_tracklist = CreateFrame("frame", nil, f_auto, "BackdropTemplate")
|
||||
background_add_tracklist:SetSize(textEntryWidth + 10, 135)
|
||||
DF:ApplyStandardBackdrop (background_add_tracklist)
|
||||
background_add_tracklist.__background:SetVertexColor (0.27, 0.27, 0.47)
|
||||
|
||||
--black list
|
||||
--create labels
|
||||
local buff_blacklist_label = self:CreateLabel (background_add_blacklist, texts.MANUAL_ADD_BLACKLIST_BUFF, DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
local debuff_blacklist_label = self:CreateLabel (background_add_blacklist, texts.MANUAL_ADD_BLACKLIST_DEBUFF, DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
local buff_blacklist_label = self:CreateLabel(background_add_blacklist, texts.MANUAL_ADD_BLACKLIST_BUFF, DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
local debuff_blacklist_label = self:CreateLabel(background_add_blacklist, texts.MANUAL_ADD_BLACKLIST_DEBUFF, DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
|
||||
local buff_name_blacklist_entry = self:CreateTextEntry (background_add_blacklist, function()end, textEntryWidth, 20, "AddBuffBlacklistTextBox", _, _, options_dropdown_template)
|
||||
buff_name_blacklist_entry:SetHook ("OnEditFocusGained", load_all_spells)
|
||||
buff_name_blacklist_entry:SetJustifyH ("left")
|
||||
buff_name_blacklist_entry:SetHook("OnEditFocusGained", load_all_spells)
|
||||
buff_name_blacklist_entry:SetJustifyH("left")
|
||||
buff_name_blacklist_entry.tooltip = "Enter the buff name using lower case letters."
|
||||
f_auto.AddBuffBlacklistTextBox = buff_name_blacklist_entry
|
||||
|
||||
local debuff_name_blacklist_entry = self:CreateTextEntry (background_add_blacklist, function()end, textEntryWidth, 20, "AddDebuffBlacklistTextBox", _, _, options_dropdown_template)
|
||||
debuff_name_blacklist_entry:SetHook ("OnEditFocusGained", load_all_spells)
|
||||
debuff_name_blacklist_entry:SetJustifyH ("left")
|
||||
debuff_name_blacklist_entry:SetHook("OnEditFocusGained", load_all_spells)
|
||||
debuff_name_blacklist_entry:SetJustifyH("left")
|
||||
debuff_name_blacklist_entry.tooltip = "Enter the debuff name using lower case letters."
|
||||
f_auto.AddDebuffBlacklistTextBox = debuff_name_blacklist_entry
|
||||
|
||||
@@ -413,7 +413,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
local add_blacklist_buff_button = self:CreateButton (background_add_blacklist, function()
|
||||
local text = buff_name_blacklist_entry.text
|
||||
buff_name_blacklist_entry:SetText ("")
|
||||
buff_name_blacklist_entry:SetText("")
|
||||
buff_name_blacklist_entry:ClearFocus()
|
||||
|
||||
if (text ~= "") then
|
||||
@@ -440,7 +440,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
local add_blacklist_buff_button_id = self:CreateButton (background_add_blacklist, function()
|
||||
local text = buff_name_blacklist_entry.text
|
||||
buff_name_blacklist_entry:SetText ("")
|
||||
buff_name_blacklist_entry:SetText("")
|
||||
buff_name_blacklist_entry:ClearFocus()
|
||||
|
||||
if (text ~= "") then
|
||||
@@ -471,7 +471,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
local add_blacklist_debuff_button = self:CreateButton (background_add_blacklist, function()
|
||||
local text = debuff_name_blacklist_entry.text
|
||||
debuff_name_blacklist_entry:SetText ("")
|
||||
debuff_name_blacklist_entry:SetText("")
|
||||
debuff_name_blacklist_entry:ClearFocus()
|
||||
|
||||
if (text ~= "") then
|
||||
@@ -497,7 +497,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
local add_blacklist_debuff_button_id = self:CreateButton (background_add_blacklist, function()
|
||||
local text = debuff_name_blacklist_entry.text
|
||||
debuff_name_blacklist_entry:SetText ("")
|
||||
debuff_name_blacklist_entry:SetText("")
|
||||
debuff_name_blacklist_entry:ClearFocus()
|
||||
|
||||
if (text ~= "") then
|
||||
@@ -527,24 +527,24 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
|
||||
--track list
|
||||
local buff_tracklist_label = self:CreateLabel (background_add_tracklist, texts.MANUAL_ADD_TRACKLIST_BUFF, DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
local debuff_tracklist_label = self:CreateLabel (background_add_tracklist, texts.MANUAL_ADD_TRACKLIST_DEBUFF, DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
local buff_tracklist_label = self:CreateLabel(background_add_tracklist, texts.MANUAL_ADD_TRACKLIST_BUFF, DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
local debuff_tracklist_label = self:CreateLabel(background_add_tracklist, texts.MANUAL_ADD_TRACKLIST_DEBUFF, DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
|
||||
local buff_name_tracklist_entry = self:CreateTextEntry (background_add_tracklist, function()end, textEntryWidth, 20, "AddBuffTracklistTextBox", _, _, options_dropdown_template)
|
||||
buff_name_tracklist_entry:SetHook ("OnEditFocusGained", load_all_spells)
|
||||
buff_name_tracklist_entry:SetJustifyH ("left")
|
||||
buff_name_tracklist_entry:SetHook("OnEditFocusGained", load_all_spells)
|
||||
buff_name_tracklist_entry:SetJustifyH("left")
|
||||
buff_name_tracklist_entry.tooltip = "Enter the buff name using lower case letters."
|
||||
f_auto.AddBuffTracklistTextBox = buff_name_tracklist_entry
|
||||
|
||||
local debuff_name_tracklist_entry = self:CreateTextEntry (background_add_tracklist, function()end, textEntryWidth, 20, "AddDebuffTracklistTextBox", _, _, options_dropdown_template)
|
||||
debuff_name_tracklist_entry:SetHook ("OnEditFocusGained", load_all_spells)
|
||||
debuff_name_tracklist_entry:SetJustifyH ("left")
|
||||
debuff_name_tracklist_entry:SetHook("OnEditFocusGained", load_all_spells)
|
||||
debuff_name_tracklist_entry:SetJustifyH("left")
|
||||
debuff_name_tracklist_entry.tooltip = "Enter the debuff name using lower case letters."
|
||||
f_auto.AddDebuffTracklistTextBox = debuff_name_tracklist_entry
|
||||
|
||||
local add_tracklist_debuff_button = self:CreateButton (background_add_tracklist, function()
|
||||
local text = debuff_name_tracklist_entry.text
|
||||
debuff_name_tracklist_entry:SetText ("")
|
||||
debuff_name_tracklist_entry:SetText("")
|
||||
debuff_name_tracklist_entry:ClearFocus()
|
||||
|
||||
if (text ~= "") then
|
||||
@@ -570,7 +570,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
local add_tracklist_debuff_button_id = self:CreateButton (background_add_tracklist, function()
|
||||
local text = debuff_name_tracklist_entry.text
|
||||
debuff_name_tracklist_entry:SetText ("")
|
||||
debuff_name_tracklist_entry:SetText("")
|
||||
debuff_name_tracklist_entry:ClearFocus()
|
||||
|
||||
if (text ~= "") then
|
||||
@@ -599,7 +599,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
local add_tracklist_buff_button = self:CreateButton (background_add_tracklist, function()
|
||||
local text = buff_name_tracklist_entry.text
|
||||
buff_name_tracklist_entry:SetText ("")
|
||||
buff_name_tracklist_entry:SetText("")
|
||||
buff_name_tracklist_entry:ClearFocus()
|
||||
|
||||
if (text ~= "") then
|
||||
@@ -627,7 +627,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
local add_tracklist_buff_button_id = self:CreateButton (background_add_tracklist, function()
|
||||
local text = buff_name_tracklist_entry.text
|
||||
buff_name_tracklist_entry:SetText ("")
|
||||
buff_name_tracklist_entry:SetText("")
|
||||
buff_name_tracklist_entry:ClearFocus()
|
||||
|
||||
if (text ~= "") then
|
||||
@@ -657,33 +657,33 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
end, textEntryWidth/2 -3, 20, "By ID", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
|
||||
|
||||
--anchors:
|
||||
background_add_blacklist:SetPoint ("topleft", f_auto, "topleft", 0, y)
|
||||
background_add_tracklist:SetPoint ("topleft", background_add_blacklist, "bottomleft", 0, -10)
|
||||
background_add_blacklist:SetPoint("topleft", f_auto, "topleft", 0, y)
|
||||
background_add_tracklist:SetPoint("topleft", background_add_blacklist, "bottomleft", 0, -10)
|
||||
|
||||
--debuff blacklist
|
||||
debuff_name_blacklist_entry:SetPoint ("topleft", background_add_blacklist, "topleft", 5, -20)
|
||||
debuff_blacklist_label:SetPoint ("bottomleft", debuff_name_blacklist_entry, "topleft", 0, 2)
|
||||
add_blacklist_debuff_button:SetPoint ("topleft", debuff_name_blacklist_entry, "bottomleft", 0, -2)
|
||||
add_blacklist_debuff_button_id:SetPoint ("left", add_blacklist_debuff_button, "right", 1, 0)
|
||||
debuff_name_blacklist_entry:SetPoint("topleft", background_add_blacklist, "topleft", 5, -20)
|
||||
debuff_blacklist_label:SetPoint("bottomleft", debuff_name_blacklist_entry, "topleft", 0, 2)
|
||||
add_blacklist_debuff_button:SetPoint("topleft", debuff_name_blacklist_entry, "bottomleft", 0, -2)
|
||||
add_blacklist_debuff_button_id:SetPoint("left", add_blacklist_debuff_button, "right", 1, 0)
|
||||
|
||||
--buff blacklist
|
||||
buff_blacklist_label:SetPoint ("topleft", add_blacklist_debuff_button.widget, "bottomleft", 0, -10)
|
||||
buff_name_blacklist_entry:SetPoint ("topleft", buff_blacklist_label, "bottomleft", 0, -2)
|
||||
add_blacklist_buff_button:SetPoint ("topleft", buff_name_blacklist_entry, "bottomleft", 0, -2)
|
||||
add_blacklist_buff_button_id:SetPoint ("left", add_blacklist_buff_button, "right", 1, 0)
|
||||
buff_blacklist_label:SetPoint("topleft", add_blacklist_debuff_button.widget, "bottomleft", 0, -10)
|
||||
buff_name_blacklist_entry:SetPoint("topleft", buff_blacklist_label, "bottomleft", 0, -2)
|
||||
add_blacklist_buff_button:SetPoint("topleft", buff_name_blacklist_entry, "bottomleft", 0, -2)
|
||||
add_blacklist_buff_button_id:SetPoint("left", add_blacklist_buff_button, "right", 1, 0)
|
||||
|
||||
|
||||
--debuff tracklist
|
||||
debuff_name_tracklist_entry:SetPoint ("topleft", background_add_tracklist, "topleft", 5, -20)
|
||||
debuff_tracklist_label:SetPoint ("bottomleft", debuff_name_tracklist_entry, "topleft", 0, 2)
|
||||
add_tracklist_debuff_button:SetPoint ("topleft", debuff_name_tracklist_entry, "bottomleft", 0, -2)
|
||||
add_tracklist_debuff_button_id:SetPoint ("left", add_tracklist_debuff_button, "right", 1, 0)
|
||||
debuff_name_tracklist_entry:SetPoint("topleft", background_add_tracklist, "topleft", 5, -20)
|
||||
debuff_tracklist_label:SetPoint("bottomleft", debuff_name_tracklist_entry, "topleft", 0, 2)
|
||||
add_tracklist_debuff_button:SetPoint("topleft", debuff_name_tracklist_entry, "bottomleft", 0, -2)
|
||||
add_tracklist_debuff_button_id:SetPoint("left", add_tracklist_debuff_button, "right", 1, 0)
|
||||
|
||||
--buff tracklist
|
||||
buff_tracklist_label:SetPoint ("topleft", add_tracklist_debuff_button.widget, "bottomleft", 0, -10)
|
||||
buff_name_tracklist_entry:SetPoint ("topleft", buff_tracklist_label, "bottomleft", 0, -2)
|
||||
add_tracklist_buff_button:SetPoint ("topleft", buff_name_tracklist_entry, "bottomleft", 0, -2)
|
||||
add_tracklist_buff_button_id:SetPoint ("left", add_tracklist_buff_button, "right", 1, 0)
|
||||
buff_tracklist_label:SetPoint("topleft", add_tracklist_debuff_button.widget, "bottomleft", 0, -10)
|
||||
buff_name_tracklist_entry:SetPoint("topleft", buff_tracklist_label, "bottomleft", 0, -2)
|
||||
add_tracklist_buff_button:SetPoint("topleft", buff_name_tracklist_entry, "bottomleft", 0, -2)
|
||||
add_tracklist_buff_button_id:SetPoint("left", add_tracklist_buff_button, "right", 1, 0)
|
||||
|
||||
local ALL_BUFFS = {}
|
||||
local ALL_DEBUFFS = {}
|
||||
@@ -699,7 +699,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
if not flag then
|
||||
GameCooltip2:Preset (2)
|
||||
GameCooltip2:SetOwner (self, "left", "right", 2, 0)
|
||||
GameCooltip2:SetOption ("TextSize", 10)
|
||||
GameCooltip2:SetOption("TextSize", 10)
|
||||
|
||||
local spellName, _, spellIcon = GetSpellInfo(value)
|
||||
if (spellName) then
|
||||
@@ -721,9 +721,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
if (spellsWithSameName) then
|
||||
GameCooltip2:Preset (2)
|
||||
GameCooltip2:SetOwner (self, "left", "right", 2, 0)
|
||||
GameCooltip2:SetOption ("TextSize", 10)
|
||||
GameCooltip2:SetOption("TextSize", 10)
|
||||
|
||||
for i, spellID in ipairs (spellsWithSameName) do
|
||||
for i, spellID in ipairs(spellsWithSameName) do
|
||||
local spellName, _, spellIcon = GetSpellInfo(spellID)
|
||||
if (spellName) then
|
||||
GameCooltip2:AddLine (spellName .. " (" .. spellID .. ")")
|
||||
@@ -766,18 +766,18 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
line.Flag = flag
|
||||
|
||||
if flag then
|
||||
line.name:SetText (spellName)
|
||||
line.name:SetText(spellName)
|
||||
else
|
||||
line.name:SetText (spellName .. " (" .. spellID .. ")")
|
||||
line.name:SetText(spellName .. " (" .. spellID .. ")")
|
||||
end
|
||||
line.icon:SetTexture (spellIcon)
|
||||
line.icon:SetTexture(spellIcon)
|
||||
line.icon:SetTexCoord (.1, .9, .1, .9)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local lineOnEnter = function(self)
|
||||
self:SetBackdropColor (unpack (backdropColor_OnEnter))
|
||||
self:SetBackdropColor(unpack (backdropColor_OnEnter))
|
||||
|
||||
--GameTooltip:SetOwner (self, "ANCHOR_CURSOR")
|
||||
--GameTooltip:SetSpellByID(self.SpellID)
|
||||
@@ -786,7 +786,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
end
|
||||
|
||||
local lineOnLeave = function(self)
|
||||
self:SetBackdropColor (unpack (backdropColor))
|
||||
self:SetBackdropColor(unpack (backdropColor))
|
||||
--GameTooltip:Hide()
|
||||
end
|
||||
|
||||
@@ -801,31 +801,31 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
end
|
||||
|
||||
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)
|
||||
line:SetScript ("OnEnter", autoTrackList_LineOnEnter)
|
||||
local line = CreateFrame("button", "$parentLine" .. index, self, "BackdropTemplate")
|
||||
line:SetPoint("topleft", self, "topleft", 1, - ((index - 1) * (lineHeight + 1)) - 1)
|
||||
line:SetSize(scrollWidth - 2, lineHeight)
|
||||
line:SetScript("OnEnter", autoTrackList_LineOnEnter)
|
||||
line:HookScript ("OnEnter", lineOnEnter)
|
||||
line:SetScript ("OnLeave", autoTrackList_LineOnLeave)
|
||||
line:SetScript("OnLeave", autoTrackList_LineOnLeave)
|
||||
line:HookScript ("OnLeave", lineOnLeave)
|
||||
|
||||
line:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
line:SetBackdropColor (unpack (backdropColor))
|
||||
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
line:SetBackdropColor(unpack (backdropColor))
|
||||
|
||||
local icon = line:CreateTexture ("$parentIcon", "overlay")
|
||||
icon:SetSize (lineHeight - 2, lineHeight - 2)
|
||||
local icon = line:CreateTexture("$parentIcon", "overlay")
|
||||
icon:SetSize(lineHeight - 2, lineHeight - 2)
|
||||
|
||||
local name = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
|
||||
DF:SetFontSize (name, 10)
|
||||
|
||||
local remove_button = CreateFrame ("button", "$parentRemoveButton", line, "UIPanelCloseButton")
|
||||
remove_button:SetSize (16, 16)
|
||||
remove_button:SetScript ("OnClick", onRemoveClick)
|
||||
remove_button:SetPoint ("topright", line, "topright")
|
||||
local remove_button = CreateFrame("button", "$parentRemoveButton", line, "UIPanelCloseButton")
|
||||
remove_button:SetSize(16, 16)
|
||||
remove_button:SetScript("OnClick", onRemoveClick)
|
||||
remove_button:SetPoint("topright", line, "topright")
|
||||
remove_button:GetNormalTexture():SetDesaturated (true)
|
||||
|
||||
icon:SetPoint ("left", line, "left", 2, 0)
|
||||
name:SetPoint ("left", icon, "right", 3, 0)
|
||||
icon:SetPoint("left", line, "left", 2, 0)
|
||||
name:SetPoint("left", icon, "right", 3, 0)
|
||||
|
||||
line.icon = icon
|
||||
line.name = name
|
||||
@@ -863,9 +863,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
self:DoRefresh()
|
||||
end
|
||||
|
||||
local title = DF:CreateLabel (parent, title)
|
||||
local title = DF:CreateLabel(parent, title)
|
||||
title.textcolor = "silver"
|
||||
title:SetPoint ("bottomleft", scroll, "topleft", 0, 2)
|
||||
title:SetPoint("bottomleft", scroll, "topleft", 0, 2)
|
||||
|
||||
for i = 1, lineAmount do
|
||||
scroll:CreateLine (createLineFunc)
|
||||
@@ -900,17 +900,17 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
local xLocation = 140
|
||||
scrollWidth = scrollWidth + 20
|
||||
|
||||
debuff_ignored:SetPoint ("topleft", f_auto, "topleft", 0 + xLocation, y)
|
||||
buff_ignored:SetPoint ("topleft", f_auto, "topleft", 8 + scrollWidth + xLocation, y)
|
||||
debuff_tracked:SetPoint ("topleft", f_auto, "topleft", 16 + (scrollWidth * 2) + xLocation, y)
|
||||
buff_tracked:SetPoint ("topleft", f_auto, "topleft", 24 + (scrollWidth * 3) + xLocation, y)
|
||||
debuff_ignored:SetPoint("topleft", f_auto, "topleft", 0 + xLocation, y)
|
||||
buff_ignored:SetPoint("topleft", f_auto, "topleft", 8 + scrollWidth + xLocation, y)
|
||||
debuff_tracked:SetPoint("topleft", f_auto, "topleft", 16 + (scrollWidth * 2) + xLocation, y)
|
||||
buff_tracked:SetPoint("topleft", f_auto, "topleft", 24 + (scrollWidth * 3) + xLocation, y)
|
||||
|
||||
f.buff_ignored = buff_ignored
|
||||
f.debuff_ignored = debuff_ignored
|
||||
f.buff_tracked = buff_tracked
|
||||
f.debuff_tracked = debuff_tracked
|
||||
|
||||
f_auto:SetScript ("OnShow", function()
|
||||
f_auto:SetScript("OnShow", function()
|
||||
for i = 1, BUFF_MAX_DISPLAY do
|
||||
local name, texture, count, debuffType, duration, expirationTime, caster, _, nameplateShowPersonal, spellId, _, _, _, nameplateShowAll = UnitAura ("player", i, "HELPFUL")
|
||||
if (name) then
|
||||
@@ -928,7 +928,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
debuff_ignored:DoRefresh()
|
||||
|
||||
end)
|
||||
f_auto:SetScript ("OnHide", function()
|
||||
f_auto:SetScript("OnHide", function()
|
||||
--
|
||||
end)
|
||||
|
||||
@@ -942,7 +942,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
-------manual
|
||||
|
||||
--> build the two aura scrolls for buff and debuff
|
||||
--build the two aura scrolls for buff and debuff
|
||||
|
||||
local scroll_width = width
|
||||
local scroll_height = height
|
||||
@@ -953,7 +953,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
local backdrop_color_on_enter = {.8, .8, .8, 0.4}
|
||||
|
||||
local line_onenter = function(self)
|
||||
self:SetBackdropColor (unpack (backdrop_color_on_enter))
|
||||
self:SetBackdropColor(unpack (backdrop_color_on_enter))
|
||||
local spellid = select (7, GetSpellInfo(self.value))
|
||||
if (spellid) then
|
||||
GameTooltip:SetOwner (self, "ANCHOR_CURSOR")
|
||||
@@ -964,7 +964,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
end
|
||||
|
||||
local line_onleave = function(self)
|
||||
self:SetBackdropColor (unpack (backdrop_color))
|
||||
self:SetBackdropColor(unpack (backdrop_color))
|
||||
GameTooltip:Hide()
|
||||
end
|
||||
|
||||
@@ -983,28 +983,28 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
end
|
||||
|
||||
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)
|
||||
line:SetScript ("OnEnter", line_onenter)
|
||||
line:SetScript ("OnLeave", line_onleave)
|
||||
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)
|
||||
line:SetScript("OnEnter", line_onenter)
|
||||
line:SetScript("OnLeave", line_onleave)
|
||||
|
||||
line:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
line:SetBackdropColor (unpack (backdrop_color))
|
||||
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
line:SetBackdropColor(unpack (backdrop_color))
|
||||
|
||||
local icon = line:CreateTexture ("$parentIcon", "overlay")
|
||||
icon:SetSize (scroll_line_height - 2, scroll_line_height - 2)
|
||||
local icon = line:CreateTexture("$parentIcon", "overlay")
|
||||
icon:SetSize(scroll_line_height - 2, scroll_line_height - 2)
|
||||
|
||||
local name = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
|
||||
|
||||
local remove_button = CreateFrame ("button", "$parentRemoveButton", line, "UIPanelCloseButton")
|
||||
remove_button:SetSize (16, 16)
|
||||
remove_button:SetScript ("OnClick", onclick_remove_button)
|
||||
remove_button:SetPoint ("topright", line, "topright")
|
||||
local remove_button = CreateFrame("button", "$parentRemoveButton", line, "UIPanelCloseButton")
|
||||
remove_button:SetSize(16, 16)
|
||||
remove_button:SetScript("OnClick", onclick_remove_button)
|
||||
remove_button:SetPoint("topright", line, "topright")
|
||||
remove_button:GetNormalTexture():SetDesaturated (true)
|
||||
|
||||
icon:SetPoint ("left", line, "left", 2, 0)
|
||||
name:SetPoint ("left", icon, "right", 2, 0)
|
||||
icon:SetPoint("left", line, "left", 2, 0)
|
||||
name:SetPoint("left", icon, "right", 2, 0)
|
||||
|
||||
line.icon = icon
|
||||
line.name = name
|
||||
@@ -1022,19 +1022,19 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
local name, _, icon = GetSpellInfo(aura)
|
||||
line.value = aura
|
||||
if (name) then
|
||||
line.name:SetText (name)
|
||||
line.icon:SetTexture (icon)
|
||||
line.name:SetText(name)
|
||||
line.icon:SetTexture(icon)
|
||||
line.icon:SetTexCoord (.1, .9, .1, .9)
|
||||
else
|
||||
line.name:SetText (aura)
|
||||
line.icon:SetTexture ([[Interface\InventoryItems\WoWUnknownItem01]])
|
||||
line.name:SetText(aura)
|
||||
line.icon:SetTexture([[Interface\InventoryItems\WoWUnknownItem01]])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
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)
|
||||
buffs_added:SetPoint("topleft", f_manual, "topleft", 0, y)
|
||||
DF:ReskinSlider(buffs_added)
|
||||
|
||||
for i = 1, scroll_lines do
|
||||
@@ -1042,7 +1042,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
end
|
||||
|
||||
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)
|
||||
debuffs_added:SetPoint("topleft", f_manual, "topleft", width+30, y)
|
||||
DF:ReskinSlider(debuffs_added)
|
||||
|
||||
for i = 1, scroll_lines do
|
||||
@@ -1052,40 +1052,40 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
f.buffs_added = buffs_added
|
||||
f.debuffs_added = debuffs_added
|
||||
|
||||
local buffs_added_name = DF:CreateLabel (buffs_added, "Buffs", 12, "silver")
|
||||
local buffs_added_name = DF:CreateLabel(buffs_added, "Buffs", 12, "silver")
|
||||
buffs_added_name:SetTemplate (DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
buffs_added_name:SetPoint ("bottomleft", buffs_added, "topleft", 0, 2)
|
||||
buffs_added_name:SetPoint("bottomleft", buffs_added, "topleft", 0, 2)
|
||||
buffs_added.Title = buffs_added_name
|
||||
|
||||
local debuffs_added_name = DF:CreateLabel (debuffs_added, "Debuffs", 12, "silver")
|
||||
local debuffs_added_name = DF:CreateLabel(debuffs_added, "Debuffs", 12, "silver")
|
||||
debuffs_added_name:SetTemplate (DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
debuffs_added_name:SetPoint ("bottomleft", debuffs_added, "topleft", 0, 2)
|
||||
debuffs_added_name:SetPoint("bottomleft", debuffs_added, "topleft", 0, 2)
|
||||
debuffs_added.Title = debuffs_added_name
|
||||
|
||||
--> build the text entry to type the spellname
|
||||
local new_buff_string = self:CreateLabel (f_manual, "Add Buff")
|
||||
local new_debuff_string = self:CreateLabel (f_manual, "Add Debuff")
|
||||
-- build the text entry to type the spellname
|
||||
local new_buff_string = self:CreateLabel(f_manual, "Add Buff")
|
||||
local new_debuff_string = self:CreateLabel(f_manual, "Add Debuff")
|
||||
local new_buff_entry = self:CreateTextEntry (f_manual, function()end, 200, 20, "NewBuffTextBox", _, _, options_dropdown_template)
|
||||
local new_debuff_entry = self:CreateTextEntry (f_manual, function()end, 200, 20, "NewDebuffTextBox", _, _, options_dropdown_template)
|
||||
|
||||
new_buff_entry:SetHook ("OnEditFocusGained", load_all_spells)
|
||||
new_debuff_entry:SetHook ("OnEditFocusGained", load_all_spells)
|
||||
new_buff_entry:SetHook("OnEditFocusGained", load_all_spells)
|
||||
new_debuff_entry:SetHook("OnEditFocusGained", load_all_spells)
|
||||
new_buff_entry.tooltip = "Enter the buff name using lower case letters.\n\nYou can add several spells at once using |cFFFFFF00;|r to separate each spell name."
|
||||
new_debuff_entry.tooltip = "Enter the debuff name using lower case letters.\n\nYou can add several spells at once using |cFFFFFF00;|r to separate each spell name."
|
||||
|
||||
new_buff_entry:SetJustifyH ("left")
|
||||
new_debuff_entry:SetJustifyH ("left")
|
||||
new_buff_entry:SetJustifyH("left")
|
||||
new_debuff_entry:SetJustifyH("left")
|
||||
|
||||
local add_buff_button = self:CreateButton (f_manual, function()
|
||||
|
||||
local text = new_buff_entry.text
|
||||
new_buff_entry:SetText ("")
|
||||
new_buff_entry:SetText("")
|
||||
new_buff_entry:ClearFocus()
|
||||
|
||||
if (text ~= "") then
|
||||
--> check for more than one spellname
|
||||
--check for more than one spellname
|
||||
if (text:find (";")) then
|
||||
for _, spellName in ipairs ({strsplit (";", text)}) do
|
||||
for _, spellName in ipairs({strsplit (";", text)}) do
|
||||
spellName = self:trim (spellName)
|
||||
local spellID = get_spellID_from_string (spellName)
|
||||
|
||||
@@ -1127,12 +1127,12 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
local add_debuff_button = self:CreateButton (f_manual, function()
|
||||
local text = new_debuff_entry.text
|
||||
new_debuff_entry:SetText ("")
|
||||
new_debuff_entry:SetText("")
|
||||
new_debuff_entry:ClearFocus()
|
||||
if (text ~= "") then
|
||||
--> check for more than one spellname
|
||||
--check for more than one spellname
|
||||
if (text:find (";")) then
|
||||
for _, spellName in ipairs ({strsplit (";", text)}) do
|
||||
for _, spellName in ipairs({strsplit (";", text)}) do
|
||||
spellName = self:trim (spellName)
|
||||
local spellID = get_spellID_from_string (spellName)
|
||||
|
||||
@@ -1173,15 +1173,15 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
end
|
||||
end, 100, 20, "Add Debuff", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
|
||||
local multiple_spells_label = DF:CreateLabel (buffs_added, "You can add multiple auras at once by separating them with ';'.\nExample: Fireball; Frostbolt; Flamestrike", 10, "gray")
|
||||
multiple_spells_label:SetSize (350, 24)
|
||||
local multiple_spells_label = DF:CreateLabel(buffs_added, "You can add multiple auras at once by separating them with ';'.\nExample: Fireball; Frostbolt; Flamestrike", 10, "gray")
|
||||
multiple_spells_label:SetSize(350, 24)
|
||||
multiple_spells_label:SetJustifyV ("top")
|
||||
|
||||
local export_box = self:CreateTextEntry (f_manual, function()end, 242, 20, "ExportAuraTextBox", _, _, options_dropdown_template)
|
||||
|
||||
local export_buff_button = self:CreateButton (f_manual, function()
|
||||
local str = ""
|
||||
for _, spellId in ipairs (f.db.aura_tracker.buff) do
|
||||
for _, spellId in ipairs(f.db.aura_tracker.buff) do
|
||||
local spellName = GetSpellInfo(spellId)
|
||||
if (spellName) then
|
||||
str = str .. spellName .. "; "
|
||||
@@ -1195,7 +1195,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
|
||||
for _, spellId in ipairs(f.db.aura_tracker.debuff) do
|
||||
local spellName = GetSpellInfo(spellId)
|
||||
if (spellName) then
|
||||
str = str .. spellName .. "; "
|
||||
@@ -1208,21 +1208,21 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
end, 120, 20, "Export Debuffs", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
|
||||
new_buff_entry:SetPoint ("topleft", f_manual, "topleft", 480, y)
|
||||
new_buff_string:SetPoint ("bottomleft", new_buff_entry, "topleft", 0, 2)
|
||||
add_buff_button:SetPoint ("left", new_buff_entry, "right", 2, 0)
|
||||
new_buff_entry:SetPoint("topleft", f_manual, "topleft", 480, y)
|
||||
new_buff_string:SetPoint("bottomleft", new_buff_entry, "topleft", 0, 2)
|
||||
add_buff_button:SetPoint("left", new_buff_entry, "right", 2, 0)
|
||||
add_buff_button.tooltip = "Add the aura to be tracked.\n\nClick an aura on the list to remove it."
|
||||
|
||||
new_debuff_string:SetPoint ("topleft", new_buff_entry, "bottomleft", 0, -6)
|
||||
new_debuff_entry:SetPoint ("topleft", new_debuff_string, "bottomleft", 0, -2)
|
||||
add_debuff_button:SetPoint ("left", new_debuff_entry, "right", 2, 0)
|
||||
new_debuff_string:SetPoint("topleft", new_buff_entry, "bottomleft", 0, -6)
|
||||
new_debuff_entry:SetPoint("topleft", new_debuff_string, "bottomleft", 0, -2)
|
||||
add_debuff_button:SetPoint("left", new_debuff_entry, "right", 2, 0)
|
||||
add_debuff_button.tooltip = "Add the aura to be tracked.\n\nClick an aura on the list to remove it."
|
||||
|
||||
multiple_spells_label:SetPoint ("topleft", new_debuff_entry, "bottomleft", 0, -6)
|
||||
multiple_spells_label:SetPoint("topleft", new_debuff_entry, "bottomleft", 0, -6)
|
||||
|
||||
export_buff_button:SetPoint ("topleft", multiple_spells_label, "bottomleft", 0, -12)
|
||||
export_debuff_button:SetPoint ("left",export_buff_button, "right", 2, 0)
|
||||
export_box:SetPoint ("topleft", export_buff_button, "bottomleft", 0, -6)
|
||||
export_buff_button:SetPoint("topleft", multiple_spells_label, "bottomleft", 0, -12)
|
||||
export_debuff_button:SetPoint("left",export_buff_button, "right", 2, 0)
|
||||
export_box:SetPoint("topleft", export_buff_button, "bottomleft", 0, -6)
|
||||
|
||||
buffs_added:Refresh()
|
||||
debuffs_added:Refresh()
|
||||
@@ -1230,7 +1230,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
----------------------- ---------------------------------------------- ---------------------------------------------- -----------------------
|
||||
|
||||
f:SetScript ("OnShow", function()
|
||||
f:SetScript("OnShow", function()
|
||||
buffs_added:Refresh()
|
||||
debuffs_added:Refresh()
|
||||
end)
|
||||
@@ -1257,7 +1257,7 @@ function DF:GetAllPlayerSpells (include_lower_case)
|
||||
end
|
||||
|
||||
function DF:SetAutoCompleteWithSpells (textentry)
|
||||
textentry:SetHook ("OnEditFocusGained", function()
|
||||
textentry:SetHook("OnEditFocusGained", function()
|
||||
local playerSpells = DF:GetAllPlayerSpells (true)
|
||||
textentry.WordList = playerSpells
|
||||
end)
|
||||
|
||||
+17
-17
@@ -167,17 +167,17 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)
|
||||
|
||||
--frame width
|
||||
local smember_width = function(_object, _value)
|
||||
return _object.button:SetWidth (_value)
|
||||
return _object.button:SetWidth(_value)
|
||||
end
|
||||
|
||||
--frame height
|
||||
local smember_height = function(_object, _value)
|
||||
return _object.button:SetHeight (_value)
|
||||
return _object.button:SetHeight(_value)
|
||||
end
|
||||
|
||||
--text
|
||||
local smember_text = function(_object, _value)
|
||||
return _object.button.text:SetText (_value)
|
||||
return _object.button.text:SetText(_value)
|
||||
end
|
||||
|
||||
--function
|
||||
@@ -197,7 +197,7 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)
|
||||
|
||||
--text color
|
||||
local smember_textcolor = function(_object, _value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors(_value)
|
||||
return _object.button.text:SetTextColor (_value1, _value2, _value3, _value4)
|
||||
end
|
||||
|
||||
@@ -213,24 +213,24 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)
|
||||
|
||||
--texture
|
||||
local smember_texture = function(_object, _value)
|
||||
if (type (_value) == "table") then
|
||||
if (type(_value) == "table") then
|
||||
local _value1, _value2, _value3, _value4 = unpack (_value)
|
||||
if (_value1) then
|
||||
_object.button:SetNormalTexture (_value1)
|
||||
_object.button:SetNormalTexture(_value1)
|
||||
end
|
||||
if (_value2) then
|
||||
_object.button:SetHighlightTexture (_value2, "ADD")
|
||||
_object.button:SetHighlightTexture(_value2, "ADD")
|
||||
end
|
||||
if (_value3) then
|
||||
_object.button:SetPushedTexture (_value3)
|
||||
_object.button:SetPushedTexture(_value3)
|
||||
end
|
||||
if (_value4) then
|
||||
_object.button:SetDisabledTexture (_value4)
|
||||
end
|
||||
else
|
||||
_object.button:SetNormalTexture (_value)
|
||||
_object.button:SetHighlightTexture (_value, "ADD")
|
||||
_object.button:SetPushedTexture (_value)
|
||||
_object.button:SetNormalTexture(_value)
|
||||
_object.button:SetHighlightTexture(_value, "ADD")
|
||||
_object.button:SetPushedTexture(_value)
|
||||
_object.button:SetDisabledTexture (_value)
|
||||
end
|
||||
return
|
||||
@@ -251,13 +251,13 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)
|
||||
--text align
|
||||
local smember_textalign = function(_object, _value)
|
||||
if (_value == "left" or _value == "<") then
|
||||
_object.button.text:SetPoint ("left", _object.button, "left", 2, 0)
|
||||
_object.button.text:SetPoint("left", _object.button, "left", 2, 0)
|
||||
_object.capsule_textalign = "left"
|
||||
elseif (_value == "center" or _value == "|") then
|
||||
_object.button.text:SetPoint ("center", _object.button, "center", 0, 0)
|
||||
_object.button.text:SetPoint("center", _object.button, "center", 0, 0)
|
||||
_object.capsule_textalign = "center"
|
||||
elseif (_value == "right" or _value == ">") then
|
||||
_object.button.text:SetPoint ("right", _object.button, "right", -2, 0)
|
||||
_object.button.text:SetPoint("right", _object.button, "right", -2, 0)
|
||||
_object.capsule_textalign = "right"
|
||||
end
|
||||
end
|
||||
@@ -407,7 +407,7 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)
|
||||
self.icon:SetPoint("left", self.widget, "left", 4 + (leftPadding or 0), 0)
|
||||
self.icon.leftPadding = leftPadding or 0
|
||||
self.widget.text:ClearAllPoints()
|
||||
self.widget.text:SetPoint ("left", self.icon, "right", textDistance or 2, 0 + (textHeight or 0))
|
||||
self.widget.text:SetPoint("left", self.icon, "right", textDistance or 2, 0 + (textHeight or 0))
|
||||
end
|
||||
|
||||
if (type(texture) == "string") then
|
||||
@@ -919,9 +919,9 @@ end
|
||||
|
||||
local textWidth = buttonObject.button.text:GetStringWidth()
|
||||
if (textWidth > width - 15 and buttonObject.button.text:GetText() ~= "") then
|
||||
if (shortMethod == false) then --> if is false, do not use auto resize
|
||||
if (shortMethod == false) then --if is false, do not use auto resize
|
||||
--do nothing
|
||||
elseif (not shortMethod) then --> if the value is omitted, use the default resize
|
||||
elseif (not shortMethod) then --if the value is omitted, use the default resize
|
||||
local new_width = textWidth + 15
|
||||
buttonObject.button:SetWidth(new_width)
|
||||
|
||||
|
||||
+4
-4
@@ -296,7 +296,7 @@ function DF:CreateCoolTip()
|
||||
end
|
||||
end
|
||||
|
||||
--> main frame
|
||||
--main frame
|
||||
local frame1 = GameCooltipFrame1
|
||||
if (not GameCooltipFrame1) then
|
||||
frame1 = CreateFrame("Frame", "GameCooltipFrame1", UIParent, "BackdropTemplate")
|
||||
@@ -310,7 +310,7 @@ function DF:CreateCoolTip()
|
||||
|
||||
createTooltipFrames(frame1)
|
||||
|
||||
--> secondary frame
|
||||
--secondary frame
|
||||
local frame2 = GameCooltipFrame2
|
||||
if (not GameCooltipFrame2) then
|
||||
frame2 = CreateFrame("Frame", "GameCooltipFrame2", UIParent, "BackdropTemplate")
|
||||
@@ -1863,13 +1863,13 @@ function DF:CreateCoolTip()
|
||||
|
||||
if (centerY) then
|
||||
if (centerY + helpScreenHeight > screenHeight) then
|
||||
--> out of top side
|
||||
--out of top side
|
||||
local moveDownOffset = (centerY + helpScreenHeight) - screenHeight
|
||||
gameCooltip.internal_y_mod = -moveDownOffset
|
||||
return gameCooltip:SetMyPoint(host, 0, -moveDownOffset)
|
||||
|
||||
elseif (centerY - helpScreenHeight < 0) then
|
||||
--> out of bottom side
|
||||
--out of bottom side
|
||||
local moveUpOffset = centerY - helpScreenHeight
|
||||
gameCooltip.internal_y_mod = moveUpOffset * -1
|
||||
return gameCooltip:SetMyPoint(host, 0, moveUpOffset * -1)
|
||||
|
||||
@@ -48,7 +48,7 @@ DF:Mixin(DropDownMetaFunctions, DF.FrameMixin)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> members
|
||||
--members
|
||||
|
||||
--selected value
|
||||
local gmember_value = function(object)
|
||||
@@ -910,7 +910,7 @@ function DF:BuildDropDownFontList(onClick, icon, iconTexcoord, iconSize)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> template
|
||||
--template
|
||||
|
||||
function DropDownMetaFunctions:SetTemplate(template)
|
||||
self.template = template
|
||||
@@ -991,7 +991,7 @@ function DropDownMetaFunctions:RefreshDropIcon()
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> object constructor
|
||||
--object constructor
|
||||
|
||||
function DF:CreateDropDown(parent, func, default, width, height, member, name, template)
|
||||
return DF:NewDropDown(parent, parent, name, member, width, height, func, default, template)
|
||||
@@ -1150,11 +1150,11 @@ function DF:CreateNewDropdownFrame(parent, name)
|
||||
newDropdownFrame.text = text
|
||||
|
||||
local arrowHightlight = newDropdownFrame:CreateTexture("$parent_ArrowTexture2", "OVERLAY", nil, 2)
|
||||
arrowHightlight:SetPoint ("right", newDropdownFrame, "right", 5, -1)
|
||||
arrowHightlight:SetBlendMode ("ADD")
|
||||
arrowHightlight:SetTexture ([[Interface\Buttons\UI-ScrollBar-ScrollDownButton-Highlight]])
|
||||
arrowHightlight:SetPoint("right", newDropdownFrame, "right", 5, -1)
|
||||
arrowHightlight:SetBlendMode("ADD")
|
||||
arrowHightlight:SetTexture([[Interface\Buttons\UI-ScrollBar-ScrollDownButton-Highlight]])
|
||||
arrowHightlight:Hide()
|
||||
arrowHightlight:SetSize (32, 28)
|
||||
arrowHightlight:SetSize(32, 28)
|
||||
newDropdownFrame.arrowTexture2 = arrowHightlight
|
||||
|
||||
local arrowTexture = newDropdownFrame:CreateTexture("$parent_ArrowTexture", "OVERLAY", nil, 1)
|
||||
@@ -1190,7 +1190,7 @@ function DF:CreateNewDropdownFrame(parent, name)
|
||||
child:SetSize(150, 150)
|
||||
child:SetPoint("topleft", scroll, "topleft", 0, 0)
|
||||
child:SetBackdrop(childBackdrop)
|
||||
child:SetBackdropColor (0, 0, 0, 1)
|
||||
child:SetBackdropColor(0, 0, 0, 1)
|
||||
|
||||
local backgroundTexture = child:CreateTexture(nil, "background")
|
||||
backgroundTexture:SetAllPoints()
|
||||
|
||||
+178
-178
File diff suppressed because it is too large
Load Diff
+13
-13
@@ -6,8 +6,8 @@ if (not DF or not DetailsFrameworkCanLoad) then
|
||||
end
|
||||
|
||||
local _
|
||||
local _rawset = rawset --> lua local
|
||||
local _rawget = rawget --> lua local
|
||||
local _rawset = rawset --lua local
|
||||
local _rawget = rawget --lua local
|
||||
|
||||
local APIHelpFunctions = false
|
||||
local HelpMetaFunctions = {}
|
||||
@@ -49,13 +49,13 @@ function HelpMetaFunctions:AddHelp (width, height, x, y, buttonX, buttonY, text,
|
||||
}
|
||||
end
|
||||
|
||||
function HelpMetaFunctions:SetPoint (v1, v2, v3, v4, v5)
|
||||
function HelpMetaFunctions:SetPoint(v1, v2, v3, v4, v5)
|
||||
v1, v2, v3, v4, v5 = DF:CheckPoints (v1, v2, v3, v4, v5, self)
|
||||
if (not v1) then
|
||||
print ("Invalid parameter for SetPoint")
|
||||
return
|
||||
end
|
||||
return self.widget:SetPoint (v1, v2, v3, v4, v5)
|
||||
return self.widget:SetPoint(v1, v2, v3, v4, v5)
|
||||
end
|
||||
|
||||
function HelpMetaFunctions:ShowHelp()
|
||||
@@ -75,7 +75,7 @@ function DF:NewHelp (parent, width, height, x, y, buttonWidth, buttonHeight, nam
|
||||
parent = parent.widget
|
||||
end
|
||||
|
||||
local helpButton = CreateFrame ("button", name or "DetailsFrameworkHelpButton"..nameCounter, parent, "MainHelpPlateButton")
|
||||
local helpButton = CreateFrame("button", name or "DetailsFrameworkHelpButton"..nameCounter, parent, "MainHelpPlateButton")
|
||||
nameCounter = nameCounter + 1
|
||||
|
||||
if (not APIHelpFunctions) then
|
||||
@@ -92,13 +92,13 @@ function DF:NewHelp (parent, width, height, x, y, buttonWidth, buttonHeight, nam
|
||||
end
|
||||
|
||||
if (buttonWidth and buttonHeight) then
|
||||
helpButton:SetWidth (buttonWidth)
|
||||
helpButton:SetHeight (buttonHeight)
|
||||
helpButton.I:SetWidth (buttonWidth*0.8)
|
||||
helpButton.I:SetHeight (buttonHeight*0.8)
|
||||
helpButton.Ring:SetWidth (buttonWidth)
|
||||
helpButton.Ring:SetHeight (buttonHeight)
|
||||
helpButton.Ring:SetPoint ("center", buttonWidth*.2, -buttonWidth*.2)
|
||||
helpButton:SetWidth(buttonWidth)
|
||||
helpButton:SetHeight(buttonHeight)
|
||||
helpButton.I:SetWidth(buttonWidth*0.8)
|
||||
helpButton.I:SetHeight(buttonHeight*0.8)
|
||||
helpButton.Ring:SetWidth(buttonWidth)
|
||||
helpButton.Ring:SetHeight(buttonHeight)
|
||||
helpButton.Ring:SetPoint("center", buttonWidth*.2, -buttonWidth*.2)
|
||||
end
|
||||
|
||||
help.helpTable = {
|
||||
@@ -112,7 +112,7 @@ function DF:NewHelp (parent, width, height, x, y, buttonWidth, buttonHeight, nam
|
||||
help.I = helpButton.I
|
||||
help.Ring = helpButton.Ring
|
||||
|
||||
helpButton:SetScript ("OnClick", function()
|
||||
helpButton:SetScript("OnClick", function()
|
||||
help:ShowHelp()
|
||||
end)
|
||||
|
||||
|
||||
+2
-2
@@ -38,14 +38,14 @@ local LabelMetaFunctions = _G[detailsFramework.GlobalWidgetControlNames ["label"
|
||||
detailsFramework:Mixin(LabelMetaFunctions, detailsFramework.SetPointMixin)
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> metatables
|
||||
--metatables
|
||||
|
||||
LabelMetaFunctions.__call = function(object, value)
|
||||
return object.label:SetText(value)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> members
|
||||
--members
|
||||
|
||||
--get text
|
||||
local gmember_text = function(object)
|
||||
|
||||
+169
-169
@@ -5,12 +5,12 @@ if (not DF or not DetailsFrameworkCanLoad) then
|
||||
end
|
||||
|
||||
local _
|
||||
local _rawset = rawset --> lua locals
|
||||
local _rawget = rawget --> lua locals
|
||||
local _setmetatable = setmetatable --> lua locals
|
||||
local _unpack = unpack --> lua locals
|
||||
local _type = type --> lua locals
|
||||
local _math_floor = math.floor --> lua locals
|
||||
local _rawset = rawset --lua locals
|
||||
local _rawget = rawget --lua locals
|
||||
local _setmetatable = setmetatable --lua locals
|
||||
local _unpack = unpack --lua locals
|
||||
local _type = type --lua locals
|
||||
local _math_floor = math.floor --lua locals
|
||||
|
||||
local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
|
||||
|
||||
@@ -47,99 +47,99 @@ end
|
||||
local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> metatables
|
||||
--metatables
|
||||
|
||||
BarMetaFunctions.__call = function(_table, value)
|
||||
if (not value) then
|
||||
return _table.statusbar:GetValue()
|
||||
else
|
||||
return _table.statusbar:SetValue (value)
|
||||
return _table.statusbar:SetValue(value)
|
||||
end
|
||||
end
|
||||
|
||||
BarMetaFunctions.__add = function(v1, v2)
|
||||
if (_type (v1) == "table") then
|
||||
if (_type(v1) == "table") then
|
||||
local v = v1.statusbar:GetValue()
|
||||
v = v + v2
|
||||
v1.statusbar:SetValue (v)
|
||||
v1.statusbar:SetValue(v)
|
||||
else
|
||||
local v = v2.statusbar:GetValue()
|
||||
v = v + v1
|
||||
v2.statusbar:SetValue (v)
|
||||
v2.statusbar:SetValue(v)
|
||||
end
|
||||
end
|
||||
|
||||
BarMetaFunctions.__sub = function(v1, v2)
|
||||
if (_type (v1) == "table") then
|
||||
if (_type(v1) == "table") then
|
||||
local v = v1.statusbar:GetValue()
|
||||
v = v - v2
|
||||
v1.statusbar:SetValue (v)
|
||||
v1.statusbar:SetValue(v)
|
||||
else
|
||||
local v = v2.statusbar:GetValue()
|
||||
v = v - v1
|
||||
v2.statusbar:SetValue (v)
|
||||
v2.statusbar:SetValue(v)
|
||||
end
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> members
|
||||
--members
|
||||
|
||||
--> tooltip
|
||||
--tooltip
|
||||
local function gmember_tooltip (_object)
|
||||
return _object:GetTooltip()
|
||||
end
|
||||
--> shown
|
||||
--shown
|
||||
local gmember_shown = function(_object)
|
||||
return _object.statusbar:IsShown()
|
||||
end
|
||||
--> frame width
|
||||
--frame width
|
||||
local gmember_width = function(_object)
|
||||
return _object.statusbar:GetWidth()
|
||||
end
|
||||
--> frame height
|
||||
--frame height
|
||||
local gmember_height = function(_object)
|
||||
return _object.statusbar:GetHeight()
|
||||
end
|
||||
--> value
|
||||
--value
|
||||
local gmember_value = function(_object)
|
||||
return _object.statusbar:GetValue()
|
||||
end
|
||||
--> right text
|
||||
--right text
|
||||
local gmember_rtext = function(_object)
|
||||
return _object.textright:GetText()
|
||||
end
|
||||
--> left text
|
||||
--left text
|
||||
local gmember_ltext = function(_object)
|
||||
return _object.textleft:GetText()
|
||||
end
|
||||
--> left color
|
||||
--left color
|
||||
local gmember_color = function(_object)
|
||||
local r, g, b, a = _object._texture:GetVertexColor()
|
||||
return r, g, b, a
|
||||
end
|
||||
--> icon
|
||||
--icon
|
||||
local gmember_icon = function(_object)
|
||||
return _object._icon:GetTexture()
|
||||
end
|
||||
--> texture
|
||||
--texture
|
||||
local gmember_texture = function(_object)
|
||||
return _object._texture:GetTexture()
|
||||
end
|
||||
--> font size
|
||||
--font size
|
||||
local gmember_textsize = function(_object)
|
||||
local _, fontsize = _object.textleft:GetFont()
|
||||
return fontsize
|
||||
end
|
||||
--> font face
|
||||
--font face
|
||||
local gmember_textfont = function(_object)
|
||||
local fontface = _object.textleft:GetFont()
|
||||
return fontface
|
||||
end
|
||||
--> font color
|
||||
--font color
|
||||
local gmember_textcolor = function(_object)
|
||||
return _object.textleft:GetTextColor()
|
||||
end
|
||||
--> alpha
|
||||
--alpha
|
||||
local gmember_alpha= function(_object)
|
||||
return _object:GetAlpha()
|
||||
end
|
||||
@@ -182,11 +182,11 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
--> tooltip
|
||||
--tooltip
|
||||
local smember_tooltip = function(_object, _value)
|
||||
return _object:SetTooltip (_value)
|
||||
end
|
||||
--> show
|
||||
--show
|
||||
local smember_shown = function(_object, _value)
|
||||
if (_value) then
|
||||
return _object:Show()
|
||||
@@ -194,7 +194,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
return _object:Hide()
|
||||
end
|
||||
end
|
||||
--> hide
|
||||
--hide
|
||||
local smember_hide = function(_object, _value)
|
||||
if (_value) then
|
||||
return _object:Hide()
|
||||
@@ -202,30 +202,30 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
return _object:Show()
|
||||
end
|
||||
end
|
||||
--> width
|
||||
--width
|
||||
local smember_width = function(_object, _value)
|
||||
return _object.statusbar:SetWidth (_value)
|
||||
return _object.statusbar:SetWidth(_value)
|
||||
end
|
||||
--> height
|
||||
--height
|
||||
local smember_height = function(_object, _value)
|
||||
return _object.statusbar:SetHeight (_value)
|
||||
return _object.statusbar:SetHeight(_value)
|
||||
end
|
||||
--> statusbar value
|
||||
--statusbar 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)
|
||||
_object.statusbar:SetValue(_value)
|
||||
return _object.div:SetPoint("left", _object.statusbar, "left", _value * (_object.statusbar:GetWidth()/100) - 16, 0)
|
||||
end
|
||||
--> right text
|
||||
--right text
|
||||
local smember_rtext = function(_object, _value)
|
||||
return _object.textright:SetText (_value)
|
||||
return _object.textright:SetText(_value)
|
||||
end
|
||||
--> left text
|
||||
--left text
|
||||
local smember_ltext = function(_object, _value)
|
||||
return _object.textleft:SetText (_value)
|
||||
return _object.textleft:SetText(_value)
|
||||
end
|
||||
--> color
|
||||
--color
|
||||
local smember_color = function(_object, _value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors(_value)
|
||||
|
||||
_object.statusbar:SetStatusBarColor (_value1, _value2, _value3, _value4)
|
||||
_object._texture.original_colors = {_value1, _value2, _value3, _value4}
|
||||
@@ -235,31 +235,31 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
|
||||
return _object._texture:SetVertexColor (_value1, _value2, _value3, _value4)
|
||||
end
|
||||
--> background color
|
||||
--background color
|
||||
local smember_backgroundcolor = function(_object, _value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors(_value)
|
||||
return _object.background:SetVertexColor (_value1, _value2, _value3, _value4)
|
||||
end
|
||||
--> icon
|
||||
--icon
|
||||
local smember_icon = function(_object, _value)
|
||||
if (type (_value) == "table") then
|
||||
if (type(_value) == "table") then
|
||||
local _value1, _value2 = _unpack (_value)
|
||||
_object._icon:SetTexture (_value1)
|
||||
_object._icon:SetTexture(_value1)
|
||||
if (_value2) then
|
||||
_object._icon:SetTexCoord (_unpack (_value2))
|
||||
end
|
||||
else
|
||||
_object._icon:SetTexture (_value)
|
||||
_object._icon:SetTexture(_value)
|
||||
end
|
||||
return
|
||||
end
|
||||
--> texture
|
||||
--texture
|
||||
local smember_texture = function(_object, _value)
|
||||
if (type (_value) == "table") then
|
||||
if (type(_value) == "table") then
|
||||
local _value1, _value2 = _unpack (_value)
|
||||
_object._texture:SetTexture (_value1)
|
||||
_object.timer_texture:SetTexture (_value1)
|
||||
_object.timer_textureR:SetTexture (_value1)
|
||||
_object._texture:SetTexture(_value1)
|
||||
_object.timer_texture:SetTexture(_value1)
|
||||
_object.timer_textureR:SetTexture(_value1)
|
||||
if (_value2) then
|
||||
_object._texture:SetTexCoord (_unpack (_value2))
|
||||
_object.timer_texture:SetTexCoord (_unpack (_value2))
|
||||
@@ -267,58 +267,58 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
end
|
||||
else
|
||||
if (_value:find ("\\")) then
|
||||
_object._texture:SetTexture (_value)
|
||||
_object._texture:SetTexture(_value)
|
||||
else
|
||||
local file = SharedMedia:Fetch ("statusbar", _value)
|
||||
if (file) then
|
||||
_object._texture:SetTexture (file)
|
||||
_object.timer_texture:SetTexture (file)
|
||||
_object.timer_textureR:SetTexture (file)
|
||||
_object._texture:SetTexture(file)
|
||||
_object.timer_texture:SetTexture(file)
|
||||
_object.timer_textureR:SetTexture(file)
|
||||
else
|
||||
_object._texture:SetTexture (_value)
|
||||
_object.timer_texture:SetTexture (_value)
|
||||
_object.timer_textureR:SetTexture (_value)
|
||||
_object._texture:SetTexture(_value)
|
||||
_object.timer_texture:SetTexture(_value)
|
||||
_object.timer_textureR:SetTexture(_value)
|
||||
end
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
--> background texture
|
||||
--background texture
|
||||
local smember_backgroundtexture = function(_object, _value)
|
||||
if (_value:find ("\\")) then
|
||||
_object.background:SetTexture (_value)
|
||||
_object.background:SetTexture(_value)
|
||||
else
|
||||
local file = SharedMedia:Fetch ("statusbar", _value)
|
||||
if (file) then
|
||||
_object.background:SetTexture (file)
|
||||
_object.background:SetTexture(file)
|
||||
else
|
||||
_object.background:SetTexture (_value)
|
||||
_object.background:SetTexture(_value)
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
--> font face
|
||||
--font face
|
||||
local smember_textfont = function(_object, _value)
|
||||
DF:SetFontFace (_object.textleft, _value)
|
||||
return DF:SetFontFace (_object.textright, _value)
|
||||
end
|
||||
--> font size
|
||||
--font size
|
||||
local smember_textsize = function(_object, _value)
|
||||
DF:SetFontSize (_object.textleft, _value)
|
||||
return DF:SetFontSize (_object.textright, _value)
|
||||
end
|
||||
--> font color
|
||||
--font color
|
||||
local smember_textcolor = function(_object, _value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors (_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)
|
||||
--outline (shadow)
|
||||
local smember_outline = function(_object, _value)
|
||||
DF:SetFontOutline (_object.textleft, _value)
|
||||
return DF:SetFontOutline (_object.textright, _value)
|
||||
end
|
||||
--> alpha
|
||||
--alpha
|
||||
local smember_alpha= function(_object, _value)
|
||||
return _object:SetAlpha (_value)
|
||||
end
|
||||
@@ -357,9 +357,9 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> methods
|
||||
--methods
|
||||
|
||||
--> show & hide
|
||||
--show & hide
|
||||
function BarMetaFunctions:Show()
|
||||
self.statusbar:Show()
|
||||
end
|
||||
@@ -368,73 +368,73 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
end
|
||||
|
||||
|
||||
--> return color
|
||||
--return color
|
||||
function BarMetaFunctions:GetVertexColor()
|
||||
return self._texture:GetVertexColor()
|
||||
end
|
||||
|
||||
--> set value (status bar)
|
||||
--set value (status bar)
|
||||
|
||||
function BarMetaFunctions:SetValue (value)
|
||||
function BarMetaFunctions:SetValue(value)
|
||||
if (not value) then
|
||||
value = 0
|
||||
end
|
||||
self.statusbar:SetValue (value)
|
||||
self.div:SetPoint ("left", self.statusbar, "left", value * (self.statusbar:GetWidth()/100) - 16, 0)
|
||||
self.statusbar:SetValue(value)
|
||||
self.div:SetPoint("left", self.statusbar, "left", value * (self.statusbar:GetWidth()/100) - 16, 0)
|
||||
end
|
||||
|
||||
--> set point
|
||||
function BarMetaFunctions:SetPoint (v1, v2, v3, v4, v5)
|
||||
--set point
|
||||
function BarMetaFunctions:SetPoint(v1, v2, v3, v4, v5)
|
||||
v1, v2, v3, v4, v5 = DF:CheckPoints (v1, v2, v3, v4, v5, self)
|
||||
if (not v1) then
|
||||
print ("Invalid parameter for SetPoint")
|
||||
return
|
||||
end
|
||||
return self.widget:SetPoint (v1, v2, v3, v4, v5)
|
||||
return self.widget:SetPoint(v1, v2, v3, v4, v5)
|
||||
end
|
||||
|
||||
--> set sizes
|
||||
function BarMetaFunctions:SetSize (w, h)
|
||||
--set sizes
|
||||
function BarMetaFunctions:SetSize(w, h)
|
||||
if (w) then
|
||||
self.statusbar:SetWidth (w)
|
||||
self.statusbar:SetWidth(w)
|
||||
end
|
||||
if (h) then
|
||||
self.statusbar:SetHeight (h)
|
||||
self.statusbar:SetHeight(h)
|
||||
end
|
||||
end
|
||||
|
||||
--> set texture
|
||||
function BarMetaFunctions:SetTexture (texture)
|
||||
self._texture:SetTexture (texture)
|
||||
--set texture
|
||||
function BarMetaFunctions:SetTexture(texture)
|
||||
self._texture:SetTexture(texture)
|
||||
end
|
||||
|
||||
--> set texts
|
||||
--set texts
|
||||
function BarMetaFunctions:SetLeftText (text)
|
||||
self.textleft:SetText (text)
|
||||
self.textleft:SetText(text)
|
||||
end
|
||||
function BarMetaFunctions:SetRightText (text)
|
||||
self.textright:SetText (text)
|
||||
self.textright:SetText(text)
|
||||
end
|
||||
|
||||
--> set color
|
||||
--set color
|
||||
function BarMetaFunctions:SetColor (r, g, b, a)
|
||||
r, g, b, a = DF:ParseColors (r, g, b, a)
|
||||
r, g, b, a = DF:ParseColors(r, g, b, a)
|
||||
|
||||
self._texture:SetVertexColor (r, g, b, a)
|
||||
self.statusbar:SetStatusBarColor (r, g, b, a)
|
||||
self._texture.original_colors = {r, g, b, a}
|
||||
end
|
||||
|
||||
--> set icons
|
||||
--set icons
|
||||
function BarMetaFunctions:SetIcon (texture, ...)
|
||||
self._icon:SetTexture (texture)
|
||||
self._icon:SetTexture(texture)
|
||||
if (...) then
|
||||
local L, R, U, D = _unpack (...)
|
||||
self._icon:SetTexCoord (L, R, U, D)
|
||||
end
|
||||
end
|
||||
|
||||
--> show div
|
||||
--show div
|
||||
function BarMetaFunctions:ShowDiv (bool)
|
||||
if (bool) then
|
||||
self.div:Show()
|
||||
@@ -473,20 +473,20 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
return self.statusbar:GetFrameStrata()
|
||||
end
|
||||
function BarMetaFunctions:SetFrameStrata (strata)
|
||||
if (_type (strata) == "table") then
|
||||
if (_type(strata) == "table") then
|
||||
self.statusbar:SetFrameStrata (strata:GetFrameStrata())
|
||||
else
|
||||
self.statusbar:SetFrameStrata (strata)
|
||||
end
|
||||
end
|
||||
|
||||
--> container
|
||||
--container
|
||||
function BarMetaFunctions:SetContainer (container)
|
||||
self.container = container
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> scripts
|
||||
--scripts
|
||||
|
||||
local OnEnter = function(frame)
|
||||
local capsule = frame.MyObject
|
||||
@@ -564,7 +564,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> timer
|
||||
--timer
|
||||
|
||||
function BarMetaFunctions:OnTimerEnd()
|
||||
local capsule = self
|
||||
@@ -589,7 +589,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
self.TimerScheduled = nil
|
||||
else
|
||||
if (self.statusbar:GetScript ("OnUpdate")) then
|
||||
self.statusbar:SetScript ("OnUpdate", nil)
|
||||
self.statusbar:SetScript("OnUpdate", nil)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -603,26 +603,26 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
end
|
||||
|
||||
local OnUpdate = function(self, elapsed)
|
||||
--> percent of elapsed
|
||||
--percent of elapsed
|
||||
local pct = abs (self.end_timer - GetTime() - self.tempo) / self.tempo
|
||||
|
||||
if (self.inverse) then
|
||||
self.t:SetWidth (self.total_size * pct)
|
||||
self.t:SetWidth(self.total_size * pct)
|
||||
else
|
||||
self.t:SetWidth (self.total_size * abs (pct-1))
|
||||
self.t:SetWidth(self.total_size * abs (pct-1))
|
||||
end
|
||||
|
||||
--> right text
|
||||
--right text
|
||||
self.remaining = self.remaining - elapsed
|
||||
if (self.MyObject.RightTextIsTimer) then
|
||||
self.righttext:SetText (DF:IntegerToTimer (self.remaining))
|
||||
self.righttext:SetText(DF:IntegerToTimer (self.remaining))
|
||||
else
|
||||
self.righttext:SetText (_math_floor (self.remaining))
|
||||
self.righttext:SetText(_math_floor(self.remaining))
|
||||
end
|
||||
|
||||
if (pct >= 1) then
|
||||
self.righttext:SetText ("")
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
self.righttext:SetText("")
|
||||
self:SetScript("OnUpdate", nil)
|
||||
self.MyObject.HasTimer = nil
|
||||
self.MyObject:OnTimerEnd()
|
||||
end
|
||||
@@ -653,21 +653,21 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
self.timer_textureR:Show()
|
||||
self.statusbar.t = self.timer_textureR
|
||||
self.timer_textureR:ClearAllPoints()
|
||||
self.timer_textureR:SetPoint ("right", self.statusbar, "right")
|
||||
self.div_timer:SetPoint ("left", self.timer_textureR, "left", -14, -1)
|
||||
self.timer_textureR:SetPoint("right", self.statusbar, "right")
|
||||
self.div_timer:SetPoint("left", self.timer_textureR, "left", -14, -1)
|
||||
else
|
||||
self.timer_texture:Show()
|
||||
self.timer_textureR:Hide()
|
||||
self.statusbar.t = self.timer_texture
|
||||
self.timer_texture:ClearAllPoints()
|
||||
self.timer_texture:SetPoint ("left", self.statusbar, "left")
|
||||
self.div_timer:SetPoint ("left", self.timer_texture, "right", -16, -1)
|
||||
self.timer_texture:SetPoint("left", self.statusbar, "left")
|
||||
self.div_timer:SetPoint("left", self.timer_texture, "right", -16, -1)
|
||||
end
|
||||
|
||||
if (self.BarIsInverse) then
|
||||
self.statusbar.t:SetWidth (1)
|
||||
self.statusbar.t:SetWidth(1)
|
||||
else
|
||||
self.statusbar.t:SetWidth (self.statusbar.total_size)
|
||||
self.statusbar.t:SetWidth(self.statusbar.total_size)
|
||||
end
|
||||
|
||||
self.timer = true
|
||||
@@ -678,11 +678,11 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
|
||||
function DF:StartTimeBarAnimation (timebar)
|
||||
timebar.TimerScheduled = nil
|
||||
timebar.statusbar:SetScript ("OnUpdate", OnUpdate)
|
||||
timebar.statusbar:SetScript("OnUpdate", OnUpdate)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> object constructor
|
||||
--object constructor
|
||||
|
||||
function DetailsFrameworkNormalBar_OnCreate (self)
|
||||
self.texture.original_colors = {1, 1, 1, 1}
|
||||
@@ -693,60 +693,60 @@ end
|
||||
|
||||
local build_statusbar = function(self)
|
||||
|
||||
self:SetSize (300, 14)
|
||||
self:SetSize(300, 14)
|
||||
|
||||
self.background = self:CreateTexture ("$parent_background", "BACKGROUND")
|
||||
self.background = self:CreateTexture("$parent_background", "BACKGROUND")
|
||||
self.background:Hide()
|
||||
self.background:SetAllPoints()
|
||||
self.background:SetTexture ([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.background:SetTexture([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.background:SetVertexColor (.3, .3, .3, .3)
|
||||
|
||||
self.timertexture = self:CreateTexture ("$parent_timerTexture", "ARTWORK")
|
||||
self.timertexture = self:CreateTexture("$parent_timerTexture", "ARTWORK")
|
||||
self.timertexture:Hide()
|
||||
self.timertexture:SetSize (300, 14)
|
||||
self.timertexture:SetTexture ([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.timertexture:SetPoint ("LEFT", self, "LEFT")
|
||||
self.timertexture:SetSize(300, 14)
|
||||
self.timertexture:SetTexture([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.timertexture:SetPoint("LEFT", self, "LEFT")
|
||||
|
||||
self.timertextureR = self:CreateTexture ("$parent_timerTextureR", "ARTWORK")
|
||||
self.timertextureR = self:CreateTexture("$parent_timerTextureR", "ARTWORK")
|
||||
self.timertextureR:Hide()
|
||||
self.timertextureR:SetSize (300, 14)
|
||||
self.timertextureR:SetTexture ([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.timertextureR:SetPoint ("TOPRIGHT", self, 0, 0)
|
||||
self.timertextureR:SetPoint ("BOTTOMRIGHT", self, 0, 0)
|
||||
self.timertextureR:SetSize(300, 14)
|
||||
self.timertextureR:SetTexture([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.timertextureR:SetPoint("TOPRIGHT", self, 0, 0)
|
||||
self.timertextureR:SetPoint("BOTTOMRIGHT", self, 0, 0)
|
||||
|
||||
self.texture = self:CreateTexture ("$parent_statusbarTexture", "ARTWORK")
|
||||
self.texture:SetSize (300, 14)
|
||||
self.texture:SetTexture ([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.texture = self:CreateTexture("$parent_statusbarTexture", "ARTWORK")
|
||||
self.texture:SetSize(300, 14)
|
||||
self.texture:SetTexture([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
|
||||
self:SetStatusBarTexture (self.texture)
|
||||
|
||||
self.icontexture = self:CreateTexture ("$parent_icon", "OVERLAY")
|
||||
self.icontexture:SetSize (14, 14)
|
||||
self.icontexture:SetPoint ("LEFT", self, "LEFT")
|
||||
self.icontexture = self:CreateTexture("$parent_icon", "OVERLAY")
|
||||
self.icontexture:SetSize(14, 14)
|
||||
self.icontexture:SetPoint("LEFT", self, "LEFT")
|
||||
|
||||
self.sparkmouseover = self:CreateTexture ("$parent_sparkMouseover", "OVERLAY")
|
||||
self.sparkmouseover:SetSize (32, 32)
|
||||
self.sparkmouseover:SetTexture ([[Interface\CastingBar\UI-CastingBar-Spark]])
|
||||
self.sparkmouseover:SetBlendMode ("ADD")
|
||||
self.sparkmouseover:SetPoint ("LEFT", self, "RIGHT", -16, -1)
|
||||
self.sparkmouseover = self:CreateTexture("$parent_sparkMouseover", "OVERLAY")
|
||||
self.sparkmouseover:SetSize(32, 32)
|
||||
self.sparkmouseover:SetTexture([[Interface\CastingBar\UI-CastingBar-Spark]])
|
||||
self.sparkmouseover:SetBlendMode("ADD")
|
||||
self.sparkmouseover:SetPoint("LEFT", self, "RIGHT", -16, -1)
|
||||
self.sparkmouseover:Hide()
|
||||
|
||||
self.sparktimer = self:CreateTexture ("$parent_sparkTimer", "OVERLAY")
|
||||
self.sparktimer:SetSize (32, 32)
|
||||
self.sparktimer:SetPoint ("LEFT", self.timertexture, "RIGHT", -16, -1)
|
||||
self.sparktimer:SetTexture ([[Interface\CastingBar\UI-CastingBar-Spark]])
|
||||
self.sparktimer:SetBlendMode ("ADD")
|
||||
self.sparktimer = self:CreateTexture("$parent_sparkTimer", "OVERLAY")
|
||||
self.sparktimer:SetSize(32, 32)
|
||||
self.sparktimer:SetPoint("LEFT", self.timertexture, "RIGHT", -16, -1)
|
||||
self.sparktimer:SetTexture([[Interface\CastingBar\UI-CastingBar-Spark]])
|
||||
self.sparktimer:SetBlendMode("ADD")
|
||||
self.sparktimer:Hide()
|
||||
|
||||
self.lefttext = self:CreateFontString ("$parent_TextLeft", "OVERLAY", "GameFontHighlight")
|
||||
self.lefttext:SetJustifyH ("LEFT")
|
||||
self.lefttext:SetPoint ("LEFT", self.icontexture, "RIGHT", 3, 0)
|
||||
self.lefttext:SetJustifyH("LEFT")
|
||||
self.lefttext:SetPoint("LEFT", self.icontexture, "RIGHT", 3, 0)
|
||||
DF:SetFontSize (self.lefttext, 10)
|
||||
|
||||
self.righttext = self:CreateFontString ("$parent_TextRight", "OVERLAY", "GameFontHighlight")
|
||||
self.righttext:SetJustifyH ("LEFT")
|
||||
self.righttext:SetJustifyH("LEFT")
|
||||
DF:SetFontSize (self.righttext, 10)
|
||||
self.righttext:SetPoint ("RIGHT", self, "RIGHT", -3, 0)
|
||||
self.righttext:SetPoint("RIGHT", self, "RIGHT", -3, 0)
|
||||
|
||||
DetailsFrameworkNormalBar_OnCreate (self)
|
||||
end
|
||||
@@ -789,14 +789,14 @@ function DF:NewBar (parent, container, name, member, w, h, value, texture_name)
|
||||
w = w or 150
|
||||
h = h or 14
|
||||
|
||||
--> default members:
|
||||
--> misc
|
||||
--default members:
|
||||
--misc
|
||||
BarObject.locked = false
|
||||
|
||||
BarObject.container = container
|
||||
|
||||
--> create widgets
|
||||
BarObject.statusbar = CreateFrame ("statusbar", name, parent)
|
||||
--create widgets
|
||||
BarObject.statusbar = CreateFrame("statusbar", name, parent)
|
||||
DF:Mixin (BarObject.statusbar, DF.WidgetFunctions)
|
||||
|
||||
build_statusbar (BarObject.statusbar)
|
||||
@@ -816,16 +816,16 @@ function DF:NewBar (parent, container, name, member, w, h, value, texture_name)
|
||||
end
|
||||
end
|
||||
|
||||
BarObject.statusbar:SetHeight (h)
|
||||
BarObject.statusbar:SetWidth (w)
|
||||
BarObject.statusbar:SetHeight(h)
|
||||
BarObject.statusbar:SetWidth(w)
|
||||
BarObject.statusbar:SetFrameLevel (parent:GetFrameLevel()+1)
|
||||
BarObject.statusbar:SetMinMaxValues (0, 100)
|
||||
BarObject.statusbar:SetValue (value or 50)
|
||||
BarObject.statusbar:SetValue(value or 50)
|
||||
BarObject.statusbar.MyObject = BarObject
|
||||
|
||||
BarObject.timer_texture = _G [name .. "_timerTexture"]
|
||||
BarObject.timer_texture:SetWidth (w)
|
||||
BarObject.timer_texture:SetHeight (h)
|
||||
BarObject.timer_texture:SetWidth(w)
|
||||
BarObject.timer_texture:SetHeight(h)
|
||||
|
||||
BarObject.timer_textureR = _G [name .. "_timerTextureR"]
|
||||
BarObject.timer_textureR:Hide()
|
||||
@@ -838,7 +838,7 @@ function DF:NewBar (parent, container, name, member, w, h, value, texture_name)
|
||||
BarObject.div = _G [name .. "_sparkMouseover"]
|
||||
BarObject.div_timer = _G [name .. "_sparkTimer"]
|
||||
|
||||
--> hooks
|
||||
--hooks
|
||||
BarObject.HookList = {
|
||||
OnEnter = {},
|
||||
OnLeave = {},
|
||||
@@ -849,17 +849,17 @@ function DF:NewBar (parent, container, name, member, w, h, value, texture_name)
|
||||
OnTimerEnd = {},
|
||||
}
|
||||
|
||||
BarObject.statusbar:SetScript ("OnEnter", OnEnter)
|
||||
BarObject.statusbar:SetScript ("OnLeave", OnLeave)
|
||||
BarObject.statusbar:SetScript ("OnHide", OnHide)
|
||||
BarObject.statusbar:SetScript ("OnShow", OnShow)
|
||||
BarObject.statusbar:SetScript ("OnMouseDown", OnMouseDown)
|
||||
BarObject.statusbar:SetScript ("OnMouseUp", OnMouseUp)
|
||||
BarObject.statusbar:SetScript("OnEnter", OnEnter)
|
||||
BarObject.statusbar:SetScript("OnLeave", OnLeave)
|
||||
BarObject.statusbar:SetScript("OnHide", OnHide)
|
||||
BarObject.statusbar:SetScript("OnShow", OnShow)
|
||||
BarObject.statusbar:SetScript("OnMouseDown", OnMouseDown)
|
||||
BarObject.statusbar:SetScript("OnMouseUp", OnMouseUp)
|
||||
|
||||
--> set class
|
||||
--set class
|
||||
_setmetatable (BarObject, BarMetaFunctions)
|
||||
|
||||
--> set texture
|
||||
--set texture
|
||||
if (texture_name) then
|
||||
smember_texture (BarObject, texture_name)
|
||||
end
|
||||
|
||||
+1201
-1201
File diff suppressed because it is too large
Load Diff
+33
-33
@@ -10,7 +10,7 @@ local texCoordinates
|
||||
local CreateImageEditorFrame = function()
|
||||
local editorWindow = DF:NewPanel (UIParent, nil, "DetailsFrameworkImageEdit", nil, 650, 500, false)
|
||||
editorWindow:SetPoint("center", UIParent, "center")
|
||||
editorWindow:SetResizable (true)
|
||||
editorWindow:SetResizable(true)
|
||||
editorWindow:SetMovable (true)
|
||||
editorWindow:SetClampedToScreen (true)
|
||||
tinsert (UISpecialFrames, "DetailsFrameworkImageEdit")
|
||||
@@ -34,13 +34,13 @@ local CreateImageEditorFrame = function()
|
||||
edit_texture:SetAllPoints()
|
||||
_G.DetailsFrameworkImageEdit_EditTexture = edit_texture
|
||||
|
||||
local background_frame = CreateFrame ("frame", "DetailsFrameworkImageEditBackground", DetailsFrameworkImageEdit, "BackdropTemplate")
|
||||
local background_frame = CreateFrame("frame", "DetailsFrameworkImageEditBackground", DetailsFrameworkImageEdit, "BackdropTemplate")
|
||||
background_frame:SetPoint("topleft", DetailsFrameworkImageEdit, "topleft", -10, 30)
|
||||
background_frame:SetFrameStrata("TOOLTIP")
|
||||
background_frame:SetFrameLevel (editorWindow:GetFrameLevel())
|
||||
background_frame:SetSize (790, 560)
|
||||
background_frame:SetSize(790, 560)
|
||||
|
||||
background_frame:SetResizable (true)
|
||||
background_frame:SetResizable(true)
|
||||
background_frame:SetMovable (true)
|
||||
|
||||
background_frame:SetScript("OnMouseDown", function()
|
||||
@@ -56,12 +56,12 @@ local CreateImageEditorFrame = function()
|
||||
|
||||
background_frame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
background_frame:SetBackdropColor(0, 0, 0, 0.9)
|
||||
background_frame:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
background_frame:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
local haveHFlip = false
|
||||
local haveVFlip = false
|
||||
|
||||
--> Top Slider
|
||||
--Top Slider
|
||||
|
||||
local topCoordTexture = DF:NewImage (editorWindow, nil, nil, nil, "overlay", nil, nil, "$parentImageTopCoord")
|
||||
topCoordTexture:SetPoint("topleft", editorWindow, "topleft")
|
||||
@@ -71,12 +71,12 @@ local CreateImageEditorFrame = function()
|
||||
topCoordTexture.alpha = .2
|
||||
|
||||
local topSlider = DF:NewSlider (editorWindow, nil, "$parentTopSlider", "topSlider", 100, 100, 0.1, 100, 0.1, 0)
|
||||
topSlider:SetAllPoints (editorWindow.widget)
|
||||
topSlider:SetAllPoints(editorWindow.widget)
|
||||
topSlider:SetOrientation ("VERTICAL")
|
||||
topSlider.backdrop = nil
|
||||
topSlider.fractional = true
|
||||
topSlider:SetHook ("OnEnter", function() return true end)
|
||||
topSlider:SetHook ("OnLeave", function() return true end)
|
||||
topSlider:SetHook("OnEnter", function() return true end)
|
||||
topSlider:SetHook("OnLeave", function() return true end)
|
||||
|
||||
local topSliderThumpTexture = topSlider:CreateTexture(nil, "overlay")
|
||||
topSliderThumpTexture:SetColorTexture(1, 1, 1)
|
||||
@@ -84,7 +84,7 @@ local CreateImageEditorFrame = function()
|
||||
topSliderThumpTexture:SetHeight(1)
|
||||
topSlider:SetThumbTexture (topSliderThumpTexture)
|
||||
|
||||
topSlider:SetHook ("OnValueChange", function(_, _, value)
|
||||
topSlider:SetHook("OnValueChange", function(_, _, value)
|
||||
topCoordTexture.image:SetHeight(editorWindow.frame:GetHeight()/100*value)
|
||||
if (editorWindow.callback_func) then
|
||||
editorWindow.accept(nil, nil, true)
|
||||
@@ -93,7 +93,7 @@ local CreateImageEditorFrame = function()
|
||||
|
||||
topSlider:Hide()
|
||||
|
||||
--> Bottom Slider
|
||||
--Bottom Slider
|
||||
|
||||
local bottomCoordTexture = DF:NewImage (editorWindow, nil, nil, nil, "overlay", nil, nil, "$parentImageBottomCoord")
|
||||
bottomCoordTexture:SetPoint("bottomleft", editorWindow, "bottomleft", 0, 0)
|
||||
@@ -103,12 +103,12 @@ local CreateImageEditorFrame = function()
|
||||
bottomCoordTexture.alpha = .2
|
||||
|
||||
local bottomSlider= DF:NewSlider (editorWindow, nil, "$parentBottomSlider", "bottomSlider", 100, 100, 0.1, 100, 0.1, 100)
|
||||
bottomSlider:SetAllPoints (editorWindow.widget)
|
||||
bottomSlider:SetAllPoints(editorWindow.widget)
|
||||
bottomSlider:SetOrientation ("VERTICAL")
|
||||
bottomSlider.backdrop = nil
|
||||
bottomSlider.fractional = true
|
||||
bottomSlider:SetHook ("OnEnter", function() return true end)
|
||||
bottomSlider:SetHook ("OnLeave", function() return true end)
|
||||
bottomSlider:SetHook("OnEnter", function() return true end)
|
||||
bottomSlider:SetHook("OnLeave", function() return true end)
|
||||
|
||||
local bottomSliderThumpTexture = bottomSlider:CreateTexture(nil, "overlay")
|
||||
bottomSliderThumpTexture:SetColorTexture(1, 1, 1)
|
||||
@@ -116,7 +116,7 @@ local CreateImageEditorFrame = function()
|
||||
bottomSliderThumpTexture:SetHeight(1)
|
||||
bottomSlider:SetThumbTexture (bottomSliderThumpTexture)
|
||||
|
||||
bottomSlider:SetHook ("OnValueChange", function(_, _, value)
|
||||
bottomSlider:SetHook("OnValueChange", function(_, _, value)
|
||||
value = math.abs (value-100)
|
||||
bottomCoordTexture.image:SetHeight(math.max (editorWindow.frame:GetHeight()/100*value, 1))
|
||||
if (editorWindow.callback_func) then
|
||||
@@ -126,7 +126,7 @@ local CreateImageEditorFrame = function()
|
||||
|
||||
bottomSlider:Hide()
|
||||
|
||||
--> Left Slider
|
||||
--Left Slider
|
||||
|
||||
local leftCoordTexture = DF:NewImage (editorWindow, nil, nil, nil, "overlay", nil, nil, "$parentImageLeftCoord")
|
||||
leftCoordTexture:SetPoint("topleft", editorWindow, "topleft", 0, 0)
|
||||
@@ -136,11 +136,11 @@ local CreateImageEditorFrame = function()
|
||||
leftCoordTexture.alpha = .2
|
||||
|
||||
local leftSlider = DF:NewSlider (editorWindow, nil, "$parentLeftSlider", "leftSlider", 100, 100, 0.1, 100, 0.1, 0.1)
|
||||
leftSlider:SetAllPoints (editorWindow.widget)
|
||||
leftSlider:SetAllPoints(editorWindow.widget)
|
||||
leftSlider.backdrop = nil
|
||||
leftSlider.fractional = true
|
||||
leftSlider:SetHook ("OnEnter", function() return true end)
|
||||
leftSlider:SetHook ("OnLeave", function() return true end)
|
||||
leftSlider:SetHook("OnEnter", function() return true end)
|
||||
leftSlider:SetHook("OnLeave", function() return true end)
|
||||
|
||||
local leftSliderThumpTexture = leftSlider:CreateTexture(nil, "overlay")
|
||||
leftSliderThumpTexture:SetColorTexture(1, 1, 1)
|
||||
@@ -148,7 +148,7 @@ local CreateImageEditorFrame = function()
|
||||
leftSliderThumpTexture:SetHeight(512)
|
||||
leftSlider:SetThumbTexture (leftSliderThumpTexture)
|
||||
|
||||
leftSlider:SetHook ("OnValueChange", function(_, _, value)
|
||||
leftSlider:SetHook("OnValueChange", function(_, _, value)
|
||||
leftCoordTexture.image:SetWidth(editorWindow.frame:GetWidth()/100*value)
|
||||
if (editorWindow.callback_func) then
|
||||
editorWindow.accept(nil, nil, true)
|
||||
@@ -157,7 +157,7 @@ local CreateImageEditorFrame = function()
|
||||
|
||||
leftSlider:Hide()
|
||||
|
||||
--> Right Slider
|
||||
--Right Slider
|
||||
|
||||
local rightCoordTexture = DF:NewImage (editorWindow, nil, nil, nil, "overlay", nil, nil, "$parentImageRightCoord")
|
||||
rightCoordTexture:SetPoint("topright", editorWindow, "topright", 0, 0)
|
||||
@@ -167,11 +167,11 @@ local CreateImageEditorFrame = function()
|
||||
rightCoordTexture.alpha = .2
|
||||
|
||||
local rightSlider = DF:NewSlider (editorWindow, nil, "$parentRightSlider", "rightSlider", 100, 100, 0.1, 100, 0.1, 100)
|
||||
rightSlider:SetAllPoints (editorWindow.widget)
|
||||
rightSlider:SetAllPoints(editorWindow.widget)
|
||||
rightSlider.backdrop = nil
|
||||
rightSlider.fractional = true
|
||||
rightSlider:SetHook ("OnEnter", function() return true end)
|
||||
rightSlider:SetHook ("OnLeave", function() return true end)
|
||||
rightSlider:SetHook("OnEnter", function() return true end)
|
||||
rightSlider:SetHook("OnLeave", function() return true end)
|
||||
--[
|
||||
local rightSliderThumpTexture = rightSlider:CreateTexture(nil, "overlay")
|
||||
rightSliderThumpTexture:SetColorTexture(1, 1, 1)
|
||||
@@ -179,7 +179,7 @@ local CreateImageEditorFrame = function()
|
||||
rightSliderThumpTexture:SetHeight(512)
|
||||
rightSlider:SetThumbTexture (rightSliderThumpTexture)
|
||||
--]]
|
||||
rightSlider:SetHook ("OnValueChange", function(_, _, value)
|
||||
rightSlider:SetHook("OnValueChange", function(_, _, value)
|
||||
value = math.abs (value-100)
|
||||
rightCoordTexture.image:SetWidth(math.max (editorWindow.frame:GetWidth()/100*value, 1))
|
||||
if (editorWindow.callback_func) then
|
||||
@@ -189,7 +189,7 @@ local CreateImageEditorFrame = function()
|
||||
|
||||
rightSlider:Hide()
|
||||
|
||||
--> Edit Buttons
|
||||
--Edit Buttons
|
||||
|
||||
local buttonsBackground = DF:NewPanel (UIParent, nil, "DetailsFrameworkImageEditButtonsBg", nil, 115, 230)
|
||||
--buttonsBackground:SetPoint("topleft", window, "topright", 2, 0)
|
||||
@@ -260,7 +260,7 @@ local CreateImageEditorFrame = function()
|
||||
Alpha:SetPoint("topright", buttonsBackground, "topright", -8, -115 + yMod)
|
||||
Alpha:SetTemplate(DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
|
||||
--> overlay color
|
||||
--overlay color
|
||||
local selectedColor = function(default)
|
||||
if (default) then
|
||||
edit_texture:SetVertexColor(unpack(default))
|
||||
@@ -284,7 +284,7 @@ local CreateImageEditorFrame = function()
|
||||
|
||||
local right, g, bottom = edit_texture:GetVertexColor()
|
||||
ColorPickerFrame:SetColorRGB (right, g, bottom)
|
||||
ColorPickerFrame:SetParent (buttonsBackground.widget)
|
||||
ColorPickerFrame:SetParent(buttonsBackground.widget)
|
||||
ColorPickerFrame.hasOpacity = false
|
||||
ColorPickerFrame.previousValues = {right, g, bottom}
|
||||
ColorPickerFrame.func = selectedColor
|
||||
@@ -317,7 +317,7 @@ local CreateImageEditorFrame = function()
|
||||
local alphaSlider = DF:NewSlider (alphaFrame, nil, "$parentAlphaSlider", "alphaSlider", 30, 220, 1, 100, 1, edit_texture:GetAlpha()*100)
|
||||
alphaSlider:SetPoint("top", alphaFrame, "top", 0, -5)
|
||||
alphaSlider:SetOrientation ("VERTICAL")
|
||||
alphaSlider.thumb:SetSize (40, 30)
|
||||
alphaSlider.thumb:SetSize(40, 30)
|
||||
--leftSlider.backdrop = nil
|
||||
--leftSlider.fractional = true
|
||||
|
||||
@@ -348,16 +348,16 @@ local CreateImageEditorFrame = function()
|
||||
|
||||
Alpha.clickfunction = alpha
|
||||
|
||||
alphaSlider:SetHook ("OnValueChange", function(_, _, value)
|
||||
alphaSlider:SetHook("OnValueChange", function(_, _, value)
|
||||
edit_texture:SetAlpha(value/100)
|
||||
if (editorWindow.callback_func) then
|
||||
editorWindow.accept(nil, nil, true)
|
||||
end
|
||||
end)
|
||||
|
||||
local resizer = CreateFrame ("Button", nil, editorWindow.widget, "BackdropTemplate")
|
||||
resizer:SetNormalTexture ([[Interface\AddOns\Details\images\skins\default_skin]])
|
||||
resizer:SetHighlightTexture ([[Interface\AddOns\Details\images\skins\default_skin]])
|
||||
local resizer = CreateFrame("Button", nil, editorWindow.widget, "BackdropTemplate")
|
||||
resizer:SetNormalTexture([[Interface\AddOns\Details\images\skins\default_skin]])
|
||||
resizer:SetHighlightTexture([[Interface\AddOns\Details\images\skins\default_skin]])
|
||||
resizer:GetNormalTexture():SetTexCoord (0.00146484375, 0.01513671875, 0.24560546875, 0.25927734375)
|
||||
resizer:GetHighlightTexture():SetTexCoord (0.00146484375, 0.01513671875, 0.24560546875, 0.25927734375)
|
||||
resizer:SetWidth(16)
|
||||
|
||||
+137
-137
@@ -311,7 +311,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> scripts
|
||||
--scripts
|
||||
|
||||
local OnEnter = function(slider)
|
||||
if (rawget (slider.MyObject, "lockdown")) then
|
||||
@@ -329,7 +329,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
|
||||
slider.thumb:SetAlpha (1)
|
||||
|
||||
if (slider.MyObject.onenter_backdrop_border_color) then
|
||||
slider:SetBackdropBorderColor (unpack (slider.MyObject.onenter_backdrop_border_color))
|
||||
slider:SetBackdropBorderColor(unpack (slider.MyObject.onenter_backdrop_border_color))
|
||||
end
|
||||
|
||||
if (slider.MyObject.have_tooltip and slider.MyObject.have_tooltip ~= "Right Click to Type the Value") then
|
||||
@@ -361,7 +361,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
|
||||
slider.thumb:SetAlpha (.7)
|
||||
|
||||
if (slider.MyObject.onleave_backdrop_border_color) then
|
||||
slider:SetBackdropBorderColor (unpack (slider.MyObject.onleave_backdrop_border_color))
|
||||
slider:SetBackdropBorderColor(unpack (slider.MyObject.onleave_backdrop_border_color))
|
||||
end
|
||||
|
||||
GameCooltip2:ShowMe (false)
|
||||
@@ -379,7 +379,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
|
||||
t = t + elapsed
|
||||
if (t > 0.3) then
|
||||
f:Hide()
|
||||
f:SetScript ("OnUpdate", nil)
|
||||
f:SetScript("OnUpdate", nil)
|
||||
f.isGoingToHide = false
|
||||
end
|
||||
end
|
||||
@@ -387,14 +387,14 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
|
||||
function f:ShowMe(host)
|
||||
f:SetParent(host)
|
||||
f:ClearAllPoints()
|
||||
f:SetPoint ("bottomleft", host, "topleft", -5, -5)
|
||||
f:SetPoint ("bottomright", host, "topright", 5, -5)
|
||||
f:SetPoint("bottomleft", host, "topleft", -5, -5)
|
||||
f:SetPoint("bottomright", host, "topright", 5, -5)
|
||||
|
||||
f:SetFrameStrata ("FULLSCREEN")
|
||||
f:SetFrameLevel (host:GetFrameLevel() + 1000)
|
||||
f:Show()
|
||||
if (f.isGoingToHide) then
|
||||
f:SetScript ("OnUpdate", nil)
|
||||
f:SetScript("OnUpdate", nil)
|
||||
f.isGoingToHide = false
|
||||
end
|
||||
|
||||
@@ -404,45 +404,45 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
|
||||
function f:PrepareToHide()
|
||||
f.isGoingToHide = true
|
||||
t = 0
|
||||
f:SetScript ("OnUpdate", goingHide)
|
||||
f:SetScript("OnUpdate", goingHide)
|
||||
end
|
||||
|
||||
local buttonPlus = CreateFrame ("button", "DetailsFrameworkSliderButtonsPlusButton", f, "BackdropTemplate")
|
||||
local buttonMinor = CreateFrame ("button", "DetailsFrameworkSliderButtonsMinorButton", f, "BackdropTemplate")
|
||||
local buttonPlus = CreateFrame("button", "DetailsFrameworkSliderButtonsPlusButton", f, "BackdropTemplate")
|
||||
local buttonMinor = CreateFrame("button", "DetailsFrameworkSliderButtonsMinorButton", f, "BackdropTemplate")
|
||||
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: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: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)
|
||||
|
||||
buttonPlus:SetNormalTexture ([[Interface\Buttons\UI-PlusButton-Up]])
|
||||
buttonMinor:SetNormalTexture ([[Interface\Buttons\UI-MinusButton-Up]])
|
||||
buttonPlus:SetNormalTexture([[Interface\Buttons\UI-PlusButton-Up]])
|
||||
buttonMinor:SetNormalTexture([[Interface\Buttons\UI-MinusButton-Up]])
|
||||
|
||||
buttonPlus:SetPushedTexture ([[Interface\Buttons\UI-PlusButton-Down]])
|
||||
buttonMinor:SetPushedTexture ([[Interface\Buttons\UI-MinusButton-Down]])
|
||||
buttonPlus:SetPushedTexture([[Interface\Buttons\UI-PlusButton-Down]])
|
||||
buttonMinor:SetPushedTexture([[Interface\Buttons\UI-MinusButton-Down]])
|
||||
|
||||
buttonPlus:SetDisabledTexture ([[Interface\Buttons\UI-PlusButton-Disabled]])
|
||||
buttonMinor:SetDisabledTexture ([[Interface\Buttons\UI-MinusButton-Disabled]])
|
||||
|
||||
buttonPlus:SetHighlightTexture ([[Interface\Buttons\UI-PlusButton-Hilight]])
|
||||
buttonMinor:SetHighlightTexture ([[Interface\Buttons\UI-PlusButton-Hilight]])
|
||||
buttonPlus:SetHighlightTexture([[Interface\Buttons\UI-PlusButton-Hilight]])
|
||||
buttonMinor:SetHighlightTexture([[Interface\Buttons\UI-PlusButton-Hilight]])
|
||||
|
||||
local plusNormalTexture = buttonPlus:GetNormalTexture()
|
||||
plusNormalTexture:SetDesaturated(true)
|
||||
@@ -451,11 +451,11 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
|
||||
|
||||
buttonMinor:ClearAllPoints()
|
||||
buttonPlus:ClearAllPoints()
|
||||
buttonMinor:SetPoint ("bottomright", f, "bottomright", 13, -13)
|
||||
buttonPlus:SetPoint ("left", buttonMinor, "right", -2, 0)
|
||||
buttonMinor:SetPoint("bottomright", f, "bottomright", 13, -13)
|
||||
buttonPlus:SetPoint("left", buttonMinor, "right", -2, 0)
|
||||
|
||||
buttonPlus:SetSize (16, 16)
|
||||
buttonMinor:SetSize (16, 16)
|
||||
buttonPlus:SetSize(16, 16)
|
||||
buttonMinor:SetSize(16, 16)
|
||||
|
||||
local timer = 0
|
||||
local change_timer = 0
|
||||
@@ -468,32 +468,32 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
|
||||
local editbox = DFSliderMetaFunctions.editbox_typevalue
|
||||
|
||||
if (f.host.fine_tuning) then
|
||||
f.host:SetValue (current + f.host.fine_tuning)
|
||||
f.host:SetValue(current + f.host.fine_tuning)
|
||||
if (editbox and DFSliderMetaFunctions.editbox_typevalue:IsShown()) then
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText (tostring (string.format ("%.2f", current + f.host.fine_tuning)))
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (string.format ("%.2f", current + f.host.fine_tuning)))
|
||||
end
|
||||
else
|
||||
if (f.host.useDecimals) then
|
||||
f.host:SetValue (current + 0.1)
|
||||
f.host:SetValue(current + 0.1)
|
||||
if (editbox and DFSliderMetaFunctions.editbox_typevalue:IsShown()) then
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText (string.format ("%.2f", current + 0.1))
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText(string.format ("%.2f", current + 0.1))
|
||||
end
|
||||
else
|
||||
f.host:SetValue (current + 1)
|
||||
f.host:SetValue(current + 1)
|
||||
if (editbox and DFSliderMetaFunctions.editbox_typevalue:IsShown()) then
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText (tostring (math.floor (current + 1)))
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (math.floor (current + 1)))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
buttonPlus:SetScript ("OnMouseUp", function(self)
|
||||
buttonPlus:SetScript("OnMouseUp", function(self)
|
||||
if (not buttonPlus.got_click) then
|
||||
plus_button_script()
|
||||
end
|
||||
buttonPlus.got_click = false
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
self:SetScript("OnUpdate", nil)
|
||||
end)
|
||||
|
||||
local on_update = function(self, elapsed)
|
||||
@@ -507,10 +507,10 @@ 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)
|
||||
self:SetScript("OnUpdate", on_update)
|
||||
end)
|
||||
|
||||
-- -- --
|
||||
@@ -520,31 +520,31 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
|
||||
local editbox = DFSliderMetaFunctions.editbox_typevalue
|
||||
|
||||
if (f.host.fine_tuning) then
|
||||
f.host:SetValue (current - f.host.fine_tuning)
|
||||
f.host:SetValue(current - f.host.fine_tuning)
|
||||
if (editbox and DFSliderMetaFunctions.editbox_typevalue:IsShown()) then
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText (tostring (string.format ("%.2f", current - f.host.fine_tuning)))
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (string.format ("%.2f", current - f.host.fine_tuning)))
|
||||
end
|
||||
else
|
||||
if (f.host.useDecimals) then
|
||||
f.host:SetValue (current - 0.1)
|
||||
f.host:SetValue(current - 0.1)
|
||||
if (editbox and DFSliderMetaFunctions.editbox_typevalue:IsShown()) then
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText (string.format ("%.2f", current - 0.1))
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText(string.format ("%.2f", current - 0.1))
|
||||
end
|
||||
else
|
||||
f.host:SetValue (current - 1)
|
||||
f.host:SetValue(current - 1)
|
||||
if (editbox and DFSliderMetaFunctions.editbox_typevalue:IsShown()) then
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText (tostring (math.floor (current - 1)))
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (math.floor (current - 1)))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
buttonMinor:SetScript ("OnMouseUp", function(self)
|
||||
buttonMinor:SetScript("OnMouseUp", function(self)
|
||||
if (not buttonMinor.got_click) then
|
||||
minor_button_script()
|
||||
end
|
||||
buttonMinor.got_click = false
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
self:SetScript("OnUpdate", nil)
|
||||
end)
|
||||
|
||||
local on_update = function(self, elapsed)
|
||||
@@ -558,14 +558,14 @@ 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)
|
||||
self:SetScript("OnUpdate", on_update)
|
||||
end)
|
||||
|
||||
local do_precision = function(text)
|
||||
if (type (text) == "string" and text:find ("%.")) then
|
||||
if (type(text) == "string" and text:find ("%.")) then
|
||||
local left, right = strsplit (".", text)
|
||||
left = tonumber (left)
|
||||
right = tonumber (right)
|
||||
@@ -589,30 +589,30 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
|
||||
|
||||
if (not DFSliderMetaFunctions.editbox_typevalue) then
|
||||
|
||||
local editbox = CreateFrame ("EditBox", "DetailsFrameworkSliderEditBox", UIParent, "BackdropTemplate")
|
||||
local editbox = CreateFrame("EditBox", "DetailsFrameworkSliderEditBox", UIParent, "BackdropTemplate")
|
||||
|
||||
editbox:SetSize (40, 20)
|
||||
editbox:SetJustifyH ("center")
|
||||
editbox:SetBackdrop ({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
|
||||
editbox:SetSize(40, 20)
|
||||
editbox:SetJustifyH("center")
|
||||
editbox:SetBackdrop({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
|
||||
edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", --edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]],
|
||||
tile = true, edgeSize = 8, tileSize = 5})
|
||||
editbox:SetFontObject ("GameFontHighlightSmall")
|
||||
|
||||
editbox:SetScript ("OnEnterPressed", function()
|
||||
editbox:SetScript("OnEnterPressed", function()
|
||||
editbox:ClearFocus()
|
||||
editbox:Hide()
|
||||
editbox:GetParent().MyObject.typing_value = false
|
||||
editbox:GetParent().MyObject.value = tonumber (editbox:GetText()) --do_precision (editbox:GetText())
|
||||
end)
|
||||
|
||||
editbox:SetScript ("OnEscapePressed", function()
|
||||
editbox:SetScript("OnEscapePressed", function()
|
||||
editbox:ClearFocus()
|
||||
editbox:Hide()
|
||||
editbox:GetParent().MyObject.typing_value = false
|
||||
editbox:GetParent().MyObject.value = self.typing_value_started --do_precision (self.typing_value_started)
|
||||
end)
|
||||
|
||||
editbox:SetScript ("OnTextChanged", function()
|
||||
editbox:SetScript("OnTextChanged", function()
|
||||
editbox:GetParent().MyObject.typing_can_change = true
|
||||
editbox:GetParent().MyObject.value = tonumber (editbox:GetText()) --do_precision
|
||||
editbox:GetParent().MyObject.typing_can_change = false
|
||||
@@ -622,21 +622,21 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
|
||||
end
|
||||
|
||||
local pvalue = self.previous_value [2]
|
||||
self:SetValue (pvalue)
|
||||
self:SetValue(pvalue)
|
||||
|
||||
self.typing_value = true
|
||||
self.typing_value_started = pvalue
|
||||
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetSize (self.width, self.height)
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetPoint ("center", self.widget, "center")
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetSize(self.width, self.height)
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetPoint("center", self.widget, "center")
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetFocus()
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetParent (self.widget)
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetParent(self.widget)
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetFrameLevel (self.widget:GetFrameLevel()+1)
|
||||
|
||||
if (self.useDecimals) then
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText (tostring (string.format ("%.1f", self.value)))
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (string.format ("%.1f", self.value)))
|
||||
else
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText (tostring (math.floor (self.value)))
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (math.floor (self.value)))
|
||||
end
|
||||
|
||||
DFSliderMetaFunctions.editbox_typevalue:HighlightText()
|
||||
@@ -678,7 +678,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
|
||||
|
||||
if (slider.MyObject.typing_value) then
|
||||
DFSliderMetaFunctions.editbox_typevalue:ClearFocus()
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText ("")
|
||||
DFSliderMetaFunctions.editbox_typevalue:SetText("")
|
||||
slider.MyObject.typing_valu = false
|
||||
end
|
||||
end
|
||||
@@ -704,7 +704,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
|
||||
end
|
||||
|
||||
if (slider.MyObject.typing_value and not slider.MyObject.typing_can_change) then
|
||||
slider.MyObject:SetValue (slider.MyObject.typing_value_started)
|
||||
slider.MyObject:SetValue(slider.MyObject.typing_value_started)
|
||||
return
|
||||
end
|
||||
|
||||
@@ -732,16 +732,16 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
|
||||
end
|
||||
|
||||
if (slider.MyObject.useDecimals) then
|
||||
slider.amt:SetText (string.format ("%.2f", amt))
|
||||
slider.amt:SetText(string.format ("%.2f", amt))
|
||||
else
|
||||
slider.amt:SetText (math.floor (amt))
|
||||
slider.amt:SetText(math.floor (amt))
|
||||
end
|
||||
slider.MyObject.ivalue = amt
|
||||
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> object constructor
|
||||
--object constructor
|
||||
|
||||
local SwitchOnClick = function(self, button, forced_value, value)
|
||||
|
||||
@@ -759,31 +759,31 @@ local SwitchOnClick = function(self, button, forced_value, value)
|
||||
rawset (slider, "value", false)
|
||||
|
||||
if (slider.backdrop_disabledcolor) then
|
||||
slider:SetBackdropColor (unpack (slider.backdrop_disabledcolor))
|
||||
slider:SetBackdropColor(unpack (slider.backdrop_disabledcolor))
|
||||
else
|
||||
slider:SetBackdropColor (1, 0, 0, 0.4)
|
||||
slider:SetBackdropColor(1, 0, 0, 0.4)
|
||||
end
|
||||
|
||||
if (slider.is_checkbox) then
|
||||
slider.checked_texture:Hide()
|
||||
else
|
||||
slider._text:SetText (slider._ltext)
|
||||
slider._text:SetText(slider._ltext)
|
||||
slider._thumb:ClearAllPoints()
|
||||
slider._thumb:SetPoint ("left", slider.widget, "left")
|
||||
slider._thumb:SetPoint("left", slider.widget, "left")
|
||||
end
|
||||
else
|
||||
rawset (slider, "value", true)
|
||||
if (slider.backdrop_enabledcolor) then
|
||||
slider:SetBackdropColor (unpack (slider.backdrop_enabledcolor))
|
||||
slider:SetBackdropColor(unpack (slider.backdrop_enabledcolor))
|
||||
else
|
||||
slider:SetBackdropColor (0, 0, 1, 0.4)
|
||||
slider:SetBackdropColor(0, 0, 1, 0.4)
|
||||
end
|
||||
if (slider.is_checkbox) then
|
||||
slider.checked_texture:Show()
|
||||
else
|
||||
slider._text:SetText (slider._rtext)
|
||||
slider._text:SetText(slider._rtext)
|
||||
slider._thumb:ClearAllPoints()
|
||||
slider._thumb:SetPoint ("right", slider.widget, "right")
|
||||
slider._thumb:SetPoint("right", slider.widget, "right")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -798,7 +798,7 @@ local SwitchOnClick = function(self, button, forced_value, value)
|
||||
return
|
||||
end
|
||||
|
||||
--> trigger hooks
|
||||
--trigger hooks
|
||||
slider:RunHooksForWidget ("OnSwitch", slider, slider.FixedValue, value)
|
||||
end
|
||||
|
||||
@@ -837,7 +837,7 @@ local switch_disable = function(self)
|
||||
if (not self.lock_texture) then
|
||||
DF:NewImage (self, [[Interface\PetBattles\PetBattle-LockIcon]], 12, 12, "overlay", {0.0546875, 0.9453125, 0.0703125, 0.9453125}, "lock_texture", "$parentLockTexture")
|
||||
self.lock_texture:SetDesaturated (true)
|
||||
self.lock_texture:SetPoint ("center", self._thumb, "center")
|
||||
self.lock_texture:SetPoint("center", self._thumb, "center")
|
||||
end
|
||||
self.lock_texture:Show()
|
||||
end
|
||||
@@ -856,7 +856,7 @@ local switch_enable = function(self)
|
||||
if (not self.lock_texture) then
|
||||
DF:NewImage (self, [[Interface\PetBattles\PetBattle-LockIcon]], 12, 12, "overlay", {0.0546875, 0.9453125, 0.0703125, 0.9453125}, "lock_texture", "$parentLockTexture")
|
||||
self.lock_texture:SetDesaturated (true)
|
||||
self.lock_texture:SetPoint ("center", self._thumb, "center")
|
||||
self.lock_texture:SetPoint("center", self._thumb, "center")
|
||||
end
|
||||
self.lock_texture:Hide()
|
||||
self._text:Show()
|
||||
@@ -872,11 +872,11 @@ end
|
||||
|
||||
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]])
|
||||
checked:SetPoint ("center", self.button, "center", -1, -1)
|
||||
local checked = self:CreateTexture(self:GetName() .. "CheckTexture", "overlay")
|
||||
checked:SetTexture([[Interface\Buttons\UI-CheckBox-Check]])
|
||||
checked:SetPoint("center", self.button, "center", -1, -1)
|
||||
local size_pct = self:GetWidth()/32
|
||||
checked:SetSize (32*size_pct, 32*size_pct)
|
||||
checked:SetSize(32*size_pct, 32*size_pct)
|
||||
self.checked_texture = checked
|
||||
|
||||
self._thumb:Hide()
|
||||
@@ -887,16 +887,16 @@ local set_as_checkbok = function(self)
|
||||
if (rawget (self, "value")) then
|
||||
self.checked_texture:Show()
|
||||
if (self.backdrop_enabledcolor) then
|
||||
self:SetBackdropColor (unpack (self.backdrop_enabledcolor))
|
||||
self:SetBackdropColor(unpack (self.backdrop_enabledcolor))
|
||||
else
|
||||
self:SetBackdropColor (0, 0, 1, 0.4)
|
||||
self:SetBackdropColor(0, 0, 1, 0.4)
|
||||
end
|
||||
else
|
||||
self.checked_texture:Hide()
|
||||
if (self.backdrop_disabledcolor) then
|
||||
self:SetBackdropColor (unpack (self.backdrop_disabledcolor))
|
||||
self:SetBackdropColor(unpack (self.backdrop_disabledcolor))
|
||||
else
|
||||
self:SetBackdropColor (0, 0, 1, 0.4)
|
||||
self:SetBackdropColor(0, 0, 1, 0.4)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -912,7 +912,7 @@ end
|
||||
|
||||
function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, default_value, color_inverted, switch_func, return_func, with_label, switch_template, label_template)
|
||||
|
||||
--> early checks
|
||||
--early checks
|
||||
if (not name) then
|
||||
name = "DetailsFrameWorkSlider" .. DF.SwitchCounter
|
||||
DF.SwitchCounter = DF.SwitchCounter + 1
|
||||
@@ -923,11 +923,11 @@ function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defa
|
||||
container = parent
|
||||
end
|
||||
|
||||
--> defaults
|
||||
--defaults
|
||||
ltext = ltext or "OFF"
|
||||
rtext = rtext or "ON"
|
||||
|
||||
--> build frames
|
||||
--build frames
|
||||
w = w or 60
|
||||
h = h or 20
|
||||
|
||||
@@ -949,18 +949,18 @@ function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defa
|
||||
parent [member] = slider
|
||||
end
|
||||
|
||||
slider:SetBackdrop ({edgeFile = [[Interface\Buttons\UI-SliderBar-Border]], edgeSize = 8,
|
||||
slider:SetBackdrop({edgeFile = [[Interface\Buttons\UI-SliderBar-Border]], edgeSize = 8,
|
||||
bgFile = [[Interface\AddOns\Details\images\background]], insets = {left = 3, right = 3, top = 5, bottom = 5}})
|
||||
|
||||
local thumb = slider:CreateTexture (nil, "artwork")
|
||||
thumb:SetTexture ("Interface\\Buttons\\UI-ScrollBar-Knob")
|
||||
thumb:SetSize (34+(h*0.2), h*1.2)
|
||||
local thumb = slider:CreateTexture(nil, "artwork")
|
||||
thumb:SetTexture("Interface\\Buttons\\UI-ScrollBar-Knob")
|
||||
thumb:SetSize(34+(h*0.2), h*1.2)
|
||||
thumb:SetAlpha (0.7)
|
||||
thumb:SetPoint ("left", slider.widget, "left")
|
||||
thumb:SetPoint("left", slider.widget, "left")
|
||||
|
||||
local text = slider:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
text:SetTextColor (.8, .8, .8, 1)
|
||||
text:SetPoint ("center", thumb, "center")
|
||||
text:SetPoint("center", thumb, "center")
|
||||
|
||||
slider._text = text
|
||||
slider._thumb = thumb
|
||||
@@ -970,9 +970,9 @@ function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defa
|
||||
|
||||
slider.invert_colors = color_inverted
|
||||
|
||||
slider:SetScript ("OnClick", SwitchOnClick)
|
||||
slider:SetScript("OnClick", SwitchOnClick)
|
||||
|
||||
slider:SetValue (default_value)
|
||||
slider:SetValue(default_value)
|
||||
|
||||
slider.isSwitch = true
|
||||
|
||||
@@ -981,9 +981,9 @@ function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defa
|
||||
end
|
||||
|
||||
if (with_label) then
|
||||
local label = DF:CreateLabel (slider.widget, with_label, nil, nil, nil, "label", nil, "overlay")
|
||||
local label = DF:CreateLabel(slider.widget, with_label, nil, nil, nil, "label", nil, "overlay")
|
||||
label.text = with_label
|
||||
slider.widget:SetPoint ("left", label.widget, "right", 2, 0)
|
||||
slider.widget:SetPoint("left", label.widget, "right", 2, 0)
|
||||
with_label = label
|
||||
|
||||
if (label_template) then
|
||||
@@ -998,64 +998,64 @@ function DFSliderMetaFunctions:SetTemplate (template)
|
||||
|
||||
--slider e switch
|
||||
if (template.width) then
|
||||
self:SetWidth (template.width)
|
||||
self:SetWidth(template.width)
|
||||
end
|
||||
if (template.height) then
|
||||
self:SetHeight (template.height)
|
||||
self:SetHeight(template.height)
|
||||
end
|
||||
|
||||
if (template.backdrop) then
|
||||
self:SetBackdrop (template.backdrop)
|
||||
self:SetBackdrop(template.backdrop)
|
||||
end
|
||||
if (template.backdropcolor) then
|
||||
local r, g, b, a = DF:ParseColors (template.backdropcolor)
|
||||
self:SetBackdropColor (r, g, b, a)
|
||||
local r, g, b, a = DF:ParseColors(template.backdropcolor)
|
||||
self:SetBackdropColor(r, g, b, a)
|
||||
end
|
||||
if (template.backdropbordercolor) then
|
||||
local r, g, b, a = DF:ParseColors (template.backdropbordercolor)
|
||||
self:SetBackdropBorderColor (r, g, b, a)
|
||||
local r, g, b, a = DF:ParseColors(template.backdropbordercolor)
|
||||
self:SetBackdropBorderColor(r, g, b, a)
|
||||
self.onleave_backdrop_border_color = {r, g, b, a}
|
||||
end
|
||||
|
||||
if (template.onenterbordercolor) then
|
||||
local r, g, b, a = DF:ParseColors (template.onenterbordercolor)
|
||||
local r, g, b, a = DF:ParseColors(template.onenterbordercolor)
|
||||
self.onenter_backdrop_border_color = {r, g, b, a}
|
||||
end
|
||||
|
||||
if (template.onleavebordercolor) then
|
||||
local r, g, b, a = DF:ParseColors (template.onleavebordercolor)
|
||||
local r, g, b, a = DF:ParseColors(template.onleavebordercolor)
|
||||
self.onleave_backdrop_border_color = {r, g, b, a}
|
||||
end
|
||||
|
||||
if (template.thumbtexture) then
|
||||
if (self.thumb) then
|
||||
self.thumb:SetTexture (template.thumbtexture)
|
||||
self.thumb:SetTexture(template.thumbtexture)
|
||||
end
|
||||
end
|
||||
if (template.thumbwidth) then
|
||||
if (self.thumb) then
|
||||
self.thumb:SetWidth (template.thumbwidth)
|
||||
self.thumb:SetWidth(template.thumbwidth)
|
||||
end
|
||||
end
|
||||
if (template.thumbheight) then
|
||||
if (self.thumb) then
|
||||
self.thumb:SetHeight (template.thumbheight)
|
||||
self.thumb:SetHeight(template.thumbheight)
|
||||
end
|
||||
end
|
||||
if (template.thumbcolor) then
|
||||
if (self.thumb) then
|
||||
local r, g, b, a = DF:ParseColors (template.thumbcolor)
|
||||
local r, g, b, a = DF:ParseColors(template.thumbcolor)
|
||||
self.thumb:SetVertexColor (r, g, b, a)
|
||||
end
|
||||
end
|
||||
|
||||
--switch only
|
||||
if (template.enabled_backdropcolor) then
|
||||
local r, g, b, a = DF:ParseColors (template.enabled_backdropcolor)
|
||||
local r, g, b, a = DF:ParseColors(template.enabled_backdropcolor)
|
||||
self.backdrop_enabledcolor = {r, g, b, a}
|
||||
end
|
||||
if (template.disabled_backdropcolor) then
|
||||
local r, g, b, a = DF:ParseColors (template.disabled_backdropcolor)
|
||||
local r, g, b, a = DF:ParseColors(template.disabled_backdropcolor)
|
||||
self.backdrop_disabledcolor = {r, g, b, a}
|
||||
end
|
||||
end
|
||||
@@ -1067,7 +1067,7 @@ end
|
||||
|
||||
function DF:NewSlider (parent, container, name, member, w, h, min, max, step, defaultv, isDecemal, isSwitch, with_label, slider_template, label_template)
|
||||
|
||||
--> early checks
|
||||
--early checks
|
||||
if (not name) then
|
||||
name = "DetailsFrameworkSlider" .. DF.SliderCounter
|
||||
DF.SliderCounter = DF.SliderCounter + 1
|
||||
@@ -1097,7 +1097,7 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
|
||||
container = container.widget
|
||||
end
|
||||
|
||||
--> defaults
|
||||
--defaults
|
||||
min = min or 1
|
||||
max = max or 2
|
||||
step = step or 1
|
||||
@@ -1106,11 +1106,11 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
|
||||
w = w or 130
|
||||
h = h or 19
|
||||
|
||||
--> default members:
|
||||
--default members:
|
||||
SliderObject.lockdown = false
|
||||
SliderObject.container = container
|
||||
|
||||
SliderObject.slider = CreateFrame ("slider", name, parent,"BackdropTemplate")
|
||||
SliderObject.slider = CreateFrame("slider", name, parent,"BackdropTemplate")
|
||||
SliderObject.widget = SliderObject.slider
|
||||
|
||||
SliderObject.useDecimals = isDecemal or false
|
||||
@@ -1135,19 +1135,19 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
|
||||
end
|
||||
|
||||
SliderObject.slider.MyObject = SliderObject
|
||||
SliderObject.slider:SetWidth (w)
|
||||
SliderObject.slider:SetHeight (h)
|
||||
SliderObject.slider:SetWidth(w)
|
||||
SliderObject.slider:SetHeight(h)
|
||||
SliderObject.slider:SetOrientation ("horizontal")
|
||||
SliderObject.slider:SetMinMaxValues (min, max)
|
||||
SliderObject.slider:SetValue (defaultv)
|
||||
SliderObject.slider:SetValue(defaultv)
|
||||
SliderObject.ivalue = defaultv
|
||||
|
||||
SliderObject.slider:SetBackdrop ({edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", edgeSize = 8})
|
||||
SliderObject.slider:SetBackdropColor (0.9, 0.7, 0.7, 1.0)
|
||||
SliderObject.slider:SetBackdrop({edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", edgeSize = 8})
|
||||
SliderObject.slider:SetBackdropColor(0.9, 0.7, 0.7, 1.0)
|
||||
|
||||
SliderObject.thumb = SliderObject.slider:CreateTexture (nil, "artwork")
|
||||
SliderObject.thumb:SetTexture ("Interface\\Buttons\\UI-ScrollBar-Knob")
|
||||
SliderObject.thumb:SetSize (30+(h*0.2), h*1.2)
|
||||
SliderObject.thumb = SliderObject.slider:CreateTexture(nil, "artwork")
|
||||
SliderObject.thumb:SetTexture("Interface\\Buttons\\UI-ScrollBar-Knob")
|
||||
SliderObject.thumb:SetSize(30+(h*0.2), h*1.2)
|
||||
SliderObject.thumb.originalWidth = SliderObject.thumb:GetWidth()
|
||||
SliderObject.thumb.originalHeight =SliderObject.thumb:GetHeight()
|
||||
SliderObject.thumb:SetAlpha (0.7)
|
||||
@@ -1166,18 +1166,18 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
|
||||
end
|
||||
|
||||
if (SliderObject.useDecimals) then
|
||||
SliderObject.amt:SetText (string.format ("%.2f", amt))
|
||||
SliderObject.amt:SetText(string.format ("%.2f", amt))
|
||||
else
|
||||
SliderObject.amt:SetText (math.floor (amt))
|
||||
SliderObject.amt:SetText(math.floor (amt))
|
||||
end
|
||||
|
||||
SliderObject.amt:SetTextColor (.8, .8, .8, 1)
|
||||
SliderObject.amt:SetPoint ("center", SliderObject.thumb, "center")
|
||||
SliderObject.amt:SetPoint("center", SliderObject.thumb, "center")
|
||||
SliderObject.slider.amt = SliderObject.amt
|
||||
|
||||
SliderObject.previous_value = {defaultv or 0, 0, 0}
|
||||
|
||||
--> hooks
|
||||
--hooks
|
||||
SliderObject.HookList = {
|
||||
OnEnter = {},
|
||||
OnLeave = {},
|
||||
@@ -1190,20 +1190,20 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
|
||||
OnValueChanged = {},
|
||||
}
|
||||
|
||||
SliderObject.slider:SetScript ("OnEnter", OnEnter)
|
||||
SliderObject.slider:SetScript ("OnLeave", OnLeave)
|
||||
SliderObject.slider:SetScript ("OnHide", OnHide)
|
||||
SliderObject.slider:SetScript ("OnShow", OnShow)
|
||||
SliderObject.slider:SetScript ("OnValueChanged", OnValueChanged)
|
||||
SliderObject.slider:SetScript ("OnMouseDown", OnMouseDown)
|
||||
SliderObject.slider:SetScript ("OnMouseUp", OnMouseUp)
|
||||
SliderObject.slider:SetScript("OnEnter", OnEnter)
|
||||
SliderObject.slider:SetScript("OnLeave", OnLeave)
|
||||
SliderObject.slider:SetScript("OnHide", OnHide)
|
||||
SliderObject.slider:SetScript("OnShow", OnShow)
|
||||
SliderObject.slider:SetScript("OnValueChanged", OnValueChanged)
|
||||
SliderObject.slider:SetScript("OnMouseDown", OnMouseDown)
|
||||
SliderObject.slider:SetScript("OnMouseUp", OnMouseUp)
|
||||
|
||||
setmetatable (SliderObject, DFSliderMetaFunctions)
|
||||
|
||||
if (with_label) then
|
||||
local label = DF:CreateLabel (SliderObject.slider, with_label, nil, nil, nil, "label", nil, "overlay")
|
||||
local label = DF:CreateLabel(SliderObject.slider, with_label, nil, nil, nil, "label", nil, "overlay")
|
||||
label.text = with_label
|
||||
SliderObject.slider:SetPoint ("left", label.widget, "right", 2, 0)
|
||||
SliderObject.slider:SetPoint("left", label.widget, "right", 2, 0)
|
||||
with_label = label
|
||||
|
||||
if (label_template) then
|
||||
|
||||
+50
-50
@@ -688,9 +688,9 @@ if (IS_WOW_PROJECT_NOT_MAINLINE) then
|
||||
|
||||
end
|
||||
|
||||
--> tells the duration, requirements and cooldown of a cooldown
|
||||
-- tells the duration, requirements and cooldown of a cooldown
|
||||
DF.CooldownsInfo = {
|
||||
--> paladin
|
||||
--paladin
|
||||
[31884] = {cooldown = 120, duration = 20, talent = false, charges = 1, class = "PALADIN", type = 1}, --Avenging Wrath
|
||||
[216331] = {cooldown = 120, duration = 20, talent = 22190, charges = 1, class = "PALADIN", type = 1}, --Avenging Crusader (talent)
|
||||
[498] = {cooldown = 60, duration = 8, talent = false, charges = 1, class = "PALADIN", type = 2}, --Divine Protection
|
||||
@@ -712,7 +712,7 @@ DF.CooldownsInfo = {
|
||||
[205191] = {cooldown = 60, duration = 10, talent = 22183, charges = 1, class = "PALADIN", type = 2}, --Eye for an Eye (talent)
|
||||
[184662] = {cooldown = 120, duration = 15, talent = false, charges = 1, class = "PALADIN", type = 2}, --Shield of Vengeance
|
||||
|
||||
--> warrior
|
||||
--warrior
|
||||
[107574] = {cooldown = 90, duration = 20, talent = 22397, charges = 1, class = "WARRIOR", type = 1}, --Avatar
|
||||
[227847] = {cooldown = 90, duration = 5, talent = false, charges = 1, class = "WARRIOR", type = 1}, --Bladestorm
|
||||
[152277] = {cooldown = 60, duration = 6, talent = 21667, charges = 1, class = "WARRIOR", type = 1}, --Ravager (talent)
|
||||
@@ -728,7 +728,7 @@ DF.CooldownsInfo = {
|
||||
[5246] = {cooldown = 90, duration = 8, talent = false, charges = 1, class = "WARRIOR", type = 5}, --Intimidating Shout
|
||||
|
||||
|
||||
--> warlock
|
||||
--warlock
|
||||
[205180] = {cooldown = 180, duration = 20, talent = false, charges = 1, class = "WARLOCK", type = 1}, --Summon Darkglare
|
||||
[342601] = {cooldown = 3600, duration = false, talent = false, charges = 1, class = "WARLOCK", type = 1}, --Ritual of Doom
|
||||
[113860] = {cooldown = 120, duration = 20, talent = 19293, charges = 1, class = "WARLOCK", type = 1}, --Dark Soul: Misery (talent)
|
||||
@@ -744,7 +744,7 @@ DF.CooldownsInfo = {
|
||||
[333889] = {cooldown = 180, duration = 15, talent = false, charges = 1, class = "WARLOCK", type = 5}, --Fel Domination
|
||||
[5484] = {cooldown = 40, duration = 20, talent = true, charges = 1, class = "WARLOCK", type = 5}, --Howl of Terror (talent)
|
||||
|
||||
--> shaman
|
||||
--shaman
|
||||
[198067] = {cooldown = 150, duration = 30, talent = false, charges = 1, class = "SHAMAN", type = 1}, --Fire Elemental
|
||||
[192249] = {cooldown = 150, duration = 30, talent = 19272, charges = 1, class = "SHAMAN", type = 1}, --Storm Elemental (talent)
|
||||
[108271] = {cooldown = 90, duration = 8, talent = false, charges = 1, class = "SHAMAN", type = 2}, --Astral Shift
|
||||
@@ -762,7 +762,7 @@ DF.CooldownsInfo = {
|
||||
[65992] = {cooldown = 60, duration = 10, talent = false, charges = 1, class = "SHAMAN", type = 5}, --Tremor Totem
|
||||
[192077] = {cooldown = 120, duration = 15, talent = 21966, charges = 1, class = "SHAMAN", type = 5}, --Wind Rush Totem (talent)
|
||||
|
||||
--> monk
|
||||
--monk
|
||||
[132578] = {cooldown = 180, duration = 25, talent = false, charges = 1, class = "MONK", type = 1}, --Invoke Niuzao, the Black Ox
|
||||
[115080] = {cooldown = 180, duration = false, talent = false, charges = 1, class = "MONK", type = 1}, --Touch of Death
|
||||
[115203] = {cooldown = 420, duration = 15, talent = false, charges = 1, class = "MONK", type = 2}, --Fortifying Brew
|
||||
@@ -783,7 +783,7 @@ DF.CooldownsInfo = {
|
||||
[116844] = {cooldown = 45, duration = 5, talent = 19995, charges = 1, class = "MONK", type = 5}, --Ring of peace (talent)
|
||||
[119381] = {cooldown = 50, duration = 3, talent = false, charges = 1, class = "MONK", type = 5}, --Leg Sweep
|
||||
|
||||
--> hunter
|
||||
--hunter
|
||||
[193530] = {cooldown = 120, duration = 20, talent = false, charges = 1, class = "HUNTER", type = 1}, --Aspect of the Wild
|
||||
[19574] = {cooldown = 90, duration = 12, talent = false, charges = 1, class = "HUNTER", type = 1}, --Bestial Wrath
|
||||
[201430] = {cooldown = 180, duration = 12, talent = 23044, charges = 1, class = "HUNTER", type = 1}, --Stampede (talent)
|
||||
@@ -799,7 +799,7 @@ DF.CooldownsInfo = {
|
||||
[187650] = {cooldown = 25, duration = 60, talent = false, charges = 1, class = "HUNTER", type = 5}, --Freezing Trap
|
||||
[186289] = {cooldown = 72, duration = 15, talent = false, charges = 1, class = "HUNTER", type = 5}, --Aspect of the eagle
|
||||
|
||||
--> druid
|
||||
--druid
|
||||
[194223] = {cooldown = 180, duration = 20, talent = false, charges = 1, class = "DRUID", type = 1}, --Celestial Alignment
|
||||
[102560] = {cooldown = 180, duration = 30, talent = 21702, charges = 1, class = "DRUID", type = 1}, --Incarnation: Chosen of Elune (talent)
|
||||
[22812] = {cooldown = 60, duration = 12, talent = false, charges = 1, class = "DRUID", type = 2}, --Barkskin
|
||||
@@ -819,7 +819,7 @@ DF.CooldownsInfo = {
|
||||
[132469] = {cooldown = 30, duration = false, talent = false, charges = 1, class = "DRUID", type = 5}, --Typhoon
|
||||
[319454] = {cooldown = 300, duration = 45, talent = 18577, charges = 1, class = "DRUID", type = 5}, --Heart of the Wild (talent)
|
||||
|
||||
--> death knight
|
||||
--death knight
|
||||
[275699] = {cooldown = 90, duration = 15, talent = false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Apocalypse
|
||||
[42650] = {cooldown = 480, duration = 30, talent = false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Army of the Dead
|
||||
[49206] = {cooldown = 180, duration = 30, talent = 22110, charges = 1, class = "DEATHKNIGHT", type = 1}, --Summon Gargoyle (talent)
|
||||
@@ -839,7 +839,7 @@ DF.CooldownsInfo = {
|
||||
[108194] = {cooldown = 45, duration = 4, talent = 22520, charges = 1, class = "DEATHKNIGHT", type = 5}, --Asphyxiate (talent)
|
||||
[221562] = {cooldown = 45, duration = 5, talent = false, charges = 1, class = "DEATHKNIGHT", type = 5}, --Asphyxiate
|
||||
|
||||
--> demon hunter
|
||||
--demon hunter
|
||||
|
||||
[200166] = {cooldown = 240, duration = 30, talent = false, charges = 1, class = "DEMONHUNTER", type = 1}, --Metamorphosis
|
||||
[198589] = {cooldown = 60, duration = 10, talent = false, charges = 1, class = "DEMONHUNTER", type = 2}, --Blur
|
||||
@@ -858,7 +858,7 @@ DF.CooldownsInfo = {
|
||||
[202137] = {cooldown = 60, duration = 8, talent = false, charges = 1, class = "DEMONHUNTER", type = 5}, --Sigil of Silence
|
||||
[202138] = {cooldown = 90, duration = 6, talent = 22511, charges = 1, class = "DEMONHUNTER", type = 5}, --Sigil of Chains (talent)
|
||||
|
||||
--> mage
|
||||
--mage
|
||||
[12042] = {cooldown = 90, duration = 10, talent = false, charges = 1, class = "MAGE", type = 1}, --Arcane Power
|
||||
[12051] = {cooldown = 90, duration = 6, talent = false, charges = 1, class = "MAGE", type = 1}, --Evocation
|
||||
[110960] = {cooldown = 120, duration = 20, talent = false, charges = 1, class = "MAGE", type = 2}, --Greater Invisibility
|
||||
@@ -874,7 +874,7 @@ DF.CooldownsInfo = {
|
||||
[235219] = {cooldown = 300, duration = false, talent = false, charges = 1, class = "MAGE", type = 5}, --Cold Snap
|
||||
[113724] = {cooldown = 45, duration = 10, talent = 22471, charges = 1, class = "MAGE", type = 5}, --Ring of Frost (talent)
|
||||
|
||||
--> priest
|
||||
--priest
|
||||
[10060] = {cooldown = 120, duration = 20, talent = false, charges = 1, class = "PRIEST", type = 1}, --Power Infusion
|
||||
[34433] = {cooldown = 180, duration = 15, talent = false, charges = 1, class = "PRIEST", type = 1}, --Shadowfiend
|
||||
[123040] = {cooldown = 60, duration = 12, talent = 22094, charges = 1, class = "PRIEST", type = 1}, --Mindbender (talent)
|
||||
@@ -895,7 +895,7 @@ DF.CooldownsInfo = {
|
||||
[47585] = {cooldown = 120, duration = 6, talent = false, charges = 1, class = "PRIEST", type = 2}, --Dispersion
|
||||
[15286] = {cooldown = 120, duration = 15, talent = false, charges = 1, class = "PRIEST", type = 4}, --Vampiric Embrace
|
||||
|
||||
--> rogue
|
||||
--rogue
|
||||
[79140] = {cooldown = 120, duration = 20, talent = false, charges = 1, class = "ROGUE", type = 1}, --Vendetta
|
||||
[1856] = {cooldown = 120, duration = 3, talent = false, charges = 1, class = "ROGUE", type = 2}, --Vanish
|
||||
[5277] = {cooldown = 120, duration = 10, talent = false, charges = 1, class = "ROGUE", type = 2}, --Evasion
|
||||
@@ -1435,7 +1435,7 @@ function DF:GetSpellsForEncounterFromJournal (instanceEJID, encounterEJID)
|
||||
local nextID = {sectionInfo.siblingSectionID}
|
||||
|
||||
while (nextID [1]) do
|
||||
--> get the deepest section in the hierarchy
|
||||
--get the deepest section in the hierarchy
|
||||
local ID = tremove (nextID)
|
||||
local sectionInfo = C_EncounterJournal.GetSectionInfo (ID)
|
||||
|
||||
@@ -1462,51 +1462,51 @@ end
|
||||
--default spells to use in the range check
|
||||
DF.SpellRangeCheckListBySpec = {
|
||||
-- 185245 spellID for Torment, it is always failing to check range with IsSpellInRange()
|
||||
[577] = 278326, --> havoc demon hunter - Consume Magic
|
||||
[581] = 278326, --> vengeance demon hunter - Consume Magic
|
||||
[577] = 278326, --havoc demon hunter - Consume Magic
|
||||
[581] = 278326, --vengeance demon hunter - Consume Magic
|
||||
|
||||
[250] = 56222, --> blood dk - dark command
|
||||
[251] = 56222, --> frost dk - dark command
|
||||
[252] = 56222, --> unholy dk - dark command
|
||||
[250] = 56222, --blood dk - dark command
|
||||
[251] = 56222, --frost dk - dark command
|
||||
[252] = 56222, --unholy dk - dark command
|
||||
|
||||
[102] = 8921, --> druid balance - Moonfire (45 yards)
|
||||
[103] = 8921, --> druid feral - Moonfire (40 yards)
|
||||
[104] = 6795, --> druid guardian - Growl
|
||||
[105] = 8921, --> druid resto - Moonfire (40 yards)
|
||||
[102] = 8921, -- druid balance - Moonfire (45 yards)
|
||||
[103] = 8921, -- druid feral - Moonfire (40 yards)
|
||||
[104] = 6795, -- druid guardian - Growl
|
||||
[105] = 8921, -- druid resto - Moonfire (40 yards)
|
||||
|
||||
[253] = 193455, --> hunter bm - Cobra Shot
|
||||
[254] = 19434, --> hunter marks - Aimed Shot
|
||||
[255] = 271788, --> hunter survivor - Serpent Sting
|
||||
[253] = 193455, -- hunter bm - Cobra Shot
|
||||
[254] = 19434, --hunter marks - Aimed Shot
|
||||
[255] = 271788, --hunter survivor - Serpent Sting
|
||||
|
||||
[62] = 227170, --> mage arcane - arcane blast
|
||||
[63] = 133, --> mage fire - fireball
|
||||
[64] = 228597, --> mage frost - frostbolt
|
||||
[62] = 227170, --mage arcane - arcane blast
|
||||
[63] = 133, --mage fire - fireball
|
||||
[64] = 228597, --mage frost - frostbolt
|
||||
|
||||
[268] = 115546 , --> monk bm - Provoke
|
||||
[269] = 117952, --> monk ww - Crackling Jade Lightning (40 yards)
|
||||
[270] = 117952, --> monk mw - Crackling Jade Lightning (40 yards)
|
||||
[268] = 115546 , --monk bm - Provoke
|
||||
[269] = 117952, --monk ww - Crackling Jade Lightning (40 yards)
|
||||
[270] = 117952, --monk mw - Crackling Jade Lightning (40 yards)
|
||||
|
||||
[65] = 20473, --> paladin holy - Holy Shock (40 yards)
|
||||
[66] = 62124, --> paladin protect - Hand of Reckoning
|
||||
[70] = 62124, --> paladin ret - Hand of Reckoning
|
||||
[65] = 20473, --paladin holy - Holy Shock (40 yards)
|
||||
[66] = 62124, --paladin protect - Hand of Reckoning
|
||||
[70] = 62124, --paladin ret - Hand of Reckoning
|
||||
|
||||
[256] = 585, --> priest disc - Smite
|
||||
[257] = 585, --> priest holy - Smite
|
||||
[258] = 8092, --> priest shadow - Mind Blast
|
||||
[256] = 585, --priest disc - Smite
|
||||
[257] = 585, --priest holy - Smite
|
||||
[258] = 8092, --priest shadow - Mind Blast
|
||||
|
||||
[259] = 185565, --> rogue assassination - Poisoned Knife (30 yards)
|
||||
[260] = 185763, --> rogue outlaw - Pistol Shot (20 yards)
|
||||
[261] = 114014, --> rogue sub - Shuriken Toss (30 yards)
|
||||
[259] = 185565, --rogue assassination - Poisoned Knife (30 yards)
|
||||
[260] = 185763, --rogue outlaw - Pistol Shot (20 yards)
|
||||
[261] = 114014, --rogue sub - Shuriken Toss (30 yards)
|
||||
|
||||
[262] = 188196, --> shaman elemental - Lightning Bolt
|
||||
[263] = 187837, --> shaman enhancement - Lightning Bolt (instance cast)
|
||||
[264] = 403, --> shaman resto - Lightning Bolt
|
||||
[262] = 188196, --shaman elemental - Lightning Bolt
|
||||
[263] = 187837, --shaman enhancement - Lightning Bolt (instance cast)
|
||||
[264] = 403, --shaman resto - Lightning Bolt
|
||||
|
||||
[265] = 686, --> warlock aff - Shadow Bolt
|
||||
[266] = 686, --> warlock demo - Shadow Bolt
|
||||
[267] = 116858, --> warlock destro - Chaos Bolt
|
||||
[265] = 686, --warlock aff - Shadow Bolt
|
||||
[266] = 686, --warlock demo - Shadow Bolt
|
||||
[267] = 116858, --warlock destro - Chaos Bolt
|
||||
|
||||
[71] = 355, --> warrior arms - Taunt
|
||||
[72] = 355, --> warrior fury - Taunt
|
||||
[73] = 355, --> warrior protect - Taunt
|
||||
[71] = 355, --warrior arms - Taunt
|
||||
[72] = 355, --warrior fury - Taunt
|
||||
[73] = 355, --warrior protect - Taunt
|
||||
}
|
||||
|
||||
+133
-133
@@ -5,12 +5,12 @@ if (not DF or not DetailsFrameworkCanLoad) then
|
||||
end
|
||||
|
||||
local _
|
||||
local _rawset = rawset --> lua local
|
||||
local _rawget = rawget --> lua local
|
||||
local _setmetatable = setmetatable --> lua local
|
||||
local _unpack = unpack --> lua local
|
||||
local _type = type --> lua local
|
||||
local _math_floor = math.floor --> lua local
|
||||
local _rawset = rawset --lua local
|
||||
local _rawget = rawget --lua local
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _unpack = unpack --lua local
|
||||
local _type = type --lua local
|
||||
local _math_floor = math.floor --lua local
|
||||
|
||||
local cleanfunction = function() end
|
||||
local APISplitBarFunctions
|
||||
@@ -45,107 +45,107 @@ end
|
||||
local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> metatables
|
||||
--metatables
|
||||
|
||||
SplitBarMetaFunctions.__call = function(_table, value)
|
||||
if (not value) then
|
||||
return _table.statusbar:GetValue()
|
||||
else
|
||||
_table.spark:SetPoint ("left", _table.statusbar, "left", value * (_table.statusbar:GetWidth()/100) - 18, 0)
|
||||
return _table.statusbar:SetValue (value)
|
||||
_table.spark:SetPoint("left", _table.statusbar, "left", value * (_table.statusbar:GetWidth()/100) - 18, 0)
|
||||
return _table.statusbar:SetValue(value)
|
||||
end
|
||||
end
|
||||
|
||||
SplitBarMetaFunctions.__add = function(v1, v2)
|
||||
if (_type (v1) == "table") then
|
||||
if (_type(v1) == "table") then
|
||||
local v = v1.statusbar:GetValue()
|
||||
v = v + v2
|
||||
v1.spark:SetPoint ("left", v1.statusbar, "left", value * (v1.statusbar:GetWidth()/100) - 18, 0)
|
||||
v1.statusbar:SetValue (v)
|
||||
v1.spark:SetPoint("left", v1.statusbar, "left", value * (v1.statusbar:GetWidth()/100) - 18, 0)
|
||||
v1.statusbar:SetValue(v)
|
||||
else
|
||||
local v = v2.statusbar:GetValue()
|
||||
v = v + v1
|
||||
v2.spark:SetPoint ("left", v2.statusbar, "left", value * (v2.statusbar:GetWidth()/100) - 18, 0)
|
||||
v2.statusbar:SetValue (v)
|
||||
v2.spark:SetPoint("left", v2.statusbar, "left", value * (v2.statusbar:GetWidth()/100) - 18, 0)
|
||||
v2.statusbar:SetValue(v)
|
||||
end
|
||||
end
|
||||
|
||||
SplitBarMetaFunctions.__sub = function(v1, v2)
|
||||
if (_type (v1) == "table") then
|
||||
if (_type(v1) == "table") then
|
||||
local v = v1.statusbar:GetValue()
|
||||
v = v - v2
|
||||
v1.spark:SetPoint ("left", v1.statusbar, "left", value * (v1.statusbar:GetWidth()/100) - 18, 0)
|
||||
v1.statusbar:SetValue (v)
|
||||
v1.spark:SetPoint("left", v1.statusbar, "left", value * (v1.statusbar:GetWidth()/100) - 18, 0)
|
||||
v1.statusbar:SetValue(v)
|
||||
else
|
||||
local v = v2.statusbar:GetValue()
|
||||
v = v - v1
|
||||
v2.spark:SetPoint ("left", v2.statusbar, "left", value * (v2.statusbar:GetWidth()/100) - 18, 0)
|
||||
v2.statusbar:SetValue (v)
|
||||
v2.spark:SetPoint("left", v2.statusbar, "left", value * (v2.statusbar:GetWidth()/100) - 18, 0)
|
||||
v2.statusbar:SetValue(v)
|
||||
end
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> members
|
||||
--members
|
||||
|
||||
--> tooltip
|
||||
--tooltip
|
||||
local function gmember_tooltip (_object)
|
||||
return _object:GetTooltip()
|
||||
end
|
||||
--> shown
|
||||
--shown
|
||||
local gmember_shown = function(_object)
|
||||
return _object.statusbar:IsShown()
|
||||
end
|
||||
--> frame width
|
||||
--frame width
|
||||
local gmember_width = function(_object)
|
||||
return _object.statusbar:GetWidth()
|
||||
end
|
||||
--> frame height
|
||||
--frame height
|
||||
local gmember_height = function(_object)
|
||||
return _object.statusbar:GetHeight()
|
||||
end
|
||||
--> value
|
||||
--value
|
||||
local gmember_value = function(_object)
|
||||
return _object.statusbar:GetValue()
|
||||
end
|
||||
--> right text
|
||||
--right text
|
||||
local gmember_rtext = function(_object)
|
||||
return _object.textright:GetText()
|
||||
end
|
||||
--> left text
|
||||
--left text
|
||||
local gmember_ltext = function(_object)
|
||||
return _object.textleft:GetText()
|
||||
end
|
||||
--> right color
|
||||
--right color
|
||||
local gmember_rcolor = function(_object)
|
||||
return _object.rightTexture.original_colors
|
||||
end
|
||||
--> left color
|
||||
--left color
|
||||
local gmember_lcolor = function(_object)
|
||||
return _object.texture.original_colors
|
||||
end
|
||||
--> right icon
|
||||
--right icon
|
||||
local gmember_ricon = function(_object)
|
||||
return _object.iconright:GetTexture()
|
||||
end
|
||||
--> left icon
|
||||
--left icon
|
||||
local gmember_licon = function(_object)
|
||||
return _object.iconleft:GetTexture()
|
||||
end
|
||||
--> texture
|
||||
--texture
|
||||
local gmember_texture = function(_object)
|
||||
return _object.texture:GetTexture()
|
||||
end
|
||||
--> font size
|
||||
--font size
|
||||
local gmember_textsize = function(_object)
|
||||
local _, fontsize = _object.textleft:GetFont()
|
||||
return fontsize
|
||||
end
|
||||
--> font face
|
||||
--font face
|
||||
local gmember_textfont = function(_object)
|
||||
local fontface = _object.textleft:GetFont()
|
||||
return fontface
|
||||
end
|
||||
--> font color
|
||||
--font color
|
||||
local gmember_textcolor = function(_object)
|
||||
return _object.textleft:GetTextColor()
|
||||
end
|
||||
@@ -187,11 +187,11 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> tooltip
|
||||
--tooltip
|
||||
local smember_tooltip = function(_object, _value)
|
||||
return _object:SetTooltip (_value)
|
||||
end
|
||||
--> show
|
||||
--show
|
||||
local smember_shown = function(_object, _value)
|
||||
if (_value) then
|
||||
return _object:Show()
|
||||
@@ -199,7 +199,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
return _object:Hide()
|
||||
end
|
||||
end
|
||||
--> hide
|
||||
--hide
|
||||
local smember_hide = function(_object, _value)
|
||||
if (_value) then
|
||||
return _object:Hide()
|
||||
@@ -207,96 +207,96 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
return _object:Show()
|
||||
end
|
||||
end
|
||||
--> width
|
||||
--width
|
||||
local smember_width = function(_object, _value)
|
||||
return _object.statusbar:SetWidth (_value)
|
||||
return _object.statusbar:SetWidth(_value)
|
||||
end
|
||||
--> height
|
||||
--height
|
||||
local smember_height = function(_object, _value)
|
||||
return _object.statusbar:SetHeight (_value)
|
||||
return _object.statusbar:SetHeight(_value)
|
||||
end
|
||||
--> statusbar value
|
||||
--statusbar 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)
|
||||
_object.statusbar:SetValue(_value)
|
||||
return _object.spark:SetPoint("left", _object.statusbar, "left", _value * (_object.statusbar:GetWidth()/100) - 18, 0)
|
||||
end
|
||||
--> right text
|
||||
--right text
|
||||
local smember_rtext = function(_object, _value)
|
||||
return _object.textright:SetText (_value)
|
||||
return _object.textright:SetText(_value)
|
||||
end
|
||||
--> left text
|
||||
--left text
|
||||
local smember_ltext = function(_object, _value)
|
||||
return _object.textleft:SetText (_value)
|
||||
return _object.textleft:SetText(_value)
|
||||
end
|
||||
--> right color
|
||||
--right color
|
||||
local smember_rcolor = function(_object, _value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors (_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
|
||||
--left color
|
||||
local smember_lcolor = function(_object, _value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors(_value)
|
||||
|
||||
_object.statusbar:SetStatusBarColor (_value1, _value2, _value3, _value4)
|
||||
_object.texture.original_colors = {_value1, _value2, _value3, _value4}
|
||||
return _object.texture:SetVertexColor (_value1, _value2, _value3, _value4)
|
||||
end
|
||||
--> right icon
|
||||
--right icon
|
||||
local smember_ricon = function(_object, _value)
|
||||
if (type (_value) == "table") then
|
||||
if (type(_value) == "table") then
|
||||
local _value1, _value2 = _unpack (_value)
|
||||
_object.iconright:SetTexture (_value1)
|
||||
_object.iconright:SetTexture(_value1)
|
||||
if (_value2) then
|
||||
_object.iconright:SetTexCoord (_unpack (_value2))
|
||||
end
|
||||
else
|
||||
_object.iconright:SetTexture (_value)
|
||||
_object.iconright:SetTexture(_value)
|
||||
end
|
||||
return
|
||||
end
|
||||
--> left icon
|
||||
--left icon
|
||||
local smember_licon = function(_object, _value)
|
||||
if (type (_value) == "table") then
|
||||
if (type(_value) == "table") then
|
||||
local _value1, _value2 = _unpack (_value)
|
||||
_object.iconleft:SetTexture (_value1)
|
||||
_object.iconleft:SetTexture(_value1)
|
||||
if (_value2) then
|
||||
_object.iconleft:SetTexCoord (_unpack (_value2))
|
||||
end
|
||||
else
|
||||
_object.iconleft:SetTexture (_value)
|
||||
_object.iconleft:SetTexture(_value)
|
||||
end
|
||||
return
|
||||
end
|
||||
--> texture
|
||||
--texture
|
||||
local smember_texture = function(_object, _value)
|
||||
if (type (_value) == "table") then
|
||||
if (type(_value) == "table") then
|
||||
local _value1, _value2 = _unpack (_value)
|
||||
_object.texture:SetTexture (_value1)
|
||||
_object.rightTexture:SetTexture (_value1)
|
||||
_object.texture:SetTexture(_value1)
|
||||
_object.rightTexture:SetTexture(_value1)
|
||||
if (_value2) then
|
||||
_object.texture:SetTexCoord (_unpack (_value2))
|
||||
_object.rightTexture:SetTexCoord (_unpack (_value2))
|
||||
end
|
||||
else
|
||||
_object.texture:SetTexture (_value)
|
||||
_object.rightTexture:SetTexture (_value)
|
||||
_object.texture:SetTexture(_value)
|
||||
_object.rightTexture:SetTexture(_value)
|
||||
end
|
||||
return
|
||||
end
|
||||
--> font face
|
||||
--font face
|
||||
local smember_textfont = function(_object, _value)
|
||||
DF:SetFontFace (_object.textleft, _value)
|
||||
return DF:SetFontFace (_object.textright, _value)
|
||||
end
|
||||
--> font size
|
||||
--font size
|
||||
local smember_textsize = function(_object, _value)
|
||||
DF:SetFontSize (_object.textleft, _value)
|
||||
return DF:SetFontSize (_object.textright, _value)
|
||||
end
|
||||
--> font color
|
||||
--font color
|
||||
local smember_textcolor = function(_object, _value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors (_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
|
||||
@@ -331,9 +331,9 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> methods
|
||||
--methods
|
||||
|
||||
--> show & hide
|
||||
--show & hide
|
||||
function SplitBarMetaFunctions:Show()
|
||||
return self.statusbar:Show()
|
||||
end
|
||||
@@ -348,34 +348,34 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
elseif (value < 0 or value > 100) then
|
||||
return
|
||||
end
|
||||
self.statusbar:SetValue (value)
|
||||
self.spark:SetPoint ("left", self.statusbar, "left", value * (self.statusbar:GetWidth()/100) - 18, 0)
|
||||
self.statusbar:SetValue(value)
|
||||
self.spark:SetPoint("left", self.statusbar, "left", value * (self.statusbar:GetWidth()/100) - 18, 0)
|
||||
end
|
||||
|
||||
-- setpoint
|
||||
function SplitBarMetaFunctions:SetPoint (v1, v2, v3, v4, v5)
|
||||
function SplitBarMetaFunctions:SetPoint(v1, v2, v3, v4, v5)
|
||||
v1, v2, v3, v4, v5 = DF:CheckPoints (v1, v2, v3, v4, v5, self)
|
||||
if (not v1) then
|
||||
print ("Invalid parameter for SetPoint")
|
||||
return
|
||||
end
|
||||
return self.widget:SetPoint (v1, v2, v3, v4, v5)
|
||||
return self.widget:SetPoint(v1, v2, v3, v4, v5)
|
||||
end
|
||||
|
||||
-- sizes
|
||||
function SplitBarMetaFunctions:SetSize (w, h)
|
||||
function SplitBarMetaFunctions:SetSize(w, h)
|
||||
if (w) then
|
||||
self.statusbar:SetWidth (w)
|
||||
self.statusbar:SetWidth(w)
|
||||
end
|
||||
if (h) then
|
||||
self.statusbar:SetHeight (h)
|
||||
self.statusbar:SetHeight(h)
|
||||
end
|
||||
end
|
||||
|
||||
-- texture
|
||||
function SplitBarMetaFunctions:SetTexture (texture)
|
||||
self.rightTexture:SetTexture (texture)
|
||||
self.texture:SetTexture (texture)
|
||||
function SplitBarMetaFunctions:SetTexture(texture)
|
||||
self.rightTexture:SetTexture(texture)
|
||||
self.texture:SetTexture(texture)
|
||||
end
|
||||
|
||||
function SplitBarMetaFunctions:SetBackgroundTexture(texture)
|
||||
@@ -384,26 +384,26 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
|
||||
-- texts
|
||||
function SplitBarMetaFunctions:SetLeftText (text)
|
||||
self.textleft:SetText (text)
|
||||
self.textleft:SetText(text)
|
||||
end
|
||||
function SplitBarMetaFunctions:SetRightText (text)
|
||||
self.textright:SetText (text)
|
||||
self.textright:SetText(text)
|
||||
end
|
||||
|
||||
-- colors
|
||||
function SplitBarMetaFunctions:SetLeftColor (r, g, b, a)
|
||||
r, g, b, a = DF:ParseColors (r, g, b, a)
|
||||
r, g, b, a = DF:ParseColors(r, g, b, a)
|
||||
self.texture:SetVertexColor (r, g, b, a)
|
||||
self.texture.original_colors = {r, g, b, a}
|
||||
end
|
||||
function SplitBarMetaFunctions:SetRightColor (r, g, b, a)
|
||||
r, g, b, a = DF:ParseColors (r, g, b, a)
|
||||
r, g, b, a = DF:ParseColors(r, g, b, a)
|
||||
self.rightTexture:SetVertexColor (r, g, b, a)
|
||||
self.rightTexture.original_colors = {r, g, b, a}
|
||||
end
|
||||
|
||||
function SplitBarMetaFunctions:SetBackgroundColor (r, g, b, a)
|
||||
r, g, b, a = DF:ParseColors (r, g, b, a)
|
||||
r, g, b, a = DF:ParseColors(r, g, b, a)
|
||||
self.background:SetVertexColor (r, g, b, a)
|
||||
self.background.original_colors = {r, g, b, a}
|
||||
end
|
||||
@@ -418,14 +418,14 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
|
||||
-- icons
|
||||
function SplitBarMetaFunctions:SetLeftIcon (texture, ...)
|
||||
self.iconleft:SetTexture (texture)
|
||||
self.iconleft:SetTexture(texture)
|
||||
if (...) then
|
||||
local L, R, U, D = unpack (...)
|
||||
self.iconleft:SetTexCoord (L, R, U, D)
|
||||
end
|
||||
end
|
||||
function SplitBarMetaFunctions:SetRightIcon (texture, ...)
|
||||
self.iconright:SetTexture (texture)
|
||||
self.iconright:SetTexture(texture)
|
||||
if (...) then
|
||||
local L, R, U, D = unpack (...)
|
||||
self.iconright:SetTexCoord (L, R, U, D)
|
||||
@@ -459,7 +459,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
|
||||
-- frame stratas
|
||||
function SplitBarMetaFunctions:SetFrameStrata (strata)
|
||||
if (_type (strata) == "table") then
|
||||
if (_type(strata) == "table") then
|
||||
self.statusbar:SetFrameStrata (strata:GetFrameStrata())
|
||||
else
|
||||
self.statusbar:SetFrameStrata (strata)
|
||||
@@ -467,7 +467,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
end
|
||||
|
||||
-- animation
|
||||
--> animation with acceleration ~animation ~healthbaranimation
|
||||
--animation with acceleration ~animation ~healthbaranimation
|
||||
local animateLeftWithAccel = function(self, deltaTime)
|
||||
local currentPercent = DetailsFramework:GetRangePercent(self.targetValue, self.startValue, self.currentValue)
|
||||
currentPercent = abs(currentPercent - 1)
|
||||
@@ -560,7 +560,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> scripts
|
||||
--scripts
|
||||
|
||||
local OnEnter = function(frame)
|
||||
local capsule = frame.MyObject
|
||||
@@ -633,17 +633,17 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
end
|
||||
|
||||
local OnSizeChanged = function(statusbar)
|
||||
statusbar.MyObject.spark:SetPoint ("left", statusbar, "left", statusbar:GetValue() * (statusbar:GetWidth()/100) - 18, 0)
|
||||
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
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> object constructor
|
||||
--object constructor
|
||||
|
||||
function DetailsFrameworkSplitlBar_OnCreate (self)
|
||||
self.texture.original_colors = {1, 1, 1, 1}
|
||||
self.rightTexture.original_colors = {.5, .5, .5, 1}
|
||||
self.spark:SetPoint ("left", self, "left", self:GetValue() * (self:GetWidth()/100) - 18, 0)
|
||||
self.spark:SetPoint("left", self, "left", self:GetValue() * (self:GetWidth()/100) - 18, 0)
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -653,58 +653,58 @@ end
|
||||
|
||||
local build_statusbar = function(self)
|
||||
|
||||
self:SetSize (300, 14)
|
||||
self:SetSize(300, 14)
|
||||
|
||||
self.background = self:CreateTexture ("$parent_StatusBarBackground", "BACKGROUND")
|
||||
self.background = self:CreateTexture("$parent_StatusBarBackground", "BACKGROUND")
|
||||
self.background:SetPoint("topright", self, "topright")
|
||||
self.background:SetPoint("bottomright", self, "bottomright")
|
||||
self.background:SetPoint("topleft", self, "topleft")
|
||||
self.background:SetPoint("bottomleft", self, "bottomleft")
|
||||
self.background:SetTexture ([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.background:SetTexture([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.background:SetVertexColor (.3, .3, .3, 1)
|
||||
|
||||
--this is the left texture and it grows to the right, it is embed within the bar by SetStatusBarTexture
|
||||
self.texture = self:CreateTexture ("$parent_StatusBarTexture", "ARTWORK", nil, 1)
|
||||
self.texture = self:CreateTexture("$parent_StatusBarTexture", "ARTWORK", nil, 1)
|
||||
self.texture:Hide()
|
||||
self.texture:SetSize (300, 14)
|
||||
self.texture:SetTexture ([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.texture:SetSize(300, 14)
|
||||
self.texture:SetTexture([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
|
||||
--this is the right texture and its size is the bar:GetWidth() - self.texture:GetWidth()
|
||||
self.rightTexture = self:CreateTexture ("$parent_StatusBarTextureRight", "ARTWORK", nil, 2)
|
||||
self.rightTexture = self:CreateTexture("$parent_StatusBarTextureRight", "ARTWORK", nil, 2)
|
||||
self.rightTexture:Hide()
|
||||
self.rightTexture:SetSize (300, 14)
|
||||
self.rightTexture:SetTexture ([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.rightTexture:SetSize(300, 14)
|
||||
self.rightTexture:SetTexture([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.rightTexture:SetPoint("topright", self, "topright")
|
||||
self.rightTexture:SetPoint("bottomright", self, "bottomright")
|
||||
self.rightTexture:SetVertexColor(1, 0, 0)
|
||||
|
||||
self.lefticon = self:CreateTexture ("$parent_IconLeft", "OVERLAY")
|
||||
self.lefticon:SetSize (14, 14)
|
||||
self.lefticon:SetPoint ("LEFT", self, "LEFT")
|
||||
self.lefticon = self:CreateTexture("$parent_IconLeft", "OVERLAY")
|
||||
self.lefticon:SetSize(14, 14)
|
||||
self.lefticon:SetPoint("LEFT", self, "LEFT")
|
||||
|
||||
self.righticon = self:CreateTexture ("$parent_IconRight", "OVERLAY")
|
||||
self.righticon:SetSize (14, 14)
|
||||
self.righticon:SetPoint ("RIGHT", self, "RIGHT")
|
||||
self.righticon = self:CreateTexture("$parent_IconRight", "OVERLAY")
|
||||
self.righticon:SetSize(14, 14)
|
||||
self.righticon:SetPoint("RIGHT", self, "RIGHT")
|
||||
|
||||
self.spark = self:CreateTexture ("$parent_Spark", "OVERLAY")
|
||||
self.spark:SetTexture ([[Interface\CastingBar\UI-CastingBar-Spark]])
|
||||
self.spark:SetBlendMode ("ADD")
|
||||
self.spark:SetSize (32, 32)
|
||||
self.spark:SetPoint ("LEFT", self, "RIGHT", -17, -1)
|
||||
self.spark = self:CreateTexture("$parent_Spark", "OVERLAY")
|
||||
self.spark:SetTexture([[Interface\CastingBar\UI-CastingBar-Spark]])
|
||||
self.spark:SetBlendMode("ADD")
|
||||
self.spark:SetSize(32, 32)
|
||||
self.spark:SetPoint("LEFT", self, "RIGHT", -17, -1)
|
||||
|
||||
self.lefttext = self:CreateFontString ("$parent_TextLeft", "OVERLAY", "GameFontHighlight")
|
||||
DF:SetFontSize (self.lefttext, 10)
|
||||
self.lefttext:SetJustifyH ("left")
|
||||
self.lefttext:SetPoint ("LEFT", self.lefticon, "RIGHT", 3, 0)
|
||||
self.lefttext:SetJustifyH("left")
|
||||
self.lefttext:SetPoint("LEFT", self.lefticon, "RIGHT", 3, 0)
|
||||
|
||||
self.righttext = self:CreateFontString ("$parent_TextRight", "OVERLAY", "GameFontHighlight")
|
||||
DF:SetFontSize (self.righttext, 10)
|
||||
self.righttext:SetJustifyH ("right")
|
||||
self.righttext:SetPoint ("RIGHT", self.righticon, "LEFT", -3, 0)
|
||||
self.righttext:SetJustifyH("right")
|
||||
self.righttext:SetPoint("RIGHT", self.righticon, "LEFT", -3, 0)
|
||||
|
||||
self:SetStatusBarTexture (self.texture)
|
||||
self:SetMinMaxValues (1, 100)
|
||||
self:SetValue (50)
|
||||
self:SetValue(50)
|
||||
DetailsFrameworkSplitlBar_OnCreate (self)
|
||||
end
|
||||
|
||||
@@ -740,14 +740,14 @@ function DF:NewSplitBar (parent, container, name, member, w, h)
|
||||
container = container.widget
|
||||
end
|
||||
|
||||
--> default members:
|
||||
--> misc
|
||||
--default members:
|
||||
--misc
|
||||
SplitBarObject.locked = false
|
||||
SplitBarObject.container = container
|
||||
SplitBarObject.currentValue = 0.5
|
||||
|
||||
--> create widgets
|
||||
SplitBarObject.statusbar = CreateFrame ("statusbar", name, parent, "BackdropTemplate")
|
||||
--create widgets
|
||||
SplitBarObject.statusbar = CreateFrame("statusbar", name, parent, "BackdropTemplate")
|
||||
build_statusbar (SplitBarObject.statusbar)
|
||||
SplitBarObject.spark = SplitBarObject.statusbar.spark
|
||||
SplitBarObject.widget = SplitBarObject.statusbar
|
||||
@@ -781,7 +781,7 @@ function DF:NewSplitBar (parent, container, name, member, w, h)
|
||||
SplitBarObject.texture = _G [name .. "_StatusBarTexture"]
|
||||
SplitBarObject.rightTexture = _G [name .. "_StatusBarTextureRight"]
|
||||
|
||||
--> hooks
|
||||
--hooks
|
||||
SplitBarObject.HookList = {
|
||||
OnEnter = {},
|
||||
OnLeave = {},
|
||||
@@ -792,13 +792,13 @@ function DF:NewSplitBar (parent, container, name, member, w, h)
|
||||
OnSizeChanged = {},
|
||||
}
|
||||
|
||||
SplitBarObject.statusbar:SetScript ("OnEnter", OnEnter)
|
||||
SplitBarObject.statusbar:SetScript ("OnLeave", OnLeave)
|
||||
SplitBarObject.statusbar:SetScript ("OnHide", OnHide)
|
||||
SplitBarObject.statusbar:SetScript ("OnShow", OnShow)
|
||||
SplitBarObject.statusbar:SetScript ("OnMouseDown", OnMouseDown)
|
||||
SplitBarObject.statusbar:SetScript ("OnMouseUp", OnMouseUp)
|
||||
SplitBarObject.statusbar:SetScript ("OnSizeChanged", OnSizeChanged)
|
||||
SplitBarObject.statusbar:SetScript("OnEnter", OnEnter)
|
||||
SplitBarObject.statusbar:SetScript("OnLeave", OnLeave)
|
||||
SplitBarObject.statusbar:SetScript("OnHide", OnHide)
|
||||
SplitBarObject.statusbar:SetScript("OnShow", OnShow)
|
||||
SplitBarObject.statusbar:SetScript("OnMouseDown", OnMouseDown)
|
||||
SplitBarObject.statusbar:SetScript("OnMouseUp", OnMouseUp)
|
||||
SplitBarObject.statusbar:SetScript("OnSizeChanged", OnSizeChanged)
|
||||
|
||||
_setmetatable (SplitBarObject, SplitBarMetaFunctions)
|
||||
|
||||
|
||||
+86
-86
@@ -5,7 +5,7 @@ if (not DF or not DetailsFrameworkCanLoad) then
|
||||
end
|
||||
|
||||
local _
|
||||
local loadstring = loadstring --> lua local
|
||||
local loadstring = loadstring --lua local
|
||||
local APITextEntryFunctions = false
|
||||
|
||||
do
|
||||
@@ -154,7 +154,7 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
|
||||
|
||||
--text horizontal pos
|
||||
local smember_horizontalpos = function(object, value)
|
||||
return object.editbox:SetJustifyH (string.lower(value))
|
||||
return object.editbox:SetJustifyH(string.lower(value))
|
||||
end
|
||||
|
||||
TextEntryMetaFunctions.SetMembers = TextEntryMetaFunctions.SetMembers or {}
|
||||
@@ -244,8 +244,8 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
|
||||
function TextEntryMetaFunctions:Enable()
|
||||
if (not self.editbox:IsEnabled()) then
|
||||
self.editbox:Enable()
|
||||
self.editbox:SetBackdropBorderColor (unpack (self.enabled_border_color))
|
||||
self.editbox:SetBackdropColor (unpack (self.enabled_backdrop_color))
|
||||
self.editbox:SetBackdropBorderColor(unpack (self.enabled_border_color))
|
||||
self.editbox:SetBackdropColor(unpack (self.enabled_backdrop_color))
|
||||
self.editbox:SetTextColor (unpack (self.enabled_text_color))
|
||||
if (self.editbox.borderframe) then
|
||||
local r, g, b, a = DF:ParseColors(unpack(self.editbox.borderframe.onleave_backdrop))
|
||||
@@ -283,7 +283,7 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> scripts and hooks
|
||||
--scripts and hooks
|
||||
|
||||
local OnEnter = function(textentry)
|
||||
local capsule = textentry.MyObject
|
||||
@@ -303,7 +303,7 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
|
||||
|
||||
if (textentry:IsEnabled()) then
|
||||
textentry.current_bordercolor = textentry.current_bordercolor or {textentry:GetBackdropBorderColor()}
|
||||
textentry:SetBackdropBorderColor (1, 1, 1, 1)
|
||||
textentry:SetBackdropBorderColor(1, 1, 1, 1)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -322,7 +322,7 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
|
||||
textentry.mouse_over = false
|
||||
|
||||
if (textentry:IsEnabled()) then
|
||||
textentry:SetBackdropBorderColor (unpack (textentry.current_bordercolor))
|
||||
textentry:SetBackdropBorderColor(unpack (textentry.current_bordercolor))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -364,12 +364,12 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
|
||||
textentry.MyObject.func(textentry.MyObject.param1, textentry.MyObject.param2, text, textentry, byScript or textentry)
|
||||
end
|
||||
else
|
||||
textentry:SetText ("")
|
||||
textentry:SetText("")
|
||||
textentry.MyObject.currenttext = ""
|
||||
end
|
||||
|
||||
if (not object.NoClearFocusOnEnterPressed) then
|
||||
textentry.focuslost = true --> quando estiver editando e clicar em outra caixa
|
||||
textentry.focuslost = true --quando estiver editando e clicar em outra caixa
|
||||
textentry:ClearFocus()
|
||||
if (textentry.MyObject.tab_on_enter and textentry.MyObject.next) then
|
||||
textentry.MyObject.next:SetFocus()
|
||||
@@ -483,23 +483,23 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
|
||||
|
||||
function TextEntryMetaFunctions:SetTemplate (template)
|
||||
if (template.width) then
|
||||
self.editbox:SetWidth (template.width)
|
||||
self.editbox:SetWidth(template.width)
|
||||
end
|
||||
if (template.height) then
|
||||
self.editbox:SetHeight (template.height)
|
||||
self.editbox:SetHeight(template.height)
|
||||
end
|
||||
|
||||
if (template.backdrop) then
|
||||
self.editbox:SetBackdrop (template.backdrop)
|
||||
self.editbox:SetBackdrop(template.backdrop)
|
||||
end
|
||||
if (template.backdropcolor) then
|
||||
local r, g, b, a = DF:ParseColors (template.backdropcolor)
|
||||
self.editbox:SetBackdropColor (r, g, b, a)
|
||||
local r, g, b, a = DF:ParseColors(template.backdropcolor)
|
||||
self.editbox:SetBackdropColor(r, g, b, a)
|
||||
self.onleave_backdrop = {r, g, b, a}
|
||||
end
|
||||
if (template.backdropbordercolor) then
|
||||
local r, g, b, a = DF:ParseColors (template.backdropbordercolor)
|
||||
self.editbox:SetBackdropBorderColor (r, g, b, a)
|
||||
local r, g, b, a = DF:ParseColors(template.backdropbordercolor)
|
||||
self.editbox:SetBackdropBorderColor(r, g, b, a)
|
||||
self.editbox.current_bordercolor[1] = r
|
||||
self.editbox.current_bordercolor[2] = g
|
||||
self.editbox.current_bordercolor[3] = b
|
||||
@@ -509,7 +509,7 @@ function TextEntryMetaFunctions:SetTemplate (template)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> object constructor
|
||||
--object constructor
|
||||
|
||||
function DF:CreateTextEntry (parent, func, w, h, member, name, with_label, entry_template, label_template)
|
||||
return DF:NewTextEntry (parent, parent, name, member, w, h, func, nil, nil, nil, with_label, entry_template, label_template)
|
||||
@@ -547,8 +547,8 @@ function DF:NewTextEntry (parent, container, name, member, w, h, func, param1, p
|
||||
container = container.widget
|
||||
end
|
||||
|
||||
--> default members:
|
||||
--> hooks
|
||||
--default members:
|
||||
--hooks
|
||||
TextEntryObject.OnEnterHook = nil
|
||||
TextEntryObject.OnLeaveHook = nil
|
||||
TextEntryObject.OnHideHook = nil
|
||||
@@ -561,17 +561,17 @@ function DF:NewTextEntry (parent, container, name, member, w, h, func, param1, p
|
||||
TextEntryObject.OnTextChangedHook = nil
|
||||
TextEntryObject.OnTabPressedHook = nil
|
||||
|
||||
--> misc
|
||||
--misc
|
||||
TextEntryObject.container = container
|
||||
TextEntryObject.have_tooltip = nil
|
||||
|
||||
TextEntryObject.editbox = CreateFrame ("EditBox", name, parent,"BackdropTemplate")
|
||||
TextEntryObject.editbox:SetSize (232, 20)
|
||||
TextEntryObject.editbox:SetBackdrop ({bgFile = [["Interface\DialogFrame\UI-DialogBox-Background"]], tileSize = 64, tile = true, edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], edgeSize = 10, insets = {left = 1, right = 1, top = 0, bottom = 0}})
|
||||
TextEntryObject.editbox = CreateFrame("EditBox", name, parent,"BackdropTemplate")
|
||||
TextEntryObject.editbox:SetSize(232, 20)
|
||||
TextEntryObject.editbox:SetBackdrop({bgFile = [["Interface\DialogFrame\UI-DialogBox-Background"]], tileSize = 64, tile = true, edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], edgeSize = 10, insets = {left = 1, right = 1, top = 0, bottom = 0}})
|
||||
|
||||
TextEntryObject.editbox.label = TextEntryObject.editbox:CreateFontString ("$parent_Desc", "OVERLAY", "GameFontHighlightSmall")
|
||||
TextEntryObject.editbox.label:SetJustifyH ("left")
|
||||
TextEntryObject.editbox.label:SetPoint ("RIGHT", TextEntryObject.editbox, "LEFT", -2, 0)
|
||||
TextEntryObject.editbox.label:SetJustifyH("left")
|
||||
TextEntryObject.editbox.label:SetPoint("RIGHT", TextEntryObject.editbox, "LEFT", -2, 0)
|
||||
|
||||
TextEntryObject.widget = TextEntryObject.editbox
|
||||
|
||||
@@ -600,18 +600,18 @@ function DF:NewTextEntry (parent, container, name, member, w, h, func, param1, p
|
||||
end
|
||||
end
|
||||
|
||||
TextEntryObject.editbox:SetWidth (w)
|
||||
TextEntryObject.editbox:SetHeight (h)
|
||||
TextEntryObject.editbox:SetWidth(w)
|
||||
TextEntryObject.editbox:SetHeight(h)
|
||||
|
||||
TextEntryObject.editbox:SetJustifyH ("center")
|
||||
TextEntryObject.editbox:SetJustifyH("center")
|
||||
TextEntryObject.editbox:EnableMouse (true)
|
||||
TextEntryObject.editbox:SetText ("")
|
||||
TextEntryObject.editbox:SetText("")
|
||||
|
||||
TextEntryObject.editbox:SetAutoFocus (false)
|
||||
TextEntryObject.editbox:SetFontObject ("GameFontHighlightSmall")
|
||||
|
||||
TextEntryObject.editbox.current_bordercolor = {1, 1, 1, 0.7}
|
||||
TextEntryObject.editbox:SetBackdropBorderColor (1, 1, 1, 0.7)
|
||||
TextEntryObject.editbox:SetBackdropBorderColor(1, 1, 1, 0.7)
|
||||
TextEntryObject.enabled_border_color = {TextEntryObject.editbox:GetBackdropBorderColor()}
|
||||
TextEntryObject.enabled_backdrop_color = {TextEntryObject.editbox:GetBackdropColor()}
|
||||
TextEntryObject.enabled_text_color = {TextEntryObject.editbox:GetTextColor()}
|
||||
@@ -626,10 +626,10 @@ function DF:NewTextEntry (parent, container, name, member, w, h, func, param1, p
|
||||
TextEntryObject.tab_on_enter = false
|
||||
|
||||
TextEntryObject.label = _G [name .. "_Desc"]
|
||||
TextEntryObject.editbox:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, insets = {left = 1, right = 1, top = 1, bottom = 1}})
|
||||
TextEntryObject.editbox:SetBackdropColor (.2, .2, .2, 1)
|
||||
TextEntryObject.editbox:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, insets = {left = 1, right = 1, top = 1, bottom = 1}})
|
||||
TextEntryObject.editbox:SetBackdropColor(.2, .2, .2, 1)
|
||||
|
||||
--> hooks
|
||||
--hooks
|
||||
TextEntryObject.HookList = {
|
||||
OnEnter = {},
|
||||
OnLeave = {},
|
||||
@@ -645,26 +645,26 @@ function DF:NewTextEntry (parent, container, name, member, w, h, func, param1, p
|
||||
OnTabPressed = {},
|
||||
}
|
||||
|
||||
TextEntryObject.editbox:SetScript ("OnEnter", OnEnter)
|
||||
TextEntryObject.editbox:SetScript ("OnLeave", OnLeave)
|
||||
TextEntryObject.editbox:SetScript ("OnHide", OnHide)
|
||||
TextEntryObject.editbox:SetScript ("OnShow", OnShow)
|
||||
TextEntryObject.editbox:SetScript("OnEnter", OnEnter)
|
||||
TextEntryObject.editbox:SetScript("OnLeave", OnLeave)
|
||||
TextEntryObject.editbox:SetScript("OnHide", OnHide)
|
||||
TextEntryObject.editbox:SetScript("OnShow", OnShow)
|
||||
|
||||
TextEntryObject.editbox:SetScript ("OnEnterPressed", OnEnterPressed)
|
||||
TextEntryObject.editbox:SetScript ("OnEscapePressed", OnEscapePressed)
|
||||
TextEntryObject.editbox:SetScript ("OnSpacePressed", OnSpacePressed)
|
||||
TextEntryObject.editbox:SetScript ("OnEditFocusLost", OnEditFocusLost)
|
||||
TextEntryObject.editbox:SetScript ("OnEditFocusGained", OnEditFocusGained)
|
||||
TextEntryObject.editbox:SetScript ("OnChar", OnChar)
|
||||
TextEntryObject.editbox:SetScript ("OnTextChanged", OnTextChanged)
|
||||
TextEntryObject.editbox:SetScript ("OnTabPressed", OnTabPressed)
|
||||
TextEntryObject.editbox:SetScript("OnEnterPressed", OnEnterPressed)
|
||||
TextEntryObject.editbox:SetScript("OnEscapePressed", OnEscapePressed)
|
||||
TextEntryObject.editbox:SetScript("OnSpacePressed", OnSpacePressed)
|
||||
TextEntryObject.editbox:SetScript("OnEditFocusLost", OnEditFocusLost)
|
||||
TextEntryObject.editbox:SetScript("OnEditFocusGained", OnEditFocusGained)
|
||||
TextEntryObject.editbox:SetScript("OnChar", OnChar)
|
||||
TextEntryObject.editbox:SetScript("OnTextChanged", OnTextChanged)
|
||||
TextEntryObject.editbox:SetScript("OnTabPressed", OnTabPressed)
|
||||
|
||||
setmetatable (TextEntryObject, TextEntryMetaFunctions)
|
||||
|
||||
if (with_label) then
|
||||
local label = DF:CreateLabel (TextEntryObject.editbox, with_label, nil, nil, nil, "label", nil, "overlay")
|
||||
local label = DF:CreateLabel(TextEntryObject.editbox, with_label, nil, nil, nil, "label", nil, "overlay")
|
||||
label.text = with_label
|
||||
TextEntryObject.editbox:SetPoint ("left", label.widget, "right", 2, 0)
|
||||
TextEntryObject.editbox:SetPoint("left", label.widget, "right", 2, 0)
|
||||
if (label_template) then
|
||||
label:SetTemplate (label_template)
|
||||
end
|
||||
@@ -682,8 +682,8 @@ end
|
||||
function DF:NewSpellEntry (parent, func, w, h, param1, param2, member, name)
|
||||
local editbox = DF:NewTextEntry (parent, parent, name, member, w, h, func, param1, param2)
|
||||
|
||||
-- editbox:SetHook ("OnEditFocusGained", SpellEntryOnEditFocusGained)
|
||||
-- editbox:SetHook ("OnTextChanged", SpellEntryOnTextChanged)
|
||||
-- editbox:SetHook("OnEditFocusGained", SpellEntryOnEditFocusGained)
|
||||
-- editbox:SetHook("OnTextChanged", SpellEntryOnTextChanged)
|
||||
|
||||
return editbox
|
||||
end
|
||||
@@ -692,7 +692,7 @@ local function_gettext = function(self)
|
||||
return self.editbox:GetText()
|
||||
end
|
||||
local function_settext = function(self, text)
|
||||
return self.editbox:SetText (text)
|
||||
return self.editbox:SetText(text)
|
||||
end
|
||||
local function_clearfocus = function(self)
|
||||
return self.editbox:ClearFocus()
|
||||
@@ -833,10 +833,10 @@ local AutoComplete_OnTextChanged = function(editboxWidget, byUser, capsule)
|
||||
|
||||
local chars_now = editboxWidget:GetText():len()
|
||||
if (not editboxWidget.ignore_textchange) then
|
||||
--> backspace
|
||||
--backspace
|
||||
if (chars_now == capsule.characters_count -1) then
|
||||
capsule.lastword = capsule.lastword:sub (1, capsule.lastword:len()-1)
|
||||
--> delete lots of text
|
||||
--delete lots of text
|
||||
elseif (chars_now < capsule.characters_count) then
|
||||
--o auto complete selecionou outra palavra bem menor e caiu nesse filtro
|
||||
editboxWidget.end_selection = nil
|
||||
@@ -1043,12 +1043,12 @@ function TextEntryMetaFunctions:SetAsAutoComplete (poolName, poolTable, shouldOp
|
||||
self.NoClearFocusOnEnterPressed = true --avoid auto clear focus
|
||||
self.ShouldOptimizeAutoComplete = shouldOptimize
|
||||
|
||||
self:SetHook ("OnEditFocusGained", AutoComplete_OnEditFocusGained)
|
||||
self:SetHook ("OnEnterPressed", AutoComplete_OnEnterPressed)
|
||||
self:SetHook("OnEditFocusGained", AutoComplete_OnEditFocusGained)
|
||||
self:SetHook("OnEnterPressed", AutoComplete_OnEnterPressed)
|
||||
self.editbox:HookScript ("OnEscapePressed", AutoComplete_OnEscapePressed)
|
||||
self.editbox:SetScript ("OnTextChanged", AutoComplete_OnTextChanged)
|
||||
self.editbox:SetScript ("OnChar", AutoComplete_OnChar)
|
||||
self.editbox:SetScript ("OnSpacePressed", AutoComplete_OnSpacePressed)
|
||||
self.editbox:SetScript("OnTextChanged", AutoComplete_OnTextChanged)
|
||||
self.editbox:SetScript("OnChar", AutoComplete_OnChar)
|
||||
self.editbox:SetScript("OnSpacePressed", AutoComplete_OnSpacePressed)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1067,36 +1067,36 @@ function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent, show
|
||||
name = name:gsub ("$parent", parentName)
|
||||
end
|
||||
|
||||
local borderframe = CreateFrame ("Frame", name, parent,"BackdropTemplate")
|
||||
borderframe:SetSize (w, h)
|
||||
local borderframe = CreateFrame("Frame", name, parent,"BackdropTemplate")
|
||||
borderframe:SetSize(w, h)
|
||||
|
||||
if (member) then
|
||||
parent [member] = borderframe
|
||||
end
|
||||
|
||||
local scrollframe = CreateFrame ("ScrollFrame", name, borderframe, "UIPanelScrollFrameTemplate, BackdropTemplate")
|
||||
local scrollframeNumberLines = CreateFrame ("ScrollFrame", name .. "NumberLines", borderframe, "UIPanelScrollFrameTemplate, BackdropTemplate")
|
||||
local scrollframe = CreateFrame("ScrollFrame", name, borderframe, "UIPanelScrollFrameTemplate, BackdropTemplate")
|
||||
local scrollframeNumberLines = CreateFrame("ScrollFrame", name .. "NumberLines", borderframe, "UIPanelScrollFrameTemplate, BackdropTemplate")
|
||||
|
||||
scrollframe.editbox = CreateFrame ("editbox", "$parentEditBox", scrollframe,"BackdropTemplate")
|
||||
scrollframe.editbox = CreateFrame("editbox", "$parentEditBox", scrollframe,"BackdropTemplate")
|
||||
scrollframe.editbox:SetMultiLine (true)
|
||||
scrollframe.editbox:SetAutoFocus (false)
|
||||
scrollframe.editbox:SetScript ("OnCursorChanged", _G.ScrollingEdit_OnCursorChanged)
|
||||
scrollframe.editbox:SetScript ("OnEscapePressed", _G.EditBox_ClearFocus)
|
||||
scrollframe.editbox:SetScript("OnCursorChanged", _G.ScrollingEdit_OnCursorChanged)
|
||||
scrollframe.editbox:SetScript("OnEscapePressed", _G.EditBox_ClearFocus)
|
||||
scrollframe.editbox:SetFontObject ("GameFontHighlightSmall")
|
||||
scrollframe:SetScrollChild (scrollframe.editbox)
|
||||
|
||||
--line number
|
||||
if (showLineNumbers) then
|
||||
scrollframeNumberLines.editbox = CreateFrame ("editbox", "$parentLineNumbers", scrollframeNumberLines, "BackdropTemplate")
|
||||
scrollframeNumberLines.editbox = CreateFrame("editbox", "$parentLineNumbers", scrollframeNumberLines, "BackdropTemplate")
|
||||
scrollframeNumberLines.editbox:SetMultiLine (true)
|
||||
scrollframeNumberLines.editbox:SetAutoFocus (false)
|
||||
scrollframeNumberLines.editbox:SetEnabled (false)
|
||||
scrollframeNumberLines.editbox:SetFontObject ("GameFontHighlightSmall")
|
||||
scrollframeNumberLines.editbox:SetJustifyH ("left")
|
||||
scrollframeNumberLines.editbox:SetJustifyH("left")
|
||||
scrollframeNumberLines.editbox:SetJustifyV ("top")
|
||||
scrollframeNumberLines.editbox:SetTextColor(.3, .3, .3, .5)
|
||||
scrollframeNumberLines.editbox:SetPoint ("topleft", borderframe, "topleft", 10, -10)
|
||||
scrollframeNumberLines.editbox:SetPoint ("bottomright", borderframe, "bottomright", -30, 10)
|
||||
scrollframeNumberLines.editbox:SetPoint("topleft", borderframe, "topleft", 10, -10)
|
||||
scrollframeNumberLines.editbox:SetPoint("bottomright", borderframe, "bottomright", -30, 10)
|
||||
|
||||
scrollframeNumberLines:SetScrollChild (scrollframeNumberLines.editbox)
|
||||
scrollframeNumberLines:EnableMouseWheel (false)
|
||||
@@ -1106,24 +1106,24 @@ function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent, show
|
||||
end
|
||||
|
||||
--place the lua code field 20 pixels to the right to make run to the lines scroll
|
||||
scrollframe:SetPoint ("topleft", borderframe, "topleft", 30, -10)
|
||||
scrollframe:SetPoint ("bottomright", borderframe, "bottomright", -10, 10)
|
||||
scrollframe:SetPoint("topleft", borderframe, "topleft", 30, -10)
|
||||
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)
|
||||
|
||||
--place the number lines scroll in the begining of the editing code space
|
||||
scrollframeNumberLines:SetPoint ("topleft", borderframe, "topleft", 10, -10)
|
||||
scrollframeNumberLines:SetPoint ("bottomright", borderframe, "bottomright", -10, 10)
|
||||
scrollframeNumberLines:SetPoint("topleft", borderframe, "topleft", 10, -10)
|
||||
scrollframeNumberLines:SetPoint("bottomright", borderframe, "bottomright", -10, 10)
|
||||
|
||||
scrollframeNumberLines.editbox:SetJustifyH ("left")
|
||||
scrollframeNumberLines.editbox:SetJustifyH("left")
|
||||
scrollframeNumberLines.editbox:SetJustifyV ("top")
|
||||
|
||||
scrollframeNumberLines:SetScript ("OnSizeChanged", function(self)
|
||||
scrollframeNumberLines.editbox:SetSize (self:GetSize())
|
||||
scrollframeNumberLines:SetScript("OnSizeChanged", function(self)
|
||||
scrollframeNumberLines.editbox:SetSize(self:GetSize())
|
||||
scrollframeNumberLines.ScrollBar:Hide()
|
||||
end)
|
||||
|
||||
@@ -1140,20 +1140,20 @@ function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent, show
|
||||
scrollframeNumberLines.editbox:SetBackdrop(nil)
|
||||
|
||||
else
|
||||
scrollframe:SetPoint ("topleft", borderframe, "topleft", 10, -10)
|
||||
scrollframe:SetPoint ("bottomright", borderframe, "bottomright", -10, 10)
|
||||
scrollframeNumberLines:SetPoint ("topleft", borderframe, "topleft", 10, -10)
|
||||
scrollframeNumberLines:SetPoint ("bottomright", borderframe, "bottomright", -10, 10)
|
||||
scrollframe:SetPoint("topleft", borderframe, "topleft", 10, -10)
|
||||
scrollframe:SetPoint("bottomright", borderframe, "bottomright", -10, 10)
|
||||
scrollframeNumberLines:SetPoint("topleft", borderframe, "topleft", 10, -10)
|
||||
scrollframeNumberLines:SetPoint("bottomright", borderframe, "bottomright", -10, 10)
|
||||
scrollframeNumberLines:Hide()
|
||||
end
|
||||
|
||||
borderframe.SetAsAutoComplete = TextEntryMetaFunctions.SetAsAutoComplete
|
||||
|
||||
scrollframe:SetScript ("OnSizeChanged", function(self)
|
||||
scrollframe.editbox:SetSize (self:GetSize())
|
||||
scrollframe:SetScript("OnSizeChanged", function(self)
|
||||
scrollframe.editbox:SetSize(self:GetSize())
|
||||
end)
|
||||
|
||||
scrollframe.editbox:SetJustifyH ("left")
|
||||
scrollframe.editbox:SetJustifyH("left")
|
||||
scrollframe.editbox:SetJustifyV ("top")
|
||||
scrollframe.editbox:SetMaxBytes (1024000)
|
||||
scrollframe.editbox:SetMaxLetters (128000)
|
||||
@@ -1173,12 +1173,12 @@ function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent, show
|
||||
IndentationLib.enable (scrollframe.editbox, nil, 4)
|
||||
end
|
||||
|
||||
borderframe:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]],
|
||||
borderframe:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]],
|
||||
tile = 1, tileSize = 16, edgeSize = 16, insets = {left = 5, right = 5, top = 5, bottom = 5}})
|
||||
|
||||
scrollframe.editbox.current_bordercolor = {1, 1, 1, 0.7}
|
||||
borderframe:SetBackdropBorderColor (1, 1, 1, 0.7)
|
||||
borderframe:SetBackdropColor (0.090195, 0.090195, 0.188234, 1)
|
||||
borderframe:SetBackdropBorderColor(1, 1, 1, 0.7)
|
||||
borderframe:SetBackdropColor(0.090195, 0.090195, 0.188234, 1)
|
||||
|
||||
borderframe.enabled_border_color = {borderframe:GetBackdropBorderColor()}
|
||||
borderframe.enabled_backdrop_color = {borderframe:GetBackdropColor()}
|
||||
|
||||
+2
-2
@@ -414,7 +414,7 @@ function DF:CreateTimeBar(parent, texture, width, height, value, member, name)
|
||||
end
|
||||
end
|
||||
|
||||
--> create widgets
|
||||
--create widgets
|
||||
timeBar.statusBar:SetWidth(width)
|
||||
timeBar.statusBar:SetHeight(height)
|
||||
timeBar.statusBar:SetFrameLevel(parent:GetFrameLevel()+1)
|
||||
@@ -445,7 +445,7 @@ function DF:CreateTimeBar(parent, texture, width, height, value, member, name)
|
||||
timeBar.statusBar.rightText:SetPoint("right", timeBar.statusBar, "right", -2, 0)
|
||||
timeBar.statusBar.rightText:SetJustifyH("left")
|
||||
|
||||
--> hooks
|
||||
--hooks
|
||||
timeBar.HookList = {
|
||||
OnEnter = {},
|
||||
OnLeave = {},
|
||||
|
||||
@@ -1292,14 +1292,14 @@ function GraphFunctions:SetYLabels(Left, Right)
|
||||
end
|
||||
|
||||
function GraphFunctions:SetLineTexture(texture)
|
||||
if (type (texture) ~= "string") then
|
||||
if (type(texture) ~= "string") then
|
||||
return assert (false, "Parameter 1 for SetLineTexture must be a string")
|
||||
end
|
||||
|
||||
--> full path
|
||||
--full path
|
||||
if (texture:find ("\\") or texture:find ("//")) then
|
||||
self.CustomLine = texture
|
||||
--> using an image inside lib-graph folder
|
||||
--using an image inside lib-graph folder
|
||||
else
|
||||
self.CustomLine = TextureDirectory..texture
|
||||
end
|
||||
@@ -1308,7 +1308,7 @@ end
|
||||
function GraphFunctions:SetBorderSize(border, size)
|
||||
border = string.lower (border)
|
||||
|
||||
if (type (size) ~= "number") then
|
||||
if (type(size) ~= "number") then
|
||||
return assert (false, "Parameter 2 for SetBorderSize must be a number")
|
||||
end
|
||||
|
||||
@@ -1711,7 +1711,7 @@ function GraphFunctions:RefreshLineGraph()
|
||||
|
||||
if not self.LockOnXMin then
|
||||
if (self.CustomLeftBorder) then
|
||||
self.XMin = MinX + self.CustomLeftBorder --> custom size of left border
|
||||
self.XMin = MinX + self.CustomLeftBorder --custom size of left border
|
||||
else
|
||||
self.XMin = MinX - XBorder
|
||||
end
|
||||
@@ -1719,7 +1719,7 @@ function GraphFunctions:RefreshLineGraph()
|
||||
|
||||
if not self.LockOnXMax then
|
||||
if (self.CustomRightBorder) then
|
||||
self.XMax = MaxX + self.CustomRightBorder --> custom size of right border
|
||||
self.XMax = MaxX + self.CustomRightBorder --custom size of right border
|
||||
else
|
||||
self.XMax = MaxX + XBorder
|
||||
end
|
||||
@@ -1727,7 +1727,7 @@ function GraphFunctions:RefreshLineGraph()
|
||||
|
||||
if not self.LockOnYMin then
|
||||
if (self.CustomBottomBorder) then
|
||||
self.YMin = MinY + self.CustomBottomBorder --> custom size of bottom border
|
||||
self.YMin = MinY + self.CustomBottomBorder --custom size of bottom border
|
||||
else
|
||||
self.YMin = MinY - YBorder
|
||||
end
|
||||
@@ -1735,7 +1735,7 @@ function GraphFunctions:RefreshLineGraph()
|
||||
|
||||
if not self.LockOnYMax then
|
||||
if (self.CustomTopBorder) then
|
||||
self.YMax = MaxY + self.CustomTopBorder --> custom size of top border
|
||||
self.YMax = MaxY + self.CustomTopBorder --custom size of top border
|
||||
else
|
||||
self.YMax = MaxY + YBorder
|
||||
end
|
||||
@@ -1905,11 +1905,11 @@ function lib:DrawLine(C, sx, sy, ex, ey, w, color, layer, linetexture)
|
||||
|
||||
local T = tremove(C.GraphLib_Lines) or C:CreateTexture(nil, "ARTWORK")
|
||||
|
||||
if linetexture then --> this data series texture
|
||||
if linetexture then --this data series texture
|
||||
T:SetTexture(linetexture)
|
||||
elseif C.CustomLine then --> overall chart texture
|
||||
elseif C.CustomLine then --overall chart texture
|
||||
T:SetTexture(C.CustomLine)
|
||||
else --> no texture assigned, use default
|
||||
else --no texture assigned, use default
|
||||
T:SetTexture(TextureDirectory.."line")
|
||||
end
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ end
|
||||
|
||||
local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0")
|
||||
|
||||
--> comm prefix deprecated
|
||||
--comm prefix deprecated
|
||||
openRaidLib.commPrefixDeprecated = {
|
||||
|
||||
}
|
||||
@@ -25,7 +25,7 @@ local spamLimit = {}
|
||||
end
|
||||
end
|
||||
|
||||
--> deprecated: 'RequestAllPlayersInfo' has been replaced by 'RequestAllData'
|
||||
--deprecated: 'RequestAllPlayersInfo' has been replaced by 'RequestAllData'
|
||||
function openRaidLib.RequestAllPlayersInfo()
|
||||
if (not spamLimit["openRaidLib.RequestAllData"]) then
|
||||
spamLimit["openRaidLib.RequestAllData"] = true
|
||||
@@ -33,7 +33,7 @@ local spamLimit = {}
|
||||
end
|
||||
end
|
||||
|
||||
--> deprecated: 'playerInfoManager' has been replaced by 'UnitInfoManager'
|
||||
--deprecated: 'playerInfoManager' has been replaced by 'UnitInfoManager'
|
||||
openRaidLib.playerInfoManager = {}
|
||||
local deprecatedMetatable = {
|
||||
__newindex = function()
|
||||
@@ -63,7 +63,7 @@ local spamLimit = {}
|
||||
end
|
||||
setmetatable(openRaidLib.playerInfoManager, deprecatedMetatable)
|
||||
|
||||
--> deprecated: 'gearManager' has been replaced by 'GearManager'
|
||||
--deprecated: 'gearManager' has been replaced by 'GearManager'
|
||||
openRaidLib.gearManager = {}
|
||||
local deprecatedMetatable = {
|
||||
__newindex = function()
|
||||
@@ -91,7 +91,7 @@ local spamLimit = {}
|
||||
end
|
||||
setmetatable(openRaidLib.gearManager, deprecatedMetatable)
|
||||
|
||||
--> deprecated: 'cooldownManager' has been replaced by 'CooldownManager'
|
||||
--deprecated: 'cooldownManager' has been replaced by 'CooldownManager'
|
||||
openRaidLib.cooldownManager = {}
|
||||
local deprecatedMetatable = {
|
||||
__newindex = function()
|
||||
|
||||
@@ -268,7 +268,7 @@ function openRaidLib.GearManager.GetPlayerGemsAndEnchantInfo()
|
||||
local _, itemId, enchantId, gemId1, gemId2, gemId3, gemId4, suffixId, uniqueId, levelOfTheItem, specId, upgradeInfo, instanceDifficultyId, numBonusIds, restLink = strsplit(":", itemLink)
|
||||
local gemsIds = {gemId1, gemId2, gemId3, gemId4}
|
||||
|
||||
--> enchant
|
||||
--enchant
|
||||
--check if the slot can receive enchat and if the equipment has an enchant
|
||||
local enchantAttribute = LIB_OPEN_RAID_ENCHANT_SLOTS[equipmentSlotId]
|
||||
if (enchantAttribute) then --this slot can receive an enchat
|
||||
@@ -276,7 +276,7 @@ function openRaidLib.GearManager.GetPlayerGemsAndEnchantInfo()
|
||||
--check if this slot is relevant for the class, some slots can have enchants only for Agility which won't matter for Priests as an example
|
||||
--if the value is an integer it points to an attribute (int, dex, str), otherwise it's true (boolean)
|
||||
local slotIsRelevant = true
|
||||
if (type (enchantAttribute) == "number") then
|
||||
if (type(enchantAttribute) == "number") then
|
||||
if (specMainAttribute ~= enchantAttribute) then
|
||||
slotIsRelevant = false
|
||||
end
|
||||
@@ -302,7 +302,7 @@ function openRaidLib.GearManager.GetPlayerGemsAndEnchantInfo()
|
||||
end
|
||||
end
|
||||
|
||||
--> gems
|
||||
--gems
|
||||
local itemStatsTable = {}
|
||||
--fill the table above with information about the item
|
||||
GetItemStats(itemLink, itemStatsTable)
|
||||
|
||||
@@ -174,7 +174,7 @@ LIB_OPEN_RAID_CAN_LOAD = false
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------
|
||||
--> ~comms
|
||||
--~comms
|
||||
openRaidLib.commHandler = {}
|
||||
|
||||
function openRaidLib.commHandler.OnReceiveComm(self, event, prefix, text, channel, sender, target, zoneChannelID, localID, name, instanceID)
|
||||
@@ -317,7 +317,7 @@ LIB_OPEN_RAID_CAN_LOAD = false
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------
|
||||
--> ~schedule ~timers
|
||||
--~schedule ~timers
|
||||
|
||||
openRaidLib.Schedules = {
|
||||
registeredUniqueTimers = {}
|
||||
@@ -396,7 +396,7 @@ LIB_OPEN_RAID_CAN_LOAD = false
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------
|
||||
--> ~public ~callbacks
|
||||
--~public ~callbacks
|
||||
--these are the events where other addons can register and receive calls
|
||||
local allPublicCallbacks = {
|
||||
"CooldownListUpdate",
|
||||
@@ -494,7 +494,7 @@ LIB_OPEN_RAID_CAN_LOAD = false
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------
|
||||
--> ~internal ~callbacks
|
||||
--~internal ~callbacks
|
||||
--internally, each module can register events through the internal callback to be notified when something happens in the game
|
||||
|
||||
openRaidLib.internalCallback = {}
|
||||
@@ -590,7 +590,7 @@ LIB_OPEN_RAID_CAN_LOAD = false
|
||||
openRaidLib.RequestAllData()
|
||||
end
|
||||
|
||||
--> this part is under development
|
||||
--this part is under development
|
||||
if (Details) then
|
||||
local detailsEventListener = Details:CreateEventListener()
|
||||
|
||||
@@ -733,7 +733,7 @@ LIB_OPEN_RAID_CAN_LOAD = false
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------
|
||||
--> ~main ~control
|
||||
--~main ~control
|
||||
|
||||
openRaidLib.mainControl = {
|
||||
playerAliveStatus = {},
|
||||
@@ -765,15 +765,15 @@ LIB_OPEN_RAID_CAN_LOAD = false
|
||||
--called on every player_entering_world event
|
||||
openRaidLib.mainControl.UpdatePlayerData = function()
|
||||
local unitName = UnitName("player")
|
||||
--> player data
|
||||
--player data
|
||||
local playerFullInfo = openRaidLib.UnitInfoManager.GetPlayerFullInfo()
|
||||
openRaidLib.UnitInfoManager.AddUnitInfo(unitName, unpack(playerFullInfo))
|
||||
|
||||
--> gear info
|
||||
--gear info
|
||||
local playerGearInfo = openRaidLib.GearManager.GetPlayerFullGearInfo()
|
||||
openRaidLib.GearManager.AddUnitGearList(unitName, unpack(playerGearInfo))
|
||||
|
||||
--> cooldowns
|
||||
--cooldowns
|
||||
openRaidLib.CooldownManager.UpdatePlayerCooldownsLocally()
|
||||
end
|
||||
|
||||
@@ -871,7 +871,7 @@ LIB_OPEN_RAID_CAN_LOAD = false
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------
|
||||
--> ~all, request data from all players
|
||||
--~all, request data from all players
|
||||
|
||||
--send a request to all players in the group to send their data
|
||||
function openRaidLib.RequestAllData()
|
||||
@@ -906,9 +906,9 @@ LIB_OPEN_RAID_CAN_LOAD = false
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------
|
||||
--> ~player general ~info ~unit
|
||||
--~player general ~info ~unit
|
||||
|
||||
--> API calls
|
||||
--API calls
|
||||
--return a table containing all information of units
|
||||
--format: [playerName-realm] = {information}
|
||||
function openRaidLib.GetAllUnitsInfo()
|
||||
@@ -921,7 +921,7 @@ LIB_OPEN_RAID_CAN_LOAD = false
|
||||
return openRaidLib.UnitInfoManager.GetUnitInfo(unitName)
|
||||
end
|
||||
|
||||
--> manager constructor
|
||||
--manager constructor
|
||||
openRaidLib.UnitInfoManager = {
|
||||
--structure:
|
||||
--[playerName] = {ilevel = 100, durability = 100, weaponEnchant = 0, noGems = {}, noEnchants = {}}
|
||||
@@ -1199,7 +1199,7 @@ openRaidLib.internalCallback.RegisterCallback("onLeaveCombat", openRaidLib.UnitI
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------
|
||||
--> ~equipment
|
||||
--~equipment
|
||||
openRaidLib.GearManager = {
|
||||
--structure: [playerName] = {ilevel = 100, durability = 100, weaponEnchant = 0, noGems = {}, noEnchants = {}}
|
||||
UnitData = {},
|
||||
@@ -1397,7 +1397,7 @@ openRaidLib.internalCallback.RegisterCallback("onLeaveCombat", openRaidLib.UnitI
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------
|
||||
--> ~cooldowns
|
||||
--~cooldowns
|
||||
openRaidLib.CooldownManager = {
|
||||
UnitData = {}, --stores the list of cooldowns each player has sent
|
||||
UnitDataFilterCache = {}, --same as the table above but cooldowns are separated has offensive, defensive, etc. FilterCooldowns in functions.lua
|
||||
@@ -1527,7 +1527,7 @@ function openRaidLib.CooldownManager.CooldownSpellUpdate(unitName, spellId, newT
|
||||
unitCooldownTable[spellId] = spellIdTable
|
||||
end
|
||||
|
||||
--> API Calls
|
||||
--API Calls
|
||||
--return a table with unit names as key and a table with unit cooldowns as the value
|
||||
--table format: [playerName] = {[spellId] = cooldownInfo}
|
||||
function openRaidLib.GetAllUnitsCooldown()
|
||||
@@ -1641,7 +1641,7 @@ end
|
||||
return calculatePercent(timeOffset, duration, updateTime, charges)
|
||||
end
|
||||
|
||||
--> internals
|
||||
--internals
|
||||
function openRaidLib.CooldownManager.OnPlayerCast(event, spellId, isPlayerPet) --~cast
|
||||
--player casted a spell, check if the spell is registered as cooldown
|
||||
local playerSpec = openRaidLib.GetPlayerSpecId()
|
||||
@@ -2005,10 +2005,10 @@ end
|
||||
openRaidLib.commHandler.RegisterComm(CONST_COMM_COOLDOWNREQUEST_PREFIX, openRaidLib.CooldownManager.OnReceiveRequestForCooldownInfoUpdate)
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------
|
||||
--> ~keystones
|
||||
--~keystones
|
||||
--public callback does not check if the keystone has changed from the previous callback
|
||||
|
||||
--> API calls
|
||||
--API calls
|
||||
--return a table containing all information of units
|
||||
--format: [playerName-realm] = {information}
|
||||
function openRaidLib.GetAllKeystonesInfo()
|
||||
@@ -2073,7 +2073,7 @@ openRaidLib.commHandler.RegisterComm(CONST_COMM_COOLDOWNREQUEST_PREFIX, openRaid
|
||||
return true
|
||||
end
|
||||
|
||||
--> manager constructor
|
||||
--manager constructor
|
||||
openRaidLib.KeystoneInfoManager = {
|
||||
--structure:
|
||||
--[playerName] = {level = 2, mapID = 222}
|
||||
@@ -2278,7 +2278,7 @@ end)
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------
|
||||
--> data
|
||||
--data
|
||||
|
||||
--vintage cooldown tracker and interrupt tracker
|
||||
C_Timer.After(0.1, function()
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
|
||||
|
||||
if (not LIB_OPEN_RAID_CAN_LOAD) then
|
||||
if (not LIB_OPEN_RAID_COOLDOWNS_INFO) then
|
||||
--the lib isn't loading in WotLK, some addons break due to this table not being initialized
|
||||
LIB_OPEN_RAID_COOLDOWNS_INFO = {}
|
||||
LIB_OPEN_RAID_COOLDOWNS_BY_SPEC = {}
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
@@ -472,6 +477,11 @@ elseif (isExpansion_Dragonflight()) then
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
--end of per expansion content
|
||||
--------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
LIB_OPEN_RAID_MELEE_SPECS = {
|
||||
[251] = "DEATHKNIGHT",
|
||||
[252] = "DEATHKNIGHT",
|
||||
@@ -493,6 +503,7 @@ LIB_OPEN_RAID_MELEE_SPECS = {
|
||||
--if talent is required, use the command:
|
||||
--/dump GetTalentInfo (talentTier, talentColumn, 1)
|
||||
--example: to get the second talent of the last talent line, use: /dump GetTalentInfo (7, 2, 1)
|
||||
|
||||
LIB_OPEN_RAID_COOLDOWNS_INFO = {
|
||||
|
||||
-- Filter Types:
|
||||
|
||||
@@ -303,10 +303,10 @@ function MyAddonObject.OnGearUpdate(unitId, unitGear, allUnitsGear)
|
||||
local noEnchantTable = unitGear.noEnchants
|
||||
local noGemsTable = unitGear.noGems
|
||||
|
||||
for index, slotIdWithoutEnchant in ipairs (noEnchantTable) do
|
||||
for index, slotIdWithoutEnchant in ipairs(noEnchantTable) do
|
||||
end
|
||||
|
||||
for index, slotIdWithEmptyGemSocket in ipairs (noGemsTable) do
|
||||
for index, slotIdWithEmptyGemSocket in ipairs(noGemsTable) do
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+149
-149
@@ -1,6 +1,6 @@
|
||||
--> Library NickTag is a small library for share individual nicknames and avatars.
|
||||
--Library NickTag is a small library for share individual nicknames and avatars.
|
||||
|
||||
--> Basic Functions:
|
||||
--Basic Functions:
|
||||
-- NickTag:SetNickname (name) -> set the player nick name, after set nicktag will broadcast the nick over addon guild channel.
|
||||
--
|
||||
|
||||
@@ -13,7 +13,7 @@ if (not NickTag) then
|
||||
return
|
||||
end
|
||||
|
||||
--> fix for old nicktag version
|
||||
--fix for old nicktag version
|
||||
if (_G.NickTag) then
|
||||
if (_G.NickTag.OnEvent) then
|
||||
_G.NickTag:UnregisterComm ("NickTag")
|
||||
@@ -22,7 +22,7 @@ if (_G.NickTag) then
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
--constants
|
||||
|
||||
local CONST_INDEX_NICKNAME = 1
|
||||
local CONST_INDEX_AVATAR_PATH = 2
|
||||
@@ -39,12 +39,12 @@ end
|
||||
--[[global]] NICKTAG_DEFAULT_BACKGROUND_CORDS = {0.129609375, 1, 1, 0}
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> library stuff
|
||||
--library stuff
|
||||
|
||||
_G.NickTag = NickTag --> nicktag object over global container
|
||||
_G.NickTag = NickTag --nicktag object over global container
|
||||
|
||||
local pool = {default = true} --> pointer to the cache pool and the default pool if no cache
|
||||
local siblingsPools = {} --> pools registered by other addons
|
||||
local pool = {default = true} --pointer to the cache pool and the default pool if no cache
|
||||
local siblingsPools = {} --pools registered by other addons
|
||||
--when this instance was the first to load
|
||||
local isMaster = false
|
||||
|
||||
@@ -211,7 +211,7 @@ end
|
||||
{[[Interface\EncounterJournal\UI-EJ-BOSS-Witch Doctor Zumrah]], "Witch Doctor Zumrah"},
|
||||
}
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> send and receive functions
|
||||
--send and receive functions
|
||||
|
||||
function NickTag:OnReceiveComm (prefix, data, channel, source)
|
||||
|
||||
@@ -221,7 +221,7 @@ end
|
||||
|
||||
local _type, serial, arg3, name, realm, version = select (2, NickTag:Deserialize (data))
|
||||
|
||||
--> 0x1: received a full persona
|
||||
--0x1: received a full persona
|
||||
if (_type == CONST_COMM_FULLPERSONA) then
|
||||
local receivedPersona = arg3
|
||||
version = name
|
||||
@@ -240,7 +240,7 @@ end
|
||||
|
||||
storedPersona [CONST_INDEX_REVISION] = receivedPersona [CONST_INDEX_REVISION]
|
||||
|
||||
--> we need to check if the received nickname fit in our rules.
|
||||
--we need to check if the received nickname fit in our rules.
|
||||
local allowNickName = NickTag:CheckName (receivedPersona [CONST_INDEX_NICKNAME])
|
||||
if (allowNickName) then
|
||||
storedPersona [CONST_INDEX_NICKNAME] = receivedPersona [CONST_INDEX_NICKNAME]
|
||||
@@ -250,15 +250,15 @@ end
|
||||
|
||||
storedPersona [CONST_INDEX_NICKNAME] = receivedPersona [CONST_INDEX_NICKNAME]
|
||||
|
||||
--> update the rest
|
||||
--update the rest
|
||||
--avatar path
|
||||
storedPersona [CONST_INDEX_AVATAR_PATH] = type (receivedPersona [CONST_INDEX_AVATAR_PATH]) == "string" and receivedPersona [CONST_INDEX_AVATAR_PATH] or ""
|
||||
|
||||
--avatar texcoord
|
||||
if (type (receivedPersona [CONST_INDEX_AVATAR_TEXCOORD]) == "boolean") then
|
||||
if (type(receivedPersona [CONST_INDEX_AVATAR_TEXCOORD]) == "boolean") then
|
||||
storedPersona [CONST_INDEX_AVATAR_TEXCOORD] = {0, 1, 0, 1}
|
||||
|
||||
elseif (type (receivedPersona [CONST_INDEX_AVATAR_TEXCOORD]) == "table") then
|
||||
elseif (type(receivedPersona [CONST_INDEX_AVATAR_TEXCOORD]) == "table") then
|
||||
storedPersona [CONST_INDEX_AVATAR_TEXCOORD] = storedPersona [CONST_INDEX_AVATAR_TEXCOORD] or {}
|
||||
storedPersona [CONST_INDEX_AVATAR_TEXCOORD][1] = type (receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][1]) == "number" and receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][1] or 0
|
||||
storedPersona [CONST_INDEX_AVATAR_TEXCOORD][2] = type (receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][2]) == "number" and receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][2] or 1
|
||||
@@ -269,10 +269,10 @@ end
|
||||
end
|
||||
|
||||
--background texcoord
|
||||
if (type (receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD]) == "boolean") then
|
||||
if (type(receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD]) == "boolean") then
|
||||
storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD] = {0, 1, 0, 1}
|
||||
|
||||
elseif (type (receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD]) == "table") then
|
||||
elseif (type(receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD]) == "table") then
|
||||
storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD] = storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD] or {}
|
||||
storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][1] = type (receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][1]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][1] or 0
|
||||
storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][2] = type (receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][2]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][2] or 1
|
||||
@@ -286,7 +286,7 @@ end
|
||||
storedPersona [CONST_INDEX_BACKGROUND_PATH] = type (receivedPersona [CONST_INDEX_BACKGROUND_PATH]) == "string" and receivedPersona [CONST_INDEX_BACKGROUND_PATH] or ""
|
||||
|
||||
--background color
|
||||
if (type (receivedPersona [CONST_INDEX_BACKGROUND_COLOR]) == "table") then
|
||||
if (type(receivedPersona [CONST_INDEX_BACKGROUND_COLOR]) == "table") then
|
||||
storedPersona [CONST_INDEX_BACKGROUND_COLOR] = storedPersona [CONST_INDEX_BACKGROUND_COLOR] or {}
|
||||
storedPersona [CONST_INDEX_BACKGROUND_COLOR][1] = type (receivedPersona [CONST_INDEX_BACKGROUND_COLOR][1]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_COLOR][1] or 1
|
||||
storedPersona [CONST_INDEX_BACKGROUND_COLOR][2] = type (receivedPersona [CONST_INDEX_BACKGROUND_COLOR][2]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_COLOR][2] or 1
|
||||
@@ -306,7 +306,7 @@ end
|
||||
NickTag:RegisterComm ("NickTag", "OnReceiveComm")
|
||||
|
||||
--frame for listening to event
|
||||
NickTag.EventFrame = NickTag.EventFrame or CreateFrame ("frame")
|
||||
NickTag.EventFrame = NickTag.EventFrame or CreateFrame("frame")
|
||||
NickTag.EventFrame.InfoSendCooldown = 0
|
||||
|
||||
function NickTag.OnEvent (self, event, ...)
|
||||
@@ -324,7 +324,7 @@ end
|
||||
NickTag.EventFrame:RegisterEvent ("GROUP_ROSTER_UPDATE")
|
||||
NickTag.EventFrame:RegisterEvent ("PLAYER_LOGIN")
|
||||
|
||||
NickTag.EventFrame:SetScript ("OnEvent", NickTag.OnEvent)
|
||||
NickTag.EventFrame:SetScript("OnEvent", NickTag.OnEvent)
|
||||
|
||||
--send the persona in the guild comm chanel
|
||||
function NickTag:SendPersona()
|
||||
@@ -342,15 +342,15 @@ end
|
||||
NickTag.EventFrame.ScheduledSend = nil
|
||||
NickTag.EventFrame.InfoSendCooldown = time() + 29
|
||||
|
||||
--> updating my own persona
|
||||
--updating my own persona
|
||||
NickTag.send_scheduled = false
|
||||
|
||||
--> auto change nickname if we have an invalid nickname
|
||||
--auto change nickname if we have an invalid nickname
|
||||
if (NickTag:GetNickname (UnitName ("player")) == LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_INVALID_NAME"]) then
|
||||
nickTable [CONST_INDEX_NICKNAME] = UnitName ("player")
|
||||
end
|
||||
|
||||
--> broadcast over guild channel
|
||||
--broadcast over guild channel
|
||||
if (IsInGuild()) then
|
||||
if (isMaster) then
|
||||
NickTag:SyncSiblings()
|
||||
@@ -361,9 +361,9 @@ end
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> cache stuff
|
||||
--cache stuff
|
||||
|
||||
--> this will clear the information about the player within nicktag cache
|
||||
--this will clear the information about the player within nicktag cache
|
||||
function NickTag:ResetPlayerPersona()
|
||||
local playerName = UnitName ("player")
|
||||
|
||||
@@ -383,7 +383,7 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
--> reset cache
|
||||
--reset cache
|
||||
function NickTag:ResetCache()
|
||||
|
||||
local playerName = UnitName ("player")
|
||||
@@ -401,10 +401,10 @@ end
|
||||
table.wipe (pool)
|
||||
end
|
||||
|
||||
pool.nextreset = time() + (60*60*24*15) --> 15 days or 1296000 seconds
|
||||
pool.nextreset = time() + (60*60*24*15) --15 days or 1296000 seconds
|
||||
pool.last_version = minor
|
||||
else
|
||||
--> sometimes player guid isn't available right after logon, so, just schedule until it become available.
|
||||
--sometimes player guid isn't available right after logon, so, just schedule until it become available.
|
||||
NickTag:ScheduleTimer ("ResetCache", 0.3)
|
||||
end
|
||||
end
|
||||
@@ -426,7 +426,7 @@ end
|
||||
end
|
||||
|
||||
pool = _table
|
||||
isMaster = true --> this instance of nicktag will save data
|
||||
isMaster = true --this instance of nicktag will save data
|
||||
|
||||
if (not pool.nextreset) then
|
||||
pool.nextreset = time() + (60*60*24*15)
|
||||
@@ -444,7 +444,7 @@ end
|
||||
|
||||
function NickTag:SyncSiblings()
|
||||
--copy all data into siblings table
|
||||
for _, syblingTable in ipairs (siblingsPools) do
|
||||
for _, syblingTable in ipairs(siblingsPools) do
|
||||
for key, value in pairs (pool) do
|
||||
syblingTable [key] = value
|
||||
end
|
||||
@@ -452,7 +452,7 @@ end
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> basic functions
|
||||
--basic functions
|
||||
|
||||
local cyrillic = "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯЁЂЃЄЅІЇЈЉЊЋЌЎЏҐабвгдежзийклмнопрстуфхцчшщъыьэюяёђѓєѕіїјљњћќўџґАаБбВвГгДдЕеЁёЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯя"
|
||||
local latin = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
@@ -474,7 +474,7 @@ end
|
||||
alphabet["chinese"][letter] = true
|
||||
end
|
||||
|
||||
--> trim from from http://lua-users.org/wiki/StringTrim
|
||||
--trim from from http://lua-users.org/wiki/StringTrim
|
||||
local function trim (s)
|
||||
local from = s:match"^%s*()"
|
||||
return from > #s and "" or s:match(".*%S", from)
|
||||
@@ -496,13 +496,13 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
--> we need to keep game smooth checking and formating nicknames.
|
||||
--> SetNickname and names comming from other player need to be check.
|
||||
--we need to keep game smooth checking and formating nicknames.
|
||||
--SetNickname and names comming from other player need to be check.
|
||||
function NickTag:CheckName (name)
|
||||
--> as nicktag only work internally in the guild, we think that is not necessary a work filter to avoid people using bad language.
|
||||
--as nicktag only work internally in the guild, we think that is not necessary a work filter to avoid people using bad language.
|
||||
|
||||
if (type (name) ~= "string") then
|
||||
return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_4"] --> error 4 = name isn't a valid string
|
||||
if (type(name) ~= "string") then
|
||||
return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_4"] --error 4 = name isn't a valid string
|
||||
end
|
||||
|
||||
name = trim (name)
|
||||
@@ -530,32 +530,32 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
--> limit nickname to 12 characters, same as wow.
|
||||
--limit nickname to 12 characters, same as wow.
|
||||
--cyrillic seems to double the len using 2 bytes
|
||||
local len = string.len (name)
|
||||
if (len > maxLength) then
|
||||
return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_1"] --> error 1 = nickname is too long, max of 12 characters.
|
||||
return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_1"] --error 1 = nickname is too long, max of 12 characters.
|
||||
end
|
||||
|
||||
--> check if contain any non allowed characters, by now only accpet letters, numbers and spaces.
|
||||
--> by default wow do not accetp spaces, but here will allow.
|
||||
--> tested over lua 5.2 and this capture was okey with accents, not sure why inside wow this doesn't work.
|
||||
--check if contain any non allowed characters, by now only accpet letters, numbers and spaces.
|
||||
--by default wow do not accetp spaces, but here will allow.
|
||||
--tested over lua 5.2 and this capture was okey with accents, not sure why inside wow this doesn't work.
|
||||
|
||||
-- local notallow = string.find (name, "[^a-zA-Z�������%s]")
|
||||
-- if (notallow) then
|
||||
-- return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_2"] --> error 2 = nickname only support letters, numbers and spaces.
|
||||
-- return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_2"] --error 2 = nickname only support letters, numbers and spaces.
|
||||
-- end
|
||||
|
||||
--[=[
|
||||
for letter in name:gmatch(".") do
|
||||
if (not allowedLetters[letter]) then
|
||||
return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_2"] --> error 2 = nickname only support letters, numbers and spaces.
|
||||
return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_2"] --error 2 = nickname only support letters, numbers and spaces.
|
||||
end
|
||||
end
|
||||
--]=]
|
||||
|
||||
--> check if there is sequencial repeated characters, like "Jasooon" were repeats 3 times the "o" character.
|
||||
--> got this from http://stackoverflow.com/questions/15608299/lua-pattern-matching-repeating-character
|
||||
--check if there is sequencial repeated characters, like "Jasooon" were repeats 3 times the "o" character.
|
||||
--got this from http://stackoverflow.com/questions/15608299/lua-pattern-matching-repeating-character
|
||||
have_repeated = false
|
||||
count_spaces = 0
|
||||
string.gsub (name, '.', '\0%0%0'):gsub ('(.)%z%1','%1'):gsub ('%z.([^%z]+)', check_repeated)
|
||||
@@ -563,48 +563,48 @@ end
|
||||
have_repeated = true
|
||||
end
|
||||
if (have_repeated) then
|
||||
return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_3"] --> error 3 = cant use the same letter three times consecutively, 2 spaces consecutively or 3 or more spaces.
|
||||
return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_3"] --error 3 = cant use the same letter three times consecutively, 2 spaces consecutively or 3 or more spaces.
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
--> set the "player" nickname and schedule for send updated persona
|
||||
--set the "player" nickname and schedule for send updated persona
|
||||
function NickTag:SetNickname (name)
|
||||
|
||||
--> check data before
|
||||
assert (type (name) == "string", "NickTag 'SetNickname' expects a string on #1 argument.")
|
||||
--check data before
|
||||
assert (type(name) == "string", "NickTag 'SetNickname' expects a string on #1 argument.")
|
||||
|
||||
--> check if the nickname is okey to allowed to use.
|
||||
--check if the nickname is okey to allowed to use.
|
||||
local okey, errortype = NickTag:CheckName (name)
|
||||
if (not okey) then
|
||||
NickTag:Msg ("SetNickname() invalid name ", name)
|
||||
return false, errortype
|
||||
end
|
||||
|
||||
--> here we format the text to match titles, e.g converts name like "JASON NICKSHOW" into "Jason Nickshow".
|
||||
--here we format the text to match titles, e.g converts name like "JASON NICKSHOW" into "Jason Nickshow".
|
||||
name = name:gsub ("(%a)([%w_']*)", titlecase)
|
||||
|
||||
local playerName = UnitName ("player")
|
||||
|
||||
--> get the full nick table.
|
||||
--get the full nick table.
|
||||
local nickTable = NickTag:GetNicknameTable (playerName)
|
||||
if (not nickTable) then
|
||||
nickTable = NickTag:Create (playerName, true)
|
||||
end
|
||||
|
||||
--> change the nickname for the player nick table.
|
||||
--change the nickname for the player nick table.
|
||||
if (nickTable [CONST_INDEX_NICKNAME] ~= name) then
|
||||
nickTable [CONST_INDEX_NICKNAME] = name
|
||||
|
||||
--increase the table revision
|
||||
NickTag:IncRevision()
|
||||
|
||||
--> send the update for script which need it.
|
||||
--send the update for script which need it.
|
||||
NickTag.callbacks:Fire ("NickTag_Update", CONST_INDEX_NICKNAME)
|
||||
|
||||
--> schedule a update for revision and broadcast full persona.
|
||||
--> this is a kind of protection for scripts which call SetNickname, SetColor and SetAvatar one after other, so scheduling here avoid three revisions upgrades and 3 broadcasts to the guild.
|
||||
--schedule a update for revision and broadcast full persona.
|
||||
--this is a kind of protection for scripts which call SetNickname, SetColor and SetAvatar one after other, so scheduling here avoid three revisions upgrades and 3 broadcasts to the guild.
|
||||
if (not NickTag.send_scheduled) then
|
||||
NickTag.send_scheduled = true
|
||||
NickTag:ScheduleTimer ("SendPersona", 1)
|
||||
@@ -621,11 +621,11 @@ end
|
||||
|
||||
if (l == nil) then
|
||||
l, r, t, b = 0, 1, 0, 1
|
||||
elseif (type (l) == "table") then
|
||||
elseif (type(l) == "table") then
|
||||
l, r, t, b = unpack (l)
|
||||
end
|
||||
|
||||
--> check data before
|
||||
--check data before
|
||||
assert (texture and l and r and t and b, "NickTag 'SetNicknameAvatar' bad format. Usage NickTag:SetAvatar (texturepath [, L, R, T, B] or texturepath [, {L, R, T, B}])")
|
||||
|
||||
local playerName = UnitName ("player")
|
||||
@@ -641,8 +641,8 @@ end
|
||||
--increase the table revision
|
||||
NickTag:IncRevision()
|
||||
|
||||
--> by default, CONST_INDEX_AVATAR_TEXCOORD comes as boolean false
|
||||
if (type (nickTable [CONST_INDEX_AVATAR_TEXCOORD]) == "boolean") then
|
||||
--by default, CONST_INDEX_AVATAR_TEXCOORD comes as boolean false
|
||||
if (type(nickTable [CONST_INDEX_AVATAR_TEXCOORD]) == "boolean") then
|
||||
nickTable [CONST_INDEX_AVATAR_TEXCOORD] = {}
|
||||
end
|
||||
|
||||
@@ -662,13 +662,13 @@ end
|
||||
return true
|
||||
end
|
||||
|
||||
--> set the background
|
||||
--set the background
|
||||
function NickTag:SetNicknameBackground (path, texcoord, color, silent)
|
||||
|
||||
if (not silent) then
|
||||
assert (type (path) == "string", "NickTag 'SetNicknameBackground' expects a string on #1 argument.")
|
||||
assert (type(path) == "string", "NickTag 'SetNicknameBackground' expects a string on #1 argument.")
|
||||
else
|
||||
if (type (path) ~= "string") then
|
||||
if (type(path) ~= "string") then
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -722,7 +722,7 @@ end
|
||||
|
||||
function NickTag:GetNickname (playerName, default, silent)
|
||||
if (not silent) then
|
||||
assert (type (playerName) == "string", "NickTag 'GetNickname' expects a string or string on #1 argument.")
|
||||
assert (type(playerName) == "string", "NickTag 'GetNickname' expects a string or string on #1 argument.")
|
||||
end
|
||||
|
||||
local _table = pool [playerName]
|
||||
@@ -732,10 +732,10 @@ end
|
||||
return _table [CONST_INDEX_NICKNAME] or default or nil
|
||||
end
|
||||
|
||||
--> return the avatar and the texcoord.
|
||||
--return the avatar and the texcoord.
|
||||
function NickTag:GetNicknameAvatar (playerName, default, silent)
|
||||
if (not silent) then
|
||||
assert (type (playerName) == "string", "NickTag 'GetNicknameAvatar' expects a string or string on #1 argument.")
|
||||
assert (type(playerName) == "string", "NickTag 'GetNicknameAvatar' expects a string or string on #1 argument.")
|
||||
end
|
||||
|
||||
local _table = pool [playerName]
|
||||
@@ -750,7 +750,7 @@ end
|
||||
|
||||
function NickTag:GetNicknameBackground (playerName, default_path, default_texcoord, default_color, silent)
|
||||
if (not silent) then
|
||||
assert (type (playerName) == "string", "NickTag 'GetNicknameBackground' expects a string or string on #1 argument.")
|
||||
assert (type(playerName) == "string", "NickTag 'GetNicknameBackground' expects a string or string on #1 argument.")
|
||||
end
|
||||
|
||||
local _table = pool [playerName]
|
||||
@@ -760,11 +760,11 @@ end
|
||||
return _table [CONST_INDEX_BACKGROUND_PATH] or default_path, _table [CONST_INDEX_BACKGROUND_TEXCOORD] or default_texcoord, _table [CONST_INDEX_BACKGROUND_COLOR] or default_color
|
||||
end
|
||||
|
||||
--> get the full nicktag table
|
||||
--get the full nicktag table
|
||||
function NickTag:GetNicknameTable (playerName, silent)
|
||||
--> check data before
|
||||
--check data before
|
||||
if (not silent) then
|
||||
assert (type (playerName) == "string", "NickTag 'GetNicknameTable' expects a string on #1 argument.")
|
||||
assert (type(playerName) == "string", "NickTag 'GetNicknameTable' expects a string on #1 argument.")
|
||||
else
|
||||
if (not playerName or type (playerName) ~= "string") then
|
||||
return
|
||||
@@ -775,20 +775,20 @@ end
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internal functions
|
||||
--internal functions
|
||||
|
||||
--> create a empty nick table for the player
|
||||
--create a empty nick table for the player
|
||||
function NickTag:Create (playerName, isSelf)
|
||||
--> check data before
|
||||
assert (type (playerName) == "string", "NickTag 'Create' expects a string on #1 argument.")
|
||||
--check data before
|
||||
assert (type(playerName) == "string", "NickTag 'Create' expects a string on #1 argument.")
|
||||
|
||||
--> check if alredy exists
|
||||
--check if alredy exists
|
||||
local alredyHave = pool [playerName]
|
||||
if (alredyHave) then
|
||||
return alredyHave
|
||||
end
|
||||
|
||||
--> create the table:
|
||||
--create the table:
|
||||
local newTable = {
|
||||
UnitName ("player"), --[1] player nickname
|
||||
false, --[2] avatar texture path
|
||||
@@ -799,7 +799,7 @@ end
|
||||
1 --[7] revision
|
||||
}
|
||||
|
||||
--> if not my persona, set revision to 0, this make always get update after creation
|
||||
--if not my persona, set revision to 0, this make always get update after creation
|
||||
if (not isSelf) then
|
||||
newTable [CONST_INDEX_REVISION] = 0
|
||||
end
|
||||
@@ -808,7 +808,7 @@ end
|
||||
return newTable
|
||||
end
|
||||
|
||||
--> inc the revision of the player persona after update nick or avatar
|
||||
--inc the revision of the player persona after update nick or avatar
|
||||
function NickTag:IncRevision()
|
||||
local playerName = UnitName ("player")
|
||||
local nickTable = NickTag:GetNicknameTable (playerName)
|
||||
@@ -821,51 +821,51 @@ end
|
||||
return true
|
||||
end
|
||||
|
||||
--> convert GUID into serial number (deprecated, it uses player name - realm name)
|
||||
--convert GUID into serial number (deprecated, it uses player name - realm name)
|
||||
function NickTag:GetSerial (serial, silent)
|
||||
return 0
|
||||
end
|
||||
|
||||
--> choose avatar window
|
||||
--choose avatar window
|
||||
do
|
||||
local avatar_pick_frame = CreateFrame ("frame", "AvatarPickFrame", UIParent,"BackdropTemplate")
|
||||
local avatar_pick_frame = CreateFrame("frame", "AvatarPickFrame", UIParent,"BackdropTemplate")
|
||||
avatar_pick_frame:SetFrameStrata ("DIALOG")
|
||||
avatar_pick_frame:SetBackdrop ({bgFile = [[Interface\FrameGeneral\UI-Background-Marble]], edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], tile = true, tileSize = 256, edgeSize = 32, insets = {left = 11, right = 12, top = 12, bottom = 11}})
|
||||
avatar_pick_frame:SetBackdropColor (.3, .3, .3, .9)
|
||||
avatar_pick_frame:SetWidth (460)
|
||||
avatar_pick_frame:SetHeight (240)
|
||||
avatar_pick_frame:SetBackdrop({bgFile = [[Interface\FrameGeneral\UI-Background-Marble]], edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], tile = true, tileSize = 256, edgeSize = 32, insets = {left = 11, right = 12, top = 12, bottom = 11}})
|
||||
avatar_pick_frame:SetBackdropColor(.3, .3, .3, .9)
|
||||
avatar_pick_frame:SetWidth(460)
|
||||
avatar_pick_frame:SetHeight(240)
|
||||
|
||||
avatar_pick_frame.selected_avatar = 1
|
||||
avatar_pick_frame.selected_background = 1
|
||||
avatar_pick_frame.selected_color = {1, 1, 1}
|
||||
avatar_pick_frame.selected_texcoord = {0, 1, 0, 1}
|
||||
|
||||
avatar_pick_frame:SetPoint ("center", UIParent, "center", 200, 0)
|
||||
avatar_pick_frame:SetPoint("center", UIParent, "center", 200, 0)
|
||||
---
|
||||
local avatar_texture = avatar_pick_frame:CreateTexture ("AvatarPickFrameAvatarPreview", "overlay")
|
||||
avatar_texture:SetPoint ("topleft", avatar_pick_frame, "topleft", 167, -10)
|
||||
avatar_texture:SetTexture ([[Interface\EncounterJournal\UI-EJ-BOSS-Default]])
|
||||
local avatar_texture = avatar_pick_frame:CreateTexture("AvatarPickFrameAvatarPreview", "overlay")
|
||||
avatar_texture:SetPoint("topleft", avatar_pick_frame, "topleft", 167, -10)
|
||||
avatar_texture:SetTexture([[Interface\EncounterJournal\UI-EJ-BOSS-Default]])
|
||||
--
|
||||
local background_texture = avatar_pick_frame:CreateTexture ("AvatarPickFrameBackgroundPreview", "artwork")
|
||||
background_texture:SetPoint ("topleft", avatar_pick_frame, "topleft", 167, 2)
|
||||
background_texture:SetWidth (290)
|
||||
background_texture:SetHeight (75)
|
||||
background_texture:SetTexture (NickTag.background_pool[1][1])
|
||||
local background_texture = avatar_pick_frame:CreateTexture("AvatarPickFrameBackgroundPreview", "artwork")
|
||||
background_texture:SetPoint("topleft", avatar_pick_frame, "topleft", 167, 2)
|
||||
background_texture:SetWidth(290)
|
||||
background_texture:SetHeight(75)
|
||||
background_texture:SetTexture(NickTag.background_pool[1][1])
|
||||
background_texture:SetTexCoord (unpack (NickTag.background_pool[1][3]))
|
||||
--
|
||||
local name = avatar_pick_frame:CreateFontString ("AvatarPickFrameName", "overlay", "GameFontHighlightHuge")
|
||||
name:SetPoint ("left", avatar_texture, "right", -11, -17)
|
||||
name:SetText (UnitName ("player"))
|
||||
name:SetPoint("left", avatar_texture, "right", -11, -17)
|
||||
name:SetText(UnitName ("player"))
|
||||
---
|
||||
|
||||
local OnClickFunction = function(button)
|
||||
if (button.isAvatar) then
|
||||
local avatar = NickTag.avatar_pool [button.IconID]
|
||||
_G.AvatarPickFrameAvatarPreview:SetTexture ( avatar [1] )
|
||||
_G.AvatarPickFrameAvatarPreview:SetTexture( avatar [1] )
|
||||
avatar_pick_frame.selected_avatar = avatar [1]
|
||||
elseif (button.isBackground) then
|
||||
local background = NickTag.background_pool [button.IconID]
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexture ( background [1] )
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexture( background [1] )
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexCoord (unpack (background [3]))
|
||||
avatar_pick_frame.selected_background = background [1]
|
||||
avatar_pick_frame.selected_texcoord = background [3]
|
||||
@@ -880,38 +880,38 @@ do
|
||||
avatar_pick_frame.selected_color[3] = b
|
||||
end
|
||||
|
||||
local okey = CreateFrame ("button", "AvatarPickFrameAccept", avatar_pick_frame)
|
||||
okey:SetPoint ("bottomright", avatar_pick_frame, "bottomright", -37, 12)
|
||||
okey:SetText ("Accept")
|
||||
local okey = CreateFrame("button", "AvatarPickFrameAccept", avatar_pick_frame)
|
||||
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)
|
||||
end
|
||||
end)
|
||||
local change_color = CreateFrame ("button", "AvatarPickFrameColor", avatar_pick_frame)
|
||||
change_color:SetPoint ("bottomright", avatar_pick_frame, "bottomright", -205, 12)
|
||||
change_color:SetText ("Color")
|
||||
local change_color = CreateFrame("button", "AvatarPickFrameColor", avatar_pick_frame)
|
||||
change_color:SetPoint("bottomright", avatar_pick_frame, "bottomright", -205, 12)
|
||||
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)
|
||||
ColorPickerFrame:SetParent(avatar_pick_frame)
|
||||
ColorPickerFrame:SetColorRGB (_G.AvatarPickFrameBackgroundPreview:GetVertexColor())
|
||||
ColorPickerFrame:ClearAllPoints()
|
||||
ColorPickerFrame:SetPoint ("left", avatar_pick_frame, "right", 0, -10)
|
||||
ColorPickerFrame:SetPoint("left", avatar_pick_frame, "right", 0, -10)
|
||||
ColorPickerFrame:Show()
|
||||
end)
|
||||
|
||||
local buttons = {}
|
||||
for i = 0, 2 do
|
||||
local newbutton = CreateFrame ("button", "AvatarPickFrameAvatarScrollButton"..i+1, avatar_pick_frame)
|
||||
newbutton:SetScript ("OnClick", OnClickFunction)
|
||||
newbutton:SetWidth (128)
|
||||
newbutton:SetHeight (64)
|
||||
newbutton:SetPoint ("topleft", avatar_pick_frame, "topleft", 15, (i*70*-1) - 20)
|
||||
local newbutton = CreateFrame("button", "AvatarPickFrameAvatarScrollButton"..i+1, avatar_pick_frame)
|
||||
newbutton:SetScript("OnClick", OnClickFunction)
|
||||
newbutton:SetWidth(128)
|
||||
newbutton:SetHeight(64)
|
||||
newbutton:SetPoint("topleft", avatar_pick_frame, "topleft", 15, (i*70*-1) - 20)
|
||||
newbutton:SetID (i+1)
|
||||
newbutton.isAvatar = true
|
||||
buttons [#buttons+1] = newbutton
|
||||
@@ -919,26 +919,26 @@ do
|
||||
|
||||
local buttonsbg = {}
|
||||
for i = 0, 2 do
|
||||
local newbutton = CreateFrame ("button", "AvatarPickFrameBackgroundScrollButton"..i+1, avatar_pick_frame)
|
||||
newbutton:SetScript ("OnClick", OnClickFunction)
|
||||
newbutton:SetWidth (275)
|
||||
newbutton:SetHeight (60)
|
||||
newbutton:SetPoint ("topleft", avatar_pick_frame, "topleft", 157, (i*50*-1) - 80)
|
||||
local newbutton = CreateFrame("button", "AvatarPickFrameBackgroundScrollButton"..i+1, avatar_pick_frame)
|
||||
newbutton:SetScript("OnClick", OnClickFunction)
|
||||
newbutton:SetWidth(275)
|
||||
newbutton:SetHeight(60)
|
||||
newbutton:SetPoint("topleft", avatar_pick_frame, "topleft", 157, (i*50*-1) - 80)
|
||||
newbutton:SetID (i+1)
|
||||
newbutton.isBackground = true
|
||||
buttonsbg [#buttonsbg+1] = newbutton
|
||||
end
|
||||
|
||||
--[=[
|
||||
local avatar_list = CreateFrame ("ScrollFrame", "AvatarPickFrameAvatarScroll", avatar_pick_frame, "ListScrollFrameTemplate")
|
||||
avatar_list:SetPoint ("topleft", avatar_pick_frame, "topleft", 10, -10)
|
||||
local background_list = CreateFrame ("ScrollFrame", "AvatarPickFrameBackgroundScroll", avatar_pick_frame, "ListScrollFrameTemplate")
|
||||
background_list:SetPoint ("topleft", avatar_pick_frame, "topleft", 147, -85)
|
||||
local avatar_list = CreateFrame("ScrollFrame", "AvatarPickFrameAvatarScroll", avatar_pick_frame, "ListScrollFrameTemplate")
|
||||
avatar_list:SetPoint("topleft", avatar_pick_frame, "topleft", 10, -10)
|
||||
local background_list = CreateFrame("ScrollFrame", "AvatarPickFrameBackgroundScroll", avatar_pick_frame, "ListScrollFrameTemplate")
|
||||
background_list:SetPoint("topleft", avatar_pick_frame, "topleft", 147, -85)
|
||||
|
||||
avatar_list:SetWidth (128)
|
||||
avatar_list:SetHeight (220)
|
||||
background_list:SetWidth (275)
|
||||
background_list:SetHeight (140)
|
||||
avatar_list:SetWidth(128)
|
||||
avatar_list:SetHeight(220)
|
||||
background_list:SetWidth(275)
|
||||
background_list:SetHeight(140)
|
||||
|
||||
local avatar_scroll_update = function(self)
|
||||
local numMacroIcons = #NickTag.avatar_pool
|
||||
@@ -952,10 +952,10 @@ do
|
||||
|
||||
texture = NickTag.avatar_pool [index][1]
|
||||
if ( index <= numMacroIcons and texture ) then
|
||||
macroPopupButton:SetNormalTexture (texture)
|
||||
macroPopupButton:SetPushedTexture (texture)
|
||||
macroPopupButton:SetNormalTexture(texture)
|
||||
macroPopupButton:SetPushedTexture(texture)
|
||||
macroPopupButton:SetDisabledTexture (texture)
|
||||
macroPopupButton:SetHighlightTexture (texture, "ADD")
|
||||
macroPopupButton:SetHighlightTexture(texture, "ADD")
|
||||
macroPopupButton.IconID = index
|
||||
macroPopupButton:Show()
|
||||
else
|
||||
@@ -976,10 +976,10 @@ do
|
||||
|
||||
texture = NickTag.background_pool [index][1]
|
||||
if ( index <= numMacroIcons and texture ) then
|
||||
macroPopupButton:SetNormalTexture (texture)
|
||||
macroPopupButton:SetPushedTexture (texture)
|
||||
macroPopupButton:SetNormalTexture(texture)
|
||||
macroPopupButton:SetPushedTexture(texture)
|
||||
macroPopupButton:SetDisabledTexture (texture)
|
||||
macroPopupButton:SetHighlightTexture (texture, "ADD")
|
||||
macroPopupButton:SetHighlightTexture(texture, "ADD")
|
||||
macroPopupButton.IconID = index
|
||||
macroPopupButton:Show()
|
||||
else
|
||||
@@ -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)
|
||||
|
||||
@@ -1000,37 +1000,37 @@ do
|
||||
background_scroll_update (background_list)
|
||||
|
||||
function avatar_pick_frame:SetAvatar (n)
|
||||
if (type (n) ~= "number") then
|
||||
if (type(n) ~= "number") then
|
||||
n = 1
|
||||
end
|
||||
if (n > #NickTag.avatar_pool) then
|
||||
n = 1
|
||||
end
|
||||
local avatar = NickTag.avatar_pool [n]
|
||||
_G.AvatarPickFrameAvatarPreview:SetTexture ( avatar [1] )
|
||||
_G.AvatarPickFrameAvatarPreview:SetTexture( avatar [1] )
|
||||
avatar_pick_frame.selected_avatar = avatar [1]
|
||||
end
|
||||
function avatar_pick_frame:SetBackground (n)
|
||||
if (type (n) ~= "number") then
|
||||
if (type(n) ~= "number") then
|
||||
n = 1
|
||||
end
|
||||
if (n > #NickTag.background_pool) then
|
||||
n = 1
|
||||
end
|
||||
local background = NickTag.background_pool [n]
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexture ( background [1] )
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexture( background [1] )
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexCoord (unpack (background [3]))
|
||||
_G.AvatarPickFrameBackgroundPreview:SetVertexColor (unpack (avatar_pick_frame.selected_color))
|
||||
avatar_pick_frame.selected_background = background [1]
|
||||
end
|
||||
function avatar_pick_frame:SetColor (r, g, b)
|
||||
if (type (r) ~= "number" or r > 1) then
|
||||
if (type(r) ~= "number" or r > 1) then
|
||||
r = 1
|
||||
end
|
||||
if (type (g) ~= "number" or g > 1) then
|
||||
if (type(g) ~= "number" or g > 1) then
|
||||
g = 1
|
||||
end
|
||||
if (type (b) ~= "number" or b > 1) then
|
||||
if (type(b) ~= "number" or b > 1) then
|
||||
b = 1
|
||||
end
|
||||
_G.AvatarPickFrameBackgroundPreview:SetVertexColor (r, g, b)
|
||||
@@ -1046,18 +1046,18 @@ do
|
||||
local CONST_INDEX_BACKGROUND_TEXCOORD = 5
|
||||
local CONST_INDEX_BACKGROUND_COLOR = 6
|
||||
|
||||
avatar_pick_frame:SetScript ("OnShow", function()
|
||||
avatar_pick_frame:SetScript("OnShow", function()
|
||||
--get player avatar
|
||||
local avatar = NickTag:GetNicknameTable (UnitGUID ("player"))
|
||||
if (avatar) then
|
||||
_G.AvatarPickFrameName:SetText ( avatar [1] or UnitName ("player"))
|
||||
_G.AvatarPickFrameName:SetText( avatar [1] or UnitName ("player"))
|
||||
|
||||
_G.AvatarPickFrameAvatarPreview:SetTexture ( avatar [CONST_INDEX_AVATAR_PATH] or [[Interface\EncounterJournal\UI-EJ-BOSS-Default]] )
|
||||
_G.AvatarPickFrameAvatarPreview:SetTexture( avatar [CONST_INDEX_AVATAR_PATH] or [[Interface\EncounterJournal\UI-EJ-BOSS-Default]] )
|
||||
avatar_pick_frame.selected_avatar = avatar [CONST_INDEX_AVATAR_PATH] or [[Interface\EncounterJournal\UI-EJ-BOSS-Default]]
|
||||
|
||||
_G.AvatarPickFrameAvatarPreview:SetTexCoord ( 0, 1, 0, 1 ) --> always
|
||||
_G.AvatarPickFrameAvatarPreview:SetTexCoord ( 0, 1, 0, 1 ) --always
|
||||
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexture ( avatar [CONST_INDEX_BACKGROUND_PATH] or [[Interface\PetBattles\Weather-ArcaneStorm]] )
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexture( avatar [CONST_INDEX_BACKGROUND_PATH] or [[Interface\PetBattles\Weather-ArcaneStorm]] )
|
||||
avatar_pick_frame.selected_background = avatar [CONST_INDEX_BACKGROUND_PATH] or [[Interface\PetBattles\Weather-ArcaneStorm]]
|
||||
|
||||
if (avatar [CONST_INDEX_BACKGROUND_TEXCOORD]) then
|
||||
@@ -1076,14 +1076,14 @@ do
|
||||
avatar_pick_frame.selected_color = {1, 1, 1}
|
||||
end
|
||||
else
|
||||
--> if none
|
||||
_G.AvatarPickFrameAvatarPreview:SetTexture ( [[Interface\EncounterJournal\UI-EJ-BOSS-Default]] )
|
||||
--if none
|
||||
_G.AvatarPickFrameAvatarPreview:SetTexture( [[Interface\EncounterJournal\UI-EJ-BOSS-Default]] )
|
||||
avatar_pick_frame.selected_avatar = [[Interface\EncounterJournal\UI-EJ-BOSS-Default]]
|
||||
|
||||
local background = NickTag.background_pool [1]
|
||||
|
||||
if (background) then
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexture ( background [1] )
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexture( background [1] )
|
||||
avatar_pick_frame.selected_background = background [1]
|
||||
_G.AvatarPickFrameBackgroundPreview:SetTexCoord (unpack (background [3]))
|
||||
avatar_pick_frame.selected_texcoord = background [3]
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> global name declaration
|
||||
--global name declaration
|
||||
|
||||
_ = nil
|
||||
_G._detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
|
||||
|
||||
local version, build, date, tocversion = GetBuildInfo()
|
||||
|
||||
_detalhes.build_counter = 10129
|
||||
_detalhes.alpha_build_counter = 10129 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.build_counter = 10135
|
||||
_detalhes.alpha_build_counter = 10135 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.dont_open_news = true
|
||||
_detalhes.game_version = version
|
||||
_detalhes.userversion = version .. " " .. _detalhes.build_counter
|
||||
@@ -50,7 +50,7 @@
|
||||
Details.PlayerBreakdown = {}
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> initialization stuff
|
||||
--initialization stuff
|
||||
local _
|
||||
|
||||
do
|
||||
@@ -321,7 +321,7 @@ do
|
||||
|
||||
Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r "
|
||||
|
||||
--> startup
|
||||
--startup
|
||||
_detalhes.max_windowline_columns = 11
|
||||
_detalhes.initializing = true
|
||||
_detalhes.enabled = true
|
||||
@@ -335,12 +335,12 @@ do
|
||||
--store functions to create options frame
|
||||
Details.optionsSection = {}
|
||||
|
||||
--> containers
|
||||
--> armazenas as fun��es do parser - All parse functions
|
||||
--containers
|
||||
--armazenas as fun��es do parser - All parse functions
|
||||
_detalhes.parser = {}
|
||||
_detalhes.parser_functions = {}
|
||||
_detalhes.parser_frame = CreateFrame ("Frame")
|
||||
_detalhes.pvp_parser_frame = CreateFrame ("Frame")
|
||||
_detalhes.parser_frame = CreateFrame("Frame")
|
||||
_detalhes.pvp_parser_frame = CreateFrame("Frame")
|
||||
_detalhes.parser_frame:Hide()
|
||||
|
||||
_detalhes.MacroList = {
|
||||
@@ -354,22 +354,22 @@ do
|
||||
{Name = "Report What is Shown In the Window", Desc = "Report the current data shown in the window, the number 1 is the window number, replace it to report another window.", MacroText = "/script Details:FastReportWindow(1)"},
|
||||
}
|
||||
|
||||
--> current instances of the exp (need to maintain)
|
||||
--current instances of the exp (need to maintain)
|
||||
_detalhes.InstancesToStoreData = { --mapId
|
||||
[2296] = true, --castle narnia
|
||||
[2450] = true, --sanctum of domination
|
||||
[2481] = true, --sepulcher of the first ones
|
||||
}
|
||||
|
||||
--> armazena os escudos - Shields information for absorbs
|
||||
--armazena os escudos - Shields information for absorbs
|
||||
_detalhes.escudos = {}
|
||||
--> armazena as fun��es dos frames - Frames functions
|
||||
--armazena as fun��es dos frames - Frames functions
|
||||
_detalhes.gump = _G ["DetailsFramework"]
|
||||
function _detalhes:GetFramework()
|
||||
return self.gump
|
||||
end
|
||||
GameCooltip = GameCooltip2
|
||||
--> anima��es dos icones
|
||||
--anima��es dos icones
|
||||
_detalhes.icon_animations = {
|
||||
load = {
|
||||
in_use = {},
|
||||
@@ -383,58 +383,58 @@ do
|
||||
return "orange"
|
||||
end
|
||||
|
||||
--> armazena as fun��es para inicializa��o dos dados - Metatable functions
|
||||
--armazena as fun��es para inicializa��o dos dados - Metatable functions
|
||||
_detalhes.refresh = {}
|
||||
--> armazena as fun��es para limpar e guardas os dados - Metatable functions
|
||||
--armazena as fun��es para limpar e guardas os dados - Metatable functions
|
||||
_detalhes.clear = {}
|
||||
--> armazena a config do painel de fast switch
|
||||
--armazena a config do painel de fast switch
|
||||
_detalhes.switch = {}
|
||||
--> armazena os estilos salvos
|
||||
--armazena os estilos salvos
|
||||
_detalhes.savedStyles = {}
|
||||
--> armazena quais atributos possue janela de atributos - contain attributes and sub attributos wich have a detailed window (left click on a row)
|
||||
--armazena quais atributos possue janela de atributos - contain attributes and sub attributos wich have a detailed window (left click on a row)
|
||||
_detalhes.row_singleclick_overwrite = {}
|
||||
--> report
|
||||
--report
|
||||
_detalhes.ReportOptions = {}
|
||||
--> armazena os buffs registrados - store buffs ids and functions
|
||||
_detalhes.Buffs = {} --> initialize buff table
|
||||
--> cache de grupo
|
||||
--armazena os buffs registrados - store buffs ids and functions
|
||||
_detalhes.Buffs = {} --initialize buff table
|
||||
-- cache de grupo
|
||||
_detalhes.cache_damage_group = {}
|
||||
_detalhes.cache_healing_group = {}
|
||||
_detalhes.cache_npc_ids = {}
|
||||
--> cache de specs
|
||||
--cache de specs
|
||||
_detalhes.cached_specs = {}
|
||||
_detalhes.cached_talents = {}
|
||||
--> ignored pets
|
||||
--ignored pets
|
||||
_detalhes.pets_ignored = {}
|
||||
_detalhes.pets_no_owner = {}
|
||||
_detalhes.pets_players = {}
|
||||
--> dual candidates
|
||||
--dual candidates
|
||||
_detalhes.duel_candidates = {}
|
||||
--> armazena as skins dispon�veis para as janelas
|
||||
--armazena as skins dispon�veis para as janelas
|
||||
_detalhes.skins = {}
|
||||
--> armazena os hooks das fun��es do parser
|
||||
--armazena os hooks das fun��es do parser
|
||||
_detalhes.hooks = {}
|
||||
--> informa��es sobre a luta do boss atual
|
||||
--informa��es sobre a luta do boss atual
|
||||
_detalhes.encounter_end_table = {}
|
||||
_detalhes.encounter_table = {}
|
||||
_detalhes.encounter_counter = {}
|
||||
_detalhes.encounter_dungeons = {}
|
||||
--> unitId dos inimigos dentro de uma arena
|
||||
--unitId dos inimigos dentro de uma arena
|
||||
_detalhes.arena_enemies = {}
|
||||
--> reliable char data sources
|
||||
--> actors that are using details! and sent character data, we don't need query inspect on these actors
|
||||
--reliable char data sources
|
||||
--actors that are using details! and sent character data, we don't need query inspect on these actors
|
||||
_detalhes.trusted_characters = {}
|
||||
--> informa��es sobre a arena atual
|
||||
--informa��es sobre a arena atual
|
||||
_detalhes.arena_table = {}
|
||||
_detalhes.arena_info = {
|
||||
--> need to get the new mapID for 8.0.1
|
||||
--need to get the new mapID for 8.0.1
|
||||
[562] = {file = "LoadScreenBladesEdgeArena", coords = {0, 1, 0.29296875, 0.9375}}, -- Circle of Blood Arena
|
||||
[617] = {file = "LoadScreenDalaranSewersArena", coords = {0, 1, 0.29296875, 0.857421875}}, --Dalaran Arena
|
||||
[559] = {file = "LoadScreenNagrandArenaBattlegrounds", coords = {0, 1, 0.341796875, 1}}, --Ring of Trials
|
||||
[980] = {file = "LoadScreenTolvirArena", coords = {0, 1, 0.29296875, 0.857421875}}, --Tol'Viron Arena
|
||||
[572] = {file = "LoadScreenRuinsofLordaeronBattlegrounds", coords = {0, 1, 0.341796875, 1}}, --Ruins of Lordaeron
|
||||
[1134] = {file = "LoadingScreen_Shadowpan_bg", coords = {0, 1, 0.29296875, 0.857421875}}, -- Tiger's Peak
|
||||
--> legion, thanks @pas06 on curse forge for the mapIds
|
||||
--legion, thanks @pas06 on curse forge for the mapIds
|
||||
[1552] = {file = "LoadingScreen_ArenaValSharah_wide", coords = {0, 1, 0.29296875, 0.857421875}}, -- Ashmane's Fall
|
||||
[1504] = {file = "LoadingScreen_BlackrookHoldArena_wide", coords = {0, 1, 0.29296875, 0.857421875}}, --Black Rook Hold
|
||||
|
||||
@@ -448,7 +448,7 @@ do
|
||||
end
|
||||
end
|
||||
_detalhes.battleground_info = {
|
||||
--> need to get the nwee mapID for 8.0.1
|
||||
--need to get the nwee mapID for 8.0.1
|
||||
[489] = {file = "LoadScreenWarsongGulch", coords = {0, 1, 121/512, 484/512}}, --warsong gulch
|
||||
[727] = {file = "LoadScreenSilvershardMines", coords = {0, 1, 251/1024, 840/1024}}, --silvershard mines
|
||||
[529] = {file = "LoadscreenArathiBasin", coords = {0, 1, 126/512, 430/512}}, --arathi basin
|
||||
@@ -469,7 +469,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--> tokenid
|
||||
--tokenid
|
||||
_detalhes.TokenID = {
|
||||
["SPELL_PERIODIC_DAMAGE"] = 1,
|
||||
["SPELL_EXTRA_ATTACKS"] = 2,
|
||||
@@ -507,11 +507,11 @@ do
|
||||
["UNIT_DESTROYED"] = 34,
|
||||
}
|
||||
|
||||
--> armazena instancias inativas
|
||||
--armazena instancias inativas
|
||||
_detalhes.unused_instances = {}
|
||||
_detalhes.default_skin_to_use = "Minimalistic"
|
||||
_detalhes.instance_title_text_timer = {}
|
||||
--> player detail skin
|
||||
--player detail skin
|
||||
_detalhes.playerdetailwindow_skins = {}
|
||||
|
||||
_detalhes.BitfieldSwapDebuffsIDs = {265646, 272407, 269691, 273401, 269131, 260900, 260926, 284995, 292826, 311367, 310567, 308996, 307832, 327414, 337253,
|
||||
@@ -520,7 +520,7 @@ do
|
||||
[360418] = true
|
||||
}
|
||||
|
||||
--> auto run code
|
||||
--auto run code
|
||||
_detalhes.RunCodeTypes = {
|
||||
{Name = "On Initialization", Desc = "Run code when Details! initialize or when a profile is changed.", Value = 1, ProfileKey = "on_init"},
|
||||
{Name = "On Zone Changed", Desc = "Run code when the zone where the player is in has changed (e.g. entered in a raid).", Value = 2, ProfileKey = "on_zonechanged"},
|
||||
@@ -542,7 +542,7 @@ do
|
||||
return true
|
||||
end
|
||||
|
||||
--> tooltip
|
||||
--tooltip
|
||||
_detalhes.tooltip_backdrop = {
|
||||
bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
|
||||
edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]],
|
||||
@@ -555,21 +555,21 @@ do
|
||||
_detalhes.tooltip_spell_icon = {file = [[Interface\CHARACTERFRAME\UI-StateIcon]], coords = {36/64, 58/64, 7/64, 26/64}}
|
||||
_detalhes.tooltip_target_icon = {file = [[Interface\Addons\Details\images\icons]], coords = {0, 0.03125, 0.126953125, 0.15625}}
|
||||
|
||||
--> icons
|
||||
--icons
|
||||
_detalhes.attribute_icons = [[Interface\AddOns\Details\images\atributos_icones]]
|
||||
function _detalhes:GetAttributeIcon (attribute)
|
||||
return _detalhes.attribute_icons, 0.125 * (attribute - 1), 0.125 * attribute, 0, 1
|
||||
end
|
||||
|
||||
--> colors
|
||||
--colors
|
||||
_detalhes.default_backdropcolor = {.094117, .094117, .094117, .8}
|
||||
_detalhes.default_backdropbordercolor = {0, 0, 0, 1}
|
||||
|
||||
--> Plugins
|
||||
--Plugins
|
||||
|
||||
--> plugin templates
|
||||
--plugin templates
|
||||
|
||||
_detalhes.gump:NewColor ("DETAILS_PLUGIN_BUTTONTEXT_COLOR", 0.9999, 0.8196, 0, 1)
|
||||
_detalhes.gump:NewColor("DETAILS_PLUGIN_BUTTONTEXT_COLOR", 0.9999, 0.8196, 0, 1)
|
||||
|
||||
_detalhes.gump:InstallTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE",
|
||||
{
|
||||
@@ -631,52 +631,52 @@ do
|
||||
_detalhes.PluginsGlobalNames = {}
|
||||
_detalhes.PluginsLocalizedNames = {}
|
||||
|
||||
--> raid -------------------------------------------------------------------
|
||||
--> general function for raid mode plugins
|
||||
--raid -------------------------------------------------------------------
|
||||
--general function for raid mode plugins
|
||||
_detalhes.RaidTables = {}
|
||||
--> menu for raid modes
|
||||
--menu for raid modes
|
||||
_detalhes.RaidTables.Menu = {}
|
||||
--> plugin objects for raid mode
|
||||
--plugin objects for raid mode
|
||||
_detalhes.RaidTables.Plugins = {}
|
||||
--> name to plugin object
|
||||
--name to plugin object
|
||||
_detalhes.RaidTables.NameTable = {}
|
||||
--> using by
|
||||
--using by
|
||||
_detalhes.RaidTables.InstancesInUse = {}
|
||||
_detalhes.RaidTables.PluginsInUse = {}
|
||||
|
||||
--> solo -------------------------------------------------------------------
|
||||
--> general functions for solo mode plugins
|
||||
--solo -------------------------------------------------------------------
|
||||
--general functions for solo mode plugins
|
||||
_detalhes.SoloTables = {}
|
||||
--> maintain plugin menu
|
||||
--maintain plugin menu
|
||||
_detalhes.SoloTables.Menu = {}
|
||||
--> plugins objects for solo mode
|
||||
--plugins objects for solo mode
|
||||
_detalhes.SoloTables.Plugins = {}
|
||||
--> name to plugin object
|
||||
--name to plugin object
|
||||
_detalhes.SoloTables.NameTable = {}
|
||||
|
||||
--> toolbar -------------------------------------------------------------------
|
||||
--> plugins container
|
||||
--toolbar -------------------------------------------------------------------
|
||||
--plugins container
|
||||
_detalhes.ToolBar = {}
|
||||
--> current showing icons
|
||||
--current showing icons
|
||||
_detalhes.ToolBar.Shown = {}
|
||||
_detalhes.ToolBar.AllButtons = {}
|
||||
--> plugin objects
|
||||
--plugin objects
|
||||
_detalhes.ToolBar.Plugins = {}
|
||||
--> name to plugin object
|
||||
--name to plugin object
|
||||
_detalhes.ToolBar.NameTable = {}
|
||||
_detalhes.ToolBar.Menu = {}
|
||||
|
||||
--> statusbar -------------------------------------------------------------------
|
||||
--> plugins container
|
||||
--statusbar -------------------------------------------------------------------
|
||||
--plugins container
|
||||
_detalhes.StatusBar = {}
|
||||
--> maintain plugin menu
|
||||
--maintain plugin menu
|
||||
_detalhes.StatusBar.Menu = {}
|
||||
--> plugins object
|
||||
--plugins object
|
||||
_detalhes.StatusBar.Plugins = {}
|
||||
--> name to plugin object
|
||||
--name to plugin object
|
||||
_detalhes.StatusBar.NameTable = {}
|
||||
|
||||
--> constants
|
||||
--constants
|
||||
if(DetailsFramework.IsWotLKWow()) then
|
||||
--[[global]] DETAILS_HEALTH_POTION_ID = 33447 -- Runic Healing Potion
|
||||
--[[global]] DETAILS_HEALTH_POTION2_ID = 41166 -- Runic Healing Injector
|
||||
@@ -731,25 +731,25 @@ do
|
||||
--[[global]] DETAILS_MODE_ALL = 3
|
||||
|
||||
_detalhes._detalhes_props = {
|
||||
DATA_TYPE_START = 1, --> Something on start
|
||||
DATA_TYPE_END = 2, --> Something on end
|
||||
DATA_TYPE_START = 1, --Something on start
|
||||
DATA_TYPE_END = 2, --Something on end
|
||||
|
||||
MODO_ALONE = 1, --> Solo
|
||||
MODO_GROUP = 2, --> Group
|
||||
MODO_ALL = 3, --> Everything
|
||||
MODO_RAID = 4, --> Raid
|
||||
MODO_ALONE = 1, --Solo
|
||||
MODO_GROUP = 2, --Group
|
||||
MODO_ALL = 3, --Everything
|
||||
MODO_RAID = 4, --Raid
|
||||
}
|
||||
_detalhes.modos = {
|
||||
alone = 1, --> Solo
|
||||
group = 2, --> Group
|
||||
all = 3, --> Everything
|
||||
raid = 4 --> Raid
|
||||
alone = 1, --Solo
|
||||
group = 2, --Group
|
||||
all = 3, --Everything
|
||||
raid = 4 --Raid
|
||||
}
|
||||
|
||||
_detalhes.divisores = {
|
||||
abre = "(", --> open
|
||||
fecha = ")", --> close
|
||||
colocacao = ". " --> dot
|
||||
abre = "(", --open
|
||||
fecha = ")", --close
|
||||
colocacao = ". " --dot
|
||||
}
|
||||
|
||||
_detalhes.role_texcoord = {
|
||||
@@ -833,7 +833,7 @@ do
|
||||
--[[global]] DETAILS_MODE_ALL = 3
|
||||
|
||||
_detalhes.icones = {
|
||||
--> report window
|
||||
--report window
|
||||
report = {
|
||||
up = "Interface\\FriendsFrame\\UI-Toast-FriendOnlineIcon",
|
||||
down = "Interface\\ItemAnimations\\MINIMAP\\TRACKING\\Profession",
|
||||
@@ -842,7 +842,7 @@ do
|
||||
}
|
||||
}
|
||||
|
||||
_detalhes.missTypes = {"ABSORB", "BLOCK", "DEFLECT", "DODGE", "EVADE", "IMMUNE", "MISS", "PARRY", "REFLECT", "RESIST"} --> do not localize-me
|
||||
_detalhes.missTypes = {"ABSORB", "BLOCK", "DEFLECT", "DODGE", "EVADE", "IMMUNE", "MISS", "PARRY", "REFLECT", "RESIST"} --do not localize-me
|
||||
|
||||
|
||||
function Details.SendHighFive()
|
||||
@@ -856,16 +856,16 @@ do
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> frames
|
||||
--frames
|
||||
|
||||
local _CreateFrame = CreateFrame --api locals
|
||||
local _UIParent = UIParent --api locals
|
||||
|
||||
--> Info Window
|
||||
--Info Window
|
||||
_detalhes.playerDetailWindow = _CreateFrame ("Frame", "DetailsPlayerDetailsWindow", _UIParent, "BackdropTemplate")
|
||||
_detalhes.PlayerDetailsWindow = _detalhes.playerDetailWindow
|
||||
|
||||
--> Event Frame
|
||||
--Event Frame
|
||||
_detalhes.listener = _CreateFrame ("Frame", nil, _UIParent)
|
||||
_detalhes.listener:RegisterEvent ("ADDON_LOADED")
|
||||
_detalhes.listener:SetFrameStrata ("LOW")
|
||||
@@ -875,13 +875,13 @@ do
|
||||
_detalhes.overlay_frame = _CreateFrame ("Frame", nil, _UIParent)
|
||||
_detalhes.overlay_frame:SetFrameStrata ("TOOLTIP")
|
||||
|
||||
--> Pet Owner Finder
|
||||
--Pet Owner Finder
|
||||
_CreateFrame ("GameTooltip", "DetailsPetOwnerFinder", nil, "GameTooltipTemplate")
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> plugin defaults
|
||||
--> backdrop
|
||||
--plugin defaults
|
||||
--backdrop
|
||||
_detalhes.PluginDefaults = {}
|
||||
|
||||
_detalhes.PluginDefaults.Backdrop = {bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16,
|
||||
@@ -896,19 +896,19 @@ do
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
--> welcome panel
|
||||
-- welcome panel
|
||||
function _detalhes:CreateWelcomePanel (name, parent, width, height, make_movable)
|
||||
local f = CreateFrame ("frame", name, parent or UIParent, "BackdropTemplate")
|
||||
local f = CreateFrame("frame", name, parent or UIParent, "BackdropTemplate")
|
||||
|
||||
--f:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 128, insets = {left=3, right=3, top=3, bottom=3}, edgeFile = [[Interface\AddOns\Details\images\border_welcome]], edgeSize = 16})
|
||||
f:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 128, insets = {left=0, right=0, top=0, bottom=0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
f:SetBackdropColor (1, 1, 1, 0.75)
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
--f:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 128, insets = {left=3, right=3, top=3, bottom=3}, edgeFile = [[Interface\AddOns\Details\images\border_welcome]], edgeSize = 16})
|
||||
f:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 128, insets = {left=0, right=0, top=0, bottom=0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
f:SetBackdropColor(1, 1, 1, 0.75)
|
||||
f:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
f:SetSize(width or 1, height or 1)
|
||||
|
||||
if (make_movable) then
|
||||
f:SetScript ("OnMouseDown", function(self, button)
|
||||
f:SetScript("OnMouseDown", function(self, button)
|
||||
if (self.isMoving) then
|
||||
return
|
||||
end
|
||||
@@ -919,7 +919,7 @@ do
|
||||
self.isMoving = true
|
||||
end
|
||||
end)
|
||||
f:SetScript ("OnMouseUp", function(self, button)
|
||||
f:SetScript("OnMouseUp", function(self, button)
|
||||
if (self.isMoving and button == "LeftButton") then
|
||||
self:StopMovingOrSizing()
|
||||
self.isMoving = nil
|
||||
@@ -933,12 +933,12 @@ do
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> functions
|
||||
--functions
|
||||
|
||||
_detalhes.empty_function = function() end
|
||||
_detalhes.empty_table = {}
|
||||
|
||||
--> register textures and fonts for shared media
|
||||
--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]])
|
||||
@@ -984,9 +984,9 @@ do
|
||||
|
||||
|
||||
|
||||
--> dump table contents over chat panel
|
||||
--dump table contents over chat panel
|
||||
function Details.VarDump(t)
|
||||
if (type (t) ~= "table") then
|
||||
if (type(t) ~= "table") then
|
||||
return
|
||||
end
|
||||
for a,b in pairs (t) do
|
||||
@@ -998,7 +998,7 @@ do
|
||||
return Details:Dump(value)
|
||||
end
|
||||
|
||||
--> copies a full table
|
||||
--copies a full table
|
||||
function Details.CopyTable(orig)
|
||||
local orig_type = type(orig)
|
||||
local copy
|
||||
@@ -1014,31 +1014,31 @@ do
|
||||
return copy
|
||||
end
|
||||
|
||||
--> delay messages
|
||||
--delay messages
|
||||
function _detalhes:DelayMsg (msg)
|
||||
_detalhes.delaymsgs = _detalhes.delaymsgs or {}
|
||||
_detalhes.delaymsgs [#_detalhes.delaymsgs+1] = msg
|
||||
end
|
||||
function _detalhes:ShowDelayMsg()
|
||||
if (_detalhes.delaymsgs and #_detalhes.delaymsgs > 0) then
|
||||
for _, msg in ipairs (_detalhes.delaymsgs) do
|
||||
for _, msg in ipairs(_detalhes.delaymsgs) do
|
||||
print (msg)
|
||||
end
|
||||
end
|
||||
_detalhes.delaymsgs = {}
|
||||
end
|
||||
|
||||
--> print messages
|
||||
--print messages
|
||||
function _detalhes:Msg (_string, arg1, arg2, arg3, arg4)
|
||||
if (self.__name) then
|
||||
--> yes, we have a name!
|
||||
--yes, we have a name!
|
||||
print ("|cffffaeae" .. self.__name .. "|r |cffcc7c7c(plugin)|r: " .. (_string or ""), arg1 or "", arg2 or "", arg3 or "", arg4 or "")
|
||||
else
|
||||
print (Loc ["STRING_DETAILS1"] .. (_string or ""), arg1 or "", arg2 or "", arg3 or "", arg4 or "")
|
||||
end
|
||||
end
|
||||
|
||||
--> welcome
|
||||
--welcome
|
||||
function _detalhes:WelcomeMsgLogon()
|
||||
_detalhes:Msg ("you can always reset the addon running the command |cFFFFFF00'/details reinstall'|r if it does fail to load after being updated.")
|
||||
|
||||
@@ -1060,8 +1060,8 @@ do
|
||||
|
||||
Details.failed_to_load = C_Timer.NewTimer(1, function() Details.Schedules.NewTimer(20, _detalhes.WelcomeMsgLogon) end)
|
||||
|
||||
--> key binds
|
||||
--> header
|
||||
--key binds
|
||||
--header
|
||||
_G ["BINDING_HEADER_Details"] = "Details!"
|
||||
_G ["BINDING_HEADER_DETAILS_KEYBIND_SEGMENTCONTROL"] = Loc ["STRING_KEYBIND_SEGMENTCONTROL"]
|
||||
_G ["BINDING_HEADER_DETAILS_KEYBIND_SCROLLING"] = Loc ["STRING_KEYBIND_SCROLLING"]
|
||||
@@ -1069,7 +1069,7 @@ do
|
||||
_G ["BINDING_HEADER_DETAILS_KEYBIND_BOOKMARK"] = Loc ["STRING_KEYBIND_BOOKMARK"]
|
||||
_G ["BINDING_HEADER_DETAILS_KEYBIND_REPORT"] = Loc ["STRING_KEYBIND_WINDOW_REPORT_HEADER"]
|
||||
|
||||
--> keys
|
||||
--keys
|
||||
|
||||
_G ["BINDING_NAME_DETAILS_TOGGLE_ALL"] = Loc ["STRING_KEYBIND_TOGGLE_WINDOWS"]
|
||||
|
||||
|
||||
+85
-85
@@ -7,7 +7,7 @@
|
||||
--[[global]] DETAILS_TOTALS_ONLYGROUP = true
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
|
||||
local _setmetatable = setmetatable -- lua local
|
||||
local _ipairs = ipairs -- lua local
|
||||
@@ -21,7 +21,7 @@
|
||||
local _GetTime = GetTime
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
--constants
|
||||
|
||||
local combate = _detalhes.combate
|
||||
local container_combatentes = _detalhes.container_combatentes
|
||||
@@ -37,7 +37,7 @@
|
||||
local _tempo = _GetTime()
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> api functions
|
||||
--api functions
|
||||
|
||||
--combat (container type, actor name)
|
||||
_detalhes.call_combate = function(self, class_type, name)
|
||||
@@ -202,7 +202,7 @@
|
||||
--[[global]] DETAILS_SEGMENTTYPE_PVP_BATTLEGROUND = 21
|
||||
|
||||
function combate:GetCombatType()
|
||||
--> mythic dungeon
|
||||
--mythic dungeon
|
||||
local isMythicDungeon = is_mythic_dungeon_segment
|
||||
if (isMythicDungeon) then
|
||||
local isMythicDungeonTrash = self.is_mythic_dungeon_trash
|
||||
@@ -226,19 +226,19 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> arena
|
||||
--arena
|
||||
local arenaInfo = self.is_arena
|
||||
if (arenaInfo) then
|
||||
return DETAILS_SEGMENTTYPE_PVP_ARENA
|
||||
end
|
||||
|
||||
--> battleground
|
||||
--battleground
|
||||
local battlegroundInfo = self.is_pvp
|
||||
if (battlegroundInfo) then
|
||||
return DETAILS_SEGMENTTYPE_PVP_BATTLEGROUND
|
||||
end
|
||||
|
||||
--> dungeon or raid
|
||||
--dungeon or raid
|
||||
local instanceType = self.instance_type
|
||||
|
||||
if (instanceType == "party") then
|
||||
@@ -258,7 +258,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> overall data
|
||||
--overall data
|
||||
if (self == _detalhes.tabela_overall) then
|
||||
return DETAILS_SEGMENTTYPE_OVERALL
|
||||
end
|
||||
@@ -282,7 +282,7 @@
|
||||
--return the combat time in seconds
|
||||
function combate:GetFormatedCombatTime()
|
||||
local time = self:GetCombatTime()
|
||||
local m, s = _math_floor (time/60), _math_floor (time%60)
|
||||
local m, s = _math_floor(time/60), _math_floor(time%60)
|
||||
return m, s
|
||||
end
|
||||
|
||||
@@ -322,7 +322,7 @@
|
||||
end
|
||||
|
||||
elseif (attribute == 3) then
|
||||
if (subAttribute == 5) then --> resources
|
||||
if (subAttribute == 5) then --resources
|
||||
return self.totals.resources or 0
|
||||
end
|
||||
if (onlyGroup) then
|
||||
@@ -435,7 +435,7 @@
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internals
|
||||
--internals
|
||||
|
||||
function combate:CreateNewCombatTable()
|
||||
return combate:NovaTabela()
|
||||
@@ -446,72 +446,72 @@
|
||||
|
||||
local esta_tabela = {true, true, true, true, true}
|
||||
|
||||
esta_tabela [1] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_DAMAGE_CLASS, esta_tabela, combatId) --> Damage
|
||||
esta_tabela [2] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_HEAL_CLASS, esta_tabela, combatId) --> Healing
|
||||
esta_tabela [3] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_ENERGY_CLASS, esta_tabela, combatId) --> Energies
|
||||
esta_tabela [4] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS, esta_tabela, combatId) --> Misc
|
||||
esta_tabela [5] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_DAMAGE_CLASS, esta_tabela, combatId) --> place holder for customs
|
||||
esta_tabela [1] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_DAMAGE_CLASS, esta_tabela, combatId) --Damage
|
||||
esta_tabela [2] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_HEAL_CLASS, esta_tabela, combatId) --Healing
|
||||
esta_tabela [3] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_ENERGY_CLASS, esta_tabela, combatId) --Energies
|
||||
esta_tabela [4] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS, esta_tabela, combatId) --Misc
|
||||
esta_tabela [5] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_DAMAGE_CLASS, esta_tabela, combatId) --place holder for customs
|
||||
|
||||
_setmetatable (esta_tabela, combate)
|
||||
|
||||
_detalhes.combat_counter = _detalhes.combat_counter + 1
|
||||
esta_tabela.combat_counter = _detalhes.combat_counter
|
||||
|
||||
--> try discover if is a pvp combat
|
||||
--try discover if is a pvp combat
|
||||
local who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags = ...
|
||||
if (who_serial) then --> aqui ir� identificar o boss ou o oponente
|
||||
if (alvo_name and _bit_band (alvo_flags, REACTION_HOSTILE) ~= 0) then --> tentando pegar o inimigo pelo alvo
|
||||
if (who_serial) then --aqui ir� identificar o boss ou o oponente
|
||||
if (alvo_name and _bit_band (alvo_flags, REACTION_HOSTILE) ~= 0) then --tentando pegar o inimigo pelo alvo
|
||||
esta_tabela.contra = alvo_name
|
||||
if (_bit_band (alvo_flags, CONTROL_PLAYER) ~= 0) then
|
||||
esta_tabela.pvp = true --> o alvo � da fac��o oposta ou foi dado mind control
|
||||
esta_tabela.pvp = true --o alvo � da fac��o oposta ou foi dado mind control
|
||||
end
|
||||
elseif (who_name and _bit_band (who_flags, REACTION_HOSTILE) ~= 0) then --> tentando pegar o inimigo pelo who caso o mob � quem deu o primeiro hit
|
||||
elseif (who_name and _bit_band (who_flags, REACTION_HOSTILE) ~= 0) then --tentando pegar o inimigo pelo who caso o mob � quem deu o primeiro hit
|
||||
esta_tabela.contra = who_name
|
||||
if (_bit_band (who_flags, CONTROL_PLAYER) ~= 0) then
|
||||
esta_tabela.pvp = true --> o who � da fac��o oposta ou foi dado mind control
|
||||
esta_tabela.pvp = true --o who � da fac��o oposta ou foi dado mind control
|
||||
end
|
||||
else
|
||||
esta_tabela.pvp = true --> se ambos s�o friendly, seria isso um PVP entre jogadores da mesma fac��o?
|
||||
esta_tabela.pvp = true --se ambos s�o friendly, seria isso um PVP entre jogadores da mesma fac��o?
|
||||
end
|
||||
end
|
||||
|
||||
--> start/end time (duration)
|
||||
--start/end time (duration)
|
||||
esta_tabela.data_fim = 0
|
||||
esta_tabela.data_inicio = 0
|
||||
esta_tabela.tempo_start = _tempo
|
||||
|
||||
--> record deaths
|
||||
--record deaths
|
||||
esta_tabela.last_events_tables = {}
|
||||
|
||||
--> last events from players
|
||||
--last events from players
|
||||
esta_tabela.player_last_events = {}
|
||||
|
||||
--> players in the raid
|
||||
--players in the raid
|
||||
esta_tabela.raid_roster = {}
|
||||
esta_tabela.raid_roster_indexed = {}
|
||||
|
||||
--> frags
|
||||
--frags
|
||||
esta_tabela.frags = {}
|
||||
esta_tabela.frags_need_refresh = false
|
||||
|
||||
--> alternate power
|
||||
--alternate power
|
||||
esta_tabela.alternate_power = {}
|
||||
|
||||
--> time data container
|
||||
--time data container
|
||||
esta_tabela.TimeData = _detalhes:TimeDataCreateCombatTables()
|
||||
esta_tabela.PhaseData = {{1, 1}, damage = {}, heal = {}, damage_section = {}, heal_section = {}} --[1] phase number [2] phase started
|
||||
|
||||
--> for external plugin usage, these tables are guaranteed to be saved with the combat
|
||||
--for external plugin usage, these tables are guaranteed to be saved with the combat
|
||||
esta_tabela.spells_cast_timeline = {}
|
||||
esta_tabela.aura_timeline = {}
|
||||
esta_tabela.cleu_timeline = {}
|
||||
|
||||
--> cleu events
|
||||
--cleu events
|
||||
esta_tabela.cleu_events = {
|
||||
n = 1 --event counter
|
||||
}
|
||||
|
||||
--> Skill cache (not used)
|
||||
--Skill cache (not used)
|
||||
esta_tabela.CombatSkillCache = {}
|
||||
|
||||
-- a tabela sem o tempo de inicio � a tabela descartavel do inicio do addon
|
||||
@@ -531,7 +531,7 @@
|
||||
esta_tabela[4].need_refresh = true
|
||||
esta_tabela[5].need_refresh = true
|
||||
|
||||
if (_tabela_overall) then --> link � a tabela de combate do overall
|
||||
if (_tabela_overall) then --link � a tabela de combate do overall
|
||||
esta_tabela[1].shadow = _tabela_overall[1]
|
||||
esta_tabela[2].shadow = _tabela_overall[2]
|
||||
esta_tabela[3].shadow = _tabela_overall[3]
|
||||
@@ -539,49 +539,49 @@
|
||||
end
|
||||
|
||||
esta_tabela.totals = {
|
||||
0, --> dano
|
||||
0, --> cura
|
||||
{--> e_energy
|
||||
[0] = 0, --> mana
|
||||
[1] = 0, --> rage
|
||||
[3] = 0, --> energy (rogues cat)
|
||||
[6] = 0, --> runepower (dk)
|
||||
0, --dano
|
||||
0, --cura
|
||||
{--e_energy
|
||||
[0] = 0, --mana
|
||||
[1] = 0, --rage
|
||||
[3] = 0, --energy (rogues cat)
|
||||
[6] = 0, --runepower (dk)
|
||||
alternatepower = 0,
|
||||
},
|
||||
{--> misc
|
||||
cc_break = 0, --> armazena quantas quebras de CC
|
||||
ress = 0, --> armazena quantos pessoas ele reviveu
|
||||
interrupt = 0, --> armazena quantos interrupt a pessoa deu
|
||||
dispell = 0, --> armazena quantos dispell esta pessoa recebeu
|
||||
dead = 0, --> armazena quantas vezes essa pessia morreu
|
||||
cooldowns_defensive = 0, --> armazena quantos cooldowns a raid usou
|
||||
buff_uptime = 0, --> armazena quantos cooldowns a raid usou
|
||||
debuff_uptime = 0 --> armazena quantos cooldowns a raid usou
|
||||
{--misc
|
||||
cc_break = 0, --armazena quantas quebras de CC
|
||||
ress = 0, --armazena quantos pessoas ele reviveu
|
||||
interrupt = 0, --armazena quantos interrupt a pessoa deu
|
||||
dispell = 0, --armazena quantos dispell esta pessoa recebeu
|
||||
dead = 0, --armazena quantas vezes essa pessia morreu
|
||||
cooldowns_defensive = 0, --armazena quantos cooldowns a raid usou
|
||||
buff_uptime = 0, --armazena quantos cooldowns a raid usou
|
||||
debuff_uptime = 0 --armazena quantos cooldowns a raid usou
|
||||
},
|
||||
|
||||
--> avoid using this values bellow, they aren't updated by the parser, only on demand by a user interaction.
|
||||
--avoid using this values bellow, they aren't updated by the parser, only on demand by a user interaction.
|
||||
voidzone_damage = 0,
|
||||
frags_total = 0,
|
||||
--> end
|
||||
--end
|
||||
}
|
||||
|
||||
esta_tabela.totals_grupo = {
|
||||
0, --> dano
|
||||
0, --> cura
|
||||
{--> e_energy
|
||||
[0] = 0, --> mana
|
||||
[1] = 0, --> rage
|
||||
[3] = 0, --> energy (rogues cat)
|
||||
[6] = 0, --> runepower (dk)
|
||||
0, --dano
|
||||
0, --cura
|
||||
{--e_energy
|
||||
[0] = 0, --mana
|
||||
[1] = 0, --rage
|
||||
[3] = 0, --energy (rogues cat)
|
||||
[6] = 0, --runepower (dk)
|
||||
alternatepower = 0,
|
||||
},
|
||||
{--> misc
|
||||
cc_break = 0, --> armazena quantas quebras de CC
|
||||
ress = 0, --> armazena quantos pessoas ele reviveu
|
||||
interrupt = 0, --> armazena quantos interrupt a pessoa deu
|
||||
dispell = 0, --> armazena quantos dispell esta pessoa recebeu
|
||||
dead = 0, --> armazena quantas vezes essa oessia morreu
|
||||
cooldowns_defensive = 0, --> armazena quantos cooldowns a raid usou
|
||||
{--misc
|
||||
cc_break = 0, --armazena quantas quebras de CC
|
||||
ress = 0, --armazena quantos pessoas ele reviveu
|
||||
interrupt = 0, --armazena quantos interrupt a pessoa deu
|
||||
dispell = 0, --armazena quantos dispell esta pessoa recebeu
|
||||
dead = 0, --armazena quantas vezes essa oessia morreu
|
||||
cooldowns_defensive = 0, --armazena quantos cooldowns a raid usou
|
||||
buff_uptime = 0,
|
||||
debuff_uptime = 0
|
||||
}
|
||||
@@ -591,7 +591,7 @@
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> core
|
||||
--core
|
||||
|
||||
function combate:CreateLastEventsTable (player_name)
|
||||
local t = {}
|
||||
@@ -606,7 +606,7 @@
|
||||
--trava o tempo dos jogadores ap�s o t�rmino do combate.
|
||||
function combate:TravarTempos()
|
||||
if (self [1]) then
|
||||
for _, jogador in _ipairs (self [1]._ActorTable) do --> damage
|
||||
for _, jogador in _ipairs(self [1]._ActorTable) do --damage
|
||||
if (jogador:Iniciar()) then -- retorna se ele esta com o dps ativo
|
||||
jogador:TerminarTempo()
|
||||
jogador:Iniciar (false) --trava o dps do jogador
|
||||
@@ -621,7 +621,7 @@
|
||||
end
|
||||
end
|
||||
if (self [2]) then
|
||||
for _, jogador in _ipairs (self [2]._ActorTable) do --> healing
|
||||
for _, jogador in _ipairs(self [2]._ActorTable) do --healing
|
||||
if (jogador:Iniciar()) then -- retorna se ele esta com o dps ativo
|
||||
jogador:TerminarTempo()
|
||||
jogador:Iniciar (false) --trava o dps do jogador
|
||||
@@ -670,50 +670,50 @@
|
||||
return
|
||||
end
|
||||
|
||||
--> sub dano
|
||||
for index, actor_T2 in _ipairs (combate2[1]._ActorTable) do
|
||||
--sub dano
|
||||
for index, actor_T2 in _ipairs(combate2[1]._ActorTable) do
|
||||
local actor_T1 = combate1[1]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
|
||||
actor_T1 = actor_T1 - actor_T2
|
||||
actor_T2:subtract_total (combate1)
|
||||
end
|
||||
combate1 [1].need_refresh = true
|
||||
|
||||
--> sub heal
|
||||
for index, actor_T2 in _ipairs (combate2[2]._ActorTable) do
|
||||
--sub heal
|
||||
for index, actor_T2 in _ipairs(combate2[2]._ActorTable) do
|
||||
local actor_T1 = combate1[2]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
|
||||
actor_T1 = actor_T1 - actor_T2
|
||||
actor_T2:subtract_total (combate1)
|
||||
end
|
||||
combate1 [2].need_refresh = true
|
||||
|
||||
--> sub energy
|
||||
for index, actor_T2 in _ipairs (combate2[3]._ActorTable) do
|
||||
--sub energy
|
||||
for index, actor_T2 in _ipairs(combate2[3]._ActorTable) do
|
||||
local actor_T1 = combate1[3]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
|
||||
actor_T1 = actor_T1 - actor_T2
|
||||
actor_T2:subtract_total (combate1)
|
||||
end
|
||||
combate1 [3].need_refresh = true
|
||||
|
||||
--> sub misc
|
||||
for index, actor_T2 in _ipairs (combate2[4]._ActorTable) do
|
||||
--sub misc
|
||||
for index, actor_T2 in _ipairs(combate2[4]._ActorTable) do
|
||||
local actor_T1 = combate1[4]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
|
||||
actor_T1 = actor_T1 - actor_T2
|
||||
actor_T2:subtract_total (combate1)
|
||||
end
|
||||
combate1 [4].need_refresh = true
|
||||
|
||||
--> reduz o tempo
|
||||
--reduz o tempo
|
||||
combate1.start_time = combate1.start_time + combate2:GetCombatTime()
|
||||
|
||||
--> apaga as mortes da luta diminuida
|
||||
local amt_mortes = #combate2.last_events_tables --> quantas mortes teve nessa luta
|
||||
--apaga as mortes da luta diminuida
|
||||
local amt_mortes = #combate2.last_events_tables --quantas mortes teve nessa luta
|
||||
if (amt_mortes > 0) then
|
||||
for i = #combate1.last_events_tables, #combate1.last_events_tables-amt_mortes, -1 do
|
||||
_table_remove (combate1.last_events_tables, #combate1.last_events_tables)
|
||||
end
|
||||
end
|
||||
|
||||
--> frags
|
||||
--frags
|
||||
for fragName, fragAmount in pairs (combate2.frags) do
|
||||
if (fragAmount) then
|
||||
if (combate1.frags [fragName]) then
|
||||
@@ -725,7 +725,7 @@
|
||||
end
|
||||
combate1.frags_need_refresh = true
|
||||
|
||||
--> alternate power
|
||||
--alternate power
|
||||
local overallPowerTable = combate1.alternate_power
|
||||
for actorName, powerTable in pairs (combate2.alternate_power) do
|
||||
local power = overallPowerTable [actorName]
|
||||
@@ -747,8 +747,8 @@
|
||||
custom_combat = combate1
|
||||
end
|
||||
|
||||
for class_type, actor_container in ipairs (all_containers) do
|
||||
for _, actor in ipairs (actor_container) do
|
||||
for class_type, actor_container in ipairs(all_containers) do
|
||||
for _, actor in ipairs(actor_container) do
|
||||
local shadow
|
||||
|
||||
if (class_type == class_type_dano) then
|
||||
@@ -767,7 +767,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> alternate power
|
||||
--alternate power
|
||||
local overallPowerTable = combate1.alternate_power
|
||||
for actorName, powerTable in pairs (combate2.alternate_power) do
|
||||
local power = overallPowerTable [actorName]
|
||||
|
||||
+150
-150
File diff suppressed because it is too large
Load Diff
+328
-328
File diff suppressed because it is too large
Load Diff
+319
-319
File diff suppressed because it is too large
Load Diff
+389
-389
File diff suppressed because it is too large
Load Diff
+145
-145
@@ -64,7 +64,7 @@ local keyName
|
||||
|
||||
function atributo_energy:NovaTabela (serial, nome, link)
|
||||
|
||||
--> constructor
|
||||
--constructor
|
||||
|
||||
local alphabetical = _detalhes:GetOrderNumber(nome)
|
||||
|
||||
@@ -92,7 +92,7 @@ function atributo_energy:NovaTabela (serial, nome, link)
|
||||
return _new_energyActor
|
||||
end
|
||||
|
||||
--> resources sort
|
||||
--resources sort
|
||||
|
||||
function _detalhes.SortGroupResource (container, keyName2)
|
||||
keyName = keyName2
|
||||
@@ -120,7 +120,7 @@ function _detalhes:ContainerSortResources (container, amount, keyName2)
|
||||
_table_sort (container, _detalhes.SortKeySimpleResources)
|
||||
|
||||
if (amount) then
|
||||
for i = amount, 1, -1 do --> de tr�s pra frente
|
||||
for i = amount, 1, -1 do --de tr�s pra frente
|
||||
if (container[i][keyName] < 1) then
|
||||
amount = amount-1
|
||||
else
|
||||
@@ -132,7 +132,7 @@ function _detalhes:ContainerSortResources (container, amount, keyName2)
|
||||
end
|
||||
end
|
||||
|
||||
--> power types sort
|
||||
--power types sort
|
||||
|
||||
local power_table = {0, 1, 3, 6}
|
||||
local power_type
|
||||
@@ -189,7 +189,7 @@ local sort_alternateenergy_group = function(t1, t2)
|
||||
end
|
||||
end
|
||||
|
||||
--> resource refresh
|
||||
--resource refresh
|
||||
|
||||
local function RefreshBarraResources (tabela, barra, instancia)
|
||||
tabela:AtualizarResources (tabela.minha_barra, barra.colocacao, instancia)
|
||||
@@ -214,7 +214,7 @@ function atributo_energy:AtualizarResources (whichRowLine, colocacao, instancia)
|
||||
local total = instancia.showing.totals.resources
|
||||
|
||||
local combat_time = instancia.showing:GetCombatTime()
|
||||
local rps = _math_floor (self.resource / combat_time)
|
||||
local rps = _math_floor(self.resource / combat_time)
|
||||
|
||||
local formated_resource = SelectedToKFunction (_, self.resource)
|
||||
local formated_rps = _cstr ("%.2f", self.resource / combat_time)
|
||||
@@ -245,39 +245,39 @@ function atributo_energy:AtualizarResources (whichRowLine, colocacao, instancia)
|
||||
|
||||
local rightText = formated_resource .. bars_brackets[1] .. formated_rps .. " r/s" .. bars_separator .. porcentagem .. bars_brackets[2]
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.lineText4:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_resource, formated_rps, porcentagem, self, instancia.showing, instancia, rightText))
|
||||
esta_barra.lineText4:SetText(_string_replace (instancia.row_info.textR_custom_text, formated_resource, formated_rps, porcentagem, self, instancia.showing, instancia, rightText))
|
||||
else
|
||||
if (instancia.use_multi_fontstrings) then
|
||||
instancia:SetInLineTexts(esta_barra, formated_resource, formated_rps .. " r/s", porcentagem .. "%")
|
||||
else
|
||||
esta_barra.lineText4:SetText (rightText)
|
||||
esta_barra.lineText4:SetText(rightText)
|
||||
end
|
||||
end
|
||||
|
||||
esta_barra.lineText1:SetText (colocacao .. ". " .. self.nome)
|
||||
esta_barra.lineText1:SetSize (esta_barra:GetWidth() - esta_barra.lineText4:GetStringWidth() - 20, 15)
|
||||
esta_barra.lineText1:SetText(colocacao .. ". " .. self.nome)
|
||||
esta_barra.lineText1:SetSize(esta_barra:GetWidth() - esta_barra.lineText4:GetStringWidth() - 20, 15)
|
||||
|
||||
esta_barra:SetValue (100)
|
||||
esta_barra:SetValue(100)
|
||||
|
||||
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
|
||||
Details.FadeHandler.Fader (esta_barra, "out")
|
||||
Details.FadeHandler.Fader(esta_barra, "out")
|
||||
end
|
||||
|
||||
--> texture color
|
||||
--texture color
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
|
||||
self:SetBarColors (esta_barra, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
|
||||
--> icon
|
||||
--icon
|
||||
self:SetClassIcon (esta_barra.icone_classe, instancia, self.classe)
|
||||
|
||||
end
|
||||
|
||||
--> refresh function
|
||||
--refresh function
|
||||
|
||||
function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, exportar)
|
||||
|
||||
local showing = tabela_do_combate [class_type]
|
||||
|
||||
if (#showing._ActorTable < 1) then --> n�o h� barras para mostrar
|
||||
if (#showing._ActorTable < 1) then --n�o h� barras para mostrar
|
||||
return _detalhes:EsconderBarrasNaoUsadas (instancia, showing), "", 0, 0
|
||||
end
|
||||
|
||||
@@ -290,7 +290,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
local modo = instancia.modo
|
||||
|
||||
if (sub_atributo == 5) then
|
||||
--> showing resources
|
||||
--showing resources
|
||||
|
||||
keyName = "resource"
|
||||
|
||||
@@ -298,7 +298,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
amount = _detalhes:ContainerSortResources (conteudo, amount, "resource")
|
||||
instancia.top = conteudo[1].resource
|
||||
|
||||
for index, player in _ipairs (conteudo) do
|
||||
for index, player in _ipairs(conteudo) do
|
||||
if (player.resource >= 1) then
|
||||
total = total + player.resource
|
||||
else
|
||||
@@ -309,9 +309,9 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
elseif (modo == modo_GROUP) then
|
||||
_table_sort (conteudo, _detalhes.SortKeyGroupResources)
|
||||
|
||||
for index, player in _ipairs (conteudo) do
|
||||
if (player.grupo) then --> � um player e esta em grupo
|
||||
if (player.resource < 1) then --> dano menor que 1, interromper o loop
|
||||
for index, player in _ipairs(conteudo) do
|
||||
if (player.grupo) then --� um player e esta em grupo
|
||||
if (player.resource < 1) then --dano menor que 1, interromper o loop
|
||||
amount = index - 1
|
||||
break
|
||||
end
|
||||
@@ -349,11 +349,11 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
whichRowLine = whichRowLine+1
|
||||
end
|
||||
|
||||
--> beta, hidar barras n�o usadas durante um refresh for�ado
|
||||
--beta, hidar barras n�o usadas durante um refresh for�ado
|
||||
if (forcar) then
|
||||
if (instancia.modo == 2) then --> group
|
||||
if (instancia.modo == 2) then --group
|
||||
for i = whichRowLine, instancia.rows_fit_in_window do
|
||||
Details.FadeHandler.Fader (instancia.barras [i], "in", Details.fade_speed)
|
||||
Details.FadeHandler.Fader(instancia.barras [i], "in", Details.fade_speed)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -371,7 +371,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
end
|
||||
|
||||
if (exportar) then
|
||||
if (_type (exportar) == "boolean") then
|
||||
if (_type(exportar) == "boolean") then
|
||||
--keyName = "received"
|
||||
else
|
||||
keyName = exportar.key
|
||||
@@ -416,7 +416,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
_table_sort (conteudo, sort_alternateenergy_group)
|
||||
|
||||
for index, player in _ipairs (conteudo) do
|
||||
for index, player in _ipairs(conteudo) do
|
||||
if (player.grupo) then
|
||||
if (player.alternatepower < 1) then
|
||||
amount = index - 1
|
||||
@@ -435,7 +435,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
_table_sort (conteudo, sort_energy_group)
|
||||
|
||||
for index, player in _ipairs (conteudo) do
|
||||
for index, player in _ipairs(conteudo) do
|
||||
if (player.grupo) then
|
||||
if (player.received < 1) then
|
||||
amount = index - 1
|
||||
@@ -461,9 +461,9 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
return total, keyName, instancia.top, amount
|
||||
end
|
||||
|
||||
if (amount < 1) then --> n�o h� barras para mostrar
|
||||
if (amount < 1) then --n�o h� barras para mostrar
|
||||
instancia:EsconderScrollBar()
|
||||
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh
|
||||
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --retorna a tabela que precisa ganhar o refresh
|
||||
end
|
||||
|
||||
instancia:RefreshScrollBar (amount)
|
||||
@@ -488,7 +488,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
if (following) then
|
||||
if (using_cache) then
|
||||
local pname = _detalhes.playername
|
||||
for i, actor in _ipairs (conteudo) do
|
||||
for i, actor in _ipairs(conteudo) do
|
||||
if (actor.nome == pname) then
|
||||
myPos = i
|
||||
break
|
||||
@@ -524,49 +524,49 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
local row1 = barras_container [1]
|
||||
row1.minha_tabela = nil
|
||||
row1.lineText1:SetText (Loc ["STRING_TOTAL"])
|
||||
row1.lineText1:SetText(Loc ["STRING_TOTAL"])
|
||||
if (instancia.use_multi_fontstrings) then
|
||||
instancia:SetInLineTexts(row1, "", _detalhes:ToK2 (total, _detalhes:ToK (total / combat_time)))
|
||||
else
|
||||
row1.lineText4:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
row1.lineText4:SetText(_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
end
|
||||
|
||||
row1:SetValue (100)
|
||||
row1:SetValue(100)
|
||||
local r, g, b = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, g, b)
|
||||
|
||||
row1.icone_classe:SetTexture (instancia.total_bar.icon)
|
||||
row1.icone_classe:SetTexture(instancia.total_bar.icon)
|
||||
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
|
||||
|
||||
Details.FadeHandler.Fader (row1, "out")
|
||||
Details.FadeHandler.Fader(row1, "out")
|
||||
|
||||
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
|
||||
for i = instancia.barraS[1], iter_last-1, 1 do --> vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> inst�ncia, index, total, valor da 1� barra
|
||||
for i = instancia.barraS[1], iter_last-1, 1 do --vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra
|
||||
whichRowLine = whichRowLine+1
|
||||
end
|
||||
|
||||
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> inst�ncia, index, total, valor da 1� barra
|
||||
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra
|
||||
whichRowLine = whichRowLine+1
|
||||
else
|
||||
for i = instancia.barraS[1], iter_last, 1 do --> vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> inst�ncia, index, total, valor da 1� barra
|
||||
for i = instancia.barraS[1], iter_last, 1 do --vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra
|
||||
whichRowLine = whichRowLine+1
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
|
||||
for i = instancia.barraS[1], instancia.barraS[2]-1, 1 do --> vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> inst�ncia, index, total, valor da 1� barra
|
||||
for i = instancia.barraS[1], instancia.barraS[2]-1, 1 do --vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra
|
||||
whichRowLine = whichRowLine+1
|
||||
end
|
||||
|
||||
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> inst�ncia, index, total, valor da 1� barra
|
||||
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra
|
||||
whichRowLine = whichRowLine+1
|
||||
else
|
||||
for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> inst�ncia, index, total, valor da 1� barra
|
||||
for i = instancia.barraS[1], instancia.barraS[2], 1 do --vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra
|
||||
whichRowLine = whichRowLine+1
|
||||
end
|
||||
end
|
||||
@@ -584,47 +584,47 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
local row1 = barras_container [1]
|
||||
row1.minha_tabela = nil
|
||||
row1.lineText1:SetText (Loc ["STRING_TOTAL"])
|
||||
row1.lineText1:SetText(Loc ["STRING_TOTAL"])
|
||||
|
||||
if (instancia.use_multi_fontstrings) then
|
||||
instancia:SetInLineTexts(row1, "", _detalhes:ToK2 (total), _detalhes:ToK (total / combat_time))
|
||||
else
|
||||
row1.lineText4:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
row1.lineText4:SetText(_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
end
|
||||
|
||||
row1:SetValue (100)
|
||||
row1:SetValue(100)
|
||||
local r, g, b = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, g, b)
|
||||
|
||||
row1.icone_classe:SetTexture (instancia.total_bar.icon)
|
||||
row1.icone_classe:SetTexture(instancia.total_bar.icon)
|
||||
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
|
||||
|
||||
Details.FadeHandler.Fader (row1, "out")
|
||||
Details.FadeHandler.Fader(row1, "out")
|
||||
|
||||
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
|
||||
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> inst�ncia, index, total, valor da 1� barra
|
||||
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra
|
||||
whichRowLine = whichRowLine+1
|
||||
for i = iter_last-1, instancia.barraS[1], -1 do --> vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> inst�ncia, index, total, valor da 1� barra
|
||||
for i = iter_last-1, instancia.barraS[1], -1 do --vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra
|
||||
whichRowLine = whichRowLine+1
|
||||
end
|
||||
else
|
||||
for i = iter_last, instancia.barraS[1], -1 do --> vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> inst�ncia, index, total, valor da 1� barra
|
||||
for i = iter_last, instancia.barraS[1], -1 do --vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra
|
||||
whichRowLine = whichRowLine+1
|
||||
end
|
||||
end
|
||||
else
|
||||
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
|
||||
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> inst�ncia, index, total, valor da 1� barra
|
||||
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra
|
||||
whichRowLine = whichRowLine+1
|
||||
for i = instancia.barraS[2]-1, instancia.barraS[1], -1 do --> vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> inst�ncia, index, total, valor da 1� barra
|
||||
for i = instancia.barraS[2]-1, instancia.barraS[1], -1 do --vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra
|
||||
whichRowLine = whichRowLine+1
|
||||
end
|
||||
else
|
||||
for i = instancia.barraS[2], instancia.barraS[1], -1 do --> vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> inst�ncia, index, total, valor da 1� barra
|
||||
for i = instancia.barraS[2], instancia.barraS[1], -1 do --vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra
|
||||
whichRowLine = whichRowLine+1
|
||||
end
|
||||
end
|
||||
@@ -637,20 +637,20 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
end
|
||||
|
||||
if (forcar) then
|
||||
if (instancia.modo == 2) then --> group
|
||||
if (instancia.modo == 2) then --group
|
||||
for i = whichRowLine, instancia.rows_fit_in_window do
|
||||
Details.FadeHandler.Fader (instancia.barras [i], "in", Details.fade_speed)
|
||||
Details.FadeHandler.Fader(instancia.barras [i], "in", Details.fade_speed)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh
|
||||
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --retorna a tabela que precisa ganhar o refresh
|
||||
|
||||
end
|
||||
|
||||
function atributo_energy:RefreshLine (instancia, barras_container, whichRowLine, lugar, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
|
||||
local esta_barra = instancia.barras[whichRowLine] --> pega a refer�ncia da barra na janela
|
||||
local esta_barra = instancia.barras[whichRowLine] --pega a refer�ncia da barra na janela
|
||||
|
||||
if (not esta_barra) then
|
||||
print ("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..lugar)
|
||||
@@ -665,7 +665,7 @@ function atributo_energy:RefreshLine (instancia, barras_container, whichRowLine,
|
||||
self.minha_barra = esta_barra
|
||||
self.colocacao = lugar
|
||||
|
||||
local esta_e_energy_total = self [keyName] --> total de dano que este jogador deu
|
||||
local esta_e_energy_total = self [keyName] --total de dano que este jogador deu
|
||||
|
||||
-- local porcentagem = esta_e_energy_total / total * 100
|
||||
local porcentagem
|
||||
@@ -675,7 +675,7 @@ function atributo_energy:RefreshLine (instancia, barras_container, whichRowLine,
|
||||
porcentagem = _cstr ("%.1f", esta_e_energy_total / instancia.top * 100)
|
||||
end
|
||||
|
||||
local esta_porcentagem = _math_floor ((esta_e_energy_total/instancia.top) * 100)
|
||||
local esta_porcentagem = _math_floor((esta_e_energy_total/instancia.top) * 100)
|
||||
|
||||
local formated_energy = SelectedToKFunction (_, esta_e_energy_total)
|
||||
|
||||
@@ -690,16 +690,16 @@ function atributo_energy:RefreshLine (instancia, barras_container, whichRowLine,
|
||||
|
||||
local rightText = formated_energy .. bars_brackets[1] .. porcentagem .. bars_brackets[2]
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.lineText4:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_energy, "", porcentagem, self, instancia.showing, instancia, rightText))
|
||||
esta_barra.lineText4:SetText(_string_replace (instancia.row_info.textR_custom_text, formated_energy, "", porcentagem, self, instancia.showing, instancia, rightText))
|
||||
else
|
||||
if (instancia.use_multi_fontstrings) then
|
||||
instancia:SetInLineTexts(esta_barra, "", formated_energy, porcentagem)
|
||||
else
|
||||
esta_barra.lineText4:SetText (rightText)
|
||||
esta_barra.lineText4:SetText(rightText)
|
||||
end
|
||||
end
|
||||
|
||||
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --> precisa atualizar o tooltip
|
||||
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --precisa atualizar o tooltip
|
||||
gump:UpdateTooltip (whichRowLine, esta_barra, instancia)
|
||||
end
|
||||
|
||||
@@ -710,13 +710,13 @@ end
|
||||
|
||||
function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior, forcar, esta_porcentagem, whichRowLine, barras_container, use_animations)
|
||||
|
||||
--> primeiro colocado
|
||||
--primeiro colocado
|
||||
if (esta_barra.colocacao == 1) then
|
||||
if (not tabela_anterior or tabela_anterior ~= esta_barra.minha_tabela or forcar) then
|
||||
esta_barra:SetValue (100)
|
||||
esta_barra:SetValue(100)
|
||||
|
||||
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
|
||||
Details.FadeHandler.Fader (esta_barra, "out")
|
||||
Details.FadeHandler.Fader(esta_barra, "out")
|
||||
end
|
||||
|
||||
return self:RefreshBarra (esta_barra, instancia)
|
||||
@@ -730,11 +730,11 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
|
||||
if (use_animations) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra:SetValue (esta_porcentagem)
|
||||
esta_barra:SetValue(esta_porcentagem)
|
||||
esta_barra.animacao_ignorar = true
|
||||
end
|
||||
|
||||
Details.FadeHandler.Fader (esta_barra, "out")
|
||||
Details.FadeHandler.Fader(esta_barra, "out")
|
||||
|
||||
if (instancia.row_info.texture_class_colors) then
|
||||
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
|
||||
@@ -746,26 +746,26 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
|
||||
return self:RefreshBarra (esta_barra, instancia)
|
||||
|
||||
else
|
||||
--> agora esta comparando se a tabela da barra � diferente da tabela na atualiza��o anterior
|
||||
if (not tabela_anterior or tabela_anterior ~= esta_barra.minha_tabela or forcar) then --> aqui diz se a barra do jogador mudou de posi��o ou se ela apenas ser� atualizada
|
||||
--agora esta comparando se a tabela da barra � diferente da tabela na atualiza��o anterior
|
||||
if (not tabela_anterior or tabela_anterior ~= esta_barra.minha_tabela or forcar) then --aqui diz se a barra do jogador mudou de posi��o ou se ela apenas ser� atualizada
|
||||
|
||||
if (use_animations) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra:SetValue (esta_porcentagem)
|
||||
esta_barra:SetValue(esta_porcentagem)
|
||||
esta_barra.animacao_ignorar = true
|
||||
end
|
||||
|
||||
esta_barra.last_value = esta_porcentagem --> reseta o ultimo valor da barra
|
||||
esta_barra.last_value = esta_porcentagem --reseta o ultimo valor da barra
|
||||
|
||||
return self:RefreshBarra (esta_barra, instancia)
|
||||
|
||||
elseif (esta_porcentagem ~= esta_barra.last_value) then --> continua mostrando a mesma tabela ent�o compara a porcentagem
|
||||
--> apenas atualizar
|
||||
elseif (esta_porcentagem ~= esta_barra.last_value) then --continua mostrando a mesma tabela ent�o compara a porcentagem
|
||||
--apenas atualizar
|
||||
if (use_animations) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra:SetValue (esta_porcentagem)
|
||||
esta_barra:SetValue(esta_porcentagem)
|
||||
end
|
||||
esta_barra.last_value = esta_porcentagem
|
||||
|
||||
@@ -785,14 +785,14 @@ function atributo_energy:RefreshBarra (esta_barra, instancia, from_resize)
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
|
||||
end
|
||||
|
||||
--> icon
|
||||
--icon
|
||||
self:SetClassIcon (esta_barra.icone_classe, instancia, class)
|
||||
--> texture color
|
||||
--texture color
|
||||
self:SetBarColors (esta_barra, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
|
||||
--> left text
|
||||
--left text
|
||||
self:SetBarLeftText (esta_barra, instancia, enemy, arena_enemy, arena_ally, UsingCustomLeftText)
|
||||
|
||||
esta_barra.lineText1:SetSize (esta_barra:GetWidth() - esta_barra.lineText4:GetStringWidth() - 20, 15)
|
||||
esta_barra.lineText1:SetSize(esta_barra:GetWidth() - esta_barra.lineText4:GetStringWidth() - 20, 15)
|
||||
|
||||
end
|
||||
|
||||
@@ -801,7 +801,7 @@ function atributo_energy:KeyNames (sub_atributo)
|
||||
return "total"
|
||||
end
|
||||
|
||||
---------> TOOLTIPS BIFURCA��O ~tooltip
|
||||
---------TOOLTIPS BIFURCA��O ~tooltip
|
||||
|
||||
local resource_bg_color = {.1, .1, .1, 0.6}
|
||||
local resource_bg_coords = {.6, 0.1, 0, 0.64453125}
|
||||
@@ -826,7 +826,7 @@ function atributo_energy:ToolTip (instancia, numero, barra, keydown)
|
||||
end
|
||||
end
|
||||
|
||||
--> tooltip locals
|
||||
--tooltip locals
|
||||
local r, g, b
|
||||
local barAlha = .6
|
||||
|
||||
@@ -861,10 +861,10 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
|
||||
local total_regenerado = self.received
|
||||
local name = self.nome
|
||||
|
||||
--> spells:
|
||||
--spells:
|
||||
local i = 1
|
||||
|
||||
for index, actor in _ipairs (container._ActorTable) do
|
||||
for index, actor in _ipairs(container._ActorTable) do
|
||||
if (actor.powertype == powertype) then
|
||||
|
||||
for spellid, spell in _pairs (actor.spells._ActorTable) do
|
||||
@@ -930,11 +930,11 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
|
||||
_detalhes:AddTooltipBackgroundStatusbar (false, spell [2] / energy_tooltips_table [1][2] * 100)
|
||||
end
|
||||
|
||||
--> players
|
||||
--players
|
||||
reset_tooltips_table()
|
||||
i = 1
|
||||
|
||||
for index, actor in _ipairs (container._ActorTable) do
|
||||
for index, actor in _ipairs(container._ActorTable) do
|
||||
if (actor.powertype == powertype) then
|
||||
|
||||
local on_self = actor.targets [name]
|
||||
@@ -998,7 +998,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
|
||||
|
||||
end
|
||||
|
||||
--> player generators
|
||||
--player generators
|
||||
local allGeneratorSpells = {}
|
||||
local allGenerated = 0
|
||||
for spellid, spellObject in _pairs (self.spells._ActorTable) do
|
||||
@@ -1032,14 +1032,14 @@ end
|
||||
|
||||
--------------------------------------------- // JANELA DETALHES // ---------------------------------------------
|
||||
|
||||
---------> DETALHES BIFURCA��O
|
||||
---------DETALHES BIFURCA��O
|
||||
function atributo_energy:MontaInfo()
|
||||
if (info.sub_atributo <= 4) then
|
||||
return self:MontaInfoRegenRecebido()
|
||||
end
|
||||
end
|
||||
|
||||
---------> DETALHES bloco da direita BIFURCA��O
|
||||
---------DETALHES bloco da direita BIFURCA��O
|
||||
function atributo_energy:MontaDetalhes (spellid, barra)
|
||||
if (info.sub_atributo <= 4) then
|
||||
return self:MontaDetalhesRegenRecebido (spellid, barra)
|
||||
@@ -1063,10 +1063,10 @@ function atributo_energy:MontaInfoRegenRecebido()
|
||||
local my_name = self.nome
|
||||
local powertype = self.powertype
|
||||
|
||||
--> spells:
|
||||
--spells:
|
||||
local i = 1
|
||||
|
||||
for index, actor in _ipairs (container._ActorTable) do
|
||||
for index, actor in _ipairs(container._ActorTable) do
|
||||
if (actor.powertype == powertype) then
|
||||
|
||||
for spellid, spell in _pairs (actor.spells._ActorTable) do
|
||||
@@ -1106,7 +1106,7 @@ function atributo_energy:MontaInfoRegenRecebido()
|
||||
gump:JI_AtualizaContainerBarras (amt)
|
||||
local max_ = energy_tooltips_table [1][2]
|
||||
|
||||
for index, tabela in _ipairs (energy_tooltips_table) do
|
||||
for index, tabela in _ipairs(energy_tooltips_table) do
|
||||
|
||||
if (tabela [2] < 1) then
|
||||
break
|
||||
@@ -1137,12 +1137,12 @@ function atributo_energy:MontaInfoRegenRecebido()
|
||||
|
||||
end
|
||||
|
||||
--> players:
|
||||
--players:
|
||||
|
||||
reset_tooltips_table()
|
||||
i = 1
|
||||
|
||||
for index, actor in _ipairs (container._ActorTable) do
|
||||
for index, actor in _ipairs(container._ActorTable) do
|
||||
if (actor.powertype == powertype) then
|
||||
|
||||
local on_self = actor.targets [my_name]
|
||||
@@ -1168,7 +1168,7 @@ function atributo_energy:MontaInfoRegenRecebido()
|
||||
local max_fontes = energy_tooltips_table[1][2]
|
||||
|
||||
local barra
|
||||
for index, tabela in _ipairs (energy_tooltips_table) do
|
||||
for index, tabela in _ipairs(energy_tooltips_table) do
|
||||
|
||||
if (tabela [2] < 1) then
|
||||
break
|
||||
@@ -1182,15 +1182,15 @@ function atributo_energy:MontaInfoRegenRecebido()
|
||||
end
|
||||
|
||||
if (index == 1) then
|
||||
barra.textura:SetValue (100)
|
||||
barra.textura:SetValue(100)
|
||||
else
|
||||
barra.textura:SetValue (tabela[2]/max_fontes*100)
|
||||
barra.textura:SetValue(tabela[2]/max_fontes*100)
|
||||
end
|
||||
|
||||
barra.lineText1:SetText (index..instancia.divisores.colocacao..tabela[1])
|
||||
barra.lineText4:SetText (_detalhes:comma_value (tabela[2]) .. " (" .. _cstr("%.1f", tabela[2]/total_regenerado * 100) .. ")")
|
||||
barra.lineText1:SetText(index..instancia.divisores.colocacao..tabela[1])
|
||||
barra.lineText4:SetText(_detalhes:comma_value (tabela[2]) .. " (" .. _cstr("%.1f", tabela[2]/total_regenerado * 100) .. ")")
|
||||
|
||||
if (barra.mouse_over) then --> atualizar o tooltip
|
||||
if (barra.mouse_over) then --atualizar o tooltip
|
||||
if (barra.isAlvo) then
|
||||
GameTooltip:Hide()
|
||||
GameTooltip:SetOwner (barra, "ANCHOR_TOPRIGHT")
|
||||
@@ -1213,7 +1213,7 @@ end
|
||||
|
||||
function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
|
||||
|
||||
for _, barra in _ipairs (info.barras3) do
|
||||
for _, barra in _ipairs(info.barras3) do
|
||||
barra:Hide()
|
||||
end
|
||||
|
||||
@@ -1230,12 +1230,12 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
|
||||
local spellid = nome
|
||||
local who_name = self.nome
|
||||
|
||||
--> who is regenerating with the spell -> nome
|
||||
--who is regenerating with the spell -> nome
|
||||
|
||||
--> spells:
|
||||
--spells:
|
||||
local i = 1
|
||||
|
||||
for index, actor in _ipairs (container._ActorTable) do
|
||||
for index, actor in _ipairs(container._ActorTable) do
|
||||
if (actor.powertype == powertype) then
|
||||
local spell = actor.spells._ActorTable [spellid]
|
||||
if (spell) then
|
||||
@@ -1264,7 +1264,7 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
|
||||
local max_ = energy_tooltips_table [1][2]
|
||||
|
||||
local barra
|
||||
for index, tabela in _ipairs (from) do
|
||||
for index, tabela in _ipairs(from) do
|
||||
|
||||
if (tabela [2] < 1) then
|
||||
break
|
||||
@@ -1272,26 +1272,26 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
|
||||
|
||||
barra = barras [index]
|
||||
|
||||
if (not barra) then --> se a barra n�o existir, criar ela ent�o
|
||||
if (not barra) then --se a barra n�o existir, criar ela ent�o
|
||||
barra = gump:CriaNovaBarraInfo3 (instancia, index)
|
||||
barra.textura:SetStatusBarColor (1, 1, 1, 1)
|
||||
end
|
||||
|
||||
if (index == 1) then
|
||||
barra.textura:SetValue (100)
|
||||
barra.textura:SetValue(100)
|
||||
else
|
||||
barra.textura:SetValue (tabela[2] / max_ * 100)
|
||||
barra.textura:SetValue(tabela[2] / max_ * 100)
|
||||
end
|
||||
|
||||
barra.lineText1:SetText (index .. "." .. tabela [1])
|
||||
barra.lineText4:SetText (_detalhes:comma_value (tabela[2]) .." (" .. _cstr("%.1f", tabela[2] / total_regenerado * 100) .."%)")
|
||||
barra.lineText1:SetText(index .. "." .. tabela [1])
|
||||
barra.lineText4:SetText(_detalhes:comma_value (tabela[2]) .." (" .. _cstr("%.1f", tabela[2] / total_regenerado * 100) .."%)")
|
||||
|
||||
barra.textura:SetStatusBarColor (_unpack (_detalhes.class_colors [tabela[3]]))
|
||||
barra.icone:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small")
|
||||
barra.icone:SetTexture("Interface\\AddOns\\Details\\images\\classes_small")
|
||||
|
||||
barra.icone:SetTexCoord (_unpack (_detalhes.class_coords [tabela[3]]))
|
||||
|
||||
barra:Show() --> mostra a barra
|
||||
barra:Show() --mostra a barra
|
||||
|
||||
if (index == 15) then
|
||||
break
|
||||
@@ -1317,7 +1317,7 @@ function atributo_energy:MontaTooltipAlvos (esta_barra, index)
|
||||
--print ("Mouse Over", actor, esta_barra.nome_inimigo, self.tipo)
|
||||
|
||||
if (actor) then
|
||||
--> spells:
|
||||
--spells:
|
||||
local i = 1
|
||||
|
||||
for spellid, spell in _pairs (actor.spells._ActorTable) do
|
||||
@@ -1338,7 +1338,7 @@ function atributo_energy:MontaTooltipAlvos (esta_barra, index)
|
||||
|
||||
--print (i, #energy_tooltips_table)
|
||||
|
||||
for index, spell in _ipairs (energy_tooltips_table) do
|
||||
for index, spell in _ipairs(energy_tooltips_table) do
|
||||
if (spell [2] < 1) then
|
||||
break
|
||||
end
|
||||
@@ -1359,9 +1359,9 @@ function atributo_energy:Iniciar (iniciar)
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> core functions
|
||||
--core functions
|
||||
|
||||
--> atualize a funcao de abreviacao
|
||||
--atualize a funcao de abreviacao
|
||||
function atributo_energy:UpdateSelectedToKFunction()
|
||||
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
|
||||
FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation]
|
||||
@@ -1369,7 +1369,7 @@ end
|
||||
headerColor = _detalhes.tooltip.header_text_color
|
||||
end
|
||||
|
||||
--> subtract total from a combat table
|
||||
--subtract total from a combat table
|
||||
function atributo_energy:subtract_total (combat_table)
|
||||
--print ("reduce total:", combat_table.totals [class_type] [self.powertype], self.total, self.powertype, self.nome)
|
||||
if (self.powertype and combat_table.totals [class_type] [self.powertype]) then
|
||||
@@ -1391,11 +1391,11 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
--> restaura e liga o ator com a sua shadow durante a inicializa��o
|
||||
--restaura e liga o ator com a sua shadow durante a inicializa��o
|
||||
|
||||
function atributo_energy:r_onlyrefresh_shadow (actor)
|
||||
|
||||
--> criar uma shadow desse ator se ainda n�o tiver uma
|
||||
--criar uma shadow desse ator se ainda n�o tiver uma
|
||||
local overall_energy = _detalhes.tabela_overall [3]
|
||||
local shadow = overall_energy._ActorTable [overall_energy._NameIndexTable [actor.nome]]
|
||||
|
||||
@@ -1413,7 +1413,7 @@ end
|
||||
|
||||
end
|
||||
|
||||
--> restaura a meta e indexes ao ator
|
||||
--restaura a meta e indexes ao ator
|
||||
_detalhes.refresh:r_atributo_energy (actor, shadow)
|
||||
shadow.powertype = actor.powertype
|
||||
|
||||
@@ -1422,15 +1422,15 @@ end
|
||||
shadow.resource_type = actor.resource_type
|
||||
end
|
||||
|
||||
--> targets
|
||||
--targets
|
||||
for target_name, amount in _pairs (actor.targets) do
|
||||
shadow.targets [target_name] = 0
|
||||
end
|
||||
|
||||
--> spells
|
||||
--spells
|
||||
for spellid, habilidade in _pairs (actor.spells._ActorTable) do
|
||||
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
|
||||
--> spell targets
|
||||
--spell targets
|
||||
for target_name, amount in _pairs (habilidade.targets) do
|
||||
habilidade_shadow.targets [target_name] = 0
|
||||
end
|
||||
@@ -1443,7 +1443,7 @@ end
|
||||
|
||||
local host_combat = combat_object or _detalhes.tabela_overall
|
||||
|
||||
--> criar uma shadow desse ator se ainda n�o tiver uma
|
||||
--criar uma shadow desse ator se ainda n�o tiver uma
|
||||
local overall_energy = host_combat [3]
|
||||
local shadow = overall_energy._ActorTable [overall_energy._NameIndexTable [actor.nome]]
|
||||
|
||||
@@ -1461,17 +1461,17 @@ end
|
||||
|
||||
end
|
||||
|
||||
--> restaura a meta e indexes ao ator
|
||||
--restaura a meta e indexes ao ator
|
||||
if (not no_refresh) then
|
||||
_detalhes.refresh:r_atributo_energy (actor, shadow)
|
||||
end
|
||||
|
||||
--> pets (add unique pet names)
|
||||
for _, petName in _ipairs (actor.pets) do
|
||||
--pets (add unique pet names)
|
||||
for _, petName in _ipairs(actor.pets) do
|
||||
DetailsFramework.table.addunique (shadow.pets, petName)
|
||||
end
|
||||
|
||||
--> total das energias (captura de dados)
|
||||
--total das energias (captura de dados)
|
||||
shadow.total = shadow.total + actor.total
|
||||
shadow.received = shadow.received + actor.received
|
||||
shadow.alternatepower = shadow.alternatepower + actor.alternatepower
|
||||
@@ -1488,19 +1488,19 @@ end
|
||||
shadow.resource_type = actor.resource_type
|
||||
end
|
||||
|
||||
--> total no combate overall (captura de dados)
|
||||
--total no combate overall (captura de dados)
|
||||
host_combat.totals[3] [actor.powertype] = host_combat.totals[3] [actor.powertype] + actor.total
|
||||
|
||||
if (actor.grupo) then
|
||||
host_combat.totals_grupo[3][actor.powertype] = host_combat.totals_grupo[3][actor.powertype] + actor.total
|
||||
end
|
||||
|
||||
--> targets
|
||||
--targets
|
||||
for target_name, amount in _pairs (actor.targets) do
|
||||
shadow.targets [target_name] = (shadow.targets [target_name] or 0) + amount
|
||||
end
|
||||
|
||||
--> spells
|
||||
--spells
|
||||
for spellid, habilidade in _pairs (actor.spells._ActorTable) do
|
||||
|
||||
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
|
||||
@@ -1508,7 +1508,7 @@ end
|
||||
habilidade_shadow.total = habilidade_shadow.total + habilidade.total
|
||||
habilidade_shadow.counter = habilidade_shadow.counter + habilidade.counter
|
||||
|
||||
--> spell targets
|
||||
--spell targets
|
||||
for target_name, amount in _pairs (habilidade.targets) do
|
||||
habilidade_shadow.targets [target_name] = (habilidade_shadow.targets [target_name] or 0) + amount
|
||||
end
|
||||
@@ -1552,17 +1552,17 @@ atributo_energy.__add = function(tabela1, tabela2)
|
||||
tabela1.resource = tabela1.resource + (tabela2.resource or 0)
|
||||
end
|
||||
|
||||
--> total and received
|
||||
--total and received
|
||||
tabela1.total = tabela1.total + tabela2.total
|
||||
tabela1.received = tabela1.received + tabela2.received
|
||||
tabela1.alternatepower = tabela1.alternatepower + tabela2.alternatepower
|
||||
|
||||
--> targets
|
||||
--targets
|
||||
for target_name, amount in _pairs (tabela2.targets) do
|
||||
tabela1.targets [target_name] = (tabela1.targets [target_name] or 0) + amount
|
||||
end
|
||||
|
||||
--> spells
|
||||
--spells
|
||||
for spellid, habilidade in _pairs (tabela2.spells._ActorTable) do
|
||||
|
||||
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
|
||||
@@ -1570,7 +1570,7 @@ atributo_energy.__add = function(tabela1, tabela2)
|
||||
habilidade_tabela1.total = habilidade_tabela1.total + habilidade.total
|
||||
habilidade_tabela1.counter = habilidade_tabela1.counter + habilidade.counter
|
||||
|
||||
--> spell targets
|
||||
--spell targets
|
||||
for target_name, amount in _pairs (habilidade.targets) do
|
||||
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
|
||||
end
|
||||
@@ -1590,19 +1590,19 @@ atributo_energy.__sub = function(tabela1, tabela2)
|
||||
tabela1.resource = tabela1.resource - (tabela2.resource or 0)
|
||||
end
|
||||
|
||||
--> total and received
|
||||
--total and received
|
||||
tabela1.total = tabela1.total - tabela2.total
|
||||
tabela1.received = tabela1.received - tabela2.received
|
||||
tabela1.alternatepower = tabela1.alternatepower - tabela2.alternatepower
|
||||
|
||||
--> targets
|
||||
--targets
|
||||
for target_name, amount in _pairs (tabela2.targets) do
|
||||
if (tabela1.targets [target_name]) then
|
||||
tabela1.targets [target_name] = tabela1.targets [target_name] - amount
|
||||
end
|
||||
end
|
||||
|
||||
--> spells
|
||||
--spells
|
||||
for spellid, habilidade in _pairs (tabela2.spells._ActorTable) do
|
||||
|
||||
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
|
||||
@@ -1610,7 +1610,7 @@ atributo_energy.__sub = function(tabela1, tabela2)
|
||||
habilidade_tabela1.total = habilidade_tabela1.total - habilidade.total
|
||||
habilidade_tabela1.counter = habilidade_tabela1.counter - habilidade.counter
|
||||
|
||||
--> spell targets
|
||||
--spell targets
|
||||
for target_name, amount in _pairs (habilidade.targets) do
|
||||
if (habilidade_tabela1.targets [target_name]) then
|
||||
habilidade_tabela1.targets [target_name] = habilidade_tabela1.targets [target_name] - amount
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
local _ipairs = ipairs--lua local
|
||||
local _pairs = pairs--lua local
|
||||
local _UnitAura = UnitAura--api local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
--constants
|
||||
|
||||
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
|
||||
local habilidade_dano = _detalhes.habilidade_dano
|
||||
@@ -21,7 +21,7 @@
|
||||
local _recording_ability_with_buffs = false
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internals
|
||||
--internals
|
||||
|
||||
function habilidade_dano:NovaTabela (id, link, token)
|
||||
|
||||
@@ -32,31 +32,31 @@
|
||||
id = id, --spellid
|
||||
successful_casted = 0, --successful casted times (only for enemies)
|
||||
|
||||
--> normal hits
|
||||
--normal hits
|
||||
n_min = 0,
|
||||
n_max = 0,
|
||||
n_amt = 0,
|
||||
n_dmg = 0,
|
||||
|
||||
--> critical hits
|
||||
--critical hits
|
||||
c_min = 0,
|
||||
c_max = 0,
|
||||
c_amt = 0,
|
||||
c_dmg = 0,
|
||||
|
||||
--> glacing hits
|
||||
--glacing hits
|
||||
g_amt = 0,
|
||||
g_dmg = 0,
|
||||
|
||||
--> resisted
|
||||
--resisted
|
||||
r_amt = 0,
|
||||
r_dmg = 0,
|
||||
|
||||
--> blocked
|
||||
--blocked
|
||||
b_amt = 0,
|
||||
b_dmg = 0,
|
||||
|
||||
--> obsorved
|
||||
--obsorved
|
||||
a_amt = 0,
|
||||
a_dmg = 0,
|
||||
|
||||
@@ -93,27 +93,27 @@
|
||||
self.counter = self.counter + 1
|
||||
|
||||
if (resisted and resisted > 0) then
|
||||
self.r_dmg = self.r_dmg+amount --> tabela.total � o total de dano
|
||||
self.r_amt = self.r_amt+1 --> tabela.total � o total de dano
|
||||
self.r_dmg = self.r_dmg+amount --tabela.total � o total de dano
|
||||
self.r_amt = self.r_amt+1 --tabela.total � o total de dano
|
||||
end
|
||||
|
||||
if (blocked and blocked > 0) then
|
||||
self.b_dmg = self.b_dmg+amount --> amount � o total de dano
|
||||
self.b_amt = self.b_amt+1 --> amount � o total de dano
|
||||
self.b_dmg = self.b_dmg+amount --amount � o total de dano
|
||||
self.b_amt = self.b_amt+1 --amount � o total de dano
|
||||
end
|
||||
|
||||
if (absorbed and absorbed > 0) then
|
||||
self.a_dmg = self.a_dmg+amount --> amount � o total de dano
|
||||
self.a_amt = self.a_amt+1 --> amount � o total de dano
|
||||
self.a_dmg = self.a_dmg+amount --amount � o total de dano
|
||||
self.a_amt = self.a_amt+1 --amount � o total de dano
|
||||
end
|
||||
|
||||
if (glacing) then
|
||||
self.g_dmg = self.g_dmg+amount --> amount � o total de dano
|
||||
self.g_amt = self.g_amt+1 --> amount � o total de dano
|
||||
self.g_dmg = self.g_dmg+amount --amount � o total de dano
|
||||
self.g_amt = self.g_amt+1 --amount � o total de dano
|
||||
|
||||
elseif (critical) then
|
||||
self.c_dmg = self.c_dmg+amount --> amount � o total de dano
|
||||
self.c_amt = self.c_amt+1 --> amount � o total de dano
|
||||
self.c_dmg = self.c_dmg+amount --amount � o total de dano
|
||||
self.c_amt = self.c_amt+1 --amount � o total de dano
|
||||
if (amount > self.c_max) then
|
||||
self.c_max = amount
|
||||
end
|
||||
@@ -145,14 +145,14 @@
|
||||
end
|
||||
|
||||
if (token == "SPELL_PERIODIC_DAMAGE") then
|
||||
--> precisa ver se ele tinha na hora que aplicou
|
||||
--precisa ver se ele tinha na hora que aplicou
|
||||
local SoloDebuffPower = _detalhes.tabela_vigente.SoloDebuffPower
|
||||
if (SoloDebuffPower) then
|
||||
local ThisDebuff = SoloDebuffPower [self.id]
|
||||
if (ThisDebuff) then
|
||||
local ThisDebuffOnTarget = ThisDebuff [serial]
|
||||
if (ThisDebuffOnTarget) then
|
||||
for index, buff_name in _ipairs (ThisDebuffOnTarget.buffs) do
|
||||
for index, buff_name in _ipairs(ThisDebuffOnTarget.buffs) do
|
||||
local buff_info = SpellBuffDetails [buff_name] or {["counter"] = 0, ["total"] = 0, ["critico"] = 0, ["critico_dano"] = 0}
|
||||
buff_info.counter = buff_info.counter+1
|
||||
buff_info.total = buff_info.total+amount
|
||||
@@ -188,7 +188,7 @@
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> core
|
||||
--core
|
||||
|
||||
function _detalhes:UpdateDamageAbilityGears()
|
||||
_recording_ability_with_buffs = _detalhes.RecordPlayerAbilityWithBuffs
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
--constants
|
||||
|
||||
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
|
||||
local habilidade_cura = _detalhes.habilidade_cura
|
||||
@@ -13,7 +13,7 @@
|
||||
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internals
|
||||
--internals
|
||||
|
||||
function habilidade_cura:NovaTabela (id, link)
|
||||
|
||||
@@ -22,26 +22,26 @@
|
||||
id = id,
|
||||
counter = 0,
|
||||
|
||||
--> totals
|
||||
--totals
|
||||
total = 0,
|
||||
totalabsorb = 0,
|
||||
absorbed = 0,
|
||||
overheal = 0,
|
||||
totaldenied = 0,
|
||||
|
||||
--> normal hits
|
||||
--normal hits
|
||||
n_min = 0,
|
||||
n_max = 0,
|
||||
n_amt = 0,
|
||||
n_curado = 0,
|
||||
|
||||
--> critical hits
|
||||
--critical hits
|
||||
c_min = 0,
|
||||
c_max = 0,
|
||||
c_amt = 0,
|
||||
c_curado = 0,
|
||||
|
||||
--> targets containers
|
||||
--targets containers
|
||||
targets = {},
|
||||
targets_overheal = {},
|
||||
targets_absorbs = {}
|
||||
@@ -89,8 +89,8 @@
|
||||
end
|
||||
|
||||
if (critical) then
|
||||
self.c_curado = self.c_curado+amount --> amount � o total de dano
|
||||
self.c_amt = self.c_amt+1 --> amount � o total de dano
|
||||
self.c_curado = self.c_curado+amount --amount � o total de dano
|
||||
self.c_amt = self.c_amt+1 --amount � o total de dano
|
||||
if (amount > self.c_max) then
|
||||
self.c_max = amount
|
||||
end
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local _UnitAura = UnitAura --api local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
--constants
|
||||
|
||||
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
|
||||
local habilidade_energy = _detalhes.habilidade_e_energy
|
||||
@@ -20,7 +20,7 @@
|
||||
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internals
|
||||
--internals
|
||||
|
||||
function habilidade_energy:NovaTabela (id, link, token)
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
local _UnitAura = UnitAura --api local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
--constants
|
||||
|
||||
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
|
||||
local habilidade_misc = _detalhes.habilidade_misc
|
||||
@@ -19,7 +19,7 @@
|
||||
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internals
|
||||
--internals
|
||||
|
||||
function habilidade_misc:NovaTabela (id, link, token)
|
||||
|
||||
@@ -58,14 +58,14 @@
|
||||
|
||||
if (spellName == "COOLDOWN") then
|
||||
self.counter = self.counter + 1
|
||||
--> target
|
||||
--target
|
||||
self.targets [nome] = (self.targets [nome] or 0) + 1
|
||||
|
||||
elseif (spellName == "BUFF_UPTIME_REFRESH") then
|
||||
if (self.actived_at and self.actived) then
|
||||
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
|
||||
self.refreshamt = self.refreshamt + 1
|
||||
token.buff_uptime = token.buff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object
|
||||
token.buff_uptime = token.buff_uptime + _detalhes._tempo - self.actived_at --token = actor misc object
|
||||
end
|
||||
self.actived_at = _detalhes._tempo
|
||||
self.actived = true
|
||||
@@ -73,7 +73,7 @@
|
||||
elseif (spellName == "BUFF_UPTIME_OUT") then
|
||||
if (self.actived_at and self.actived) then
|
||||
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
|
||||
token.buff_uptime = token.buff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object
|
||||
token.buff_uptime = token.buff_uptime + _detalhes._tempo - self.actived_at --token = actor misc object
|
||||
end
|
||||
self.actived = false
|
||||
self.actived_at = nil
|
||||
@@ -84,7 +84,7 @@
|
||||
self.appliedamt = self.appliedamt + 1
|
||||
|
||||
if (self.actived_at and self.actived and spellName == "DEBUFF_UPTIME_IN") then
|
||||
--> ja esta ativo em outro mob e jogou num novo
|
||||
--ja esta ativo em outro mob e jogou num novo
|
||||
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
|
||||
token.debuff_uptime = token.debuff_uptime + _detalhes._tempo - self.actived_at
|
||||
end
|
||||
@@ -103,7 +103,7 @@
|
||||
elseif (spellName == "DEBUFF_UPTIME_OUT") then
|
||||
if (self.actived_at and self.actived) then
|
||||
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
|
||||
token.debuff_uptime = token.debuff_uptime + _detalhes._tempo - self.actived_at --> token = actor misc object
|
||||
token.debuff_uptime = token.debuff_uptime + _detalhes._tempo - self.actived_at --token = actor misc object
|
||||
end
|
||||
|
||||
self.activedamt = self.activedamt - 1
|
||||
@@ -126,12 +126,12 @@
|
||||
self.interrompeu_oque [spellID] = self.interrompeu_oque [spellID] + 1
|
||||
end
|
||||
|
||||
--> target
|
||||
--target
|
||||
self.targets [nome] = (self.targets [nome] or 0) + 1
|
||||
|
||||
elseif (token == "SPELL_RESURRECT") then
|
||||
self.ress = (self.ress or 0) + 1
|
||||
--> target
|
||||
--target
|
||||
self.targets [nome] = (self.targets [nome] or 0) + 1
|
||||
|
||||
elseif (token == "SPELL_DISPEL" or token == "SPELL_STOLEN") then
|
||||
@@ -143,7 +143,7 @@
|
||||
self.dispell_oque [spellID] = self.dispell_oque [spellID] + 1
|
||||
end
|
||||
|
||||
--> target
|
||||
--target
|
||||
self.targets [nome] = (self.targets [nome] or 0) + 1
|
||||
|
||||
elseif (token == "SPELL_AURA_BROKEN_SPELL" or token == "SPELL_AURA_BROKEN") then
|
||||
@@ -155,7 +155,7 @@
|
||||
self.cc_break_oque [spellID] = self.cc_break_oque [spellID] + 1
|
||||
end
|
||||
|
||||
--> target
|
||||
--target
|
||||
self.targets [nome] = (self.targets [nome] or 0) + 1
|
||||
end
|
||||
|
||||
|
||||
+247
-247
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@
|
||||
local CONST_CLIENT_LANGUAGE = DF.ClientLanguage
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
|
||||
local _UnitClass = UnitClass --api local
|
||||
local _IsInInstance = IsInInstance --api local
|
||||
@@ -29,7 +29,7 @@
|
||||
local DeclineName = _G.DeclineName
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
--constants
|
||||
|
||||
local combatente = _detalhes.combatente
|
||||
local container_combatentes = _detalhes.container_combatentes
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
local container_pets = {}
|
||||
|
||||
--> flags
|
||||
--flags
|
||||
local REACTION_HOSTILE = 0x00000040
|
||||
local IS_GROUP_OBJECT = 0x00000007
|
||||
local REACTION_FRIENDLY = 0x00000010
|
||||
@@ -88,7 +88,7 @@
|
||||
}
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> api functions
|
||||
--api functions
|
||||
|
||||
function container_combatentes:GetActor (actorName)
|
||||
local index = self._NameIndexTable [actorName]
|
||||
@@ -120,7 +120,7 @@
|
||||
function container_combatentes:GetTotal (key)
|
||||
local total = 0
|
||||
key = key or "total"
|
||||
for _, actor in _ipairs (self._ActorTable) do
|
||||
for _, actor in _ipairs(self._ActorTable) do
|
||||
total = total + (actor [key] or 0)
|
||||
end
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
local total = 0
|
||||
key = key or "total"
|
||||
local roster = combat.raid_roster
|
||||
for _, actor in _ipairs (self._ActorTable) do
|
||||
for _, actor in _ipairs(self._ActorTable) do
|
||||
if (roster [actor.nome]) then
|
||||
total = total + (actor [key] or 0)
|
||||
end
|
||||
@@ -141,13 +141,13 @@
|
||||
end
|
||||
|
||||
function container_combatentes:ListActors()
|
||||
return _ipairs (self._ActorTable)
|
||||
return _ipairs(self._ActorTable)
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internals
|
||||
--internals
|
||||
|
||||
--> build a new actor container
|
||||
--build a new actor container
|
||||
function container_combatentes:NovoContainer (tipo_do_container, combat_table, combat_id)
|
||||
local _newContainer = {
|
||||
funcao_de_criacao = container_combatentes:FuncaoDeCriacao (tipo_do_container),
|
||||
@@ -165,16 +165,16 @@
|
||||
return _newContainer
|
||||
end
|
||||
|
||||
--> try to get the actor class from name
|
||||
--try to get the actor class from name
|
||||
local function get_actor_class (novo_objeto, nome, flag, serial)
|
||||
--> get spec
|
||||
--get spec
|
||||
if (_detalhes.track_specs) then
|
||||
local have_cached = _detalhes.cached_specs [serial]
|
||||
if (have_cached) then
|
||||
novo_objeto.spec = have_cached
|
||||
--> check is didn't changed the spec:
|
||||
--check is didn't changed the spec:
|
||||
if (_detalhes.streamer_config.quick_detection) then
|
||||
--> validate the spec more times if on quick detection
|
||||
--validate the spec more times if on quick detection
|
||||
_detalhes:ScheduleTimer("ReGuessSpec", 2, {novo_objeto})
|
||||
_detalhes:ScheduleTimer("ReGuessSpec", 4, {novo_objeto})
|
||||
_detalhes:ScheduleTimer("ReGuessSpec", 6, {novo_objeto})
|
||||
@@ -183,7 +183,7 @@
|
||||
--print (nome, "spec em cache:", have_cached)
|
||||
else
|
||||
if (_detalhes.streamer_config.quick_detection) then
|
||||
--> shoot detection early if in quick detection
|
||||
--shoot detection early if in quick detection
|
||||
_detalhes:ScheduleTimer("GuessSpec", 1, {novo_objeto, nil, 1})
|
||||
else
|
||||
_detalhes:ScheduleTimer("GuessSpec", 3, {novo_objeto, nil, 1})
|
||||
@@ -198,7 +198,7 @@
|
||||
return
|
||||
else
|
||||
if (flag) then
|
||||
--> conferir se o jogador � um player
|
||||
--conferir se o jogador � um player
|
||||
if (_bit_band (flag, OBJECT_TYPE_PLAYER) ~= 0) then
|
||||
novo_objeto.classe = "UNGROUPPLAYER"
|
||||
return
|
||||
@@ -234,11 +234,11 @@
|
||||
return nickname
|
||||
end
|
||||
|
||||
--> read the actor flag
|
||||
--read the actor flag
|
||||
local read_actor_flag = function(actorObject, dono_do_pet, serial, flag, nome, container_type)
|
||||
|
||||
if (flag) then
|
||||
--> this is player actor
|
||||
--this is player actor
|
||||
if (_bit_band (flag, OBJECT_TYPE_PLAYER) ~= 0) then
|
||||
if (not _detalhes.ignore_nicktag) then
|
||||
actorObject.displayName = checkValidNickname(Details:GetNickname(nome, false, true), nome) --defaults to player name
|
||||
@@ -295,9 +295,9 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> pvp duel
|
||||
--pvp duel
|
||||
if (_detalhes.duel_candidates [serial]) then
|
||||
--> check if is recent
|
||||
--check if is recent
|
||||
if (_detalhes.duel_candidates [serial]+20 > GetTime()) then
|
||||
actorObject.grupo = true
|
||||
actorObject.enemy = true
|
||||
@@ -376,7 +376,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> � um pet
|
||||
--� um pet
|
||||
elseif (dono_do_pet) then
|
||||
actorObject.owner = dono_do_pet
|
||||
actorObject.ownerName = dono_do_pet.nome
|
||||
@@ -393,7 +393,7 @@
|
||||
--end
|
||||
|
||||
else
|
||||
--> anything else that isn't a player or a pet
|
||||
--anything else that isn't a player or a pet
|
||||
actorObject.displayName = nome
|
||||
|
||||
--[=[
|
||||
@@ -406,14 +406,14 @@
|
||||
--]=]
|
||||
end
|
||||
|
||||
--> check if is hostile
|
||||
--check if is hostile
|
||||
if (_bit_band (flag, REACTION_HOSTILE) ~= 0) then
|
||||
|
||||
if (_bit_band (flag, OBJECT_TYPE_PLAYER) == 0) then
|
||||
--> is hostile and isn't a player
|
||||
--is hostile and isn't a player
|
||||
|
||||
if (_bit_band (flag, OBJECT_TYPE_PETGUARDIAN) == 0) then
|
||||
--> isn't a pet or guardian
|
||||
--isn't a pet or guardian
|
||||
actorObject.monster = true
|
||||
end
|
||||
|
||||
@@ -452,12 +452,12 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> check pet owner name with correct declension for ruRU locale (from user 'denis-kam' on github)
|
||||
--check pet owner name with correct declension for ruRU locale (from user 'denis-kam' on github)
|
||||
local find_name_declension = function(petTooltip, playerName)
|
||||
--> 2 - male, 3 - female
|
||||
--2 - male, 3 - female
|
||||
for gender = 3, 2, -1 do
|
||||
for declensionSet = 1, GetNumDeclensionSets(playerName, gender) do
|
||||
--> check genitive case of player name
|
||||
--check genitive case of player name
|
||||
local genitive = DeclineName(playerName, gender, declensionSet)
|
||||
if petTooltip:find(genitive) then
|
||||
--print("found genitive: ", gender, declensionSet, playerName, petTooltip:find(genitive))
|
||||
@@ -548,11 +548,11 @@
|
||||
--print (nome, flag)
|
||||
--end
|
||||
|
||||
--> verifica se � um pet, se for confere se tem o nome do dono, se n�o tiver, precisa por
|
||||
--verifica se � um pet, se for confere se tem o nome do dono, se n�o tiver, precisa por
|
||||
local dono_do_pet
|
||||
serial = serial or "ns"
|
||||
|
||||
if (container_pets [serial]) then --> � um pet reconhecido
|
||||
if (container_pets [serial]) then --� um pet reconhecido
|
||||
--[[statistics]]-- _detalhes.statistics.container_pet_calls = _detalhes.statistics.container_pet_calls + 1
|
||||
|
||||
local nome_dele, dono_nome, dono_serial, dono_flag = _detalhes.tabela_pets:PegaDono (serial, nome, flag)
|
||||
@@ -561,11 +561,11 @@
|
||||
dono_do_pet = self:PegarCombatente (dono_serial, dono_nome, dono_flag, true)
|
||||
end
|
||||
|
||||
elseif (not pet_blacklist [serial]) then --> verifica se � um pet
|
||||
elseif (not pet_blacklist [serial]) then --verifica se � um pet
|
||||
|
||||
pet_blacklist [serial] = true
|
||||
|
||||
--> try to find the owner
|
||||
--try to find the owner
|
||||
if (flag and _bit_band (flag, OBJECT_TYPE_PETGUARDIAN) ~= 0) then
|
||||
--[[statistics]]-- _detalhes.statistics.container_unknow_pet = _detalhes.statistics.container_unknow_pet + 1
|
||||
local find_nome, find_owner = find_pet_owner (serial, nome, flag, self)
|
||||
@@ -575,13 +575,13 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> pega o index no mapa
|
||||
--pega o index no mapa
|
||||
local index = self._NameIndexTable [nome]
|
||||
--> retorna o actor
|
||||
--retorna o actor
|
||||
if (index) then
|
||||
return self._ActorTable [index], dono_do_pet, nome
|
||||
|
||||
--> n�o achou, criar
|
||||
--n�o achou, criar
|
||||
elseif (criar) then
|
||||
|
||||
local novo_objeto = self.funcao_de_criacao (_, serial, nome)
|
||||
@@ -589,7 +589,7 @@
|
||||
novo_objeto.flag_original = flag
|
||||
novo_objeto.serial = serial
|
||||
|
||||
--> seta a classe default para desconhecido, assim nenhum objeto fica com classe nil
|
||||
--seta a classe default para desconhecido, assim nenhum objeto fica com classe nil
|
||||
novo_objeto.classe = "UNKNOW"
|
||||
local forceClass
|
||||
|
||||
@@ -625,7 +625,7 @@
|
||||
-- tipo do container
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if (self.tipo == container_damage) then --> CONTAINER DAMAGE
|
||||
if (self.tipo == container_damage) then --CONTAINER DAMAGE
|
||||
|
||||
local shouldScanOnce = get_actor_class (novo_objeto, nome, flag, serial)
|
||||
|
||||
@@ -641,13 +641,13 @@
|
||||
end
|
||||
end
|
||||
|
||||
if (novo_objeto.classe == "UNGROUPPLAYER") then --> is a player
|
||||
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --> is hostile
|
||||
if (novo_objeto.classe == "UNGROUPPLAYER") then --is a player
|
||||
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --is hostile
|
||||
novo_objeto.enemy = true
|
||||
end
|
||||
|
||||
--> try to guess his class
|
||||
if (self.shadow) then --> n�o executar 2x
|
||||
--try to guess his class
|
||||
if (self.shadow) then --n�o executar 2x
|
||||
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
|
||||
end
|
||||
|
||||
@@ -660,7 +660,7 @@
|
||||
novo_objeto.avoidance = _detalhes:CreateActorAvoidanceTable()
|
||||
end
|
||||
|
||||
elseif (self.tipo == container_heal) then --> CONTAINER HEALING
|
||||
elseif (self.tipo == container_heal) then --CONTAINER HEALING
|
||||
|
||||
local shouldScanOnce = get_actor_class (novo_objeto, nome, flag, serial)
|
||||
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "heal")
|
||||
@@ -675,19 +675,19 @@
|
||||
end
|
||||
end
|
||||
|
||||
if (novo_objeto.classe == "UNGROUPPLAYER") then --> is a player
|
||||
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --> is hostile
|
||||
if (novo_objeto.classe == "UNGROUPPLAYER") then --is a player
|
||||
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --is hostile
|
||||
novo_objeto.enemy = true --print (nome.." EH UM INIMIGO -> " .. engRace)
|
||||
end
|
||||
|
||||
--> try to guess his class
|
||||
if (self.shadow) then --> n�o executar 2x
|
||||
--try to guess his class
|
||||
if (self.shadow) then --n�o executar 2x
|
||||
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
elseif (self.tipo == container_energy) then --> CONTAINER ENERGY
|
||||
elseif (self.tipo == container_energy) then --CONTAINER ENERGY
|
||||
|
||||
local shouldScanOnce = get_actor_class (novo_objeto, nome, flag, serial)
|
||||
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "energy")
|
||||
@@ -696,18 +696,18 @@
|
||||
AddUnique (dono_do_pet.pets, nome)
|
||||
end
|
||||
|
||||
if (novo_objeto.classe == "UNGROUPPLAYER") then --> is a player
|
||||
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --> is hostile
|
||||
if (novo_objeto.classe == "UNGROUPPLAYER") then --is a player
|
||||
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --is hostile
|
||||
novo_objeto.enemy = true
|
||||
end
|
||||
|
||||
--> try to guess his class
|
||||
if (self.shadow) then --> n�o executar 2x
|
||||
--try to guess his class
|
||||
if (self.shadow) then --n�o executar 2x
|
||||
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
|
||||
end
|
||||
end
|
||||
|
||||
elseif (self.tipo == container_misc) then --> CONTAINER MISC
|
||||
elseif (self.tipo == container_misc) then --CONTAINER MISC
|
||||
|
||||
local shouldScanOnce = get_actor_class (novo_objeto, nome, flag, serial)
|
||||
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "misc")
|
||||
@@ -716,20 +716,20 @@
|
||||
AddUnique (dono_do_pet.pets, nome)
|
||||
end
|
||||
|
||||
if (novo_objeto.classe == "UNGROUPPLAYER") then --> is a player
|
||||
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --> is hostile
|
||||
if (novo_objeto.classe == "UNGROUPPLAYER") then --is a player
|
||||
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --is hostile
|
||||
novo_objeto.enemy = true
|
||||
end
|
||||
|
||||
--> try to guess his class
|
||||
if (self.shadow) then --> n�o executar 2x
|
||||
--try to guess his class
|
||||
if (self.shadow) then --n�o executar 2x
|
||||
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
|
||||
end
|
||||
end
|
||||
|
||||
elseif (self.tipo == container_damage_target) then --> CONTAINER ALVO DO DAMAGE
|
||||
elseif (self.tipo == container_damage_target) then --CONTAINER ALVO DO DAMAGE
|
||||
|
||||
elseif (self.tipo == container_energy_target) then --> CONTAINER ALVOS DO ENERGY
|
||||
elseif (self.tipo == container_energy_target) then --CONTAINER ALVOS DO ENERGY
|
||||
|
||||
novo_objeto.mana = 0
|
||||
novo_objeto.e_rage = 0
|
||||
@@ -742,10 +742,10 @@
|
||||
novo_objeto.actived = false
|
||||
novo_objeto.activedamt = 0
|
||||
|
||||
elseif (self.tipo == container_misc_target) then --> CONTAINER ALVOS DO MISC
|
||||
elseif (self.tipo == container_misc_target) then --CONTAINER ALVOS DO MISC
|
||||
|
||||
|
||||
elseif (self.tipo == container_friendlyfire) then --> CONTAINER FRIENDLY FIRE
|
||||
elseif (self.tipo == container_friendlyfire) then --CONTAINER FRIENDLY FIRE
|
||||
|
||||
local shouldScanOnce = get_actor_class (novo_objeto, nome, serial)
|
||||
|
||||
@@ -759,8 +759,8 @@
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- grava o objeto no mapa do container
|
||||
local size = #self._ActorTable+1
|
||||
self._ActorTable [size] = novo_objeto --> grava na tabela de indexes
|
||||
self._NameIndexTable [nome] = size --> grava no hash map o index deste jogador
|
||||
self._ActorTable [size] = novo_objeto --grava na tabela de indexes
|
||||
self._NameIndexTable [nome] = size --grava no hash map o index deste jogador
|
||||
|
||||
if (_detalhes.is_in_battleground or _detalhes.is_in_arena) then
|
||||
novo_objeto.pvp = true
|
||||
@@ -790,7 +790,7 @@
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> core
|
||||
--core
|
||||
|
||||
--_detalhes:AddToNpcIdCache (novo_objeto)
|
||||
function _detalhes:AddToNpcIdCache (actor)
|
||||
@@ -843,9 +843,9 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> chama a fun��o para ser executada em todos os atores
|
||||
--chama a fun��o para ser executada em todos os atores
|
||||
function container_combatentes:ActorCallFunction (funcao, ...)
|
||||
for index, actor in _ipairs (self._ActorTable) do
|
||||
for index, actor in _ipairs(self._ActorTable) do
|
||||
funcao (nil, actor, ...)
|
||||
end
|
||||
end
|
||||
@@ -856,7 +856,7 @@
|
||||
end
|
||||
|
||||
function container_combatentes:SortByKey (key)
|
||||
assert (type (key) == "string", "Container:SortByKey() expects a keyname on parameter 1.")
|
||||
assert (type(key) == "string", "Container:SortByKey() expects a keyname on parameter 1.")
|
||||
bykey = key
|
||||
_table_sort (self._ActorTable, sort)
|
||||
self:remapear()
|
||||
@@ -875,19 +875,19 @@
|
||||
end
|
||||
|
||||
function _detalhes.refresh:r_container_combatentes (container, shadow)
|
||||
--> reconstr�i meta e indexes
|
||||
--reconstr�i meta e indexes
|
||||
_setmetatable (container, _detalhes.container_combatentes)
|
||||
container.__index = _detalhes.container_combatentes
|
||||
container.funcao_de_criacao = container_combatentes:FuncaoDeCriacao (container.tipo)
|
||||
|
||||
--> repara mapa
|
||||
--repara mapa
|
||||
local mapa = {}
|
||||
for i = 1, #container._ActorTable do
|
||||
mapa [container._ActorTable[i].nome] = i
|
||||
end
|
||||
container._NameIndexTable = mapa
|
||||
|
||||
--> seta a shadow
|
||||
--seta a shadow
|
||||
container.shadow = shadow
|
||||
end
|
||||
|
||||
|
||||
+15
-15
@@ -23,8 +23,8 @@ local is_ignored = _detalhes.pets_ignored
|
||||
function container_pets:NovoContainer()
|
||||
local esta_tabela = {}
|
||||
_setmetatable (esta_tabela, _detalhes.container_pets)
|
||||
esta_tabela.pets = {} --> armazena a pool -> uma dictionary com o [serial do pet] -> nome do dono
|
||||
esta_tabela._ActorTable = {} --> armazena os 15 ultimos pets do jogador -> [jogador nome] -> {nil, nil, nil, ...}
|
||||
esta_tabela.pets = {} --armazena a pool -> uma dictionary com o [serial do pet] -> nome do dono
|
||||
esta_tabela._ActorTable = {} --armazena os 15 ultimos pets do jogador -> [jogador nome] -> {nil, nil, nil, ...}
|
||||
return esta_tabela
|
||||
end
|
||||
|
||||
@@ -34,12 +34,12 @@ local PET_EM_GRUPO = 0x00001007
|
||||
|
||||
function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
|
||||
|
||||
--> sair se o pet estiver na ignore
|
||||
--sair se o pet estiver na ignore
|
||||
if (is_ignored [pet_serial]) then
|
||||
return
|
||||
end
|
||||
|
||||
--> buscar pelo pet no container de pets
|
||||
--buscar pelo pet no container de pets
|
||||
local busca = self.pets [pet_serial]
|
||||
if (busca) then
|
||||
--in merging operations, make sure to not add the owner name a second time in the name
|
||||
@@ -52,18 +52,18 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
|
||||
pet_nome = pet_nome .. " <".. ownerName ..">"
|
||||
end
|
||||
|
||||
--return busca[6] or pet_nome, busca[1], busca[2], busca[3] --> busca[6] poderia estar causando problemas
|
||||
return pet_nome, busca[1], busca[2], busca[3] --> [1] dono nome [2] dono serial [3] dono flag
|
||||
--return busca[6] or pet_nome, busca[1], busca[2], busca[3] --busca[6] poderia estar causando problemas
|
||||
return pet_nome, busca[1], busca[2], busca[3] --[1] dono nome [2] dono serial [3] dono flag
|
||||
end
|
||||
|
||||
--> buscar pelo pet na raide
|
||||
--buscar pelo pet na raide
|
||||
local dono_nome, dono_serial, dono_flags
|
||||
|
||||
if (_IsInRaid()) then
|
||||
for i = 1, _GetNumGroupMembers() do
|
||||
if (pet_serial == _UnitGUID ("raidpet"..i)) then
|
||||
dono_serial = _UnitGUID ("raid"..i)
|
||||
dono_flags = 0x00000417 --> emulate sourceflag flag
|
||||
dono_flags = 0x00000417 --emulate sourceflag flag
|
||||
|
||||
local nome, realm = _UnitName ("raid"..i)
|
||||
if (realm and realm ~= "") then
|
||||
@@ -77,7 +77,7 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
|
||||
for i = 1, _GetNumGroupMembers()-1 do
|
||||
if (pet_serial == _UnitGUID ("partypet"..i)) then
|
||||
dono_serial = _UnitGUID ("party"..i)
|
||||
dono_flags = 0x00000417 --> emulate sourceflag flag
|
||||
dono_flags = 0x00000417 --emulate sourceflag flag
|
||||
|
||||
local nome, realm = _UnitName ("party"..i)
|
||||
if (realm and realm ~= "") then
|
||||
@@ -94,15 +94,15 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
|
||||
dono_nome = _GetUnitName ("player")
|
||||
dono_serial = _UnitGUID ("player")
|
||||
if (_IsInGroup() or _IsInRaid()) then
|
||||
dono_flags = 0x00000417 --> emulate sourceflag flag
|
||||
dono_flags = 0x00000417 --emulate sourceflag flag
|
||||
else
|
||||
dono_flags = 0x00000411 --> emulate sourceflag flag
|
||||
dono_flags = 0x00000411 --emulate sourceflag flag
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (dono_nome) then
|
||||
self.pets [pet_serial] = {dono_nome, dono_serial, dono_flags, _detalhes._tempo, true, pet_nome, pet_serial} --> adicionada a flag emulada
|
||||
self.pets [pet_serial] = {dono_nome, dono_serial, dono_flags, _detalhes._tempo, true, pet_nome, pet_serial} --adicionada a flag emulada
|
||||
|
||||
if (not pet_nome:find ("<")) then
|
||||
pet_nome = pet_nome .. " <".. dono_nome ..">"
|
||||
@@ -111,7 +111,7 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
|
||||
return pet_nome, dono_nome, dono_serial, dono_flags
|
||||
else
|
||||
|
||||
if (pet_flags and _bit_band (pet_flags, OBJECT_TYPE_PET) ~= 0) then --> � um pet
|
||||
if (pet_flags and _bit_band (pet_flags, OBJECT_TYPE_PET) ~= 0) then --� um pet
|
||||
if (not _detalhes.pets_no_owner [pet_serial] and _bit_band (pet_flags, EM_GRUPO) ~= 0) then
|
||||
_detalhes.pets_no_owner [pet_serial] = {pet_nome, pet_flags}
|
||||
_detalhes:Msg ("couldn't find the owner of the pet:", pet_nome)
|
||||
@@ -227,9 +227,9 @@ function _detalhes:WipePets()
|
||||
end
|
||||
|
||||
function _detalhes:LimparPets()
|
||||
--> erase old pet table by creating a new one
|
||||
--erase old pet table by creating a new one
|
||||
local newPetTable = {}
|
||||
--> minimum of 90 minutes to clean a pet from the pet table data
|
||||
--minimum of 90 minutes to clean a pet from the pet table data
|
||||
for PetSerial, PetTable in _pairs (_detalhes.tabela_pets.pets) do
|
||||
if ( (PetTable[4] + 5400 > _detalhes._tempo + 1) or (PetTable[5] and PetTable[4] + 43200 > _detalhes._tempo) ) then
|
||||
newPetTable [PetSerial] = PetTable
|
||||
|
||||
@@ -16,30 +16,30 @@ local container_pets = _detalhes.container_pets
|
||||
local timeMachine = _detalhes.timeMachine
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> API
|
||||
--API
|
||||
|
||||
--> reset only the overall data
|
||||
--reset only the overall data
|
||||
function _detalhes:ResetSegmentOverallData()
|
||||
return historico:resetar_overall()
|
||||
end
|
||||
|
||||
--> reset segments and overall data
|
||||
--reset segments and overall data
|
||||
function _detalhes:ResetSegmentData()
|
||||
return historico:resetar()
|
||||
end
|
||||
|
||||
--> returns the current active segment
|
||||
--returns the current active segment
|
||||
function _detalhes:GetCurrentCombat()
|
||||
return _detalhes.tabela_vigente
|
||||
end
|
||||
|
||||
--> returns a private table containing all stored segments
|
||||
--returns a private table containing all stored segments
|
||||
function _detalhes:GetCombatSegments()
|
||||
return _detalhes.tabela_historico.tabelas
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internal
|
||||
--internal
|
||||
|
||||
function historico:NovoHistorico()
|
||||
local esta_tabela = {tabelas = {}}
|
||||
@@ -55,13 +55,13 @@ function historico:adicionar_overall (tabela)
|
||||
end
|
||||
|
||||
if (_detalhes.overall_clear_newboss) then
|
||||
--> only for raids
|
||||
--only for raids
|
||||
if (tabela.instance_type == "raid" and tabela.is_boss) then
|
||||
if (_detalhes.last_encounter ~= _detalhes.last_encounter2) then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) new boss detected 'overall_clear_newboss' is true, cleaning overall data.")
|
||||
end
|
||||
for index, combat in ipairs (_detalhes.tabela_historico.tabelas) do
|
||||
for index, combat in ipairs(_detalhes.tabela_historico.tabelas) do
|
||||
combat.overall_added = false
|
||||
end
|
||||
historico:resetar_overall()
|
||||
@@ -75,7 +75,7 @@ function historico:adicionar_overall (tabela)
|
||||
end
|
||||
local mythicInfo = tabela.is_mythic_dungeon
|
||||
if (mythicInfo) then
|
||||
--> do not add overall mythic+ dungeon segments
|
||||
--do not add overall mythic+ dungeon segments
|
||||
if (mythicInfo.TrashOverallSegment) then
|
||||
_detalhes:Msg ("error > attempt to add a TrashOverallSegment > func historico:adicionar_overall()")
|
||||
return
|
||||
@@ -85,7 +85,7 @@ function historico:adicionar_overall (tabela)
|
||||
end
|
||||
end
|
||||
|
||||
--> store the segments added to the overall data
|
||||
--store the segments added to the overall data
|
||||
_detalhes.tabela_overall.segments_added = _detalhes.tabela_overall.segments_added or {}
|
||||
local this_clock = tabela.data_inicio
|
||||
|
||||
@@ -148,24 +148,24 @@ end
|
||||
|
||||
function _detalhes:CanAddCombatToOverall (tabela)
|
||||
|
||||
--> already added
|
||||
--already added
|
||||
if (tabela.overall_added) then
|
||||
return false
|
||||
end
|
||||
|
||||
--> already scheduled to add
|
||||
--already scheduled to add
|
||||
if (_detalhes.schedule_add_to_overall) then --deprecated
|
||||
for _, combat in ipairs (_detalhes.schedule_add_to_overall) do
|
||||
for _, combat in ipairs(_detalhes.schedule_add_to_overall) do
|
||||
if (combat == tabela) then
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> special cases
|
||||
--special cases
|
||||
local mythicInfo = tabela.is_mythic_dungeon
|
||||
if (mythicInfo) then
|
||||
--> do not add overall mythic+ dungeon segments
|
||||
--do not add overall mythic+ dungeon segments
|
||||
if (mythicInfo.TrashOverallSegment) then
|
||||
return false
|
||||
elseif (mythicInfo.OverallSegment) then
|
||||
@@ -173,7 +173,7 @@ function _detalhes:CanAddCombatToOverall (tabela)
|
||||
end
|
||||
end
|
||||
|
||||
--> raid boss - flag 0x1
|
||||
--raid boss - flag 0x1
|
||||
if (bit.band (_detalhes.overall_flag, 0x1) ~= 0) then
|
||||
if (tabela.is_boss and tabela.instance_type == "raid" and not tabela.is_pvp) then
|
||||
if (tabela:GetCombatTime() >= 30) then
|
||||
@@ -182,33 +182,33 @@ function _detalhes:CanAddCombatToOverall (tabela)
|
||||
end
|
||||
end
|
||||
|
||||
--> raid trash - flag 0x2
|
||||
--raid trash - flag 0x2
|
||||
if (bit.band (_detalhes.overall_flag, 0x2) ~= 0) then
|
||||
if (tabela.is_trash and tabela.instance_type == "raid") then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--> dungeon boss - flag 0x4
|
||||
--dungeon boss - flag 0x4
|
||||
if (bit.band (_detalhes.overall_flag, 0x4) ~= 0) then
|
||||
if (tabela.is_boss and tabela.instance_type == "party" and not tabela.is_pvp) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--> dungeon trash - flag 0x8
|
||||
--dungeon trash - flag 0x8
|
||||
if (bit.band (_detalhes.overall_flag, 0x8) ~= 0) then
|
||||
if ((tabela.is_trash or tabela.is_mythic_dungeon_trash) and tabela.instance_type == "party") then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--> any combat
|
||||
--any combat
|
||||
if (bit.band (_detalhes.overall_flag, 0x10) ~= 0) then
|
||||
return true
|
||||
end
|
||||
|
||||
--> is a PvP combat
|
||||
--is a PvP combat
|
||||
if (tabela.is_pvp or tabela.is_arena) then
|
||||
return true
|
||||
end
|
||||
@@ -216,25 +216,25 @@ function _detalhes:CanAddCombatToOverall (tabela)
|
||||
return false
|
||||
end
|
||||
|
||||
--> sai do combate, chamou adicionar a tabela ao hist�rico
|
||||
--sai do combate, chamou adicionar a tabela ao hist�rico
|
||||
function historico:adicionar (tabela)
|
||||
|
||||
local tamanho = #self.tabelas
|
||||
|
||||
--> verifica se precisa dar UnFreeze()
|
||||
if (tamanho < _detalhes.segments_amount) then --> vai preencher um novo index vazio
|
||||
--verifica se precisa dar UnFreeze()
|
||||
if (tamanho < _detalhes.segments_amount) then --vai preencher um novo index vazio
|
||||
local ultima_tabela = self.tabelas[tamanho]
|
||||
if (not ultima_tabela) then --> n�o ha tabelas no historico, esta ser� a #1
|
||||
--> pega a tabela do combate atual
|
||||
if (not ultima_tabela) then --n�o ha tabelas no historico, esta ser� a #1
|
||||
--pega a tabela do combate atual
|
||||
ultima_tabela = tabela
|
||||
end
|
||||
_detalhes:InstanciaCallFunction (_detalhes.CheckFreeze, tamanho+1, ultima_tabela)
|
||||
end
|
||||
|
||||
--> add to history table
|
||||
--add to history table
|
||||
_table_insert (self.tabelas, 1, tabela)
|
||||
|
||||
--> count boss tries
|
||||
--count boss tries
|
||||
local boss = tabela.is_boss and tabela.is_boss.name
|
||||
if (boss) then
|
||||
local try_number = _detalhes.encounter_counter [boss]
|
||||
@@ -260,7 +260,7 @@ function historico:adicionar (tabela)
|
||||
tabela.is_boss.try_number = try_number
|
||||
end
|
||||
|
||||
--> see if can add the encounter to overall data
|
||||
--see if can add the encounter to overall data
|
||||
local canAddToOverall = _detalhes:CanAddCombatToOverall (tabela)
|
||||
|
||||
if (canAddToOverall) then
|
||||
@@ -277,25 +277,25 @@ function historico:adicionar (tabela)
|
||||
--end
|
||||
end
|
||||
|
||||
--> erase trash segments
|
||||
--erase trash segments
|
||||
if (self.tabelas[2]) then
|
||||
local _segundo_combate = self.tabelas[2]
|
||||
local container_damage = _segundo_combate [1]
|
||||
local container_heal = _segundo_combate [2]
|
||||
|
||||
--regular cleanup
|
||||
for _, jogador in ipairs (container_damage._ActorTable) do
|
||||
--> remover a tabela de last events
|
||||
for _, jogador in ipairs(container_damage._ActorTable) do
|
||||
--remover a tabela de last events
|
||||
jogador.last_events_table = nil
|
||||
--> verifica se ele ainda esta registrado na time machine
|
||||
--verifica se ele ainda esta registrado na time machine
|
||||
if (jogador.timeMachine) then
|
||||
jogador:DesregistrarNaTimeMachine()
|
||||
end
|
||||
end
|
||||
for _, jogador in ipairs (container_heal._ActorTable) do
|
||||
--> remover a tabela de last events
|
||||
for _, jogador in ipairs(container_heal._ActorTable) do
|
||||
--remover a tabela de last events
|
||||
jogador.last_events_table = nil
|
||||
--> verifica se ele ainda esta registrado na time machine
|
||||
--verifica se ele ainda esta registrado na time machine
|
||||
if (jogador.timeMachine) then
|
||||
jogador:DesregistrarNaTimeMachine()
|
||||
end
|
||||
@@ -307,20 +307,20 @@ function historico:adicionar (tabela)
|
||||
if (_terceiro_combate and not _terceiro_combate.is_mythic_dungeon_segment) then
|
||||
|
||||
if ((_terceiro_combate.is_trash and not _terceiro_combate.is_boss) or (_terceiro_combate.is_temporary)) then
|
||||
--> verificar novamente a time machine
|
||||
for _, jogador in ipairs (_terceiro_combate [1]._ActorTable) do --> damage
|
||||
--verificar novamente a time machine
|
||||
for _, jogador in ipairs(_terceiro_combate [1]._ActorTable) do --damage
|
||||
if (jogador.timeMachine) then
|
||||
jogador:DesregistrarNaTimeMachine()
|
||||
end
|
||||
end
|
||||
for _, jogador in ipairs (_terceiro_combate [2]._ActorTable) do --> heal
|
||||
for _, jogador in ipairs(_terceiro_combate [2]._ActorTable) do --heal
|
||||
if (jogador.timeMachine) then
|
||||
jogador:DesregistrarNaTimeMachine()
|
||||
end
|
||||
end
|
||||
--> remover
|
||||
--remover
|
||||
_table_remove (self.tabelas, 3)
|
||||
_detalhes:SendEvent ("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
|
||||
_detalhes:SendEvent("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -329,12 +329,12 @@ function historico:adicionar (tabela)
|
||||
|
||||
end
|
||||
|
||||
--> verifica se precisa apagar a �ltima tabela do hist�rico
|
||||
--verifica se precisa apagar a �ltima tabela do hist�rico
|
||||
if (#self.tabelas > _detalhes.segments_amount) then
|
||||
|
||||
local combat_removed, combat_index
|
||||
|
||||
--> verifica se est�o dando try em um boss e remove o combate menos relevante
|
||||
--verifica se est�o dando try em um boss e remove o combate menos relevante
|
||||
local bossid = tabela.is_boss and tabela.is_boss.id
|
||||
|
||||
local last_segment = self.tabelas [#self.tabelas]
|
||||
@@ -366,31 +366,31 @@ function historico:adicionar (tabela)
|
||||
combat_index = #self.tabelas
|
||||
end
|
||||
|
||||
--> verificar novamente a time machine
|
||||
for _, jogador in ipairs (combat_removed [1]._ActorTable) do --> damage
|
||||
--verificar novamente a time machine
|
||||
for _, jogador in ipairs(combat_removed [1]._ActorTable) do --damage
|
||||
if (jogador.timeMachine) then
|
||||
jogador:DesregistrarNaTimeMachine()
|
||||
end
|
||||
end
|
||||
for _, jogador in ipairs (combat_removed [2]._ActorTable) do --> heal
|
||||
for _, jogador in ipairs(combat_removed [2]._ActorTable) do --heal
|
||||
if (jogador.timeMachine) then
|
||||
jogador:DesregistrarNaTimeMachine()
|
||||
end
|
||||
end
|
||||
|
||||
--> remover
|
||||
--remover
|
||||
_table_remove (self.tabelas, combat_index)
|
||||
_detalhes:SendEvent ("DETAILS_DATA_SEGMENTREMOVED")
|
||||
_detalhes:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
|
||||
end
|
||||
|
||||
--> chama a fun��o que ir� atualizar as inst�ncias com segmentos no hist�rico
|
||||
--chama a fun��o que ir� atualizar as inst�ncias com segmentos no hist�rico
|
||||
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos_AfterCombat, self)
|
||||
--_detalhes:InstanciaCallFunction (_detalhes.AtualizarJanela)
|
||||
end
|
||||
|
||||
--> verifica se tem alguma instancia congelada mostrando o segmento rec�m liberado
|
||||
--verifica se tem alguma instancia congelada mostrando o segmento rec�m liberado
|
||||
function _detalhes:CheckFreeze (instancia, index_liberado, tabela)
|
||||
if (instancia.freezed) then --> esta congelada
|
||||
if (instancia.freezed) then --esta congelada
|
||||
if (instancia.segmento == index_liberado) then
|
||||
instancia.showing = tabela
|
||||
instancia:UnFreeze()
|
||||
@@ -423,12 +423,12 @@ function historico:resetar_overall()
|
||||
-- _detalhes:Msg (Loc ["STRING_ERASE_IN_COMBAT"])
|
||||
-- _detalhes.schedule_remove_overall = true
|
||||
--else
|
||||
--> fecha a janela de informa��es do jogador
|
||||
--fecha a janela de informa��es do jogador
|
||||
_detalhes:FechaJanelaInfo()
|
||||
|
||||
_detalhes.tabela_overall = combate:NovaTabela()
|
||||
|
||||
for index, instancia in ipairs (_detalhes.tabela_instancias) do
|
||||
for index, instancia in ipairs(_detalhes.tabela_instancias) do
|
||||
if (instancia.ativa and instancia.segmento == -1) then
|
||||
instancia:InstanceReset()
|
||||
instancia:ReajustaGump()
|
||||
@@ -440,7 +440,7 @@ function historico:resetar_overall()
|
||||
end
|
||||
--end
|
||||
|
||||
--> stop bar testing if any
|
||||
--stop bar testing if any
|
||||
_detalhes:StopTestBarUpdate()
|
||||
|
||||
_detalhes:ClockPluginTickOnSegment()
|
||||
@@ -452,32 +452,32 @@ function historico:resetar()
|
||||
_detalhes.bosswindow:Reset()
|
||||
end
|
||||
|
||||
--> stop bar testing if any
|
||||
--stop bar testing if any
|
||||
_detalhes:StopTestBarUpdate()
|
||||
|
||||
if (_detalhes.tabela_vigente.verifica_combate) then --> finaliza a checagem se esta ou n�o no combate
|
||||
if (_detalhes.tabela_vigente.verifica_combate) then --finaliza a checagem se esta ou n�o no combate
|
||||
_detalhes:CancelTimer (_detalhes.tabela_vigente.verifica_combate)
|
||||
end
|
||||
|
||||
_detalhes.last_closed_combat = nil
|
||||
|
||||
--> remove mythic dungeon schedules if any
|
||||
--remove mythic dungeon schedules if any
|
||||
_detalhes.schedule_mythicdungeon_trash_merge = nil
|
||||
_detalhes.schedule_mythicdungeon_endtrash_merge = nil
|
||||
_detalhes.schedule_mythicdungeon_overallrun_merge = nil
|
||||
|
||||
--> clear other schedules
|
||||
--clear other schedules
|
||||
_detalhes.schedule_flag_boss_components = nil
|
||||
_detalhes.schedule_store_boss_encounter = nil
|
||||
--_detalhes.schedule_remove_overall = nil
|
||||
|
||||
--> fecha a janela de informa��es do jogador
|
||||
--fecha a janela de informa��es do jogador
|
||||
_detalhes:FechaJanelaInfo()
|
||||
|
||||
--> empty temporary tables
|
||||
--empty temporary tables
|
||||
_detalhes.atributo_damage:ClearTempTables()
|
||||
|
||||
for _, combate in ipairs (_detalhes.tabela_historico.tabelas) do
|
||||
for _, combate in ipairs(_detalhes.tabela_historico.tabelas) do
|
||||
_table_wipe (combate)
|
||||
end
|
||||
_table_wipe (_detalhes.tabela_vigente)
|
||||
@@ -489,7 +489,7 @@ function historico:resetar()
|
||||
end
|
||||
|
||||
_detalhes:LimparPets()
|
||||
_detalhes:ResetSpecCache (true) --> for�ar
|
||||
_detalhes:ResetSpecCache (true) --for�ar
|
||||
|
||||
-- novo container de historico
|
||||
_detalhes.tabela_historico = historico:NovoHistorico() --joga fora a tabela antiga e cria uma nova
|
||||
@@ -507,13 +507,13 @@ function historico:resetar()
|
||||
--zera o contador de combates
|
||||
_detalhes:NumeroCombate (0)
|
||||
|
||||
--> limpa o cache de magias
|
||||
--limpa o cache de magias
|
||||
_detalhes:ClearSpellCache()
|
||||
|
||||
--> limpa a tabela de escudos
|
||||
--limpa a tabela de escudos
|
||||
_table_wipe (_detalhes.escudos)
|
||||
|
||||
--> reinicia a time machine
|
||||
--reinicia a time machine
|
||||
timeMachine:Reiniciar()
|
||||
|
||||
_table_wipe (_detalhes.cache_damage_group)
|
||||
@@ -521,7 +521,7 @@ function historico:resetar()
|
||||
_detalhes:UpdateParserGears()
|
||||
|
||||
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
|
||||
--> workarround for the "script run too long" issue while outside the combat lockdown
|
||||
--workarround for the "script run too long" issue while outside the combat lockdown
|
||||
local cleargarbage = function()
|
||||
collectgarbage()
|
||||
end
|
||||
@@ -538,9 +538,9 @@ function historico:resetar()
|
||||
_detalhes:InstanciaCallFunction(_detalhes.ResetaGump) --_detalhes:ResetaGump ("de todas as instancias")
|
||||
_detalhes:InstanciaCallFunction(Details.FadeHandler.Fader, "IN", nil, "barras")
|
||||
|
||||
_detalhes:RefreshMainWindow (-1) --atualiza todas as instancias
|
||||
_detalhes:RefreshMainWindow(-1) --atualiza todas as instancias
|
||||
|
||||
_detalhes:SendEvent ("DETAILS_DATA_RESET", nil, nil)
|
||||
_detalhes:SendEvent("DETAILS_DATA_RESET", nil, nil)
|
||||
|
||||
end
|
||||
|
||||
@@ -558,7 +558,7 @@ end
|
||||
|
||||
if (_terceiro_combate) then
|
||||
if (_terceiro_combate.is_trash and _segundo_combate.is_trash and not _terceiro_combate.is_boss and not _segundo_combate.is_boss) then
|
||||
--> tabela 2 deve ser deletada e somada a tabela 1
|
||||
--tabela 2 deve ser deletada e somada a tabela 1
|
||||
if (_detalhes.debug) then
|
||||
detalhes:Msg ("(debug) concatenating two trash segments.")
|
||||
end
|
||||
@@ -568,20 +568,20 @@ end
|
||||
|
||||
_segundo_combate.is_trash = true
|
||||
|
||||
--> verificar novamente a time machine
|
||||
for _, jogador in ipairs (_terceiro_combate [1]._ActorTable) do --> damage
|
||||
--verificar novamente a time machine
|
||||
for _, jogador in ipairs(_terceiro_combate [1]._ActorTable) do --damage
|
||||
if (jogador.timeMachine) then
|
||||
jogador:DesregistrarNaTimeMachine()
|
||||
end
|
||||
end
|
||||
for _, jogador in ipairs (_terceiro_combate [2]._ActorTable) do --> heal
|
||||
for _, jogador in ipairs(_terceiro_combate [2]._ActorTable) do --heal
|
||||
if (jogador.timeMachine) then
|
||||
jogador:DesregistrarNaTimeMachine()
|
||||
end
|
||||
end
|
||||
--> remover
|
||||
--remover
|
||||
_table_remove (self.tabelas, 3)
|
||||
_detalhes:SendEvent ("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
|
||||
_detalhes:SendEvent("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
|
||||
end
|
||||
end
|
||||
--]]
|
||||
|
||||
@@ -4,12 +4,12 @@ local _detalhes = _G._detalhes
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
|
||||
local _setmetatable = setmetatable --lua local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
--constants
|
||||
|
||||
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
|
||||
local container_damage = _detalhes.container_type.CONTAINER_DAMAGE_CLASS
|
||||
@@ -30,7 +30,7 @@ local _
|
||||
local container_habilidades = _detalhes.container_habilidades
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internals
|
||||
--internals
|
||||
|
||||
function container_habilidades:NovoContainer (tipo_do_container)
|
||||
local _newContainer = {
|
||||
@@ -100,7 +100,7 @@ local _
|
||||
end
|
||||
|
||||
function _detalhes.refresh:r_container_habilidades (container, shadow)
|
||||
--> reconstr�i meta e indexes
|
||||
--reconstr�i meta e indexes
|
||||
_setmetatable (container, _detalhes.container_habilidades)
|
||||
container.__index = _detalhes.container_habilidades
|
||||
local func_criacao = container_habilidades:FuncaoDeCriacao (container.tipo)
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> attributes functions for customs
|
||||
--> DAMAGEDONE
|
||||
--attributes functions for customs
|
||||
--DAMAGEDONE
|
||||
|
||||
--> customized display script
|
||||
--customized display script
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> attributes functions for customs
|
||||
--> DAMAGEDONE
|
||||
--attributes functions for customs
|
||||
--DAMAGEDONE
|
||||
|
||||
--> customized display script
|
||||
--customized display script
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
|
||||
local _cstr = string.format --lua local
|
||||
local _math_floor = math.floor --lua local
|
||||
@@ -40,7 +40,7 @@ local _GetNumRaidMembers = GetNumRaidMembers or GetNumGroupMembers -- api local
|
||||
local _GetUnitName = GetUnitName -- api local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
--constants
|
||||
|
||||
local atributo_custom = _detalhes.atributo_custom
|
||||
|
||||
@@ -106,7 +106,7 @@ local function SortOrder (main_table, func, ...)
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> damagedone tooltip
|
||||
--damagedone tooltip
|
||||
|
||||
function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, instance)
|
||||
|
||||
@@ -199,7 +199,7 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
|
||||
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
|
||||
end
|
||||
|
||||
--for index, pet_name in ipairs (actor.pets) do
|
||||
--for index, pet_name in ipairs(actor.pets) do
|
||||
|
||||
--end
|
||||
end
|
||||
@@ -210,23 +210,23 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> damagedone search
|
||||
--damagedone search
|
||||
|
||||
function atributo_custom:damagedone (actor, source, target, spellid, combat, instance_container)
|
||||
|
||||
if (spellid) then --> spell is always damagedone
|
||||
if (spellid) then --spell is always damagedone
|
||||
local spell = actor.spells._ActorTable [spellid]
|
||||
if (spell) then
|
||||
if (target) then
|
||||
if (target == "[all]") then
|
||||
for target_name, amount in _pairs (spell.targets) do
|
||||
--> add amount
|
||||
--add amount
|
||||
|
||||
--> we need to pass a object here in order to get name and class, so we just get the main damage actor from the combat
|
||||
--we need to pass a object here in order to get name and class, so we just get the main damage actor from the combat
|
||||
instance_container:AddValue (combat (1, target_name), amount, true)
|
||||
--
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
|
||||
--> add to processed container
|
||||
--add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [target_name]) then
|
||||
atributo_custom._TargetActorsProcessed [target_name] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
@@ -238,10 +238,10 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
|
||||
local roster = combat.raid_roster
|
||||
for target_name, amount in _pairs (spell.targets) do
|
||||
if (roster [target_name]) then
|
||||
--> add amount
|
||||
--add amount
|
||||
instance_container:AddValue (combat (1, target_name), amount, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
|
||||
--> add to processed container
|
||||
--add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [target_name]) then
|
||||
atributo_custom._TargetActorsProcessed [target_name] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
@@ -253,10 +253,10 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
|
||||
elseif (target == "[player]") then
|
||||
local target_amount = spell.targets [_detalhes.playername]
|
||||
if (target_amount) then
|
||||
--> add amount
|
||||
--add amount
|
||||
instance_container:AddValue (combat (1, _detalhes.playername), target_amount, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
|
||||
--> add to processed container
|
||||
--add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [_detalhes.playername]) then
|
||||
atributo_custom._TargetActorsProcessed [_detalhes.playername] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
@@ -267,10 +267,10 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
|
||||
else
|
||||
local target_amount = actor.targets [target]
|
||||
if (target_amount) then
|
||||
--> add amount
|
||||
--add amount
|
||||
instance_container:AddValue (combat (1, target), target_amount, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
|
||||
--> add to processed container
|
||||
--add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [target]) then
|
||||
atributo_custom._TargetActorsProcessed [target] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
|
||||
local _cstr = string.format --lua local
|
||||
local _math_floor = math.floor --lua local
|
||||
@@ -33,7 +33,7 @@
|
||||
local _GetUnitName = GetUnitName -- api local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
--constants
|
||||
|
||||
local atributo_custom = _detalhes.atributo_custom
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> healing done tooltip
|
||||
--healing done tooltip
|
||||
|
||||
|
||||
function atributo_custom:healdoneTooltip (actor, target, spellid, combat, instance)
|
||||
@@ -198,24 +198,24 @@
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> healing done search
|
||||
--healing done search
|
||||
|
||||
function atributo_custom:healdone (actor, source, target, spellid, combat, instance_container)
|
||||
|
||||
if (spellid) then --> spell is always healing done
|
||||
if (spellid) then --spell is always healing done
|
||||
local spell = actor.spells._ActorTable [spellid]
|
||||
local melee = actor.spells._ActorTable [1]
|
||||
if (spell) then
|
||||
if (target) then
|
||||
if (target == "[all]") then
|
||||
for target_name, amount in _pairs (spell.targets) do
|
||||
--> add amount
|
||||
--add amount
|
||||
|
||||
--> we need to pass a object here in order to get name and class, so we just get the main heal actor from the combat
|
||||
--we need to pass a object here in order to get name and class, so we just get the main heal actor from the combat
|
||||
instance_container:AddValue (combat (1, target_name), amount, true)
|
||||
--
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
|
||||
--> add to processed container
|
||||
--add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [target_name]) then
|
||||
atributo_custom._TargetActorsProcessed [target_name] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
@@ -227,10 +227,10 @@
|
||||
local roster = combat.raid_roster
|
||||
for target_name, amount in _pairs (spell.targets) do
|
||||
if (roster [target_name]) then
|
||||
--> add amount
|
||||
--add amount
|
||||
instance_container:AddValue (combat (1, target_name), amount, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + amount
|
||||
--> add to processed container
|
||||
--add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [target_name]) then
|
||||
atributo_custom._TargetActorsProcessed [target_name] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
@@ -242,10 +242,10 @@
|
||||
elseif (target == "[player]") then
|
||||
local target_amount = spell.targets [_detalhes.playername]
|
||||
if (target_amount) then
|
||||
--> add amount
|
||||
--add amount
|
||||
instance_container:AddValue (combat (1, _detalhes.playername), target_amount, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
|
||||
--> add to processed container
|
||||
--add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [_detalhes.playername]) then
|
||||
atributo_custom._TargetActorsProcessed [_detalhes.playername] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
@@ -256,10 +256,10 @@
|
||||
else
|
||||
local target_amount = actor.targets [target]
|
||||
if (target_amount) then
|
||||
--> add amount
|
||||
--add amount
|
||||
instance_container:AddValue (combat (1, target), target_amount, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + target_amount
|
||||
--> add to processed container
|
||||
--add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [target]) then
|
||||
atributo_custom._TargetActorsProcessed [target] = true
|
||||
atributo_custom._TargetActorsProcessedAmt = atributo_custom._TargetActorsProcessedAmt + 1
|
||||
|
||||
@@ -12,7 +12,7 @@ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
|
||||
|
||||
function _detalhes:ResetInstanceConfig (maintainsnap)
|
||||
for key, value in pairs (_detalhes.instance_defaults) do
|
||||
if (type (value) == "table") then
|
||||
if (type(value) == "table") then
|
||||
self [key] = Details.CopyTable (value)
|
||||
else
|
||||
self [key] = value
|
||||
@@ -59,7 +59,7 @@ _detalhes.instance_skin_ignored_values = {
|
||||
function _detalhes:ResetInstanceConfigKeepingValues (maintainsnap)
|
||||
for key, value in pairs (_detalhes.instance_defaults) do
|
||||
if (not _detalhes.instance_skin_ignored_values [key]) then
|
||||
if (type (value) == "table") then
|
||||
if (type(value) == "table") then
|
||||
self [key] = Details.CopyTable (value)
|
||||
else
|
||||
self [key] = value
|
||||
@@ -77,16 +77,16 @@ end
|
||||
function _detalhes:LoadInstanceConfig()
|
||||
for key, value in pairs (_detalhes.instance_defaults) do
|
||||
if (self [key] == nil) then
|
||||
if (type (value) == "table") then
|
||||
if (type(value) == "table") then
|
||||
self [key] = Details.CopyTable (_detalhes.instance_defaults [key])
|
||||
else
|
||||
self [key] = value
|
||||
end
|
||||
|
||||
elseif (type (value) == "table") then
|
||||
elseif (type(value) == "table") then
|
||||
for key2, value2 in pairs (value) do
|
||||
if (self [key] [key2] == nil) then
|
||||
if (type (value2) == "table") then
|
||||
if (type(value2) == "table") then
|
||||
self [key] [key2] = Details.CopyTable (_detalhes.instance_defaults [key] [key2])
|
||||
else
|
||||
self [key] [key2] = value2
|
||||
@@ -99,13 +99,13 @@ end
|
||||
|
||||
_detalhes.instance_defaults = {
|
||||
|
||||
--> click through settings
|
||||
--click through settings
|
||||
clickthrough_toolbaricons = false,
|
||||
clickthrough_rows = false,
|
||||
clickthrough_window = false,
|
||||
clickthrough_incombatonly = true,
|
||||
|
||||
--> window settings
|
||||
--window settings
|
||||
ignore_mass_showhide = false,
|
||||
--skin
|
||||
skin = _detalhes.default_skin_to_use,
|
||||
|
||||
+183
-183
File diff suppressed because it is too large
Load Diff
+114
-114
@@ -27,7 +27,7 @@ function _detalhes:GetCoreVersion()
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> chat hooks
|
||||
--chat hooks
|
||||
|
||||
_detalhes.chat_embed = _detalhes:CreateEventListener()
|
||||
_detalhes.chat_embed.startup = true
|
||||
@@ -74,7 +74,7 @@ end
|
||||
_detalhes.chat_tab_embed.single_window = is_single
|
||||
|
||||
if (current_name ~= tab_name) then
|
||||
--> rename the tab on chat frame
|
||||
--rename the tab on chat frame
|
||||
local ChatFrame = _detalhes.chat_embed:GetTab (current_name)
|
||||
if (ChatFrame) then
|
||||
FCF_SetWindowName (ChatFrame, tab_name, false)
|
||||
@@ -82,7 +82,7 @@ end
|
||||
end
|
||||
|
||||
if (is_enabled) then
|
||||
--> was disabled, so we need to save the current window positions.
|
||||
--was disabled, so we need to save the current window positions.
|
||||
if (not current_enabled_state) then
|
||||
local window1 = _detalhes:GetInstance (1)
|
||||
if (window1) then
|
||||
@@ -102,10 +102,10 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
--> need to make the embed
|
||||
--need to make the embed
|
||||
_detalhes.chat_embed:DoEmbed()
|
||||
else
|
||||
--> need to release the frame
|
||||
--need to release the frame
|
||||
if (current_enabled_state) then
|
||||
_detalhes.chat_embed:ReleaseEmbed()
|
||||
end
|
||||
@@ -158,27 +158,27 @@ end
|
||||
_detalhes.chat_tab_embed_onframe = ChatFrame
|
||||
|
||||
if (_detalhes.chat_tab_embed.single_window) then
|
||||
--> only one window
|
||||
--only one window
|
||||
local window1 = _detalhes:GetInstance (1)
|
||||
|
||||
window1:UngroupInstance()
|
||||
window1.baseframe:ClearAllPoints()
|
||||
|
||||
window1.baseframe:SetParent (ChatFrame)
|
||||
window1.baseframe:SetParent(ChatFrame)
|
||||
|
||||
window1.rowframe:SetParent (window1.baseframe)
|
||||
window1.rowframe:SetParent(window1.baseframe)
|
||||
window1.rowframe:ClearAllPoints()
|
||||
window1.rowframe:SetAllPoints()
|
||||
|
||||
window1.windowSwitchButton:SetParent (window1.baseframe)
|
||||
window1.windowSwitchButton:SetParent(window1.baseframe)
|
||||
window1.windowSwitchButton:ClearAllPoints()
|
||||
window1.windowSwitchButton:SetAllPoints()
|
||||
|
||||
local y_up = window1.toolbar_side == 1 and -20 or 0
|
||||
local y_down = (window1.show_statusbar and 14 or 0) + (window1.toolbar_side == 2 and 20 or 0)
|
||||
|
||||
window1.baseframe:SetPoint ("topleft", ChatFrameBackground, "topleft", 0, y_up + _detalhes.chat_tab_embed.y_offset)
|
||||
window1.baseframe:SetPoint ("bottomright", ChatFrameBackground, "bottomright", _detalhes.chat_tab_embed.x_offset, y_down)
|
||||
window1.baseframe:SetPoint("topleft", ChatFrameBackground, "topleft", 0, y_up + _detalhes.chat_tab_embed.y_offset)
|
||||
window1.baseframe:SetPoint("bottomright", ChatFrameBackground, "bottomright", _detalhes.chat_tab_embed.x_offset, y_down)
|
||||
|
||||
window1:LockInstance (true)
|
||||
window1:SaveMainWindowPosition()
|
||||
@@ -186,13 +186,13 @@ end
|
||||
local window2 = _detalhes:GetInstance (2)
|
||||
if (window2 and window2.baseframe) then
|
||||
if (window2.baseframe:GetParent() == ChatFrame) then
|
||||
--> need to detach
|
||||
--need to detach
|
||||
_detalhes.chat_embed:ReleaseEmbed (true)
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
--> window #1 and #2
|
||||
--window #1 and #2
|
||||
local window1 = _detalhes:GetInstance (1)
|
||||
local window2 = _detalhes:GetInstance (2)
|
||||
if (not window2) then
|
||||
@@ -204,15 +204,15 @@ end
|
||||
window1.baseframe:ClearAllPoints()
|
||||
window2.baseframe:ClearAllPoints()
|
||||
|
||||
window1.baseframe:SetParent (ChatFrame)
|
||||
window2.baseframe:SetParent (ChatFrame)
|
||||
window1.rowframe:SetParent (window1.baseframe)
|
||||
window2.rowframe:SetParent (window2.baseframe)
|
||||
window1.baseframe:SetParent(ChatFrame)
|
||||
window2.baseframe:SetParent(ChatFrame)
|
||||
window1.rowframe:SetParent(window1.baseframe)
|
||||
window2.rowframe:SetParent(window2.baseframe)
|
||||
|
||||
window1.windowSwitchButton:SetParent (window1.baseframe)
|
||||
window1.windowSwitchButton:SetParent(window1.baseframe)
|
||||
window1.windowSwitchButton:ClearAllPoints()
|
||||
window1.windowSwitchButton:SetAllPoints()
|
||||
window2.windowSwitchButton:SetParent (window2.baseframe)
|
||||
window2.windowSwitchButton:SetParent(window2.baseframe)
|
||||
window2.windowSwitchButton:ClearAllPoints()
|
||||
window2.windowSwitchButton:SetAllPoints()
|
||||
|
||||
@@ -232,11 +232,11 @@ end
|
||||
local width = ChatFrameBackground:GetWidth() / 2
|
||||
local height = ChatFrameBackground:GetHeight() - y_down + y_up
|
||||
|
||||
window1.baseframe:SetSize (width + (_detalhes.chat_tab_embed.x_offset/2), height + _detalhes.chat_tab_embed.y_offset)
|
||||
window2.baseframe:SetSize (width + (_detalhes.chat_tab_embed.x_offset/2), height + _detalhes.chat_tab_embed.y_offset)
|
||||
window1.baseframe:SetSize(width + (_detalhes.chat_tab_embed.x_offset/2), height + _detalhes.chat_tab_embed.y_offset)
|
||||
window2.baseframe:SetSize(width + (_detalhes.chat_tab_embed.x_offset/2), height + _detalhes.chat_tab_embed.y_offset)
|
||||
|
||||
window1.baseframe:SetPoint ("topleft", ChatFrameBackground, "topleft", 0, y_up + _detalhes.chat_tab_embed.y_offset)
|
||||
window2.baseframe:SetPoint ("topright", ChatFrameBackground, "topright", _detalhes.chat_tab_embed.x_offset, y_up + _detalhes.chat_tab_embed.y_offset)
|
||||
window1.baseframe:SetPoint("topleft", ChatFrameBackground, "topleft", 0, y_up + _detalhes.chat_tab_embed.y_offset)
|
||||
window2.baseframe:SetPoint("topright", ChatFrameBackground, "topright", _detalhes.chat_tab_embed.x_offset, y_up + _detalhes.chat_tab_embed.y_offset)
|
||||
|
||||
window1:SaveMainWindowPosition()
|
||||
window2:SaveMainWindowPosition()
|
||||
@@ -248,16 +248,16 @@ end
|
||||
end
|
||||
|
||||
function _detalhes.chat_embed:ReleaseEmbed (second_window)
|
||||
--> release
|
||||
--release
|
||||
local window1 = _detalhes:GetInstance (1)
|
||||
local window2 = _detalhes:GetInstance (2)
|
||||
|
||||
if (second_window) then
|
||||
window2.baseframe:ClearAllPoints()
|
||||
window2.baseframe:SetParent (UIParent)
|
||||
window2.rowframe:SetParent (UIParent)
|
||||
window2.baseframe:SetPoint ("center", UIParent, "center", 200, 0)
|
||||
window2.rowframe:SetPoint ("center", UIParent, "center", 200, 0)
|
||||
window2.baseframe:SetParent(UIParent)
|
||||
window2.rowframe:SetParent(UIParent)
|
||||
window2.baseframe:SetPoint("center", UIParent, "center", 200, 0)
|
||||
window2.rowframe:SetPoint("center", UIParent, "center", 200, 0)
|
||||
window2:LockInstance (false)
|
||||
window2:SaveMainWindowPosition()
|
||||
|
||||
@@ -269,10 +269,10 @@ end
|
||||
end
|
||||
|
||||
window1.baseframe:ClearAllPoints()
|
||||
window1.baseframe:SetParent (UIParent)
|
||||
window1.rowframe:SetParent (UIParent)
|
||||
window1.baseframe:SetPoint ("center", UIParent, "center")
|
||||
window1.rowframe:SetPoint ("center", UIParent, "center")
|
||||
window1.baseframe:SetParent(UIParent)
|
||||
window1.rowframe:SetParent(UIParent)
|
||||
window1.baseframe:SetPoint("center", UIParent, "center")
|
||||
window1.rowframe:SetPoint("center", UIParent, "center")
|
||||
window1:LockInstance (false)
|
||||
window1:SaveMainWindowPosition()
|
||||
|
||||
@@ -283,10 +283,10 @@ end
|
||||
|
||||
if (not _detalhes.chat_tab_embed.single_window and window2) then
|
||||
window2.baseframe:ClearAllPoints()
|
||||
window2.baseframe:SetParent (UIParent)
|
||||
window2.rowframe:SetParent (UIParent)
|
||||
window2.baseframe:SetPoint ("center", UIParent, "center", 200, 0)
|
||||
window2.rowframe:SetPoint ("center", UIParent, "center", 200, 0)
|
||||
window2.baseframe:SetParent(UIParent)
|
||||
window2.rowframe:SetParent(UIParent)
|
||||
window2.baseframe:SetPoint("center", UIParent, "center", 200, 0)
|
||||
window2.rowframe:SetPoint("center", UIParent, "center", 200, 0)
|
||||
window2:LockInstance (false)
|
||||
window2:SaveMainWindowPosition()
|
||||
|
||||
@@ -343,7 +343,7 @@ function _detalhes:SetDeathLogLimit (limit)
|
||||
end
|
||||
else
|
||||
event_table.n = 1
|
||||
for _, t in ipairs (event_table) do
|
||||
for _, t in ipairs(event_table) do
|
||||
wipe (t)
|
||||
end
|
||||
end
|
||||
@@ -385,13 +385,13 @@ function _detalhes:TrackSpecsNow (track_everything)
|
||||
end
|
||||
else
|
||||
local combatlist = {}
|
||||
for _, combat in ipairs (_detalhes.tabela_historico.tabelas) do
|
||||
for _, combat in ipairs(_detalhes.tabela_historico.tabelas) do
|
||||
tinsert (combatlist, combat)
|
||||
end
|
||||
tinsert (combatlist, _detalhes.tabela_vigente)
|
||||
tinsert (combatlist, _detalhes.tabela_overall)
|
||||
|
||||
for _, combat in ipairs (combatlist) do
|
||||
for _, combat in ipairs(combatlist) do
|
||||
for _, actor in combat[1]:ListActors() do
|
||||
if (actor:IsPlayer()) then
|
||||
for spellid, spell in pairs (actor:GetSpellList()) do
|
||||
@@ -429,9 +429,9 @@ function _detalhes:ResetSpecCache (forced)
|
||||
|
||||
if (_detalhes.track_specs) then
|
||||
local my_spec = DetailsFramework.GetSpecialization()
|
||||
if (type (my_spec) == "number") then
|
||||
if (type(my_spec) == "number") then
|
||||
local spec_number = DetailsFramework.GetSpecializationInfo (my_spec)
|
||||
if (type (spec_number) == "number") then
|
||||
if (type(spec_number) == "number") then
|
||||
local pguid = UnitGUID (_detalhes.playername)
|
||||
if (pguid) then
|
||||
_detalhes.cached_specs [pguid] = spec_number
|
||||
@@ -475,7 +475,7 @@ function _detalhes:RefreshUpdater(suggested_interval)
|
||||
local updateInterval = suggested_interval or _detalhes.update_speed
|
||||
|
||||
if (_detalhes.streamer_config.faster_updates) then
|
||||
--> force 60 updates per second
|
||||
--force 60 updates per second
|
||||
updateInterval = 0.016
|
||||
end
|
||||
|
||||
@@ -623,7 +623,7 @@ end
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> background tasks
|
||||
--background tasks
|
||||
|
||||
|
||||
local background_tasks = {}
|
||||
@@ -635,12 +635,12 @@ local task_timers = {
|
||||
|
||||
function _detalhes:RegisterBackgroundTask (name, func, priority, ...)
|
||||
|
||||
assert (type (self) == "table", "RegisterBackgroundTask 'self' must be a table.")
|
||||
assert (type (name) == "string", "RegisterBackgroundTask param #1 must be a string.")
|
||||
if (type (func) == "string") then
|
||||
assert (type (self [func]) == "function", "RegisterBackgroundTask param #2 function not found on main object.")
|
||||
assert (type(self) == "table", "RegisterBackgroundTask 'self' must be a table.")
|
||||
assert (type(name) == "string", "RegisterBackgroundTask param #1 must be a string.")
|
||||
if (type(func) == "string") then
|
||||
assert (type(self [func]) == "function", "RegisterBackgroundTask param #2 function not found on main object.")
|
||||
else
|
||||
assert (type (func) == "function", "RegisterBackgroundTask param #2 expect a function or function name.")
|
||||
assert (type(func) == "function", "RegisterBackgroundTask param #2 expect a function or function name.")
|
||||
end
|
||||
|
||||
priority = priority or "LOW"
|
||||
@@ -674,7 +674,7 @@ function _detalhes:DoBackgroundTasks()
|
||||
|
||||
for taskName, taskTable in pairs (background_tasks) do
|
||||
if (t > taskTable.nextexec) then
|
||||
if (type (taskTable.func) == "string") then
|
||||
if (type(taskTable.func) == "string") then
|
||||
taskTable.object [taskTable.func] (taskTable.object, unpack (taskTable.args, 1, taskTable.args_amt))
|
||||
else
|
||||
taskTable.func (unpack (taskTable.args, 1, taskTable.args_amt))
|
||||
@@ -689,13 +689,13 @@ _detalhes.background_tasks_loop = _detalhes:ScheduleRepeatingTimer ("DoBackgroun
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> storage stuff ~storage
|
||||
--storage stuff ~storage
|
||||
|
||||
--global database
|
||||
_detalhes.storage = {}
|
||||
|
||||
function _detalhes.storage:OpenRaidStorage()
|
||||
--> check if the storage is already loaded
|
||||
--check if the storage is already loaded
|
||||
if (not IsAddOnLoaded ("Details_DataStorage")) then
|
||||
local loaded, reason = LoadAddOn ("Details_DataStorage")
|
||||
if (not loaded) then
|
||||
@@ -703,7 +703,7 @@ function _detalhes.storage:OpenRaidStorage()
|
||||
end
|
||||
end
|
||||
|
||||
--> get the storage table
|
||||
--get the storage table
|
||||
local db = DetailsDataStorage
|
||||
|
||||
if (not db and _detalhes.CreateStorageDB) then
|
||||
@@ -733,13 +733,13 @@ function _detalhes.storage:HaveDataForEncounter (diff, encounter_id, guild_name)
|
||||
if (table) then
|
||||
local encounters = table [encounter_id]
|
||||
if (encounters) then
|
||||
--> didn't requested a guild name, so just return 'we have data for this encounter'
|
||||
--didn't requested a guild name, so just return 'we have data for this encounter'
|
||||
if (not guild_name) then
|
||||
return true
|
||||
end
|
||||
|
||||
--> data for a specific guild is requested, check if there is data for the guild
|
||||
for index, encounter in ipairs (encounters) do
|
||||
--data for a specific guild is requested, check if there is data for the guild
|
||||
for index, encounter in ipairs(encounters) do
|
||||
if (encounter.guild == guild_name) then
|
||||
return true
|
||||
end
|
||||
@@ -786,7 +786,7 @@ function _detalhes.storage:GetBestFromGuild (diff, encounter_id, role, dps, guil
|
||||
if (table) then
|
||||
local encounters = table [encounter_id]
|
||||
if (encounters) then
|
||||
for index, encounter in ipairs (encounters) do
|
||||
for index, encounter in ipairs(encounters) do
|
||||
if (encounter.guild == guild_name) then
|
||||
local players = encounter [role]
|
||||
if (players) then
|
||||
@@ -852,7 +852,7 @@ function _detalhes.storage:GetPlayerGuildRank (diff, encounter_id, role, playern
|
||||
if (_table) then
|
||||
local encounters = _table [encounter_id]
|
||||
if (encounters) then
|
||||
for index, encounter in ipairs (encounters) do
|
||||
for index, encounter in ipairs(encounters) do
|
||||
if (encounter.guild == guild_name) then
|
||||
local roleTable = encounter [role]
|
||||
for playerName, playerTable in pairs (roleTable) do
|
||||
@@ -931,7 +931,7 @@ function _detalhes.storage:GetBestFromPlayer (diff, encounter_id, role, playerna
|
||||
if (table) then
|
||||
local encounters = table [encounter_id]
|
||||
if (encounters) then
|
||||
for index, encounter in ipairs (encounters) do
|
||||
for index, encounter in ipairs(encounters) do
|
||||
local player = encounter [role] and encounter [role] [playername]
|
||||
if (player) then
|
||||
if (best) then
|
||||
@@ -971,7 +971,7 @@ local encounter_is_current_tier = function(encounterID)
|
||||
if (OnlyFromCurrentRaidTier) then
|
||||
local mapID = _detalhes:GetInstanceIdFromEncounterId (encounterID)
|
||||
if (mapID) then
|
||||
--> if isn'y the mapID in the table to save data
|
||||
--if isn'y the mapID in the table to save data
|
||||
if (not _detalhes.InstancesToStoreData [mapID]) then
|
||||
return false
|
||||
end
|
||||
@@ -987,9 +987,9 @@ local have_encounter = function(db, ID)
|
||||
local maxTime = ID + 120
|
||||
|
||||
for diff, diffTable in pairs (db or {}) do
|
||||
if (type (diffTable) == "table") then
|
||||
if (type(diffTable) == "table") then
|
||||
for encounterID, encounterTable in pairs (diffTable) do
|
||||
for index, encounter in ipairs (encounterTable) do
|
||||
for index, encounter in ipairs(encounterTable) do
|
||||
--check if the encounter fits in the timespam window
|
||||
if (encounter.time >= minTime and encounter.time <= maxTime) then
|
||||
return true
|
||||
@@ -1030,10 +1030,10 @@ function _detalhes.storage:GetIDsToGuildSync()
|
||||
|
||||
--build the encounter ID list
|
||||
for diff, diffTable in pairs (db or {}) do
|
||||
if (type (diffTable) == "table") then
|
||||
if (type(diffTable) == "table") then
|
||||
for encounterID, encounterTable in pairs (diffTable) do
|
||||
if (encounter_is_current_tier (encounterID)) then
|
||||
for index, encounter in ipairs (encounterTable) do
|
||||
for index, encounter in ipairs(encounterTable) do
|
||||
if (encounter.servertime) then
|
||||
if (myGuildName == encounter.guild) then
|
||||
tinsert (IDs, encounter.servertime)
|
||||
@@ -1061,7 +1061,7 @@ function _detalhes.storage:CheckMissingIDsToGuildSync (IDsList)
|
||||
return
|
||||
end
|
||||
|
||||
if (type (IDsList) ~= "table") then
|
||||
if (type(IDsList) ~= "table") then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) [RoS-EncounterSync] RoC IDsList isn't a table.")
|
||||
end
|
||||
@@ -1075,7 +1075,7 @@ function _detalhes.storage:CheckMissingIDsToGuildSync (IDsList)
|
||||
local RequestIDs = {}
|
||||
|
||||
--check missing IDs
|
||||
for index, ID in ipairs (IDsList) do
|
||||
for index, ID in ipairs(IDsList) do
|
||||
if (not have_encounter (db, ID)) then
|
||||
if (not have_recent_requested_encounter (ID)) then
|
||||
tinsert (RequestIDs, ID)
|
||||
@@ -1099,7 +1099,7 @@ function _detalhes.storage:BuildEncounterDataToGuildSync (IDsList)
|
||||
return
|
||||
end
|
||||
|
||||
if (type (IDsList) ~= "table") then
|
||||
if (type(IDsList) ~= "table") then
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) [RoS-EncounterSync] IDsList isn't a table.")
|
||||
end
|
||||
@@ -1117,14 +1117,14 @@ function _detalhes.storage:BuildEncounterDataToGuildSync (IDsList)
|
||||
_detalhes:Msg ("(debug) [RoS-EncounterSync] the client requested " .. #IDsList .. " encounters.")
|
||||
end
|
||||
|
||||
for index, ID in ipairs (IDsList) do
|
||||
for index, ID in ipairs(IDsList) do
|
||||
|
||||
for diff, diffTable in pairs (db or {}) do
|
||||
if (type (diffTable) == "table") then
|
||||
if (type(diffTable) == "table") then
|
||||
for encounterID, encounterTable in pairs (diffTable) do
|
||||
for index, encounter in ipairs (encounterTable) do
|
||||
for index, encounter in ipairs(encounterTable) do
|
||||
|
||||
if (ID == encounter.time or ID == encounter.servertime) then --> the time here is always exactly
|
||||
if (ID == encounter.time or ID == encounter.servertime) then --the time here is always exactly
|
||||
--send this encounter
|
||||
CurrentTable [diff] = CurrentTable [diff] or {}
|
||||
CurrentTable [diff] [encounterID] = CurrentTable [diff] [encounterID] or {}
|
||||
@@ -1167,12 +1167,12 @@ function _detalhes.storage:AddGuildSyncData (data, source)
|
||||
_detalhes.LastGuildSyncReceived = GetTime()
|
||||
|
||||
for diff, diffTable in pairs (data) do
|
||||
if (type (diff) == "number" and type (diffTable) == "table") then
|
||||
if (type(diff) == "number" and type (diffTable) == "table") then
|
||||
for encounterID, encounterTable in pairs (diffTable) do
|
||||
if (type (encounterID) == "number" and type (encounterTable) == "table") then
|
||||
for index, encounter in ipairs (encounterTable) do
|
||||
if (type(encounterID) == "number" and type (encounterTable) == "table") then
|
||||
for index, encounter in ipairs(encounterTable) do
|
||||
--validate the encounter
|
||||
if (type (encounter.servertime) == "number" and type (encounter.time) == "number" and type (encounter.guild) == "string" and type (encounter.date) == "string" and type (encounter.healing) == "table" and type (encounter.elapsed) == "number" and type (encounter.damage) == "table") then
|
||||
if (type(encounter.servertime) == "number" and type (encounter.time) == "number" and type (encounter.guild) == "string" and type (encounter.date) == "string" and type (encounter.healing) == "table" and type (encounter.elapsed) == "number" and type (encounter.damage) == "table") then
|
||||
--check if the encounter is from the current raiding tier
|
||||
if (encounter_is_current_tier (encounterID)) then
|
||||
--check if this encounter already has been added from another sync
|
||||
@@ -1266,7 +1266,7 @@ function _detalhes.storage:GetPlayerData (diff, encounter_id, playername)
|
||||
end
|
||||
|
||||
local t = {}
|
||||
assert (type (playername) == "string", "PlayerName must be a string.")
|
||||
assert (type(playername) == "string", "PlayerName must be a string.")
|
||||
|
||||
|
||||
if (not diff) then
|
||||
@@ -1335,7 +1335,7 @@ function _detalhes.storage:GetEncounterData (diff, encounter_id, guild)
|
||||
local data = db [diff]
|
||||
|
||||
assert (data, "Difficulty not found. Use: 14, 15 or 16.")
|
||||
assert (type (encounter_id) == "number", "EncounterId must be a number.")
|
||||
assert (type(encounter_id) == "number", "EncounterId must be a number.")
|
||||
|
||||
data = data [encounter_id]
|
||||
|
||||
@@ -1361,7 +1361,7 @@ function _detalhes.storage:GetEncounterData (diff, encounter_id, guild)
|
||||
end
|
||||
|
||||
local create_storage_tables = function()
|
||||
--> get the storage table
|
||||
--get the storage table
|
||||
local db = DetailsDataStorage
|
||||
|
||||
if (not db and _detalhes.CreateStorageDB) then
|
||||
@@ -1418,9 +1418,9 @@ end
|
||||
function _detalhes.OpenStorage()
|
||||
--if the player is in combat, this function return false, if failed to load by other reason it returns nil
|
||||
|
||||
--> check if the storage is already loaded
|
||||
--check if the storage is already loaded
|
||||
if (not IsAddOnLoaded ("Details_DataStorage")) then
|
||||
--> can't open it during combat
|
||||
--can't open it during combat
|
||||
if (InCombatLockdown() or UnitAffectingCombat ("player")) then
|
||||
if (_detalhes.debug) then
|
||||
print ("|cFFFFFF00Details! Storage|r: can't load storage due to combat.")
|
||||
@@ -1462,7 +1462,7 @@ function Details.Database.LoadDB()
|
||||
end
|
||||
end
|
||||
|
||||
--> get the storage table
|
||||
--get the storage table
|
||||
local db = _G.DetailsDataStorage
|
||||
|
||||
if (not db and _detalhes.CreateStorageDB) then
|
||||
@@ -1621,7 +1621,7 @@ function Details.Database.StoreEncounter(combat)
|
||||
--total kills in a boss on raid or dungeon
|
||||
local totalkills_database = Details.Database.GetBossKillsDB(db)
|
||||
|
||||
--> store total kills on this boss
|
||||
--store total kills on this boss
|
||||
--if the player is facing a raid boss
|
||||
if (IsInRaid()) then
|
||||
totalkills_database[encounter_id] = totalkills_database[encounter_id] or {}
|
||||
@@ -1663,10 +1663,10 @@ function Details.Database.StoreEncounter(combat)
|
||||
end
|
||||
|
||||
|
||||
--> check for heroic and mythic
|
||||
--check for heroic and mythic
|
||||
if (storageDebug or (diff == 15 or diff == 16 or diff == 14)) then --test on raid finder: ' or diff == 17' -- normal mode: diff == 14 or
|
||||
|
||||
--> check the guild name
|
||||
--check the guild name
|
||||
local match = 0
|
||||
local guildName = GetGuildInfo ("player")
|
||||
local raidSize = GetNumGroupMembers() or 0
|
||||
@@ -1747,14 +1747,14 @@ function Details.Database.StoreEncounter(combat)
|
||||
end
|
||||
end
|
||||
|
||||
--> add the encounter data
|
||||
--add the encounter data
|
||||
tinsert (encounter_database, this_combat_data)
|
||||
if (_detalhes.debug) then
|
||||
print ("|cFFFFFF00Details! Storage|r: combat data added to encounter database.")
|
||||
end
|
||||
|
||||
local myrole = UnitGroupRolesAssigned ("player")
|
||||
local mybest, onencounter = _detalhes.storage:GetBestFromPlayer (diff, encounter_id, myrole, _detalhes.playername, true) --> get dps or hps
|
||||
local mybest, onencounter = _detalhes.storage:GetBestFromPlayer (diff, encounter_id, myrole, _detalhes.playername, true) --get dps or hps
|
||||
local mybest2 = mybest and mybest[1] or 0
|
||||
|
||||
if (mybest and onencounter) then
|
||||
@@ -1804,7 +1804,7 @@ function Details.Database.StoreEncounter(combat)
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> inspect stuff
|
||||
--inspect stuff
|
||||
|
||||
_detalhes.ilevel = {}
|
||||
local ilvl_core = _detalhes:CreateEventListener()
|
||||
@@ -1827,7 +1827,7 @@ function ilvl_core:HasQueuedInspec (unitName)
|
||||
end
|
||||
end
|
||||
|
||||
local inspect_frame = CreateFrame ("frame")
|
||||
local inspect_frame = CreateFrame("frame")
|
||||
inspect_frame:RegisterEvent ("INSPECT_READY")
|
||||
|
||||
local two_hand = {
|
||||
@@ -1843,7 +1843,7 @@ local LOOP_TIME = 7
|
||||
function _detalhes:IlvlFromNetwork (player, realm, core, serialNumber, itemLevel, talentsSelected, currentSpec)
|
||||
if (_detalhes.debug) then
|
||||
local talents = "Invalid Talents"
|
||||
if (type (talentsSelected) == "table") then
|
||||
if (type(talentsSelected) == "table") then
|
||||
talents = ""
|
||||
for i = 1, #talentsSelected do
|
||||
talents = talents .. talentsSelected [i] .. ","
|
||||
@@ -1856,44 +1856,44 @@ function _detalhes:IlvlFromNetwork (player, realm, core, serialNumber, itemLevel
|
||||
return
|
||||
end
|
||||
|
||||
--> older versions of details wont send serial nor talents nor spec
|
||||
--older versions of details wont send serial nor talents nor spec
|
||||
if (not serialNumber or not itemLevel or not talentsSelected or not currentSpec) then
|
||||
--if any data is invalid, abort
|
||||
return
|
||||
end
|
||||
|
||||
--> won't inspect this actor
|
||||
--won't inspect this actor
|
||||
_detalhes.trusted_characters [serialNumber] = true
|
||||
|
||||
if (type (serialNumber) ~= "string") then
|
||||
if (type(serialNumber) ~= "string") then
|
||||
return
|
||||
end
|
||||
|
||||
--store the item level
|
||||
if (type (itemLevel) == "number") then
|
||||
if (type(itemLevel) == "number") then
|
||||
_detalhes.item_level_pool [serialNumber] = {name = player, ilvl = itemLevel, time = time()}
|
||||
end
|
||||
|
||||
--store talents
|
||||
if (type (talentsSelected) == "table") then
|
||||
if (type(talentsSelected) == "table") then
|
||||
if (talentsSelected [1]) then
|
||||
_detalhes.cached_talents [serialNumber] = talentsSelected
|
||||
end
|
||||
end
|
||||
|
||||
--store the spec the player is playing
|
||||
if (type (currentSpec) == "number") then
|
||||
if (type(currentSpec) == "number") then
|
||||
_detalhes.cached_specs [serialNumber] = currentSpec
|
||||
end
|
||||
end
|
||||
|
||||
--> test
|
||||
--test
|
||||
--/run _detalhes.ilevel:CalcItemLevel ("player", UnitGUID("player"), true)
|
||||
--/run wipe (_detalhes.item_level_pool)
|
||||
|
||||
function ilvl_core:CalcItemLevel (unitid, guid, shout)
|
||||
|
||||
if (type (unitid) == "table") then
|
||||
if (type(unitid) == "table") then
|
||||
shout = unitid [3]
|
||||
guid = unitid [2]
|
||||
unitid = unitid [1]
|
||||
@@ -1901,7 +1901,7 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
|
||||
|
||||
if (unitid and CanInspect(unitid) and UnitPlayerControlled(unitid) and CheckInteractDistance(unitid, CONST_INSPECT_ACHIEVEMENT_DISTANCE)) then
|
||||
|
||||
--> 16 = all itens including main and off hand
|
||||
--16 = all itens including main and off hand
|
||||
local item_amount = 16
|
||||
local item_level = 0
|
||||
local failed = 0
|
||||
@@ -1914,8 +1914,8 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
|
||||
if (iLevel) then
|
||||
item_level = item_level + iLevel
|
||||
|
||||
--> 16 = main hand 17 = off hand
|
||||
--> if using a two-hand, ignore the off hand slot
|
||||
--16 = main hand 17 = off hand
|
||||
-- if using a two-hand, ignore the off hand slot
|
||||
if (equip_id == 16 and two_hand [equipSlot]) then
|
||||
item_amount = 15
|
||||
break
|
||||
@@ -1933,7 +1933,7 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
|
||||
local average = item_level / item_amount
|
||||
--print (UnitName (unitid), "ILVL:", average, unitid, "items:", item_amount)
|
||||
|
||||
--> register
|
||||
--register
|
||||
if (average > 0) then
|
||||
if (shout) then
|
||||
_detalhes:Msg (UnitName(unitid) .. " item level: " .. average)
|
||||
@@ -1977,7 +1977,7 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
|
||||
if (ilvl_core.forced_inspects [guid]) then
|
||||
if (type (ilvl_core.forced_inspects [guid].callback) == "function") then
|
||||
if (type(ilvl_core.forced_inspects [guid].callback) == "function") then
|
||||
local okey, errortext = pcall (ilvl_core.forced_inspects[guid].callback, guid, unitid, ilvl_core.forced_inspects[guid].param1, ilvl_core.forced_inspects[guid].param2)
|
||||
if (not okey) then
|
||||
_detalhes:Msg ("Error on QueryInspect callback: " .. errortext)
|
||||
@@ -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
|
||||
@@ -2002,7 +2002,7 @@ inspect_frame:SetScript ("OnEvent", function(self, event, ...)
|
||||
|
||||
ilvl_core:CancelTimer (cancel_tread)
|
||||
|
||||
--> do inspect stuff
|
||||
--do inspect stuff
|
||||
if (unitid) then
|
||||
local t = {unitid, guid}
|
||||
--ilvl_core:ScheduleTimer ("CalcItemLevel", 0.5, t)
|
||||
@@ -2044,7 +2044,7 @@ function ilvl_core:GetItemLevel (unitid, guid, is_forced, try_number)
|
||||
return
|
||||
end
|
||||
|
||||
--> ddouble check
|
||||
--ddouble check
|
||||
if (not is_forced and (UnitAffectingCombat ("player") or InCombatLockdown())) then
|
||||
return
|
||||
end
|
||||
@@ -2186,7 +2186,7 @@ function ilvl_core:Loop()
|
||||
return
|
||||
end
|
||||
|
||||
--> if already inspecting or the actor is in the list of trusted actors
|
||||
--if already inspecting or the actor is in the list of trusted actors
|
||||
if (inspecting [guid] or _detalhes.trusted_characters [guid]) then
|
||||
return
|
||||
end
|
||||
@@ -2252,12 +2252,12 @@ function ilvl_core:OnLeave()
|
||||
end
|
||||
end
|
||||
|
||||
--> ilvl API
|
||||
--ilvl API
|
||||
function _detalhes.ilevel:IsTrackerEnabled()
|
||||
return _detalhes.track_item_level
|
||||
end
|
||||
function _detalhes.ilevel:TrackItemLevel (bool)
|
||||
if (type (bool) == "boolean") then
|
||||
if (type(bool) == "boolean") then
|
||||
if (bool) then
|
||||
_detalhes.track_item_level = true
|
||||
if (can_start_loop()) then
|
||||
@@ -2349,27 +2349,27 @@ function Details:DecompressData (data, dataType)
|
||||
|
||||
dataCompressed = LibDeflate:DecodeForPrint (data)
|
||||
if (not dataCompressed) then
|
||||
Details:Msg ("couldn't decode the data.")
|
||||
Details:Msg("couldn't decode the data.")
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (dataType == "comm") then
|
||||
dataCompressed = LibDeflate:DecodeForWoWAddonChannel (data)
|
||||
if (not dataCompressed) then
|
||||
Details:Msg ("couldn't decode the data.")
|
||||
Details:Msg("couldn't decode the data.")
|
||||
return false
|
||||
end
|
||||
end
|
||||
local dataSerialized = LibDeflate:DecompressDeflate (dataCompressed)
|
||||
|
||||
if (not dataSerialized) then
|
||||
Details:Msg ("couldn't uncompress the data.")
|
||||
Details:Msg("couldn't uncompress the data.")
|
||||
return false
|
||||
end
|
||||
|
||||
local okay, data = LibAceSerializer:Deserialize (dataSerialized)
|
||||
if (not okay) then
|
||||
Details:Msg ("couldn't unserialize the data.")
|
||||
Details:Msg("couldn't unserialize the data.")
|
||||
return false
|
||||
end
|
||||
|
||||
@@ -2379,7 +2379,7 @@ end
|
||||
|
||||
--oldschool talent tree
|
||||
if (DetailsFramework.IsWotLKWow()) then
|
||||
local talentWatchClassic = CreateFrame ("frame")
|
||||
local talentWatchClassic = CreateFrame("frame")
|
||||
talentWatchClassic:RegisterEvent("CHARACTER_POINTS_CHANGED")
|
||||
talentWatchClassic:RegisterEvent("SPELLS_CHANGED")
|
||||
talentWatchClassic:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
@@ -2488,8 +2488,8 @@ if (DetailsFramework.IsWotLKWow()) then
|
||||
if (iLevel) then
|
||||
item_level = item_level + iLevel
|
||||
|
||||
--> 16 = main hand 17 = off hand
|
||||
--> if using a two-hand, ignore the off hand slot
|
||||
--16 = main hand 17 = off hand
|
||||
-- if using a two-hand, ignore the off hand slot
|
||||
if (equip_id == 16 and two_hand [equipSlot]) then
|
||||
item_amount = 15
|
||||
break
|
||||
|
||||
+105
-105
@@ -4,7 +4,7 @@
|
||||
local _tempo = time()
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
local _
|
||||
local _pairs = pairs --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
@@ -30,7 +30,7 @@
|
||||
local container_damage_target = _detalhes.container_type.CONTAINER_DAMAGETARGET_CLASS
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
--constants
|
||||
|
||||
local class_type_dano = _detalhes.atributos.dano
|
||||
local class_type_cura = _detalhes.atributos.cura
|
||||
@@ -38,9 +38,9 @@
|
||||
local class_type_misc = _detalhes.atributos.misc
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> core
|
||||
--core
|
||||
|
||||
--> reconstr�i o mapa do container
|
||||
--reconstr�i o mapa do container
|
||||
local function ReconstroiMapa (tabela)
|
||||
local mapa = {}
|
||||
for i = 1, #tabela._ActorTable do
|
||||
@@ -49,7 +49,7 @@
|
||||
tabela._NameIndexTable = mapa
|
||||
end
|
||||
|
||||
--> reaplica as tabelas no overall
|
||||
--reaplica as tabelas no overall
|
||||
function _detalhes:RestauraOverallMetaTables()
|
||||
|
||||
local is_in_instance = select (1, IsInInstance())
|
||||
@@ -71,8 +71,8 @@
|
||||
|
||||
local todos_atributos = {combate [class_type_dano]._ActorTable, combate [class_type_cura]._ActorTable, combate [class_type_e_energy]._ActorTable, combate [class_type_misc]._ActorTable}
|
||||
|
||||
for class_type, atributo in _ipairs (todos_atributos) do
|
||||
for _, esta_classe in _ipairs (atributo) do
|
||||
for class_type, atributo in _ipairs(todos_atributos) do
|
||||
for _, esta_classe in _ipairs(atributo) do
|
||||
|
||||
local nome = esta_classe.nome
|
||||
|
||||
@@ -101,9 +101,9 @@
|
||||
end
|
||||
end
|
||||
|
||||
for class_type, atributo in _ipairs (todos_atributos) do
|
||||
for _, esta_classe in _ipairs (atributo) do
|
||||
if (esta_classe.ownerName) then --> nome do owner
|
||||
for class_type, atributo in _ipairs(todos_atributos) do
|
||||
for _, esta_classe in _ipairs(atributo) do
|
||||
if (esta_classe.ownerName) then --nome do owner
|
||||
esta_classe.owner = combate (class_type, esta_classe.ownerName)
|
||||
end
|
||||
end
|
||||
@@ -111,26 +111,26 @@
|
||||
|
||||
end
|
||||
|
||||
--> reaplica indexes e metatables
|
||||
--reaplica indexes e metatables
|
||||
function _detalhes:RestauraMetaTables()
|
||||
|
||||
_detalhes.refresh:r_atributo_custom()
|
||||
|
||||
--> container de pets e hist�rico
|
||||
--container de pets e hist�rico
|
||||
_detalhes.refresh:r_container_pets (_detalhes.tabela_pets)
|
||||
_detalhes.refresh:r_historico (_detalhes.tabela_historico)
|
||||
|
||||
--> tabelas dos combates
|
||||
--tabelas dos combates
|
||||
local combate_overall = _detalhes.tabela_overall
|
||||
local overall_dano = combate_overall [class_type_dano] --> damage atalho
|
||||
local overall_cura = combate_overall [class_type_cura] --> heal atalho
|
||||
local overall_energy = combate_overall [class_type_e_energy] --> energy atalho
|
||||
local overall_misc = combate_overall [class_type_misc] --> misc atalho
|
||||
local overall_dano = combate_overall [class_type_dano] --damage atalho
|
||||
local overall_cura = combate_overall [class_type_cura] --heal atalho
|
||||
local overall_energy = combate_overall [class_type_e_energy] --energy atalho
|
||||
local overall_misc = combate_overall [class_type_misc] --misc atalho
|
||||
|
||||
local tabelas_do_historico = _detalhes.tabela_historico.tabelas --> atalho
|
||||
local tabelas_do_historico = _detalhes.tabela_historico.tabelas --atalho
|
||||
|
||||
--> recupera meta function
|
||||
for _, combat_table in _ipairs (tabelas_do_historico) do
|
||||
--recupera meta function
|
||||
for _, combat_table in _ipairs(tabelas_do_historico) do
|
||||
combat_table.__call = _detalhes.call_combate
|
||||
end
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
combat.previous_combat = tabelas_do_historico [i+1]
|
||||
end
|
||||
|
||||
--> tempo padrao do overall
|
||||
--tempo padrao do overall
|
||||
|
||||
local overall_saved = combate_overall.overall_refreshed
|
||||
|
||||
@@ -150,16 +150,16 @@
|
||||
|
||||
local is_in_instance = select (1, IsInInstance())
|
||||
|
||||
--> inicia a recupera��o das tabelas e montagem do overall
|
||||
--inicia a recupera��o das tabelas e montagem do overall
|
||||
if (#tabelas_do_historico > 0) then
|
||||
for index, combate in _ipairs (tabelas_do_historico) do
|
||||
for index, combate in _ipairs(tabelas_do_historico) do
|
||||
|
||||
combate.hasSaved = true
|
||||
|
||||
--> recupera a meta e indexes da tabela do combate
|
||||
--recupera a meta e indexes da tabela do combate
|
||||
_detalhes.refresh:r_combate (combate, combate_overall)
|
||||
|
||||
--> aumenta o tempo do combate do overall, seta as datas e os combates armazenados
|
||||
--aumenta o tempo do combate do overall, seta as datas e os combates armazenados
|
||||
if (not overall_saved and combate.overall_added) then
|
||||
|
||||
if (combate.end_time and combate.start_time) then
|
||||
@@ -185,22 +185,22 @@
|
||||
|
||||
end
|
||||
|
||||
--> recupera a meta e indexes dos 4 container
|
||||
--recupera a meta e indexes dos 4 container
|
||||
_detalhes.refresh:r_container_combatentes (combate [class_type_dano], overall_dano)
|
||||
_detalhes.refresh:r_container_combatentes (combate [class_type_cura], overall_cura)
|
||||
_detalhes.refresh:r_container_combatentes (combate [class_type_e_energy], overall_energy)
|
||||
_detalhes.refresh:r_container_combatentes (combate [class_type_misc], overall_misc)
|
||||
|
||||
--> ghost container
|
||||
--ghost container
|
||||
if (combate[5]) then
|
||||
_detalhes.refresh:r_container_combatentes (combate [5], combate_overall [5])
|
||||
end
|
||||
|
||||
--> tabela com os 4 tabelas de jogadores
|
||||
--tabela com os 4 tabelas de jogadores
|
||||
local todos_atributos = {combate [class_type_dano]._ActorTable, combate [class_type_cura]._ActorTable, combate [class_type_e_energy]._ActorTable, combate [class_type_misc]._ActorTable}
|
||||
|
||||
for class_type, atributo in _ipairs (todos_atributos) do
|
||||
for _, esta_classe in _ipairs (atributo) do
|
||||
for class_type, atributo in _ipairs(todos_atributos) do
|
||||
for _, esta_classe in _ipairs(atributo) do
|
||||
|
||||
local nome = esta_classe.nome
|
||||
|
||||
@@ -246,10 +246,10 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> reconstr�i a tabela dos pets
|
||||
for class_type, atributo in _ipairs (todos_atributos) do
|
||||
for _, esta_classe in _ipairs (atributo) do
|
||||
if (esta_classe.ownerName) then --> nome do owner
|
||||
--reconstr�i a tabela dos pets
|
||||
for class_type, atributo in _ipairs(todos_atributos) do
|
||||
for _, esta_classe in _ipairs(atributo) do
|
||||
if (esta_classe.ownerName) then --nome do owner
|
||||
esta_classe.owner = combate (class_type, esta_classe.ownerName)
|
||||
end
|
||||
end
|
||||
@@ -259,14 +259,14 @@
|
||||
--fim
|
||||
end
|
||||
|
||||
--> restaura last_events_table
|
||||
local primeiro_combate = tabelas_do_historico [1] --> primeiro combate
|
||||
--restaura last_events_table
|
||||
local primeiro_combate = tabelas_do_historico [1] --primeiro combate
|
||||
if (primeiro_combate) then
|
||||
primeiro_combate [1]:ActorCallFunction (atributo_damage.r_last_events_table)
|
||||
primeiro_combate [2]:ActorCallFunction (atributo_heal.r_last_events_table)
|
||||
end
|
||||
|
||||
local segundo_combate = tabelas_do_historico [2] --> segundo combate
|
||||
local segundo_combate = tabelas_do_historico [2] --segundo combate
|
||||
if (segundo_combate) then
|
||||
segundo_combate [1]:ActorCallFunction (atributo_damage.r_last_events_table)
|
||||
segundo_combate [2]:ActorCallFunction (atributo_heal.r_last_events_table)
|
||||
@@ -276,8 +276,8 @@
|
||||
|
||||
function _detalhes:DoInstanceCleanup()
|
||||
|
||||
--> normal instances
|
||||
for _, esta_instancia in _ipairs (_detalhes.tabela_instancias) do
|
||||
--normal instances
|
||||
for _, esta_instancia in _ipairs(_detalhes.tabela_instancias) do
|
||||
|
||||
if (esta_instancia.StatusBar.left) then
|
||||
esta_instancia.StatusBarSaved = {
|
||||
@@ -292,7 +292,7 @@
|
||||
}
|
||||
end
|
||||
|
||||
--> erase all widgets frames
|
||||
--erase all widgets frames
|
||||
|
||||
esta_instancia.scroll = nil
|
||||
esta_instancia.baseframe = nil
|
||||
@@ -329,8 +329,8 @@
|
||||
|
||||
end
|
||||
|
||||
--> unused instances
|
||||
for _, esta_instancia in _ipairs (_detalhes.unused_instances) do
|
||||
--unused instances
|
||||
for _, esta_instancia in _ipairs(_detalhes.unused_instances) do
|
||||
|
||||
if (esta_instancia.StatusBar.left) then
|
||||
esta_instancia.StatusBarSaved = {
|
||||
@@ -345,7 +345,7 @@
|
||||
}
|
||||
end
|
||||
|
||||
--> erase all widgets frames
|
||||
--erase all widgets frames
|
||||
esta_instancia.scroll = nil
|
||||
esta_instancia.baseframe = nil
|
||||
esta_instancia.bgframe = nil
|
||||
@@ -389,9 +389,9 @@
|
||||
overall_added = true
|
||||
end
|
||||
|
||||
for index, combat in _ipairs (combats) do
|
||||
for index, container in _ipairs (combat) do
|
||||
for index, esta_classe in _ipairs (container._ActorTable) do
|
||||
for index, combat in _ipairs(combats) do
|
||||
for index, container in _ipairs(combat) do
|
||||
for index, esta_classe in _ipairs(container._ActorTable) do
|
||||
esta_classe.owner = nil
|
||||
end
|
||||
end
|
||||
@@ -410,9 +410,9 @@
|
||||
overall_added = true
|
||||
end
|
||||
|
||||
for index, combat in _ipairs (combats) do
|
||||
for class_type, container in _ipairs (combat) do
|
||||
for index, esta_classe in _ipairs (container._ActorTable) do
|
||||
for index, combat in _ipairs(combats) do
|
||||
for class_type, container in _ipairs(combat) do
|
||||
for index, esta_classe in _ipairs(container._ActorTable) do
|
||||
|
||||
esta_classe.displayName = nil
|
||||
esta_classe.minha_barra = nil
|
||||
@@ -444,9 +444,9 @@
|
||||
overall_added = true
|
||||
end
|
||||
|
||||
for index, combat in _ipairs (combats) do
|
||||
for index, combat in _ipairs(combats) do
|
||||
_detalhes.clear:c_combate (combat)
|
||||
for index, container in _ipairs (combat) do
|
||||
for index, container in _ipairs(combat) do
|
||||
_detalhes.clear:c_container_combatentes (container)
|
||||
end
|
||||
end
|
||||
@@ -464,8 +464,8 @@
|
||||
overall_added = true
|
||||
end
|
||||
|
||||
for index, combat in _ipairs (combats) do
|
||||
for index, container in _ipairs (combat) do
|
||||
for index, combat in _ipairs(combats) do
|
||||
for index, container in _ipairs(combat) do
|
||||
_detalhes.clear:c_container_combatentes_index (container)
|
||||
end
|
||||
end
|
||||
@@ -475,21 +475,21 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> limpa indexes, metatables e shadows
|
||||
--limpa indexes, metatables e shadows
|
||||
function _detalhes:PrepareTablesForSave()
|
||||
|
||||
_detalhes.clear_ungrouped = true
|
||||
|
||||
--> clear instances
|
||||
--clear instances
|
||||
_detalhes:DoInstanceCleanup()
|
||||
_detalhes:DoClassesCleanup() --aumentou 1 combat
|
||||
_detalhes:DoContainerCleanup() --aumentou 1 combat
|
||||
|
||||
--> clear combats
|
||||
--clear combats
|
||||
local tabelas_de_combate = {}
|
||||
local historico_tabelas = _detalhes.tabela_historico.tabelas or {}
|
||||
|
||||
--> remove os segmentos de trash
|
||||
--remove os segmentos de trash
|
||||
for i = #historico_tabelas, 1, -1 do
|
||||
local combate = historico_tabelas [i]
|
||||
if (combate:IsTrash()) then
|
||||
@@ -497,7 +497,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> remove os segmentos > que o limite permitido para salvar
|
||||
--remove os segmentos > que o limite permitido para salvar
|
||||
if (_detalhes.segments_amount_to_save and _detalhes.segments_amount_to_save < _detalhes.segments_amount) then
|
||||
for i = _detalhes.segments_amount, _detalhes.segments_amount_to_save+1, -1 do
|
||||
if (_detalhes.tabela_historico.tabelas [i]) then
|
||||
@@ -506,10 +506,10 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> tabela do combate atual
|
||||
--tabela do combate atual
|
||||
local tabela_atual = _detalhes.tabela_vigente or _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
|
||||
|
||||
--> limpa a tabela overall
|
||||
--limpa a tabela overall
|
||||
if (_detalhes.overall_clear_logout) then
|
||||
_detalhes.tabela_overall = nil
|
||||
_detalhes_database.tabela_overall = nil
|
||||
@@ -519,14 +519,14 @@
|
||||
_combate.previous_combat = nil
|
||||
local todos_atributos = {_combate [class_type_dano] or {}, _combate [class_type_cura] or {}, _combate [class_type_e_energy] or {}, _combate [class_type_misc] or {}}
|
||||
|
||||
for class_type, _tabela in _ipairs (todos_atributos) do
|
||||
for class_type, _tabela in _ipairs(todos_atributos) do
|
||||
local conteudo = _tabela._ActorTable
|
||||
|
||||
--> Limpa tabelas que n�o estejam em grupo
|
||||
--Limpa tabelas que n�o estejam em grupo
|
||||
if (conteudo) then
|
||||
if (_detalhes.clear_ungrouped) then
|
||||
--if (not _detalhes.clear_ungrouped) then
|
||||
local _iter = {index = 1, data = conteudo[1], cleaned = 0} --> ._ActorTable[1] para pegar o primeiro index
|
||||
local _iter = {index = 1, data = conteudo[1], cleaned = 0} --._ActorTable[1] para pegar o primeiro index
|
||||
|
||||
while (_iter.data) do --search key: ~deletar ~apagar
|
||||
local can_erase = true
|
||||
@@ -567,18 +567,18 @@
|
||||
end
|
||||
end
|
||||
|
||||
for _, _tabela in _ipairs (historico_tabelas) do
|
||||
for _, _tabela in _ipairs(historico_tabelas) do
|
||||
tabelas_de_combate [#tabelas_de_combate+1] = _tabela
|
||||
end
|
||||
|
||||
for tabela_index, _combate in _ipairs (tabelas_de_combate) do
|
||||
for tabela_index, _combate in _ipairs(tabelas_de_combate) do
|
||||
|
||||
--> limpa a tabela do grafico
|
||||
--limpa a tabela do grafico
|
||||
if (_detalhes.clear_graphic) then
|
||||
_combate.TimeData = {}
|
||||
end
|
||||
|
||||
--> limpa a referencia do ultimo combate
|
||||
--limpa a referencia do ultimo combate
|
||||
_combate.previous_combat = nil
|
||||
|
||||
local container_dano = _combate [class_type_dano] or {}
|
||||
@@ -596,18 +596,18 @@
|
||||
end
|
||||
|
||||
if (not _combate.is_mythic_dungeon_segment) then
|
||||
for class_type, _tabela in _ipairs (todos_atributos) do
|
||||
for class_type, _tabela in _ipairs(todos_atributos) do
|
||||
|
||||
local conteudo = _tabela._ActorTable
|
||||
|
||||
--> Limpa tabelas que n�o estejam em grupo
|
||||
--Limpa tabelas que n�o estejam em grupo
|
||||
if (conteudo) then
|
||||
|
||||
if (_detalhes.clear_ungrouped) then
|
||||
--n�o deleta dummies e actors de fora do grupo
|
||||
--if (not _detalhes.clear_ungrouped) then
|
||||
|
||||
local _iter = {index = 1, data = conteudo[1], cleaned = 0} --> ._ActorTable[1] para pegar o primeiro index
|
||||
local _iter = {index = 1, data = conteudo[1], cleaned = 0} --._ActorTable[1] para pegar o primeiro index
|
||||
|
||||
while (_iter.data) do --search key: ~deletar ~apagar
|
||||
local can_erase = true
|
||||
@@ -631,7 +631,7 @@
|
||||
|
||||
if (can_erase) then
|
||||
|
||||
if (not _iter.data.owner) then --> pet
|
||||
if (not _iter.data.owner) then --pet
|
||||
local myself = _iter.data
|
||||
|
||||
if (myself.tipo == class_type_dano or myself.tipo == class_type_cura) then
|
||||
@@ -659,7 +659,7 @@
|
||||
_combate.totals_grupo [myself.tipo] ["ress"] = _combate.totals_grupo [myself.tipo] ["ress"] - myself.ress
|
||||
end
|
||||
end
|
||||
--> n�o precisa diminuir o total dos buffs e debuffs
|
||||
--n�o precisa diminuir o total dos buffs e debuffs
|
||||
if (myself.cooldowns_defensive) then
|
||||
_combate.totals [myself.tipo] ["cooldowns_defensive"] = _combate.totals [myself.tipo] ["cooldowns_defensive"] - myself.cooldowns_defensive
|
||||
if (myself.grupo) then
|
||||
@@ -708,27 +708,27 @@
|
||||
end --end is mythic dungeon segment
|
||||
end
|
||||
|
||||
--> panic mode
|
||||
--panic mode
|
||||
if (_detalhes.segments_panic_mode and _detalhes.can_panic_mode) then
|
||||
if (_detalhes.tabela_vigente.is_boss) then
|
||||
_detalhes.tabela_historico = _detalhes.historico:NovoHistorico()
|
||||
end
|
||||
end
|
||||
|
||||
--> clear all segments on logoff
|
||||
--clear all segments on logoff
|
||||
if (_detalhes.data_cleanup_logout) then
|
||||
_detalhes.tabela_historico = _detalhes.historico:NovoHistorico()
|
||||
_detalhes.tabela_overall = nil
|
||||
_detalhes_database.tabela_overall = nil
|
||||
end
|
||||
|
||||
--> clear customs
|
||||
--clear customs
|
||||
_detalhes.clear:c_atributo_custom()
|
||||
|
||||
--> clear owners
|
||||
--clear owners
|
||||
_detalhes:DoOwnerCleanup()
|
||||
|
||||
--> cleaer container indexes
|
||||
--cleaer container indexes
|
||||
_detalhes:DoContainerIndexCleanup()
|
||||
end
|
||||
|
||||
@@ -737,7 +737,7 @@
|
||||
instancia.showing[instancia.atributo].need_refresh = true
|
||||
instancia.v_barras = true
|
||||
instancia:ResetaGump()
|
||||
instancia:RefreshMainWindow (true)
|
||||
instancia:RefreshMainWindow(true)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -748,7 +748,7 @@
|
||||
UpdateAddOnMemoryUsage()
|
||||
local memory = GetAddOnMemoryUsage ("Details")
|
||||
if (memory > _detalhes.memory_ram) then
|
||||
_detalhes:IniciarColetaDeLixo (true, 60) --> sending true doesn't check anythink
|
||||
_detalhes:IniciarColetaDeLixo (true, 60) --sending true doesn't check anythink
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -762,7 +762,7 @@
|
||||
_detalhes:Msg ("(debug) checking memory periodically. Using: ",math.floor (memory))
|
||||
end
|
||||
if (memory > _detalhes.memory_ram * 1000) then
|
||||
_detalhes:IniciarColetaDeLixo (1, 60) --> sending 1 only check for combat and ignore garbage collect cooldown
|
||||
_detalhes:IniciarColetaDeLixo (1, 60) --sending 1 only check for combat and ignore garbage collect cooldown
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -777,7 +777,7 @@
|
||||
return
|
||||
end
|
||||
else
|
||||
if (type (forcar) ~= "boolean") then
|
||||
if (type(forcar) ~= "boolean") then
|
||||
if (forcar == 1) then
|
||||
if (_detalhes.in_combat or _InCombatLockdown()) then
|
||||
_detalhes:ScheduleTimer ("IniciarColetaDeLixo", 5, forcar)
|
||||
@@ -797,13 +797,13 @@
|
||||
|
||||
local memory = GetAddOnMemoryUsage ("Details")
|
||||
|
||||
--> reseta o cache do parser
|
||||
--reseta o cache do parser
|
||||
_detalhes:ClearParserCache()
|
||||
|
||||
--> limpa barras que n�o est�o sendo usadas nas inst�ncias.
|
||||
for index, instancia in _ipairs (_detalhes.tabela_instancias) do
|
||||
--limpa barras que n�o est�o sendo usadas nas inst�ncias.
|
||||
for index, instancia in _ipairs(_detalhes.tabela_instancias) do
|
||||
if (instancia.barras and instancia.barras [1]) then
|
||||
for i, barra in _ipairs (instancia.barras) do
|
||||
for i, barra in _ipairs(instancia.barras) do
|
||||
if (not barra:IsShown()) then
|
||||
barra.minha_tabela = nil
|
||||
end
|
||||
@@ -811,7 +811,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> faz a coleta nos 4 atributos
|
||||
--faz a coleta nos 4 atributos
|
||||
local damage = atributo_damage:ColetarLixo (lastevent)
|
||||
local heal = atributo_heal:ColetarLixo (lastevent)
|
||||
local energy = atributo_energy:ColetarLixo (lastevent)
|
||||
@@ -819,28 +819,28 @@
|
||||
|
||||
local limpados = damage + heal + energy + misc
|
||||
|
||||
--> refresh nas janelas
|
||||
--refresh nas janelas
|
||||
if (limpados > 0) then
|
||||
_detalhes:InstanciaCallFunction (_detalhes.reset_window)
|
||||
end
|
||||
|
||||
_detalhes:ManutencaoTimeMachine()
|
||||
|
||||
--> print cache states
|
||||
--print cache states
|
||||
--if (_detalhes.debug) then
|
||||
-- _detalhes:Msg ("(debug) removed: damage "..damage.." heal "..heal.." energy "..energy.." misc "..misc)
|
||||
--end
|
||||
|
||||
--> elimina pets antigos
|
||||
--elimina pets antigos
|
||||
_detalhes:LimparPets()
|
||||
if (not _detalhes.in_combat) then
|
||||
_detalhes:ClearCCPetsBlackList()
|
||||
end
|
||||
|
||||
--> reseta cache de specs
|
||||
--reseta cache de specs
|
||||
_detalhes:ResetSpecCache()
|
||||
|
||||
--> wipa container de escudos
|
||||
--wipa container de escudos
|
||||
_table_wipe (_detalhes.escudos)
|
||||
|
||||
_detalhes.ultima_coleta = _detalhes._tempo
|
||||
@@ -854,7 +854,7 @@
|
||||
|
||||
end
|
||||
|
||||
--> combates Normais
|
||||
--combates Normais
|
||||
local function FazColeta (_combate, tipo, intervalo_overwrite)
|
||||
|
||||
local conteudo = _combate [tipo]._ActorTable
|
||||
@@ -893,7 +893,7 @@
|
||||
end
|
||||
|
||||
if (can_garbage) then
|
||||
if (not _actor.owner) then --> pet
|
||||
if (not _actor.owner) then --pet
|
||||
_actor:subtract_total (_combate)
|
||||
end
|
||||
|
||||
@@ -924,7 +924,7 @@
|
||||
return _iter.cleaned
|
||||
end
|
||||
|
||||
--> Combate overall
|
||||
--Combate overall
|
||||
function _detalhes:ColetarLixo (tipo, lastevent)
|
||||
|
||||
--print ("fazendo coleta...")
|
||||
@@ -932,24 +932,24 @@
|
||||
local _tempo = _time()
|
||||
local limpados = 0
|
||||
|
||||
--> monta a lista de combates
|
||||
--monta a lista de combates
|
||||
local tabelas_de_combate = {}
|
||||
for _, _tabela in _ipairs (_detalhes.tabela_historico.tabelas) do
|
||||
for _, _tabela in _ipairs(_detalhes.tabela_historico.tabelas) do
|
||||
if (_tabela ~= _detalhes.tabela_vigente) then
|
||||
tabelas_de_combate [#tabelas_de_combate+1] = _tabela
|
||||
end
|
||||
end
|
||||
tabelas_de_combate [#tabelas_de_combate+1] = _detalhes.tabela_vigente
|
||||
|
||||
--> faz a coleta em todos os combates para este atributo
|
||||
for _, _combate in _ipairs (tabelas_de_combate) do
|
||||
--faz a coleta em todos os combates para este atributo
|
||||
for _, _combate in _ipairs(tabelas_de_combate) do
|
||||
limpados = limpados + FazColeta (_combate, tipo, lastevent)
|
||||
end
|
||||
|
||||
--> limpa a tabela overall para o atributo atual (limpa para os 4, um de cada vez atrav�s do ipairs)
|
||||
--limpa a tabela overall para o atributo atual (limpa para os 4, um de cada vez atrav�s do ipairs)
|
||||
local _overall_combat = _detalhes.tabela_overall
|
||||
local conteudo = _overall_combat [tipo]._ActorTable
|
||||
local _iter = {index = 1, data = conteudo[1], cleaned = 0} --> ._ActorTable[1] para pegar o primeiro index
|
||||
local _iter = {index = 1, data = conteudo[1], cleaned = 0} --._ActorTable[1] para pegar o primeiro index
|
||||
|
||||
while (_iter.data) do
|
||||
|
||||
@@ -960,13 +960,13 @@
|
||||
can_garbage = true
|
||||
end
|
||||
|
||||
if (can_garbage) then --> n�o h� refer�ncias a este objeto
|
||||
if (can_garbage) then --n�o h� refer�ncias a este objeto
|
||||
|
||||
if (not _actor.owner) then --> pet
|
||||
if (not _actor.owner) then --pet
|
||||
_actor:subtract_total (_overall_combat)
|
||||
end
|
||||
|
||||
--> apaga a refer�ncia deste jogador na tabela overall
|
||||
--apaga a refer�ncia deste jogador na tabela overall
|
||||
_iter.cleaned = _iter.cleaned+1
|
||||
|
||||
_table_remove (conteudo, _iter.index)
|
||||
@@ -979,7 +979,7 @@
|
||||
|
||||
end
|
||||
|
||||
--> termina o coletor de lixo
|
||||
--termina o coletor de lixo
|
||||
if (_iter.cleaned > 0) then
|
||||
_overall_combat[tipo].need_refresh = true
|
||||
ReconstroiMapa (_overall_combat [tipo])
|
||||
@@ -988,7 +988,7 @@
|
||||
|
||||
if (limpados > 0) then
|
||||
_detalhes:InstanciaCallFunction (_detalhes.ScheduleUpdate)
|
||||
_detalhes:RefreshMainWindow (-1)
|
||||
_detalhes:RefreshMainWindow(-1)
|
||||
end
|
||||
|
||||
return limpados
|
||||
|
||||
+10
-10
@@ -7,14 +7,14 @@
|
||||
Details.network = {}
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
|
||||
local UnitName = UnitName
|
||||
local GetRealmName = GetRealmName
|
||||
local select = select
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
--constants
|
||||
|
||||
_G.DETAILS_PREFIX_NETWORK = "DTLS"
|
||||
|
||||
@@ -73,10 +73,10 @@
|
||||
local registredPlugins = {}
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> comm functions
|
||||
--comm functions
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> item level
|
||||
--item level
|
||||
function Details:SendCharacterData()
|
||||
--only send if in group
|
||||
if (not IsInGroup() and not IsInRaid()) then
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
function Details.network.Update_VersionReceived(player, realm, coreVersion, buildNumber)
|
||||
if (Details.debugnet) then
|
||||
Details:Msg ("(debug) received version alert ", buildNumber)
|
||||
Details:Msg("(debug) received version alert ", buildNumber)
|
||||
end
|
||||
|
||||
if (Details.streamer_config.no_alerts) then
|
||||
@@ -432,7 +432,7 @@
|
||||
}
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> register comm
|
||||
--register comm
|
||||
|
||||
function Details:CommReceived(commPrefix, data, channel, source)
|
||||
|
||||
@@ -518,7 +518,7 @@
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> send functions
|
||||
--send functions
|
||||
|
||||
function Details:GetChannelId(channel)
|
||||
--deprecated
|
||||
@@ -587,12 +587,12 @@
|
||||
end
|
||||
|
||||
function Details:SendGuildData(type, ...)
|
||||
if not IsInGuild() then return end --> fix from Tim@WoWInterface
|
||||
if not IsInGuild() then return end --fix from Tim@WoWInterface
|
||||
Details:SendCommMessage(DETAILS_PREFIX_NETWORK, Details:Serialize(type, UnitName("player"), GetRealmName(), Details.realversion, ...), "GUILD")
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> cloud
|
||||
--cloud
|
||||
|
||||
function Details:SendCloudRequest()
|
||||
--deprecated
|
||||
@@ -607,7 +607,7 @@
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> update
|
||||
--update
|
||||
|
||||
function Details:CheckVersion(sendToGuild)
|
||||
if (IsInRaid()) then
|
||||
|
||||
+692
-692
File diff suppressed because it is too large
Load Diff
+130
-130
@@ -7,7 +7,7 @@
|
||||
|
||||
DETAILSPLUGIN_ALWAYSENABLED = 0x1
|
||||
|
||||
--> consts
|
||||
--consts
|
||||
local CONST_PLUGINWINDOW_MENU_WIDTH = 150
|
||||
local CONST_PLUGINWINDOW_MENU_HEIGHT = 22
|
||||
local CONST_PLUGINWINDOW_MENU_X = -5
|
||||
@@ -16,7 +16,7 @@
|
||||
local CONST_PLUGINWINDOW_HEIGHT = 600
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> details api functions
|
||||
--details api functions
|
||||
function _detalhes:GetPlugin (PAN) --plugin absolute name
|
||||
return _detalhes.SoloTables.NameTable [PAN] or _detalhes.RaidTables.NameTable [PAN] or _detalhes.ToolBar.NameTable [PAN] or _detalhes.StatusBar.NameTable [PAN] or _detalhes.PluginsLocalizedNames [PAN] or _detalhes.PluginsGlobalNames [PAN]
|
||||
end
|
||||
@@ -40,7 +40,7 @@
|
||||
local instance = self:GetPluginInstance()
|
||||
if (instance) then
|
||||
local w, h = instance:GetSize()
|
||||
self.Frame:SetSize (w, h)
|
||||
self.Frame:SetSize(w, h)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
saved_table.enabled = false
|
||||
plugin.__enabled = false
|
||||
|
||||
_detalhes:SendEvent ("PLUGIN_DISABLED", plugin)
|
||||
_detalhes:SendEvent("PLUGIN_DISABLED", plugin)
|
||||
|
||||
_detalhes:DelayOptionsRefresh()
|
||||
return true
|
||||
@@ -92,8 +92,8 @@
|
||||
|
||||
function _detalhes:CheckDefaultTable (current, default)
|
||||
for key, value in pairs (default) do
|
||||
if (type (value) == "table") then
|
||||
if (type (current [key]) ~= "table") then
|
||||
if (type(value) == "table") then
|
||||
if (type(current [key]) ~= "table") then
|
||||
current [key] = Details.CopyTable (value)
|
||||
else
|
||||
_detalhes:CheckDefaultTable (current [key], value)
|
||||
@@ -101,7 +101,7 @@
|
||||
else
|
||||
if (current [key] == nil) then
|
||||
current [key] = value
|
||||
--elseif (type (current [key]) ~= type (value)) then
|
||||
--elseif (type(current [key]) ~= type (value)) then
|
||||
-- current [key] = value
|
||||
end
|
||||
end
|
||||
@@ -174,21 +174,21 @@
|
||||
return _detalhes:NewError ("plugin doesn't have a Frame, please check case-sensitive member name: Frame")
|
||||
end
|
||||
|
||||
--> Install Plugin
|
||||
--Install Plugin
|
||||
_detalhes.SoloTables.Plugins [#_detalhes.SoloTables.Plugins+1] = PluginObject
|
||||
_detalhes.SoloTables.Menu [#_detalhes.SoloTables.Menu+1] = {PluginName, PluginIcon, PluginObject, PluginAbsoluteName}
|
||||
_detalhes.SoloTables.NameTable [PluginAbsoluteName] = PluginObject
|
||||
_detalhes:SendEvent ("INSTALL_OKEY", PluginObject)
|
||||
_detalhes:SendEvent("INSTALL_OKEY", PluginObject)
|
||||
|
||||
_detalhes.PluginCount.SOLO = _detalhes.PluginCount.SOLO + 1
|
||||
|
||||
elseif (PluginType == "RAID") then
|
||||
|
||||
--> Install Plugin
|
||||
--Install Plugin
|
||||
_detalhes.RaidTables.Plugins [#_detalhes.RaidTables.Plugins+1] = PluginObject
|
||||
_detalhes.RaidTables.Menu [#_detalhes.RaidTables.Menu+1] = {PluginName, PluginIcon, PluginObject, PluginAbsoluteName}
|
||||
_detalhes.RaidTables.NameTable [PluginAbsoluteName] = PluginObject
|
||||
_detalhes:SendEvent ("INSTALL_OKEY", PluginObject)
|
||||
_detalhes:SendEvent("INSTALL_OKEY", PluginObject)
|
||||
|
||||
_detalhes.PluginCount.RAID = _detalhes.PluginCount.RAID + 1
|
||||
|
||||
@@ -196,21 +196,21 @@
|
||||
|
||||
elseif (PluginType == "TOOLBAR") then
|
||||
|
||||
--> Install Plugin
|
||||
--Install Plugin
|
||||
_detalhes.ToolBar.Plugins [#_detalhes.ToolBar.Plugins+1] = PluginObject
|
||||
_detalhes.ToolBar.Menu [#_detalhes.ToolBar.Menu+1] = {PluginName, PluginIcon, PluginObject, PluginAbsoluteName}
|
||||
_detalhes.ToolBar.NameTable [PluginAbsoluteName] = PluginObject
|
||||
_detalhes:SendEvent ("INSTALL_OKEY", PluginObject)
|
||||
_detalhes:SendEvent("INSTALL_OKEY", PluginObject)
|
||||
|
||||
_detalhes.PluginCount.TOOLBAR = _detalhes.PluginCount.TOOLBAR + 1
|
||||
|
||||
elseif (PluginType == "STATUSBAR") then
|
||||
|
||||
--> Install Plugin
|
||||
--Install Plugin
|
||||
_detalhes.StatusBar.Plugins [#_detalhes.StatusBar.Plugins+1] = PluginObject
|
||||
_detalhes.StatusBar.Menu [#_detalhes.StatusBar.Menu+1] = {PluginName, PluginIcon}
|
||||
_detalhes.StatusBar.NameTable [PluginAbsoluteName] = PluginObject
|
||||
_detalhes:SendEvent ("INSTALL_OKEY", PluginObject)
|
||||
_detalhes:SendEvent("INSTALL_OKEY", PluginObject)
|
||||
|
||||
_detalhes.PluginCount.STATUSBAR = _detalhes.PluginCount.STATUSBAR + 1
|
||||
end
|
||||
@@ -228,7 +228,7 @@
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internal functions
|
||||
--internal functions
|
||||
|
||||
_detalhes.PluginCount = {
|
||||
["SOLO"] = 0,
|
||||
@@ -242,13 +242,13 @@
|
||||
--self = frame __parent = plugin object
|
||||
local instance = _detalhes:GetInstance (self.__parent.instance_id)
|
||||
if (instance) then
|
||||
self:SetParent (instance.baseframe)
|
||||
self:SetParent(instance.baseframe)
|
||||
end
|
||||
_detalhes:SendEvent ("SHOW", self.__parent)
|
||||
_detalhes:SendEvent("SHOW", self.__parent)
|
||||
end
|
||||
|
||||
local OnDisableFunction = function(self)
|
||||
_detalhes:SendEvent ("HIDE", self.__parent)
|
||||
_detalhes:SendEvent("HIDE", self.__parent)
|
||||
if (bit.band (self.__parent.__options, DETAILSPLUGIN_ALWAYSENABLED) == 0) then
|
||||
self.__parent.Enabled = false
|
||||
end
|
||||
@@ -284,11 +284,11 @@
|
||||
PluginOptions = PluginOptions or 0x0
|
||||
local NewPlugin = {__options = PluginOptions, __enabled = true, RegisterEvent = register_event_func, UnregisterEvent = unregister_event_func}
|
||||
|
||||
local Frame = CreateFrame ("Frame", FrameName, UIParent,"BackdropTemplate")
|
||||
local Frame = CreateFrame("Frame", FrameName, UIParent,"BackdropTemplate")
|
||||
Frame:RegisterEvent ("PLAYER_LOGIN")
|
||||
Frame:RegisterEvent ("PLAYER_LOGOUT")
|
||||
|
||||
Frame:SetScript ("OnEvent", function(self, event, ...)
|
||||
Frame:SetScript("OnEvent", function(self, event, ...)
|
||||
if (NewPlugin.OnEvent) then
|
||||
if (event == "PLAYER_LOGIN") then
|
||||
NewPlugin:OnEvent (self, "ADDON_LOADED", NewPlugin.Frame:GetName())
|
||||
@@ -311,17 +311,17 @@
|
||||
NewPlugin.Enabled = false
|
||||
end
|
||||
|
||||
--> default members
|
||||
--default members
|
||||
if (PluginType == "STATUSBAR") then
|
||||
BuildDefaultStatusBarMembers (NewPlugin)
|
||||
end
|
||||
|
||||
NewPlugin.Frame = Frame
|
||||
|
||||
Frame:SetScript ("OnShow", OnEnableFunction)
|
||||
Frame:SetScript ("OnHide", OnDisableFunction)
|
||||
Frame:SetScript("OnShow", OnEnableFunction)
|
||||
Frame:SetScript("OnHide", OnDisableFunction)
|
||||
|
||||
--> temporary details event function
|
||||
--temporary details event function
|
||||
NewPlugin.OnDetailsEvent = temp_event_function
|
||||
|
||||
setmetatable (NewPlugin, _detalhes)
|
||||
@@ -334,11 +334,11 @@
|
||||
template = template or 1
|
||||
|
||||
if (template == 2) then
|
||||
local options_frame = CreateFrame ("frame", name, UIParent, "ButtonFrameTemplate,BackdropTemplate")
|
||||
local options_frame = CreateFrame("frame", name, UIParent, "ButtonFrameTemplate,BackdropTemplate")
|
||||
tinsert (UISpecialFrames, name)
|
||||
options_frame:SetSize (500, 200)
|
||||
options_frame:SetSize(500, 200)
|
||||
|
||||
options_frame:SetScript ("OnMouseDown", function(self, button)
|
||||
options_frame:SetScript("OnMouseDown", function(self, button)
|
||||
if (button == "RightButton") then
|
||||
if (self.moving) then
|
||||
self.moving = false
|
||||
@@ -350,7 +350,7 @@
|
||||
self:StartMoving()
|
||||
end
|
||||
end)
|
||||
options_frame:SetScript ("OnMouseUp", function(self)
|
||||
options_frame:SetScript("OnMouseUp", function(self)
|
||||
if (self.moving) then
|
||||
self.moving = false
|
||||
self:StopMovingOrSizing()
|
||||
@@ -364,19 +364,19 @@
|
||||
|
||||
options_frame:Hide()
|
||||
|
||||
options_frame:SetPoint ("center", UIParent, "center")
|
||||
--options_frame.TitleText:SetText (title) --10.0 fuck
|
||||
--options_frame.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]])
|
||||
options_frame:SetPoint("center", UIParent, "center")
|
||||
--options_frame.TitleText:SetText(title) --10.0 fuck
|
||||
--options_frame.portrait:SetTexture([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]])
|
||||
|
||||
return options_frame
|
||||
|
||||
elseif (template == 1) then
|
||||
|
||||
local options_frame = CreateFrame ("frame", name, UIParent,"BackdropTemplate")
|
||||
local options_frame = CreateFrame("frame", name, UIParent,"BackdropTemplate")
|
||||
tinsert (UISpecialFrames, name)
|
||||
options_frame:SetSize (500, 200)
|
||||
options_frame:SetSize(500, 200)
|
||||
|
||||
options_frame:SetScript ("OnMouseDown", function(self, button)
|
||||
options_frame:SetScript("OnMouseDown", function(self, button)
|
||||
if (button == "RightButton") then
|
||||
if (self.moving) then
|
||||
self.moving = false
|
||||
@@ -388,7 +388,7 @@
|
||||
self:StartMoving()
|
||||
end
|
||||
end)
|
||||
options_frame:SetScript ("OnMouseUp", function(self)
|
||||
options_frame:SetScript("OnMouseUp", function(self)
|
||||
if (self.moving) then
|
||||
self.moving = false
|
||||
self:StopMovingOrSizing()
|
||||
@@ -402,18 +402,18 @@
|
||||
|
||||
options_frame:Hide()
|
||||
|
||||
options_frame:SetPoint ("center", UIParent, "center")
|
||||
options_frame:SetPoint("center", UIParent, "center")
|
||||
|
||||
options_frame:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16,
|
||||
options_frame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16,
|
||||
edgeFile = [[Interface\AddOns\Details\images\border_2]], edgeSize = 32,
|
||||
insets = {left = 1, right = 1, top = 1, bottom = 1}})
|
||||
options_frame:SetBackdropColor (0, 0, 0, .7)
|
||||
options_frame:SetBackdropColor(0, 0, 0, .7)
|
||||
|
||||
Details.gump:ApplyStandardBackdrop (options_frame)
|
||||
Details.gump:CreateTitleBar (options_frame, title)
|
||||
|
||||
local bigdog = _detalhes.gump:NewImage (options_frame, [[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]], 110, 120, nil, {1, 0, 0, 1}, "backgroundBigDog", "$parentBackgroundBigDog")
|
||||
bigdog:SetPoint ("bottomright", options_frame, "bottomright", -3, 0)
|
||||
bigdog:SetPoint("bottomright", options_frame, "bottomright", -3, 0)
|
||||
bigdog:SetAlpha (.25)
|
||||
|
||||
return options_frame
|
||||
@@ -422,12 +422,12 @@
|
||||
|
||||
function _detalhes:CreatePluginWindowContainer()
|
||||
|
||||
local f = CreateFrame ("frame", "DetailsPluginContainerWindow", UIParent,"BackdropTemplate")
|
||||
local f = CreateFrame("frame", "DetailsPluginContainerWindow", UIParent,"BackdropTemplate")
|
||||
f:EnableMouse (true)
|
||||
f:SetMovable (true)
|
||||
f:SetPoint ("center", UIParent, "center")
|
||||
f:SetBackdrop (_detalhes.PluginDefaults and _detalhes.PluginDefaults.Backdrop or {bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
f:SetBackdropColor (0, 0, 0, 0.3)
|
||||
f:SetPoint("center", UIParent, "center")
|
||||
f:SetBackdrop(_detalhes.PluginDefaults and _detalhes.PluginDefaults.Backdrop or {bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
f:SetBackdropColor(0, 0, 0, 0.3)
|
||||
f:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
local scaleBar = DetailsFramework:CreateScaleBar(f, Details.options_window)
|
||||
@@ -436,7 +436,7 @@
|
||||
|
||||
f:Hide()
|
||||
|
||||
--> members
|
||||
--members
|
||||
f.MenuX = CONST_PLUGINWINDOW_MENU_X
|
||||
f.MenuY = CONST_PLUGINWINDOW_MENU_Y
|
||||
f.MenuButtonWidth = CONST_PLUGINWINDOW_MENU_WIDTH
|
||||
@@ -445,31 +445,31 @@
|
||||
f.FrameHeight = CONST_PLUGINWINDOW_HEIGHT
|
||||
f.TitleHeight = 20
|
||||
|
||||
--> store button references for the left menu
|
||||
--store button references for the left menu
|
||||
f.MenuButtons = {}
|
||||
--> store all plugins embed
|
||||
--store all plugins embed
|
||||
f.EmbedPlugins = {}
|
||||
|
||||
--> lib window
|
||||
f:SetSize (f.FrameWidth, f.FrameHeight)
|
||||
--lib window
|
||||
f:SetSize(f.FrameWidth, f.FrameHeight)
|
||||
local LibWindow = LibStub ("LibWindow-1.1")
|
||||
LibWindow.RegisterConfig (f, _detalhes.plugin_window_pos)
|
||||
LibWindow.RestorePosition (f)
|
||||
LibWindow.MakeDraggable (f)
|
||||
LibWindow.SavePosition (f)
|
||||
|
||||
--> menu background
|
||||
local menuBackground = CreateFrame ("frame", "$parentMenuFrame", f,"BackdropTemplate")
|
||||
--menu background
|
||||
local menuBackground = CreateFrame("frame", "$parentMenuFrame", f,"BackdropTemplate")
|
||||
_detalhes:FormatBackground (menuBackground)
|
||||
local menuBackgroundTexture = menuBackground:CreateTexture("$parentBackgroundTexture", "background", nil, -2)
|
||||
menuBackgroundTexture:SetAllPoints()
|
||||
menuBackgroundTexture:SetColorTexture(0.2, 0.2, 0.2, .5)
|
||||
|
||||
--> statusbar
|
||||
local statusBar = CreateFrame ("frame", nil, menuBackground,"BackdropTemplate")
|
||||
statusBar:SetPoint ("topleft", menuBackground, "bottomleft", 0, 1)
|
||||
statusBar:SetPoint ("topright", f, "bottomright", 0, 1)
|
||||
statusBar:SetHeight (20)
|
||||
--statusbar
|
||||
local statusBar = CreateFrame("frame", nil, menuBackground,"BackdropTemplate")
|
||||
statusBar:SetPoint("topleft", menuBackground, "bottomleft", 0, 1)
|
||||
statusBar:SetPoint("topright", f, "bottomright", 0, 1)
|
||||
statusBar:SetHeight(20)
|
||||
statusBar:SetAlpha (1)
|
||||
DetailsFramework:BuildStatusbarAuthorInfo (statusBar)
|
||||
DetailsFramework:ApplyStandardBackdrop (statusBar)
|
||||
@@ -478,73 +478,73 @@
|
||||
extraDarkTexture:SetColorTexture(.2, .2, .2, .8)
|
||||
|
||||
--
|
||||
local right_click_to_back = _detalhes.gump:CreateLabel (statusBar, "right click to close", 10, "gray")
|
||||
right_click_to_back:SetPoint ("bottomright", statusBar, "bottomright", -1, 5)
|
||||
local right_click_to_back = _detalhes.gump:CreateLabel(statusBar, "right click to close", 10, "gray")
|
||||
right_click_to_back:SetPoint("bottomright", statusBar, "bottomright", -1, 5)
|
||||
right_click_to_back:SetAlpha (.4)
|
||||
|
||||
--> point
|
||||
menuBackground:SetPoint ("topright", f, "topleft", -2, 0)
|
||||
menuBackground:SetPoint ("bottomright", f, "bottomleft", -2, 0)
|
||||
menuBackground:SetWidth (f.MenuButtonWidth + 6)
|
||||
--point
|
||||
menuBackground:SetPoint("topright", f, "topleft", -2, 0)
|
||||
menuBackground:SetPoint("bottomright", f, "bottomleft", -2, 0)
|
||||
menuBackground:SetWidth(f.MenuButtonWidth + 6)
|
||||
|
||||
local bigdog = _detalhes.gump:NewImage (menuBackground, [[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]], 180*0.7, 200*0.7, "overlay", {0, 1, 0, 1}, "backgroundBigDog", "$parentBackgroundBigDog")
|
||||
bigdog:SetPoint ("bottomleft", custom_window, "bottomleft", 0, 1)
|
||||
bigdog:SetPoint("bottomleft", custom_window, "bottomleft", 0, 1)
|
||||
bigdog:SetAlpha (0.3)
|
||||
|
||||
local gradientBelowTheLine = DetailsFramework:CreateTexture(menuBackground, {gradient = "vertical", fromColor = {0, 0, 0, 0.45}, toColor = "transparent"}, 1, 95, "artwork", {0, 1, 0, 1}, "dogGradient")
|
||||
gradientBelowTheLine:SetPoint("bottoms")
|
||||
|
||||
local bigdogRow = menuBackground:CreateTexture (nil, "artwork")
|
||||
bigdogRow:SetPoint ("bottomleft", menuBackground, "bottomleft", 1, 1)
|
||||
bigdogRow:SetPoint ("bottomright", menuBackground, "bottomright", -1, 1)
|
||||
bigdogRow:SetHeight (20)
|
||||
local bigdogRow = menuBackground:CreateTexture(nil, "artwork")
|
||||
bigdogRow:SetPoint("bottomleft", menuBackground, "bottomleft", 1, 1)
|
||||
bigdogRow:SetPoint("bottomright", menuBackground, "bottomright", -1, 1)
|
||||
bigdogRow:SetHeight(20)
|
||||
bigdogRow:SetColorTexture (.5, .5, .5, .1)
|
||||
bigdogRow:Hide()
|
||||
|
||||
--
|
||||
--> plugins menu title bar
|
||||
local titlebar_plugins = CreateFrame ("frame", nil, menuBackground,"BackdropTemplate")
|
||||
--plugins menu title bar
|
||||
local titlebar_plugins = CreateFrame("frame", nil, menuBackground,"BackdropTemplate")
|
||||
PixelUtil.SetPoint (titlebar_plugins, "topleft", menuBackground, "topleft", 2, -3)
|
||||
PixelUtil.SetPoint (titlebar_plugins, "topright", menuBackground, "topright", -2, -3)
|
||||
titlebar_plugins:SetHeight (f.TitleHeight)
|
||||
titlebar_plugins:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
titlebar_plugins:SetBackdropColor (.5, .5, .5, 1)
|
||||
titlebar_plugins:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
--> title
|
||||
local titleLabel = _detalhes.gump:NewLabel (titlebar_plugins, titlebar_plugins, nil, "titulo", "Plugins", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
|
||||
titlebar_plugins:SetHeight(f.TitleHeight)
|
||||
titlebar_plugins:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
titlebar_plugins:SetBackdropColor(.5, .5, .5, 1)
|
||||
titlebar_plugins:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
--title
|
||||
local titleLabel = _detalhes.gump:NewLabel(titlebar_plugins, titlebar_plugins, nil, "titulo", "Plugins", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
|
||||
PixelUtil.SetPoint (titleLabel, "center", titlebar_plugins , "center", 0, 0)
|
||||
PixelUtil.SetPoint (titleLabel, "top", titlebar_plugins , "top", 0, -5)
|
||||
|
||||
--> plugins menu title bar
|
||||
local titlebar_tools = CreateFrame ("frame", nil, menuBackground,"BackdropTemplate")
|
||||
titlebar_tools:SetHeight (f.TitleHeight)
|
||||
titlebar_tools:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
titlebar_tools:SetBackdropColor (.5, .5, .5, 1)
|
||||
titlebar_tools:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
--> title
|
||||
local titleLabel = _detalhes.gump:NewLabel (titlebar_tools, titlebar_tools, nil, "titulo", "Tools", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
|
||||
--plugins menu title bar
|
||||
local titlebar_tools = CreateFrame("frame", nil, menuBackground,"BackdropTemplate")
|
||||
titlebar_tools:SetHeight(f.TitleHeight)
|
||||
titlebar_tools:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
titlebar_tools:SetBackdropColor(.5, .5, .5, 1)
|
||||
titlebar_tools:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
--title
|
||||
local titleLabel = _detalhes.gump:NewLabel(titlebar_tools, titlebar_tools, nil, "titulo", "Tools", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
|
||||
PixelUtil.SetPoint (titleLabel, "center", titlebar_tools , "center", 0, 0)
|
||||
PixelUtil.SetPoint (titleLabel, "top", titlebar_tools , "top", 0, -5)
|
||||
|
||||
--> scripts
|
||||
f:SetScript ("OnShow", function()
|
||||
--scripts
|
||||
f:SetScript("OnShow", function()
|
||||
--check if the window isn't out of screen
|
||||
C_Timer.After (1, function()
|
||||
local right = f:GetRight()
|
||||
if (right and right > GetScreenWidth() + 500) then
|
||||
f:ClearAllPoints()
|
||||
f:SetPoint ("center", UIParent, "center", 0, 0)
|
||||
f:SetPoint("center", UIParent, "center", 0, 0)
|
||||
LibWindow.SavePosition (f)
|
||||
_detalhes:Msg ("detected options panel out of screen, position has reset")
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
f:SetScript ("OnHide", function()
|
||||
f:SetScript("OnHide", function()
|
||||
|
||||
end)
|
||||
|
||||
f:SetScript ("OnMouseDown", function(self, button)
|
||||
f:SetScript("OnMouseDown", function(self, button)
|
||||
if (button == "RightButton") then
|
||||
f.ClosePlugin()
|
||||
end
|
||||
@@ -561,10 +561,10 @@
|
||||
|
||||
function f.OnMenuClick (_, _, pluginAbsName, callRefresh)
|
||||
|
||||
--> get the plugin
|
||||
--get the plugin
|
||||
local pluginObject = _detalhes:GetPlugin (pluginAbsName)
|
||||
if (not pluginObject) then
|
||||
for index, plugin in ipairs (f.EmbedPlugins) do
|
||||
for index, plugin in ipairs(f.EmbedPlugins) do
|
||||
if (plugin.real_name == pluginAbsName) then
|
||||
pluginObject = plugin
|
||||
end
|
||||
@@ -576,62 +576,62 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> hide or show plugin windows
|
||||
for index, plugin in ipairs (f.EmbedPlugins) do
|
||||
--hide or show plugin windows
|
||||
for index, plugin in ipairs(f.EmbedPlugins) do
|
||||
if (plugin ~= pluginObject) then
|
||||
--> hide this plugin
|
||||
--hide this plugin
|
||||
if (plugin.Frame:IsShown()) then
|
||||
plugin.Frame:Hide()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> re set the point of the frame within the main plugin window
|
||||
--re set the point of the frame within the main plugin window
|
||||
f.RefreshFrame (pluginObject.__var_Frame)
|
||||
C_Timer.After (0.016, function()
|
||||
f.RefreshFrame (pluginObject.__var_Frame)
|
||||
end)
|
||||
|
||||
--> show the plugin window
|
||||
--show the plugin window
|
||||
if (pluginObject.RefreshWindow and callRefresh) then
|
||||
DetailsFramework:QuickDispatch (pluginObject.RefreshWindow)
|
||||
end
|
||||
|
||||
--> highlight the plugin button on the menu
|
||||
for index, button in ipairs (f.MenuButtons) do
|
||||
--highlight the plugin button on the menu
|
||||
for index, button in ipairs(f.MenuButtons) do
|
||||
button:Show()
|
||||
|
||||
if (button.PluginAbsName == pluginAbsName) then
|
||||
--> emphatizate this button
|
||||
--emphatizate this button
|
||||
button:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTONSELECTED_TEMPLATE"))
|
||||
else
|
||||
--> make this button regular
|
||||
--make this button regular
|
||||
button:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
|
||||
end
|
||||
end
|
||||
|
||||
--> show the container
|
||||
--show the container
|
||||
f:Show()
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function f.CreatePluginMenuButton (pluginObject, isUtility)
|
||||
--> create the button
|
||||
--create the button
|
||||
local newButton = _detalhes.gump:CreateButton (f, f.OnMenuClick, f.MenuButtonWidth, f.MenuButtonHeight, pluginObject.__name, pluginObject.real_name, true)
|
||||
newButton.PluginAbsName = pluginObject.real_name
|
||||
newButton.PluginName = pluginObject.__name
|
||||
newButton.IsUtility = isUtility
|
||||
|
||||
--> add a template
|
||||
--add a template
|
||||
newButton:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
|
||||
newButton:SetText (pluginObject.__name)
|
||||
newButton:SetText(pluginObject.__name)
|
||||
newButton.textsize = 10
|
||||
|
||||
--> set icon
|
||||
--set icon
|
||||
newButton:SetIcon (pluginObject.__icon, nil, nil, nil, pluginObject.__iconcoords, pluginObject.__iconcolor, 4)
|
||||
|
||||
--> add it to menu table
|
||||
--add it to menu table
|
||||
tinsert (f.MenuButtons, newButton)
|
||||
|
||||
return newButton
|
||||
@@ -643,35 +643,35 @@
|
||||
|
||||
function f.RefreshFrame (frame)
|
||||
frame:EnableMouse (false)
|
||||
frame:SetSize (f.FrameWidth, f.FrameHeight)
|
||||
frame:SetScript ("OnMouseDown", nil)
|
||||
frame:SetScript ("OnMouseUp", nil)
|
||||
--frame:SetScript ("OnHide", on_hide)
|
||||
frame:SetSize(f.FrameWidth, f.FrameHeight)
|
||||
frame:SetScript("OnMouseDown", nil)
|
||||
frame:SetScript("OnMouseUp", nil)
|
||||
--frame:SetScript("OnHide", on_hide)
|
||||
frame:HookScript ("OnHide", on_hide)
|
||||
frame:ClearAllPoints()
|
||||
PixelUtil.SetPoint (frame, "topleft", f, "topleft", 0, 0)
|
||||
frame:Show()
|
||||
end
|
||||
|
||||
--> a plugin request to be embed into the main plugin window
|
||||
--a plugin request to be embed into the main plugin window
|
||||
function f.EmbedPlugin(pluginObject, frame, isUtility)
|
||||
|
||||
--> check if the plugin has a frame
|
||||
--check if the plugin has a frame
|
||||
if (not pluginObject.Frame) then
|
||||
f.DebugMsg ("plugin doesn't have a frame.")
|
||||
return
|
||||
end
|
||||
|
||||
--> create a button for this plugin
|
||||
--create a button for this plugin
|
||||
local newMenuButtom = f.CreatePluginMenuButton(pluginObject, isUtility)
|
||||
|
||||
--> utility is true when the object isn't a real plugin, but instead a tool frame from the main addon being embed on this panel
|
||||
--utility is true when the object isn't a real plugin, but instead a tool frame from the main addon being embed on this panel
|
||||
if (isUtility) then
|
||||
pluginObject.__var_Utility = true
|
||||
end
|
||||
pluginObject.__var_Frame = frame
|
||||
|
||||
--> sort buttons alphabetically, put utilities at the end
|
||||
--sort buttons alphabetically, put utilities at the end
|
||||
table.sort (f.MenuButtons, function(t1, t2)
|
||||
if (t1.IsUtility and t2.IsUtility) then
|
||||
return t1.PluginName < t2.PluginName
|
||||
@@ -684,17 +684,17 @@
|
||||
end
|
||||
end)
|
||||
|
||||
--> reset the buttons points
|
||||
--reset the buttons points
|
||||
local addingTools = false
|
||||
for index, button in ipairs(f.MenuButtons) do
|
||||
button:ClearAllPoints()
|
||||
PixelUtil.SetPoint(button, "center", menuBackground, "center", 0, 0)
|
||||
|
||||
if (button.IsUtility) then
|
||||
--> add -20 to add a gap between plugins and utilities
|
||||
--add -20 to add a gap between plugins and utilities
|
||||
|
||||
if (not addingTools) then
|
||||
--> add the header
|
||||
--add the header
|
||||
addingTools = true
|
||||
PixelUtil.SetPoint (titlebar_tools, "topleft", menuBackground, "topleft", 2, f.MenuY + ( (index-1) * -f.MenuButtonHeight ) - index - 20)
|
||||
PixelUtil.SetPoint (titlebar_tools, "topright", menuBackground, "topright", -2, f.MenuY + ( (index-1) * -f.MenuButtonHeight ) - index - 20)
|
||||
@@ -706,9 +706,9 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> format the plugin main frame
|
||||
--format the plugin main frame
|
||||
f.RefreshFrame (frame)
|
||||
--> add the plugin to embed table
|
||||
--add the plugin to embed table
|
||||
tinsert(f.EmbedPlugins, pluginObject)
|
||||
frame:SetParent(f)
|
||||
|
||||
@@ -716,16 +716,16 @@
|
||||
end
|
||||
|
||||
function f.OpenPlugin (pluginObject)
|
||||
--> just simulate a click on the menu button
|
||||
--just simulate a click on the menu button
|
||||
f.OnMenuClick (_, _, pluginObject.real_name)
|
||||
end
|
||||
|
||||
function f.ClosePlugin()
|
||||
--> hide all embed plugins
|
||||
for index, plugin in ipairs (f.EmbedPlugins) do
|
||||
--hide all embed plugins
|
||||
for index, plugin in ipairs(f.EmbedPlugins) do
|
||||
plugin.Frame:Hide()
|
||||
end
|
||||
--> hide the main frame
|
||||
--hide the main frame
|
||||
f:Hide()
|
||||
end
|
||||
|
||||
@@ -741,20 +741,20 @@
|
||||
function _detalhes:OpenPlugin (wildcard)
|
||||
local originalName = wildcard
|
||||
|
||||
if (type (wildcard) == "string") then
|
||||
if (type(wildcard) == "string") then
|
||||
|
||||
--> check if passed a plugin absolute name
|
||||
--check if passed a plugin absolute name
|
||||
local pluginObject = _detalhes:GetPlugin (wildcard)
|
||||
if (pluginObject) then
|
||||
f.OpenPlugin (pluginObject)
|
||||
return true
|
||||
end
|
||||
|
||||
--> check if passed a plugin name, remove spaces and make it lower case
|
||||
--check if passed a plugin name, remove spaces and make it lower case
|
||||
wildcard = string.lower (wildcard)
|
||||
wildcard = wildcard:gsub ("%s", "")
|
||||
|
||||
for index, pluginInfoTable in ipairs (_detalhes.ToolBar.Menu) do
|
||||
for index, pluginInfoTable in ipairs(_detalhes.ToolBar.Menu) do
|
||||
local pluginName = pluginInfoTable [1]
|
||||
pluginName = string.lower (pluginName)
|
||||
pluginName = pluginName:gsub ("%s", "")
|
||||
@@ -766,15 +766,15 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> check if passed a plugin object
|
||||
elseif (type (wildcard) == "table") then
|
||||
--check if passed a plugin object
|
||||
elseif (type(wildcard) == "table") then
|
||||
if (wildcard.__name) then
|
||||
f.OpenPlugin (wildcard)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
Details:Msg ("|cFFFF7700plugin not found|r:|cFFFFFF00", (originalName or wildcard), "|rcheck if it is enabled in the addons control panel.") --localize-me
|
||||
Details:Msg("|cFFFF7700plugin not found|r:|cFFFFFF00", (originalName or wildcard), "|rcheck if it is enabled in the addons control panel.") --localize-me
|
||||
end
|
||||
|
||||
|
||||
|
||||
+22
-22
@@ -6,7 +6,7 @@
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
|
||||
local _math_floor = math.floor --lua local
|
||||
local _cstr = string.format --lua local
|
||||
@@ -19,13 +19,13 @@
|
||||
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
--constants
|
||||
|
||||
local modo_raid = _detalhes._detalhes_props["MODO_RAID"]
|
||||
local modo_alone = _detalhes._detalhes_props["MODO_ALONE"]
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internal functions
|
||||
--internal functions
|
||||
|
||||
function _detalhes.RaidTables:DisableRaidMode (instance)
|
||||
--free
|
||||
@@ -59,28 +59,28 @@
|
||||
|
||||
function _detalhes.RaidTables:EnableRaidMode (instance, plugin_name, from_cooltip, from_mode_menu)
|
||||
|
||||
--> check if came from cooltip
|
||||
--check if came from cooltip
|
||||
if (from_cooltip) then
|
||||
self = _detalhes.RaidTables
|
||||
instance = plugin_name
|
||||
plugin_name = from_cooltip
|
||||
end
|
||||
|
||||
--> set the mode
|
||||
--set the mode
|
||||
if (instance.modo == modo_alone) then
|
||||
instance:SoloMode (false)
|
||||
end
|
||||
instance.modo = modo_raid
|
||||
|
||||
--> hide rows, scrollbar
|
||||
Details.FadeHandler.Fader (instance, 1, nil, "barras")
|
||||
--hide rows, scrollbar
|
||||
Details.FadeHandler.Fader(instance, 1, nil, "barras")
|
||||
if (instance.rolagem) then
|
||||
instance:EsconderScrollBar (true) --> hida a scrollbar
|
||||
instance:EsconderScrollBar (true) --hida a scrollbar
|
||||
end
|
||||
_detalhes:ResetaGump (instance)
|
||||
instance:RefreshMainWindow (true)
|
||||
instance:RefreshMainWindow(true)
|
||||
|
||||
--> get the plugin name
|
||||
--get the plugin name
|
||||
|
||||
--if the desired plugin isn't passed, try to get the latest used.
|
||||
if (not plugin_name) then
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
function _detalhes.RaidTables:GetAvailablePlugins()
|
||||
local available = {}
|
||||
for index, plugin in ipairs (self.Menu) do
|
||||
for index, plugin in ipairs(self.Menu) do
|
||||
if (not self.PluginsInUse [ plugin [4] ] and plugin [3].__enabled) then -- 3 = plugin object 4 = absolute name
|
||||
tinsert (available, plugin)
|
||||
end
|
||||
@@ -212,10 +212,10 @@
|
||||
|
||||
self:SetInUse (plugin_name, instance:GetId())
|
||||
plugin_object.instance_id = instance:GetId()
|
||||
plugin_object.Frame:SetPoint ("TOPLEFT", instance.bgframe)
|
||||
plugin_object.Frame:SetPoint("TOPLEFT", instance.bgframe)
|
||||
plugin_object.Frame:Show()
|
||||
instance:ChangeIcon (plugin_object.__icon)--; print (instance:GetId(),"icon",plugin_object.__icon)
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instance, instance.atributo, instance.sub_atributo)
|
||||
_detalhes:SendEvent("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instance, instance.atributo, instance.sub_atributo)
|
||||
|
||||
if (update_menu) then
|
||||
GameCooltip:ExecFunc (instance.baseframe.cabecalho.atributo)
|
||||
@@ -238,7 +238,7 @@
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> built in announcers
|
||||
--built in announcers
|
||||
|
||||
function _detalhes:SendMsgToChannel (msg, channel, towho)
|
||||
if (channel == "RAID" or channel == "PARTY") then
|
||||
@@ -249,10 +249,10 @@
|
||||
|
||||
elseif (channel == "BNET") then
|
||||
|
||||
if (type (towho) == "number") then
|
||||
if (type(towho) == "number") then
|
||||
BNSendWhisper (towho, msg)
|
||||
|
||||
elseif (type (towho) == "string") then
|
||||
elseif (type(towho) == "string") then
|
||||
--local BnetFriends = BNGetNumFriends()
|
||||
--for i = 1, BnetFriends do
|
||||
-- local presenceID, presenceName, battleTag, isBattleTagPresence, toonName, toonID, client, isOnline, lastOnline, isAFK, isDND, messageText, noteText, isRIDFriend, broadcastTime, canSoR = BNGetFriendInfo (i)
|
||||
@@ -531,13 +531,13 @@
|
||||
channel = "INSTANCE_CHAT"
|
||||
end
|
||||
|
||||
elseif (where == 4) then --> observer
|
||||
elseif (where == 4) then --observer
|
||||
if (zone ~= "raid" and zone ~= "party") then
|
||||
return
|
||||
end
|
||||
channel = "PRINT"
|
||||
|
||||
elseif (where == 5) then --> officers
|
||||
elseif (where == 5) then --officers
|
||||
if (IsInGuild()) then
|
||||
channel = "OFFICER"
|
||||
end
|
||||
@@ -555,7 +555,7 @@
|
||||
alvo_name = _detalhes:GetOnlyName (alvo_name)
|
||||
|
||||
local msg
|
||||
if (where == 4) then --> observer
|
||||
if (where == 4) then --observer
|
||||
local _, class = _UnitClass (alvo_name)
|
||||
local class_color = "|cFFFFFFFF"
|
||||
|
||||
@@ -575,14 +575,14 @@
|
||||
for i = 1, _detalhes.announce_deaths.last_hits do
|
||||
for o = last, 1, -1 do
|
||||
local this_death = death_table [o]
|
||||
if (type (this_death[1]) == "boolean" and this_death[1] and this_death[4]+5 > time) then
|
||||
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])
|
||||
else
|
||||
spelllink = "[" .. _GetSpellInfo(this_death [2]) .. "]"
|
||||
end
|
||||
spells = spelllink .. ": " .. _detalhes:ToK2 (_math_floor (this_death [3])) .. " " .. spells
|
||||
spells = spelllink .. ": " .. _detalhes:ToK2 (_math_floor(this_death [3])) .. " " .. spells
|
||||
last = o-1
|
||||
break
|
||||
end
|
||||
@@ -591,7 +591,7 @@
|
||||
|
||||
msg = msg .. " " .. spells
|
||||
|
||||
if (where == 4) then --> observer
|
||||
if (where == 4) then --observer
|
||||
local minute, second = _detalhes:GetCombat():GetFormatedCombatTime()
|
||||
if (second < 10) then
|
||||
second = "0" .. second
|
||||
|
||||
+59
-59
@@ -5,7 +5,7 @@
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
|
||||
local _pairs = pairs --lua locals
|
||||
local _math_floor = math.floor --lua locals
|
||||
@@ -16,15 +16,15 @@
|
||||
local gump = _detalhes.gump --details local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
--constants
|
||||
|
||||
local modo_alone = _detalhes._detalhes_props["MODO_ALONE"]
|
||||
local modo_grupo = _detalhes._detalhes_props["MODO_GROUP"]
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internal functions
|
||||
--internal functions
|
||||
|
||||
--> When a combat start
|
||||
--When a combat start
|
||||
function _detalhes:UpdateSolo()
|
||||
local SoloInstance = _detalhes.tabela_instancias[_detalhes.solo]
|
||||
_detalhes.SoloTables.CombatIDLast = _detalhes.SoloTables.CombatID
|
||||
@@ -35,17 +35,17 @@
|
||||
function _detalhes:CreateSoloCloseButton()
|
||||
|
||||
local plugin, frame = self, self.Frame
|
||||
local button = CreateFrame ("Button", nil, frame, "UIPanelCloseButton")
|
||||
local button = CreateFrame("Button", nil, frame, "UIPanelCloseButton")
|
||||
|
||||
button:SetScript ("OnClick", function()
|
||||
button:SetScript("OnClick", function()
|
||||
if (not button.close_confirmation) then
|
||||
button.close_confirmation = gump:CreateSimplePanel (button, 296, 60, "", plugin.real_name .. "CloseConfirmation")
|
||||
button.close_confirmation:SetPoint ("center", frame, 0, 0)
|
||||
button.close_confirmation:SetPoint("center", frame, 0, 0)
|
||||
_G [button.close_confirmation:GetName() .. "TitleBar"]:Hide()
|
||||
local fade_background = button.close_confirmation:CreateTexture (nil, "background")
|
||||
fade_background:SetPoint ("topleft", frame, 0, 0)
|
||||
fade_background:SetPoint ("bottomright", frame, 0, 0)
|
||||
fade_background:SetTexture (0, 0, 0, 0.7)
|
||||
local fade_background = button.close_confirmation:CreateTexture(nil, "background")
|
||||
fade_background:SetPoint("topleft", frame, 0, 0)
|
||||
fade_background:SetPoint("bottomright", frame, 0, 0)
|
||||
fade_background:SetTexture(0, 0, 0, 0.7)
|
||||
|
||||
local close_func = function()
|
||||
local instance = plugin:GetPluginInstance()
|
||||
@@ -66,42 +66,42 @@
|
||||
close_window:SetIcon ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]], nil, nil, nil, {0.143125, 0.8653125, 0.1446875, 0.8653125}, nil, nil, 2)
|
||||
back_to_group_and_raid:SetIcon ([[Interface\AddOns\Details\images\modo_icones]], nil, nil, nil, {32/256, 32/256*2, 0, 1}, nil, nil, 2)
|
||||
|
||||
close_window:SetPoint ("topleft", 3, -4)
|
||||
close_window:SetPoint ("bottomright", -3, 31)
|
||||
back_to_group_and_raid:SetPoint ("topleft", 3, -31)
|
||||
back_to_group_and_raid:SetPoint ("bottomright", -3, 4)
|
||||
close_window:SetPoint("topleft", 3, -4)
|
||||
close_window:SetPoint("bottomright", -3, 31)
|
||||
back_to_group_and_raid:SetPoint("topleft", 3, -31)
|
||||
back_to_group_and_raid:SetPoint("bottomright", -3, 4)
|
||||
end
|
||||
|
||||
button.close_confirmation:Show()
|
||||
end)
|
||||
|
||||
button:SetWidth (20)
|
||||
button:SetHeight (20)
|
||||
button:SetWidth(20)
|
||||
button:SetHeight(20)
|
||||
--button:GetNormalTexture():SetDesaturated (true)
|
||||
return button
|
||||
end
|
||||
|
||||
--> enable and disable Solo Mode for an Instance
|
||||
--enable and disable Solo Mode for an Instance
|
||||
function _detalhes:SoloMode (show)
|
||||
if (show) then
|
||||
|
||||
--> salvar a janela normal
|
||||
if (self.mostrando ~= "solo") then --> caso o addon tenha ligado ja no painel solo, n�o precisa rodar isso aqui
|
||||
--salvar a janela normal
|
||||
if (self.mostrando ~= "solo") then --caso o addon tenha ligado ja no painel solo, n�o precisa rodar isso aqui
|
||||
self:SaveMainWindowPosition()
|
||||
|
||||
if (self.rolagem) then
|
||||
self:EsconderScrollBar() --> hida a scrollbar
|
||||
self:EsconderScrollBar() --hida a scrollbar
|
||||
end
|
||||
self.need_rolagem = false
|
||||
|
||||
self.baseframe:EnableMouseWheel (false)
|
||||
Details.FadeHandler.Fader (self, 1, nil, "barras") --> escondendo a janela da inst�ncia [inst�ncia [force hide [velocidade [hidar o que]]]]
|
||||
Details.FadeHandler.Fader(self, 1, nil, "barras") --escondendo a janela da inst�ncia [inst�ncia [force hide [velocidade [hidar o que]]]]
|
||||
self.mostrando = "solo"
|
||||
end
|
||||
|
||||
_detalhes.SoloTables.instancia = self
|
||||
|
||||
--> default plugin
|
||||
--default plugin
|
||||
if (not _detalhes.SoloTables.built) then
|
||||
gump:PrepareSoloMode (self)
|
||||
end
|
||||
@@ -110,22 +110,22 @@
|
||||
_detalhes.solo = self.meu_id
|
||||
--self:AtualizaSliderSolo (0)
|
||||
|
||||
if (not self.posicao.solo.w) then --> primeira vez que o solo mode � executado nessa inst�ncia
|
||||
self.baseframe:SetWidth (300)
|
||||
self.baseframe:SetHeight (300)
|
||||
if (not self.posicao.solo.w) then --primeira vez que o solo mode � executado nessa inst�ncia
|
||||
self.baseframe:SetWidth(300)
|
||||
self.baseframe:SetHeight(300)
|
||||
self:SaveMainWindowPosition()
|
||||
else
|
||||
self:RestoreMainWindowPosition()
|
||||
local w, h = self:GetSize()
|
||||
if (w ~= 300 or h ~= 300) then
|
||||
self.baseframe:SetWidth (300)
|
||||
self.baseframe:SetHeight (300)
|
||||
self.baseframe:SetWidth(300)
|
||||
self.baseframe:SetHeight(300)
|
||||
self:SaveMainWindowPosition()
|
||||
end
|
||||
end
|
||||
|
||||
local first_enabled_plugin, first_enabled_plugin_index
|
||||
for index, plugin in ipairs (_detalhes.SoloTables.Plugins) do
|
||||
for index, plugin in ipairs(_detalhes.SoloTables.Plugins) do
|
||||
if (plugin.__enabled) then
|
||||
first_enabled_plugin = plugin
|
||||
first_enabled_plugin_index = index
|
||||
@@ -153,7 +153,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes.solo = nil --> destranca a janela solo para ser usada em outras inst�ncias
|
||||
_detalhes.solo = nil --destranca a janela solo para ser usada em outras inst�ncias
|
||||
self.mostrando = "normal"
|
||||
self:RestoreMainWindowPosition()
|
||||
|
||||
@@ -161,24 +161,24 @@
|
||||
_detalhes:CancelWaitForPlugin()
|
||||
end
|
||||
|
||||
Details.FadeHandler.Fader (self, 1, nil, "barras")
|
||||
Details.FadeHandler.Fader (self.scroll, 0)
|
||||
Details.FadeHandler.Fader(self, 1, nil, "barras")
|
||||
Details.FadeHandler.Fader(self.scroll, 0)
|
||||
|
||||
if (self.need_rolagem) then
|
||||
self:MostrarScrollBar (true)
|
||||
else
|
||||
--> precisa verificar se ele precisa a rolagem certo?
|
||||
--precisa verificar se ele precisa a rolagem certo?
|
||||
self:ReajustaGump()
|
||||
end
|
||||
|
||||
--> calcula se existem barras, etc...
|
||||
if (not self.rows_fit_in_window) then --> as barras n�o forma iniciadas ainda
|
||||
self.rows_fit_in_window = _math_floor (self.baseframe.BoxBarrasAltura / self.row_height)
|
||||
--calcula se existem barras, etc...
|
||||
if (not self.rows_fit_in_window) then --as barras n�o forma iniciadas ainda
|
||||
self.rows_fit_in_window = _math_floor(self.baseframe.BoxBarrasAltura / self.row_height)
|
||||
if (self.rows_created < self.rows_fit_in_window) then
|
||||
for i = #self.barras+1, self.rows_fit_in_window do
|
||||
local nova_barra = gump:CriaNovaBarra (self, i, 30) --> cria nova barra
|
||||
nova_barra.lineText1:SetText (Loc ["STRING_NEWROW"])
|
||||
nova_barra.statusbar:SetValue (100)
|
||||
local nova_barra = gump:CriaNovaBarra (self, i, 30) --cria nova barra
|
||||
nova_barra.lineText1:SetText(Loc ["STRING_NEWROW"])
|
||||
nova_barra.statusbar:SetValue(100)
|
||||
self.barras [i] = nova_barra
|
||||
end
|
||||
self.rows_created = #self.barras
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
function _detalhes.SoloTables:EnableSoloMode (instance, plugin_name, from_cooltip)
|
||||
|
||||
--> check if came from cooltip
|
||||
--check if came from cooltip
|
||||
if (from_cooltip) then
|
||||
self = _detalhes.SoloTables
|
||||
instance = plugin_name
|
||||
@@ -201,15 +201,15 @@
|
||||
_detalhes.SoloTables:switch (nil, plugin_name)
|
||||
end
|
||||
|
||||
--> Build Solo Mode Tables and Functions
|
||||
--Build Solo Mode Tables and Functions
|
||||
function gump:PrepareSoloMode (instancia)
|
||||
|
||||
_detalhes.SoloTables.built = true
|
||||
|
||||
_detalhes.SoloTables.SpellCastTable = {} --> not used
|
||||
_detalhes.SoloTables.TimeTable = {} --> not used
|
||||
_detalhes.SoloTables.SpellCastTable = {} --not used
|
||||
_detalhes.SoloTables.TimeTable = {} --not used
|
||||
|
||||
_detalhes.SoloTables.Mode = _detalhes.SoloTables.Mode or 1 --> solo mode
|
||||
_detalhes.SoloTables.Mode = _detalhes.SoloTables.Mode or 1 --solo mode
|
||||
|
||||
function _detalhes.SoloTables:GetActiveIndex()
|
||||
return _detalhes.SoloTables.Mode
|
||||
@@ -217,17 +217,17 @@
|
||||
|
||||
function _detalhes.SoloTables:switch (_, _switchTo)
|
||||
|
||||
--> just hide all
|
||||
--just hide all
|
||||
if (not _switchTo) then
|
||||
if (#_detalhes.SoloTables.Plugins > 0) then --> have at least one plugin
|
||||
if (#_detalhes.SoloTables.Plugins > 0) then --have at least one plugin
|
||||
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame:Hide()
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
--> if passed the absolute plugin name
|
||||
if (type (_switchTo) == "string") then
|
||||
for index, ptable in ipairs (_detalhes.SoloTables.Menu) do
|
||||
--if passed the absolute plugin name
|
||||
if (type(_switchTo) == "string") then
|
||||
for index, ptable in ipairs(_detalhes.SoloTables.Menu) do
|
||||
if (ptable [3].__enabled and ptable [4] == _switchTo) then
|
||||
_switchTo = index
|
||||
break
|
||||
@@ -243,27 +243,27 @@
|
||||
|
||||
local ThisFrame = _detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode]
|
||||
if (not ThisFrame or not ThisFrame.__enabled) then
|
||||
--> frame not found, try in few second again
|
||||
--frame not found, try in few second again
|
||||
_detalhes.SoloTables.Mode = _switchTo
|
||||
_detalhes:WaitForSoloPlugin (instancia)
|
||||
return
|
||||
end
|
||||
|
||||
--> hide current frame
|
||||
--hide current frame
|
||||
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame:Hide()
|
||||
--> switch mode
|
||||
--switch mode
|
||||
_detalhes.SoloTables.Mode = _switchTo
|
||||
--> show and setpoint new frame
|
||||
--show and setpoint new frame
|
||||
|
||||
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame:Show()
|
||||
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame:SetPoint ("TOPLEFT",_detalhes.SoloTables.instancia.bgframe)
|
||||
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame:SetPoint("TOPLEFT",_detalhes.SoloTables.instancia.bgframe)
|
||||
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame:SetFrameLevel (20)
|
||||
|
||||
_detalhes.SoloTables.instancia:ChangeIcon (_detalhes.SoloTables.Menu [_detalhes.SoloTables.Mode] [2])
|
||||
|
||||
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].instance_id = _detalhes.SoloTables.instancia:GetId()
|
||||
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, _detalhes.SoloTables.instancia, _detalhes.SoloTables.instancia.atributo, _detalhes.SoloTables.instancia.sub_atributo)
|
||||
_detalhes:SendEvent("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, _detalhes.SoloTables.instancia, _detalhes.SoloTables.instancia.atributo, _detalhes.SoloTables.instancia.sub_atributo)
|
||||
|
||||
end
|
||||
|
||||
@@ -278,16 +278,16 @@
|
||||
|
||||
for SpellId, DebuffTable in _pairs (SoloDebuffUptime) do
|
||||
if (DebuffTable.start) then
|
||||
DebuffTable.duration = DebuffTable.duration + (_detalhes._tempo - DebuffTable.start) --> time do parser ser� igual ao time()?
|
||||
DebuffTable.duration = DebuffTable.duration + (_detalhes._tempo - DebuffTable.start) --time do parser ser� igual ao time()?
|
||||
DebuffTable.start = nil
|
||||
end
|
||||
DebuffTable.Active = false
|
||||
end
|
||||
end
|
||||
|
||||
--> Buffs ter� em todos os Solo Modes
|
||||
--Buffs ter� em todos os Solo Modes
|
||||
function _detalhes.SoloTables:CatchBuffs()
|
||||
--> reset bufftables
|
||||
--reset bufftables
|
||||
_detalhes.SoloTables.SoloBuffUptime = _detalhes.SoloTables.SoloBuffUptime or {}
|
||||
|
||||
for spellname, BuffTable in _pairs (_detalhes.SoloTables.SoloBuffUptime) do
|
||||
@@ -310,7 +310,7 @@
|
||||
BuffTable.droppedAmt = 0
|
||||
end
|
||||
|
||||
--> catch buffs untracked yet
|
||||
--catch buffs untracked yet
|
||||
for buffIndex = 1, 41 do
|
||||
local name = _UnitAura ("player", buffIndex)
|
||||
if (name) then
|
||||
|
||||
+276
-276
File diff suppressed because it is too large
Load Diff
+60
-60
@@ -6,53 +6,53 @@
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
-- none
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> details api functions
|
||||
--details api functions
|
||||
|
||||
--> create a button which will be displayed on tooltip
|
||||
--create a button which will be displayed on tooltip
|
||||
function _detalhes.ToolBar:NewPluginToolbarButton (func, icon, pluginname, tooltip, w, h, framename, menu_function)
|
||||
|
||||
--> random name if nameless
|
||||
--random name if nameless
|
||||
if (not framename) then
|
||||
framename = "DetailsToolbarButton" .. math.random (1, 100000)
|
||||
end
|
||||
|
||||
--> create button from template
|
||||
local button = CreateFrame ("button", framename, _detalhes.listener, "DetailsToolbarButton")
|
||||
--create button from template
|
||||
local button = CreateFrame("button", framename, _detalhes.listener, "DetailsToolbarButton")
|
||||
|
||||
--> sizes
|
||||
--sizes
|
||||
if (w) then
|
||||
button:SetWidth (w)
|
||||
button:SetWidth(w)
|
||||
end
|
||||
if (h) then
|
||||
button:SetHeight (h)
|
||||
button:SetHeight(h)
|
||||
end
|
||||
|
||||
button.x = 0
|
||||
button.y = 0
|
||||
|
||||
--> tooltip and function on click
|
||||
--tooltip and function on click
|
||||
button.tooltip = tooltip
|
||||
button.menu = menu_function
|
||||
button:SetScript ("OnClick", func)
|
||||
button:SetScript("OnClick", func)
|
||||
|
||||
--> textures
|
||||
button:SetNormalTexture (icon)
|
||||
button:SetPushedTexture (icon)
|
||||
--textures
|
||||
button:SetNormalTexture(icon)
|
||||
button:SetPushedTexture(icon)
|
||||
button:SetDisabledTexture (icon)
|
||||
button:SetHighlightTexture (icon, "ADD")
|
||||
button:SetHighlightTexture(icon, "ADD")
|
||||
button.__icon = icon
|
||||
button.__name = pluginname
|
||||
|
||||
--> blizzard built-in animation
|
||||
--local FourCornerAnimeFrame = CreateFrame ("frame", framename.."Blink", button) --, "IconIntroAnimTemplate" --stop using 'IconIntroAnimTemplate' as older versions of the game doesn't have it
|
||||
--FourCornerAnimeFrame:SetPoint ("center", button)
|
||||
--FourCornerAnimeFrame:SetWidth (w or 14)
|
||||
--FourCornerAnimeFrame:SetHeight (w or 14)
|
||||
--FourCornerAnimeFrame.glow:SetScript ("OnFinished", nil)
|
||||
--blizzard built-in animation
|
||||
--local FourCornerAnimeFrame = CreateFrame("frame", framename.."Blink", button) --, "IconIntroAnimTemplate" --stop using 'IconIntroAnimTemplate' as older versions of the game doesn't have it
|
||||
--FourCornerAnimeFrame:SetPoint("center", button)
|
||||
--FourCornerAnimeFrame:SetWidth(w or 14)
|
||||
--FourCornerAnimeFrame:SetHeight(w or 14)
|
||||
--FourCornerAnimeFrame.glow:SetScript("OnFinished", nil)
|
||||
--button.blink = FourCornerAnimeFrame
|
||||
|
||||
_detalhes.ToolBar.AllButtons [#_detalhes.ToolBar.AllButtons+1] = button
|
||||
@@ -60,12 +60,12 @@
|
||||
return button
|
||||
end
|
||||
|
||||
--> show your plugin icon on tooltip
|
||||
--show your plugin icon on tooltip
|
||||
function _detalhes:ShowToolbarIcon (Button, Effect)
|
||||
|
||||
local LastIcon
|
||||
|
||||
--> get the lower number instance
|
||||
--get the lower number instance
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
if (not lower_instance) then
|
||||
return
|
||||
@@ -74,7 +74,7 @@
|
||||
local instance = _detalhes:GetInstance (lower_instance)
|
||||
|
||||
if (#_detalhes.ToolBar.Shown > 0) then
|
||||
--> already shown
|
||||
--already shown
|
||||
if (_detalhes:tableIN (_detalhes.ToolBar.Shown, Button)) then
|
||||
return
|
||||
end
|
||||
@@ -84,7 +84,7 @@
|
||||
end
|
||||
|
||||
_detalhes.ToolBar.Shown [#_detalhes.ToolBar.Shown+1] = Button
|
||||
Button:SetPoint ("left", LastIcon.widget or LastIcon, "right", Button.x, Button.y)
|
||||
Button:SetPoint("left", LastIcon.widget or LastIcon, "right", Button.x, Button.y)
|
||||
|
||||
Button:Show()
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
end
|
||||
|
||||
if (Effect) then
|
||||
if (type (Effect) == "string") then
|
||||
if (type(Effect) == "string") then
|
||||
if (Effect == "blink") then
|
||||
--Button.blink.glow:Play() --.blink and .glow doesn't exists anymore due to removal of the template 'IconIntroAnimTemplate'
|
||||
elseif (Effect == "star") then
|
||||
@@ -111,46 +111,46 @@
|
||||
return true
|
||||
end
|
||||
|
||||
--> hide your plugin icon from toolbar
|
||||
--hide your plugin icon from toolbar
|
||||
function _detalhes:HideToolbarIcon (Button)
|
||||
|
||||
local index = _detalhes:tableIN (_detalhes.ToolBar.Shown, Button)
|
||||
|
||||
if (not index) then
|
||||
--> current not shown
|
||||
--current not shown
|
||||
return
|
||||
end
|
||||
|
||||
Button:Hide()
|
||||
table.remove (_detalhes.ToolBar.Shown, index)
|
||||
|
||||
--> reorganize icons
|
||||
--reorganize icons
|
||||
_detalhes.ToolBar:ReorganizeIcons (true)
|
||||
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internal functions
|
||||
--internal functions
|
||||
do
|
||||
local PluginDescPanel = CreateFrame ("frame", "DetailsPluginDescPanel", UIParent)
|
||||
local PluginDescPanel = CreateFrame("frame", "DetailsPluginDescPanel", UIParent)
|
||||
PluginDescPanel:SetFrameStrata ("tooltip")
|
||||
PluginDescPanel:Hide()
|
||||
PluginDescPanel:SetWidth (205)
|
||||
PluginDescPanel:SetWidth(205)
|
||||
PluginDescPanel.BackdropTable = {}
|
||||
|
||||
local background = PluginDescPanel:CreateTexture (nil, "artwork")
|
||||
background:SetPoint ("topleft", 0, 0)
|
||||
background:SetPoint ("bottomright", 0, 0)
|
||||
local background = PluginDescPanel:CreateTexture(nil, "artwork")
|
||||
background:SetPoint("topleft", 0, 0)
|
||||
background:SetPoint("bottomright", 0, 0)
|
||||
PluginDescPanel.background = background
|
||||
|
||||
local icon, title, desc = PluginDescPanel:CreateTexture (nil, "overlay"), PluginDescPanel:CreateFontString (nil, "overlay", "GameFontNormal"), PluginDescPanel:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
icon:SetPoint ("topleft", 10, -10)
|
||||
icon:SetSize (16, 16)
|
||||
title:SetPoint ("left", icon, "right", 2, 0)
|
||||
desc:SetPoint ("topleft", 13, -30)
|
||||
desc:SetWidth (180)
|
||||
desc:SetJustifyH ("left")
|
||||
_detalhes:SetFontColor (desc, "white")
|
||||
local icon, title, desc = PluginDescPanel:CreateTexture(nil, "overlay"), PluginDescPanel:CreateFontString (nil, "overlay", "GameFontNormal"), PluginDescPanel:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
icon:SetPoint("topleft", 10, -10)
|
||||
icon:SetSize(16, 16)
|
||||
title:SetPoint("left", icon, "right", 2, 0)
|
||||
desc:SetPoint("topleft", 13, -30)
|
||||
desc:SetWidth(180)
|
||||
desc:SetJustifyH("left")
|
||||
_detalhes:SetFontColor(desc, "white")
|
||||
|
||||
PluginDescPanel.icon = icon
|
||||
PluginDescPanel.title = title
|
||||
@@ -161,7 +161,7 @@ end
|
||||
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
if (lower_instance) then
|
||||
_detalhes.OnEnterMainWindow (_detalhes:GetInstance (lower_instance), button, 3)
|
||||
_detalhes.OnEnterMainWindow(_detalhes:GetInstance (lower_instance), button, 3)
|
||||
end
|
||||
|
||||
if (button.tooltip) then
|
||||
@@ -171,13 +171,13 @@ 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
|
||||
if (not GameCooltipFrame1:IsMouseOver() and not button:IsMouseOver()) then
|
||||
GameCooltip2:Hide()
|
||||
button:SetScript ("OnUpdate", nil)
|
||||
button:SetScript("OnUpdate", nil)
|
||||
return
|
||||
end
|
||||
next_check = 0.8
|
||||
@@ -186,7 +186,7 @@ end
|
||||
|
||||
--disable the hider menu if the cooltip is required in another place
|
||||
hooksecurefunc (GameCooltip2, "ShowCooltip", function()
|
||||
button:SetScript ("OnUpdate", nil)
|
||||
button:SetScript("OnUpdate", nil)
|
||||
end)
|
||||
|
||||
return
|
||||
@@ -196,13 +196,13 @@ end
|
||||
local plugin_object = _detalhes:GetPlugin (button.__name)
|
||||
|
||||
local f = DetailsPluginDescPanel
|
||||
f.icon:SetTexture (button.__icon)
|
||||
f.title:SetText (button.__name)
|
||||
f.desc:SetText (plugin_object:GetPluginDescription())
|
||||
f.icon:SetTexture(button.__icon)
|
||||
f.title:SetText(button.__name)
|
||||
f.desc:SetText(plugin_object:GetPluginDescription())
|
||||
_detalhes:SetFontSize (f.desc, _detalhes.font_sizes.menus)
|
||||
_detalhes:SetFontFace (f.desc, _detalhes.font_faces.menus)
|
||||
|
||||
--f.background:SetTexture (_detalhes.tooltip.menus_bg_texture)
|
||||
--f.background:SetTexture(_detalhes.tooltip.menus_bg_texture)
|
||||
f.background:SetTexCoord (unpack (_detalhes.tooltip.menus_bg_coords))
|
||||
f.background:SetVertexColor (unpack (_detalhes.tooltip.menus_bg_color))
|
||||
--f.background:SetDesaturated (true)
|
||||
@@ -213,12 +213,12 @@ end
|
||||
f.BackdropTable.edgeSize = 1 --_detalhes.tooltip_backdrop.edgeSize
|
||||
f.BackdropTable.tileSize = _detalhes.tooltip_backdrop.tileSize
|
||||
|
||||
f:SetBackdrop (f.BackdropTable)
|
||||
local r, g, b, a = _detalhes.gump:ParseColors (_detalhes.tooltip_border_color)
|
||||
f:SetBackdropBorderColor (r, g, b, a)
|
||||
f:SetBackdrop(f.BackdropTable)
|
||||
local r, g, b, a = _detalhes.gump:ParseColors(_detalhes.tooltip_border_color)
|
||||
f:SetBackdropBorderColor(r, g, b, a)
|
||||
|
||||
f:SetHeight (40 + f.desc:GetStringHeight())
|
||||
f:SetPoint ("bottom", button, "top", 0, 10)
|
||||
f:SetHeight(40 + f.desc:GetStringHeight())
|
||||
f:SetPoint("bottom", button, "top", 0, 10)
|
||||
f:Show()
|
||||
--SharedMedia:Fetch ("font", "Friz Quadrata TT")
|
||||
|
||||
@@ -229,7 +229,7 @@ end
|
||||
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
if (lower_instance) then
|
||||
_detalhes.OnLeaveMainWindow (_detalhes:GetInstance (lower_instance), button, 3)
|
||||
_detalhes.OnLeaveMainWindow(_detalhes:GetInstance (lower_instance), button, 3)
|
||||
end
|
||||
|
||||
if (button.tooltip) then
|
||||
@@ -239,7 +239,7 @@ end
|
||||
|
||||
_detalhes:RegisterEvent (_detalhes.ToolBar, "DETAILS_INSTANCE_OPEN", "OnInstanceOpen")
|
||||
_detalhes:RegisterEvent (_detalhes.ToolBar, "DETAILS_INSTANCE_CLOSE", "OnInstanceClose")
|
||||
_detalhes.ToolBar.Enabled = true --> must have this member or wont receive the event
|
||||
_detalhes.ToolBar.Enabled = true --must have this member or wont receive the event
|
||||
_detalhes.ToolBar.__enabled = true
|
||||
|
||||
function _detalhes.ToolBar:OnInstanceOpen()
|
||||
@@ -250,11 +250,11 @@ end
|
||||
end
|
||||
|
||||
function _detalhes.ToolBar:ReorganizeIcons (just_refresh)
|
||||
--> get the lower number instance
|
||||
--get the lower number instance
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
|
||||
if (not lower_instance) then
|
||||
for _, ThisButton in ipairs (_detalhes.ToolBar.Shown) do
|
||||
for _, ThisButton in ipairs(_detalhes.ToolBar.Shown) do
|
||||
ThisButton:Hide()
|
||||
end
|
||||
return
|
||||
|
||||
+28
-28
@@ -5,7 +5,7 @@
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
|
||||
local _table_insert = table.insert --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
@@ -18,25 +18,25 @@
|
||||
local timeMachine = _detalhes.timeMachine --details local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
--constants
|
||||
local _tempo = _time()
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> core
|
||||
--core
|
||||
|
||||
timeMachine.ligada = false
|
||||
|
||||
local calc_for_pvp = function(self)
|
||||
for tipo, tabela in _pairs (self.tabelas) do
|
||||
for nome, jogador in _ipairs (tabela) do
|
||||
for nome, jogador in _ipairs(tabela) do
|
||||
if (jogador) then
|
||||
if (jogador.last_event+3 > _tempo) then --> okey o jogador esta dando dps
|
||||
if (jogador.on_hold) then --> o dps estava pausado, retornar a ativa
|
||||
if (jogador.last_event+3 > _tempo) then --okey o jogador esta dando dps
|
||||
if (jogador.on_hold) then --o dps estava pausado, retornar a ativa
|
||||
jogador:HoldOn (false)
|
||||
end
|
||||
else
|
||||
if (not jogador.on_hold) then --> n�o ta pausado, precisa por em pausa
|
||||
--> verifica se esta castando alguma coisa que leve + que 3 segundos
|
||||
if (not jogador.on_hold) then --n�o ta pausado, precisa por em pausa
|
||||
--verifica se esta castando alguma coisa que leve + que 3 segundos
|
||||
jogador:HoldOn (true)
|
||||
end
|
||||
end
|
||||
@@ -47,15 +47,15 @@
|
||||
|
||||
local calc_for_pve = function(self)
|
||||
for tipo, tabela in _pairs (self.tabelas) do
|
||||
for nome, jogador in _ipairs (tabela) do
|
||||
for nome, jogador in _ipairs(tabela) do
|
||||
if (jogador) then
|
||||
if (jogador.last_event+10 > _tempo) then --> okey o jogador esta dando dps
|
||||
if (jogador.on_hold) then --> o dps estava pausado, retornar a ativa
|
||||
if (jogador.last_event+10 > _tempo) then --okey o jogador esta dando dps
|
||||
if (jogador.on_hold) then --o dps estava pausado, retornar a ativa
|
||||
jogador:HoldOn (false)
|
||||
end
|
||||
else
|
||||
if (not jogador.on_hold) then --> n�o ta pausado, precisa por em pausa
|
||||
--> verifica se esta castando alguma coisa que leve + que 10 segundos
|
||||
if (not jogador.on_hold) then --n�o ta pausado, precisa por em pausa
|
||||
--verifica se esta castando alguma coisa que leve + que 10 segundos
|
||||
jogador:HoldOn (true)
|
||||
end
|
||||
end
|
||||
@@ -79,10 +79,10 @@
|
||||
function timeMachine:Ligar()
|
||||
self.atualizador = self:ScheduleRepeatingTimer ("Core", 1)
|
||||
self.ligada = true
|
||||
self.tabelas = {{}, {}} --> 1 dano 2 cura
|
||||
self.tabelas = {{}, {}} --1 dano 2 cura
|
||||
|
||||
local danos = _detalhes.tabela_vigente[1]._ActorTable
|
||||
for _, jogador in _ipairs (danos) do
|
||||
for _, jogador in _ipairs(danos) do
|
||||
if (jogador.dps_started) then
|
||||
jogador:RegistrarNaTimeMachine()
|
||||
end
|
||||
@@ -101,7 +101,7 @@
|
||||
function timeMachine:Reiniciar()
|
||||
table.wipe (self.tabelas[1])
|
||||
table.wipe (self.tabelas[2])
|
||||
self.tabelas = {{}, {}} --> 1 dano 2 cura
|
||||
self.tabelas = {{}, {}} --1 dano 2 cura
|
||||
end
|
||||
|
||||
function _detalhes:DesregistrarNaTimeMachine()
|
||||
@@ -130,10 +130,10 @@
|
||||
end
|
||||
|
||||
function _detalhes:ManutencaoTimeMachine()
|
||||
for tipo, tabela in _ipairs (timeMachine.tabelas) do
|
||||
for tipo, tabela in _ipairs(timeMachine.tabelas) do
|
||||
local t = {}
|
||||
local removed = 0
|
||||
for index, jogador in _ipairs (tabela) do
|
||||
for index, jogador in _ipairs(tabela) do
|
||||
if (jogador) then
|
||||
t [#t+1] = jogador
|
||||
jogador.timeMachine = #t
|
||||
@@ -153,14 +153,14 @@
|
||||
function _detalhes:Tempo()
|
||||
|
||||
if (self.pvp) then
|
||||
--> pvp timer
|
||||
if (self.end_time) then --> o tempo do jogador esta trancado
|
||||
--pvp timer
|
||||
if (self.end_time) then --o tempo do jogador esta trancado
|
||||
local t = self.end_time - self.start_time
|
||||
if (t < 3) then
|
||||
t = 3
|
||||
end
|
||||
return t
|
||||
elseif (self.on_hold) then --> o tempo esta em pausa
|
||||
elseif (self.on_hold) then --o tempo esta em pausa
|
||||
local t = self.delay - self.start_time
|
||||
if (t < 3) then
|
||||
t = 3
|
||||
@@ -183,14 +183,14 @@
|
||||
return t
|
||||
end
|
||||
else
|
||||
--> pve timer
|
||||
if (self.end_time) then --> o tempo do jogador esta trancado
|
||||
--pve timer
|
||||
if (self.end_time) then --o tempo do jogador esta trancado
|
||||
local t = self.end_time - self.start_time
|
||||
if (t < 10) then
|
||||
t = 10
|
||||
end
|
||||
return t
|
||||
elseif (self.on_hold) then --> o tempo esta em pausa
|
||||
elseif (self.on_hold) then --o tempo esta em pausa
|
||||
local t = self.delay - self.start_time
|
||||
if (t < 10) then
|
||||
t = 10
|
||||
@@ -231,19 +231,19 @@
|
||||
self.end_time = _tempo
|
||||
end
|
||||
|
||||
--> diz se o dps deste jogador esta em pausa
|
||||
--diz se o dps deste jogador esta em pausa
|
||||
function _detalhes:HoldOn (pausa)
|
||||
if (pausa == nil) then
|
||||
return self.on_hold --retorna se o dps esta aberto ou fechado para este jogador
|
||||
|
||||
elseif (pausa) then --> true - colocar como inativo
|
||||
self.delay = _math_floor (self.last_event) --_tempo - 10
|
||||
elseif (pausa) then --true - colocar como inativo
|
||||
self.delay = _math_floor(self.last_event) --_tempo - 10
|
||||
if (self.delay < self.start_time) then
|
||||
self.delay = self.start_time
|
||||
end
|
||||
self.on_hold = true
|
||||
|
||||
else --> false - retornar a atividade
|
||||
else --false - retornar a atividade
|
||||
local diff = _tempo - self.delay - 1
|
||||
if (diff > 0) then
|
||||
self.start_time = self.start_time + diff
|
||||
|
||||
+119
-119
@@ -4,7 +4,7 @@
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
|
||||
local upper = string.upper --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
@@ -32,7 +32,7 @@
|
||||
local gump = _detalhes.gump --details local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> fade handler
|
||||
--fade handler
|
||||
|
||||
Details.FadeHandler = {
|
||||
frames = {}
|
||||
@@ -204,13 +204,13 @@
|
||||
|
||||
elseif (upper(animationType) == "OUT") then --show the frame
|
||||
|
||||
if (frame:GetAlpha() == 1 and not frame.hidden and not frame.fading_in) then --> ja esta na tela
|
||||
if (frame:GetAlpha() == 1 and not frame.hidden and not frame.fading_in) then --ja esta na tela
|
||||
return
|
||||
elseif (frame.fading_out) then --> j� ta com fading out
|
||||
elseif (frame.fading_out) then --j� ta com fading out
|
||||
return
|
||||
end
|
||||
|
||||
if (frame.fading_in) then --> se tiver uma anima��o de hidar em andamento se for true
|
||||
if (frame.fading_in) then --se tiver uma anima��o de hidar em andamento se for true
|
||||
frame.fading_in = false
|
||||
end
|
||||
|
||||
@@ -286,9 +286,9 @@
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> details api functions
|
||||
--details api functions
|
||||
|
||||
--> get the npc id from guid
|
||||
--get the npc id from guid
|
||||
function _detalhes:GetNpcIdFromGuid (guid)
|
||||
local NpcId = _select ( 6, _strsplit ( "-", guid ) )
|
||||
if (NpcId) then
|
||||
@@ -298,7 +298,7 @@
|
||||
end
|
||||
|
||||
function _detalhes:GetSourceFromNpcId (npcId)
|
||||
for index, container in ipairs (_detalhes.tabela_vigente) do
|
||||
for index, container in ipairs(_detalhes.tabela_vigente) do
|
||||
if (index <= 4) then
|
||||
local t = container._ActorTable
|
||||
for i = 1, #t do
|
||||
@@ -335,7 +335,7 @@
|
||||
return playername, playerclass, deathtime, deathcombattime, deathtimestring, playermaxhealth, deathevents, lastcooldown
|
||||
end
|
||||
|
||||
--> get the fractional number representing the alphabetical letter
|
||||
--get the fractional number representing the alphabetical letter
|
||||
function _detalhes:GetOrderNumber(who_name)
|
||||
--local name = upper (who_name .. "zz")
|
||||
--local byte1 = _math_abs (_string_byte (name, 2)-91)/1000000
|
||||
@@ -345,7 +345,7 @@
|
||||
|
||||
--/script print (tonumber (4/1000000)) - 4e-006
|
||||
--0.000004
|
||||
--> set all table keys to lower
|
||||
--set all table keys to lower
|
||||
local temptable = {}
|
||||
function _detalhes:LowerizeKeys (_table)
|
||||
for key, value in _pairs (_table) do
|
||||
@@ -360,7 +360,7 @@
|
||||
--krKR by @yuk6196 (http://wow.curseforge.com/profiles/yuk6196)
|
||||
function _detalhes:UseEastAsianNumericalSystem()
|
||||
|
||||
--> try to auto detect the language
|
||||
--try to auto detect the language
|
||||
local symbol_1K, symbol_10K, symbol_1B
|
||||
if (LibStub("AceLocale-3.0"):NewLocale ("Details", "koKR")) then --Korea
|
||||
symbol_1K, symbol_10K, symbol_1B = "천", "만", "억"
|
||||
@@ -370,15 +370,15 @@
|
||||
symbol_1K, symbol_10K, symbol_1B = "千", "萬", "億"
|
||||
end
|
||||
|
||||
--> override, force details! to use symbols for a specific language.
|
||||
--> usage: _detalhes:SetNumericalSystemOverride (language) language can be: "kr", "cn", "tw"
|
||||
--override, force details! to use symbols for a specific language.
|
||||
--usage: _detalhes:SetNumericalSystemOverride (language) language can be: "kr", "cn", "tw"
|
||||
|
||||
--> just in case the user mess up something
|
||||
if (type (_detalhes.numerical_system_symbols) ~= "string") then
|
||||
--just in case the user mess up something
|
||||
if (type(_detalhes.numerical_system_symbols) ~= "string") then
|
||||
_detalhes.numerical_system_symbols = "auto"
|
||||
end
|
||||
|
||||
--> do the override
|
||||
--do the override
|
||||
if (_detalhes.numerical_system_symbols ~= "auto") then
|
||||
local locale = string.lower (_detalhes.numerical_system_symbols)
|
||||
|
||||
@@ -392,8 +392,8 @@
|
||||
end
|
||||
|
||||
if (not symbol_1K) then
|
||||
--> if a english client is trying to use east asian numeral system and there is no override, let's just use the chinese as default.
|
||||
--> if the user is from kr or tw and want to use english client, an override must be used.
|
||||
--if a english client is trying to use east asian numeral system and there is no override, let's just use the chinese as default.
|
||||
--if the user is from kr or tw and want to use english client, an override must be used.
|
||||
symbol_1K, symbol_10K, symbol_1B = "千", "万", "亿"
|
||||
end
|
||||
|
||||
@@ -414,7 +414,7 @@
|
||||
elseif (numero > 999999) then
|
||||
return _string_format ("%.2f", numero/10000) .. symbol_10K
|
||||
elseif (numero > 99999) then
|
||||
return _math_floor (numero/10000) .. symbol_10K
|
||||
return _math_floor(numero/10000) .. symbol_10K
|
||||
elseif (numero > 9999) then
|
||||
return _string_format ("%.1f", (numero/10000)) .. symbol_10K
|
||||
elseif (numero > 999) then
|
||||
@@ -423,7 +423,7 @@
|
||||
return _string_format ("%.1f", numero)
|
||||
end
|
||||
|
||||
--> short numbers no numbers after comma
|
||||
--short numbers no numbers after comma
|
||||
function _detalhes:ToK0 (numero)
|
||||
if (numero > 100000000) then
|
||||
return _string_format ("%.0f", numero/100000000) .. symbol_1B
|
||||
@@ -452,7 +452,7 @@
|
||||
elseif (numero > 999999) then
|
||||
return _string_format ("%.2f", numero/10000) .. symbol_10K
|
||||
elseif (numero > 99999) then
|
||||
return _math_floor (numero/10000) .. symbol_10K
|
||||
return _math_floor(numero/10000) .. symbol_10K
|
||||
elseif (numero > 9999) then
|
||||
return _string_format ("%.1f", (numero/10000)) .. symbol_10K
|
||||
elseif (numero > 999) then
|
||||
@@ -461,7 +461,7 @@
|
||||
return _string_format ("%.1f", numero)
|
||||
end
|
||||
|
||||
--> short numbers no numbers after comma
|
||||
--short numbers no numbers after comma
|
||||
function _detalhes:ToK0Min (numero)
|
||||
if (numero > 100000000) then
|
||||
return _string_format ("%.0f", numero/100000000) .. symbol_1B
|
||||
@@ -473,7 +473,7 @@
|
||||
return _string_format ("%.0f", numero)
|
||||
end
|
||||
|
||||
--> short numbers no numbers after comma
|
||||
--short numbers no numbers after comma
|
||||
function _detalhes:ToKReport (numero)
|
||||
if (numero > 100000000) then
|
||||
return _string_format ("%.2f", numero/100000000) .. symbol_1B
|
||||
@@ -486,7 +486,7 @@
|
||||
end
|
||||
|
||||
function _detalhes:Format (n, custom)
|
||||
n = _math_floor (n)
|
||||
n = _math_floor(n)
|
||||
if (custom) then
|
||||
if (n > 99999999) then
|
||||
return _string_format (custom, n/100000000) .. symbol_1B
|
||||
@@ -502,15 +502,15 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> no changes
|
||||
--no changes
|
||||
function _detalhes:NoToK (numero)
|
||||
return _math_floor (numero)
|
||||
return _math_floor(numero)
|
||||
end
|
||||
|
||||
-- thanks http://richard.warburton.it
|
||||
function _detalhes:comma_value (n)
|
||||
if (not n) then return "0" end
|
||||
n = _math_floor (n)
|
||||
n = _math_floor(n)
|
||||
if (n == 0) then
|
||||
return "0"
|
||||
end
|
||||
@@ -536,7 +536,7 @@
|
||||
end
|
||||
|
||||
function _detalhes:UseWestNumericalSystem()
|
||||
--> short numbers
|
||||
--short numbers
|
||||
function _detalhes:ToK (numero)
|
||||
if (numero > 999999999) then
|
||||
return format ("%.2f", numero/1000000000) .. "B"
|
||||
@@ -555,7 +555,7 @@
|
||||
elseif (numero > 999999) then
|
||||
return _string_format ("%.2f", numero/1000000) .. "M"
|
||||
elseif (numero > 99999) then
|
||||
return _math_floor (numero/1000) .. "K"
|
||||
return _math_floor(numero/1000) .. "K"
|
||||
elseif (numero > 999) then
|
||||
return _string_format ("%.1f", (numero/1000)) .. "K"
|
||||
end
|
||||
@@ -563,7 +563,7 @@
|
||||
return _string_format ("%.0f", numero)
|
||||
end
|
||||
|
||||
--> short numbers no numbers after comma
|
||||
--short numbers no numbers after comma
|
||||
function _detalhes:ToK0 (numero)
|
||||
if (numero > 999999999) then
|
||||
return format ("%.2f", numero/1000000000) .. "B"
|
||||
@@ -590,7 +590,7 @@
|
||||
if (numero > 999999) then
|
||||
return _string_format ("%.2f", numero/1000000) .. "m"
|
||||
elseif (numero > 99999) then
|
||||
return _math_floor (numero/1000) .. "k"
|
||||
return _math_floor(numero/1000) .. "k"
|
||||
elseif (numero > 999) then
|
||||
return _string_format ("%.1f", (numero/1000)) .. "k"
|
||||
end
|
||||
@@ -598,7 +598,7 @@
|
||||
return _string_format ("%.0f", numero)
|
||||
end
|
||||
|
||||
--> short numbers no numbers after comma
|
||||
--short numbers no numbers after comma
|
||||
function _detalhes:ToK0Min (numero)
|
||||
if (numero > 1000000) then
|
||||
return _string_format ("%.0f", numero/1000000) .. "m"
|
||||
@@ -609,7 +609,7 @@
|
||||
return _string_format ("%.0f", numero)
|
||||
end
|
||||
|
||||
--> short numbers no numbers after comma
|
||||
--short numbers no numbers after comma
|
||||
function _detalhes:ToKReport (numero)
|
||||
if (numero > 1000000) then
|
||||
return _string_format ("%.2f", numero/1000000) .. "M"
|
||||
@@ -621,7 +621,7 @@
|
||||
end
|
||||
|
||||
function _detalhes:Format (n, custom)
|
||||
n = _math_floor (n)
|
||||
n = _math_floor(n)
|
||||
if (custom) then
|
||||
if (n > 999999) then
|
||||
return _string_format (custom, n/1000000) .. "M"
|
||||
@@ -635,15 +635,15 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> no changes
|
||||
--no changes
|
||||
function _detalhes:NoToK (numero)
|
||||
return _math_floor (numero)
|
||||
return _math_floor(numero)
|
||||
end
|
||||
|
||||
-- thanks http://richard.warburton.it
|
||||
function _detalhes:comma_value (n)
|
||||
if (not n) then return "0" end
|
||||
n = _math_floor (n)
|
||||
n = _math_floor(n)
|
||||
if (n == 0) then
|
||||
return "0"
|
||||
end
|
||||
@@ -669,7 +669,7 @@
|
||||
--
|
||||
end
|
||||
|
||||
--> load western as default, the proper method is loaded within the profile
|
||||
--load western as default, the proper method is loaded within the profile
|
||||
_detalhes:UseWestNumericalSystem()
|
||||
|
||||
function _detalhes:GetCurrentToKFunction()
|
||||
@@ -677,7 +677,7 @@
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> numerical system
|
||||
--numerical system
|
||||
|
||||
function _detalhes:SetNumericalSystemOverride (language)
|
||||
if (not language) then
|
||||
@@ -720,7 +720,7 @@
|
||||
|
||||
--------end of ToK functions----
|
||||
|
||||
--> replacing data for custom texts
|
||||
--replacing data for custom texts
|
||||
_detalhes.string = {}
|
||||
|
||||
local function_cache = {}
|
||||
@@ -731,7 +731,7 @@
|
||||
return arguments_cache [tonumber(i)]
|
||||
end
|
||||
local run_function = function(str)
|
||||
--> cache functions
|
||||
--cache functions
|
||||
local func, errortext = function_cache [str]
|
||||
if (not func) then
|
||||
func = loadstring (str)
|
||||
@@ -763,7 +763,7 @@
|
||||
return (str:gsub ("{data(%d+)}", replace_arg):gsub ("{func(.-)}", run_function))
|
||||
end
|
||||
|
||||
--> remove a index from a hash table
|
||||
--remove a index from a hash table
|
||||
function _detalhes:tableRemove (tabela, indexName)
|
||||
local newtable = {}
|
||||
for hash, value in _pairs (tabela) do
|
||||
@@ -774,9 +774,9 @@
|
||||
return newtable
|
||||
end
|
||||
|
||||
--> return if the numeric table have an object
|
||||
--return if the numeric table have an object
|
||||
function _detalhes:tableIN (tabela, objeto)
|
||||
for index, valor in _ipairs (tabela) do
|
||||
for index, valor in _ipairs(tabela) do
|
||||
if (valor == objeto) then
|
||||
return index
|
||||
end
|
||||
@@ -784,7 +784,7 @@
|
||||
return false
|
||||
end
|
||||
|
||||
--> reverse numerical table
|
||||
--reverse numerical table
|
||||
function _detalhes:reverse_table (t)
|
||||
local new = {}
|
||||
local index = 1
|
||||
@@ -810,7 +810,7 @@
|
||||
|
||||
function _detalhes.table.copy (t1, t2)
|
||||
for key, value in pairs (t2) do
|
||||
if (type (value) == "table") then
|
||||
if (type(value) == "table") then
|
||||
t1 [key] = Details.CopyTable (value)
|
||||
else
|
||||
t1 [key] = value
|
||||
@@ -821,7 +821,7 @@
|
||||
|
||||
function _detalhes.table.deploy (t1, t2)
|
||||
for key, value in pairs (t2) do
|
||||
if (type (value) == "table") then
|
||||
if (type(value) == "table") then
|
||||
t1 [key] = t1 [key] or {}
|
||||
_detalhes.table.deploy (t1 [key], t2 [key])
|
||||
elseif (t1 [key] == nil) then
|
||||
@@ -832,7 +832,7 @@
|
||||
|
||||
function _detalhes.table.overwrite (t1, t2)
|
||||
for key, value in pairs (t2) do
|
||||
if (type (value) == "table") then
|
||||
if (type(value) == "table") then
|
||||
t1 [key] = t1 [key] or {}
|
||||
_detalhes.table.overwrite (t1 [key], t2 [key])
|
||||
else
|
||||
@@ -858,18 +858,18 @@
|
||||
|
||||
local tpe = type (value)
|
||||
|
||||
if (type (key) == "function") then
|
||||
if (type(key) == "function") then
|
||||
key = "#function#"
|
||||
elseif (type (key) == "table") then
|
||||
elseif (type(key) == "table") then
|
||||
key = "#table#"
|
||||
end
|
||||
|
||||
if (type (key) ~= "string" and type (key) ~= "number") then
|
||||
if (type(key) ~= "string" and type (key) ~= "number") then
|
||||
key = "unknown?"
|
||||
end
|
||||
|
||||
if (tpe == "table") then
|
||||
if (type (key) == "number") then
|
||||
if (type(key) == "number") then
|
||||
s = s .. space .. "[" .. key .. "] = |cFFa9ffa9table {|r\n"
|
||||
else
|
||||
s = s .. space .. "[\"" .. key .. "\"] = |cFFa9ffa9table {|r\n"
|
||||
@@ -916,13 +916,13 @@
|
||||
if (value < 50) then
|
||||
r = 255
|
||||
else
|
||||
r = _math_floor ( 255 - (value * 2 - 100) * 255 / 100)
|
||||
r = _math_floor( 255 - (value * 2 - 100) * 255 / 100)
|
||||
end
|
||||
|
||||
if (value > 50) then
|
||||
g = 255
|
||||
else
|
||||
g = _math_floor ( (value * 2) * 255 / 100)
|
||||
g = _math_floor( (value * 2) * 255 / 100)
|
||||
end
|
||||
|
||||
if (inverted) then
|
||||
@@ -932,19 +932,19 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> unpack more than 1 table
|
||||
--unpack more than 1 table
|
||||
-- http://www.dzone.com/snippets/lua-unpack-multiple-tables
|
||||
function _detalhes:unpacks (...)
|
||||
local values = {}
|
||||
for i = 1, select ('#', ...) do
|
||||
for _, value in _ipairs (select (i, ...)) do
|
||||
for _, value in _ipairs(select (i, ...)) do
|
||||
values[ #values + 1] = value
|
||||
end
|
||||
end
|
||||
return unpack (values)
|
||||
end
|
||||
|
||||
--> trim http://lua-users.org/wiki/StringTrim
|
||||
--trim http://lua-users.org/wiki/StringTrim
|
||||
function _detalhes:trim (s)
|
||||
local from = s:match"^%s*()"
|
||||
return from > #s and "" or s:match(".*%S", from)
|
||||
@@ -1011,18 +1011,18 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--> scale
|
||||
--scale
|
||||
function _detalhes:Scale (rangeMin, rangeMax, scaleMin, scaleMax, x)
|
||||
return 1 + (x - rangeMin) * (scaleMax - scaleMin) / (rangeMax - rangeMin)
|
||||
end
|
||||
|
||||
--> font color
|
||||
function _detalhes:SetFontColor (fontString, r, g, b, a)
|
||||
r, g, b, a = gump:ParseColors (r, g, b, a)
|
||||
--font color
|
||||
function _detalhes:SetFontColor(fontString, r, g, b, a)
|
||||
r, g, b, a = gump:ParseColors(r, g, b, a)
|
||||
fontString:SetTextColor (r, g, b, a)
|
||||
end
|
||||
|
||||
--> font size
|
||||
--font size
|
||||
function _detalhes:SetFontSize (fontString, ...)
|
||||
local fonte, _, flags = fontString:GetFont()
|
||||
fontString:SetFont (fonte, _math_max (...), flags)
|
||||
@@ -1032,7 +1032,7 @@ end
|
||||
return size
|
||||
end
|
||||
|
||||
--> font face
|
||||
--font face
|
||||
function _detalhes:SetFontFace (fontString, fontface)
|
||||
local _, size, flags = fontString:GetFont()
|
||||
fontString:SetFont (fontface, size, flags)
|
||||
@@ -1042,11 +1042,11 @@ end
|
||||
return fontface
|
||||
end
|
||||
|
||||
--> font outline
|
||||
--font outline
|
||||
function _detalhes:SetFontOutline (fontString, outline)
|
||||
local fonte, size = fontString:GetFont()
|
||||
if (outline) then
|
||||
if (type (outline) == "boolean" and outline) then
|
||||
if (type(outline) == "boolean" and outline) then
|
||||
outline = "OUTLINE"
|
||||
elseif (outline == 1) then
|
||||
outline = "OUTLINE"
|
||||
@@ -1081,7 +1081,7 @@ end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internal functions
|
||||
--internal functions
|
||||
|
||||
function _detalhes:HealthTick()
|
||||
if (UnitExists ("boss1") and IsInRaid() and IsInInstance()) then
|
||||
@@ -1095,7 +1095,7 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
--> is in combat yet?
|
||||
--is in combat yet?
|
||||
function _detalhes:EstaEmCombate()
|
||||
|
||||
_detalhes:TimeDataTick()
|
||||
@@ -1180,7 +1180,7 @@ end
|
||||
for i = 1, instancia.rows_created, 1 do
|
||||
local barra = instancia.barras[i]
|
||||
local red, green, blue, alpha = barra.textura:GetVertexColor()
|
||||
local grayscale = (red*0.03+green+blue) / 3 --> grayscale lightness method
|
||||
local grayscale = (red*0.03+green+blue) / 3 --grayscale lightness method
|
||||
gump:GradientEffect ( barra.textura, "texture", red, green, blue, alpha, grayscale, grayscale, grayscale, alpha, 1)
|
||||
end
|
||||
end
|
||||
@@ -1192,18 +1192,18 @@ end
|
||||
if (self.HaveGradientEffect) then
|
||||
|
||||
local done = false
|
||||
for index, ThisGradient in _ipairs (self.gradientes) do
|
||||
for index, ThisGradient in _ipairs(self.gradientes) do
|
||||
|
||||
if (not ThisGradient.done) then
|
||||
|
||||
local percent = _math_min ((_GetTime() - ThisGradient.TimeStart) / ThisGradient.Duration * 100, 100)
|
||||
local percent = _math_min((_GetTime() - ThisGradient.TimeStart) / ThisGradient.Duration * 100, 100)
|
||||
local red_now = ThisGradient.StartRed + (percent * ThisGradient.OnePercentRed)
|
||||
local green_now = ThisGradient.StartGreen + (percent * ThisGradient.OnePercentGreen)
|
||||
local blue_now = ThisGradient.StartBlue + (percent * ThisGradient.OnePercentBlue)
|
||||
local alpha_now = ThisGradient.StartAlpha + (percent * ThisGradient.OnePercentAlpha)
|
||||
|
||||
if (ThisGradient.ObjectType == "frame") then
|
||||
ThisGradient.Object:SetBackdropColor (red_now, green_now, blue_now, alpha_now)
|
||||
ThisGradient.Object:SetBackdropColor(red_now, green_now, blue_now, alpha_now)
|
||||
elseif (ThisGradient.ObjectType == "texture") then
|
||||
ThisGradient.Object:SetVertexColor (red_now, green_now, blue_now, alpha_now)
|
||||
end
|
||||
@@ -1242,23 +1242,23 @@ end
|
||||
end
|
||||
|
||||
if (not self.HaveGradientEffect) then
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
self:SetScript("OnUpdate", nil)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function gump:GradientEffect (Object, ObjectType, StartRed, StartGreen, StartBlue, StartAlpha, EndRed, EndGreen, EndBlue, EndAlpha, Duration, EndFunction, FuncParam)
|
||||
|
||||
if (type (StartRed) == "table" and type (StartGreen) == "table") then
|
||||
if (type(StartRed) == "table" and type (StartGreen) == "table") then
|
||||
Duration, EndFunction = StartBlue, StartAlpha
|
||||
EndRed, EndGreen, EndBlue, EndAlpha = unpack (StartGreen)
|
||||
StartRed, StartGreen, StartBlue, StartAlpha = unpack (StartRed)
|
||||
|
||||
elseif (type (StartRed) == "table") then
|
||||
elseif (type(StartRed) == "table") then
|
||||
EndRed, EndGreen, EndBlue, EndAlpha, Duration, EndFunction = StartGreen, StartBlue, StartAlpha, EndRed, EndGreen, EndBlue
|
||||
StartRed, StartGreen, StartBlue, StartAlpha = unpack (StartRed)
|
||||
|
||||
elseif (type (EndRed) == "table") then
|
||||
elseif (type(EndRed) == "table") then
|
||||
Duration, EndFunction = EndGreen, EndBlue
|
||||
EndRed, EndGreen, EndBlue, EndAlpha = unpack (EndRed)
|
||||
end
|
||||
@@ -1324,12 +1324,12 @@ end
|
||||
GradientFrameControl.HaveGradientEffect = true
|
||||
|
||||
if (not GradientFrameControl:GetScript ("OnUpdate")) then
|
||||
GradientFrameControl:SetScript ("OnUpdate", frame_task)
|
||||
GradientFrameControl:SetScript("OnUpdate", frame_task)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--> work around to solve the UI Frame Flashes
|
||||
--work around to solve the UI Frame Flashes
|
||||
local onFinish = function(self)
|
||||
if (self.showWhenDone) then
|
||||
self.frame:SetAlpha (1)
|
||||
@@ -1358,10 +1358,10 @@ end
|
||||
fadeIn:Stop()
|
||||
fadeOut:Stop()
|
||||
|
||||
fadeIn:SetDuration (fadeInTime or 1)
|
||||
fadeIn:SetDuration(fadeInTime or 1)
|
||||
fadeIn:SetEndDelay (flashInHoldTime or 0)
|
||||
|
||||
fadeOut:SetDuration (fadeOutTime or 1)
|
||||
fadeOut:SetDuration(fadeOutTime or 1)
|
||||
fadeOut:SetEndDelay (flashOutHoldTime or 0)
|
||||
|
||||
FlashAnimation.duration = flashDuration
|
||||
@@ -1380,13 +1380,13 @@ end
|
||||
|
||||
local FlashAnimation = frame:CreateAnimationGroup()
|
||||
|
||||
FlashAnimation.fadeOut = FlashAnimation:CreateAnimation ("Alpha") --> fade out anime
|
||||
FlashAnimation.fadeOut = FlashAnimation:CreateAnimation("Alpha") --fade out anime
|
||||
FlashAnimation.fadeOut:SetOrder (1)
|
||||
|
||||
FlashAnimation.fadeOut:SetFromAlpha (0)
|
||||
FlashAnimation.fadeOut:SetToAlpha (1)
|
||||
|
||||
FlashAnimation.fadeIn = FlashAnimation:CreateAnimation ("Alpha") --> fade in anime
|
||||
FlashAnimation.fadeIn = FlashAnimation:CreateAnimation("Alpha") --fade in anime
|
||||
FlashAnimation.fadeIn:SetOrder (2)
|
||||
FlashAnimation.fadeIn:SetFromAlpha (0)
|
||||
FlashAnimation.fadeIn:SetToAlpha (1)
|
||||
@@ -1395,15 +1395,15 @@ end
|
||||
FlashAnimation.frame = frame
|
||||
FlashAnimation.onFinishFunc = onFinishFunc
|
||||
|
||||
FlashAnimation:SetScript ("OnLoop", onLoopFunc)
|
||||
FlashAnimation:SetScript ("OnFinished", onFinish)
|
||||
FlashAnimation:SetScript("OnLoop", onLoopFunc)
|
||||
FlashAnimation:SetScript("OnFinished", onFinish)
|
||||
|
||||
frame.Flash = flash
|
||||
frame.Stop = stop
|
||||
|
||||
end
|
||||
|
||||
--> todo: remove the function creation everytime this function run.
|
||||
--todo: remove the function creation everytime this function run.
|
||||
|
||||
|
||||
|
||||
@@ -1437,23 +1437,23 @@ end
|
||||
|
||||
a = a + 1 --throw an error if called
|
||||
|
||||
if (type (frame) == "table") then
|
||||
if (type(frame) == "table") then
|
||||
|
||||
if (frame.meu_id) then --> ups, � uma inst�ncia
|
||||
if (parametros == "barras") then --> hida todas as barras da inst�ncia
|
||||
if (frame.meu_id) then --ups, � uma inst�ncia
|
||||
if (parametros == "barras") then --hida todas as barras da inst�ncia
|
||||
if (velocidade) then
|
||||
for i = 1, frame.rows_created, 1 do
|
||||
Details.FadeHandler.Fader (frame.barras[i], tipo, velocidade)
|
||||
Details.FadeHandler.Fader(frame.barras[i], tipo, velocidade)
|
||||
end
|
||||
return
|
||||
else
|
||||
velocidade = velocidade or 0.3
|
||||
for i = 1, frame.rows_created, 1 do
|
||||
Details.FadeHandler.Fader (frame.barras[i], tipo, 0.3+(i/10))
|
||||
Details.FadeHandler.Fader(frame.barras[i], tipo, 0.3+(i/10))
|
||||
end
|
||||
return
|
||||
end
|
||||
elseif (parametros == "hide_barras") then --> hida todas as barras da inst�ncia
|
||||
elseif (parametros == "hide_barras") then --hida todas as barras da inst�ncia
|
||||
for i = 1, frame.rows_created, 1 do
|
||||
local esta_barra = frame.barras[i]
|
||||
if (esta_barra.fading_in or esta_barra.fading_out) then
|
||||
@@ -1476,25 +1476,25 @@ end
|
||||
|
||||
velocidade = velocidade or 0.3
|
||||
|
||||
--> esse ALL aqui pode dar merda com as inst�ncias n�o ativadas
|
||||
if (frame == "all") then --> todas as inst�ncias
|
||||
for _, instancia in _ipairs (_detalhes.tabela_instancias) do
|
||||
if (parametros == "barras") then --> hida todas as barras da inst�ncia
|
||||
--esse ALL aqui pode dar merda com as inst�ncias n�o ativadas
|
||||
if (frame == "all") then --todas as inst�ncias
|
||||
for _, instancia in _ipairs(_detalhes.tabela_instancias) do
|
||||
if (parametros == "barras") then --hida todas as barras da inst�ncia
|
||||
for i = 1, instancia.rows_created, 1 do
|
||||
Details.FadeHandler.Fader (instancia.barras[i], tipo, velocidade+(i/10))
|
||||
Details.FadeHandler.Fader(instancia.barras[i], tipo, velocidade+(i/10))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
elseif (upper (tipo) == "IN") then
|
||||
|
||||
if (frame:GetAlpha() == 0 and frame.hidden and not frame.fading_out) then --> ja esta escondida
|
||||
if (frame:GetAlpha() == 0 and frame.hidden and not frame.fading_out) then --ja esta escondida
|
||||
return
|
||||
elseif (frame.fading_in) then --> ja esta com uma anima��o, se for true
|
||||
elseif (frame.fading_in) then --ja esta com uma anima��o, se for true
|
||||
return
|
||||
end
|
||||
|
||||
if (frame.fading_out) then --> se tiver uma anima��o de aparecer em andamento se for true
|
||||
if (frame.fading_out) then --se tiver uma anima��o de aparecer em andamento se for true
|
||||
frame.fading_out = false
|
||||
end
|
||||
|
||||
@@ -1504,15 +1504,15 @@ end
|
||||
frame.fadeInfo.finishedFunc = fade_IN_finished_func
|
||||
frame.fadeInfo.finishedArg1 = frame
|
||||
|
||||
elseif (upper (tipo) == "OUT") then --> aparecer
|
||||
elseif (upper (tipo) == "OUT") then --aparecer
|
||||
|
||||
if (frame:GetAlpha() == 1 and not frame.hidden and not frame.fading_in) then --> ja esta na tela
|
||||
if (frame:GetAlpha() == 1 and not frame.hidden and not frame.fading_in) then --ja esta na tela
|
||||
return
|
||||
elseif (frame.fading_out) then --> j� ta com fading out
|
||||
elseif (frame.fading_out) then --j� ta com fading out
|
||||
return
|
||||
end
|
||||
|
||||
if (frame.fading_in) then --> se tiver uma anima��o de hidar em andamento se for true
|
||||
if (frame.fading_in) then --se tiver uma anima��o de hidar em andamento se for true
|
||||
frame.fading_in = false
|
||||
end
|
||||
|
||||
@@ -1523,7 +1523,7 @@ end
|
||||
frame.fadeInfo.finishedFunc = fade_OUT_finished_func
|
||||
frame.fadeInfo.finishedArg1 = frame
|
||||
|
||||
elseif (tipo == 0) then --> for�a o frame a ser mostrado
|
||||
elseif (tipo == 0) then --for�a o frame a ser mostrado
|
||||
frame.hidden = false
|
||||
frame.faded = false
|
||||
frame.fading_out = false
|
||||
@@ -1531,7 +1531,7 @@ end
|
||||
frame:Show()
|
||||
frame:SetAlpha (1)
|
||||
|
||||
elseif (tipo == 1) then --> for�a o frame a ser hidado
|
||||
elseif (tipo == 1) then --for�a o frame a ser hidado
|
||||
frame.hidden = true
|
||||
frame.faded = true
|
||||
frame.fading_out = false
|
||||
@@ -1539,14 +1539,14 @@ end
|
||||
frame:SetAlpha (0)
|
||||
frame:Hide()
|
||||
|
||||
elseif (tipo == -1) then --> apenas da fade sem hidar
|
||||
if (frame:GetAlpha() == 0 and frame.hidden and not frame.fading_out) then --> ja esta escondida
|
||||
elseif (tipo == -1) then --apenas da fade sem hidar
|
||||
if (frame:GetAlpha() == 0 and frame.hidden and not frame.fading_out) then --ja esta escondida
|
||||
return
|
||||
elseif (frame.fading_in) then --> ja esta com uma anima��o, se for true
|
||||
elseif (frame.fading_in) then --ja esta com uma anima��o, se for true
|
||||
return
|
||||
end
|
||||
|
||||
if (frame.fading_out) then --> se tiver uma anima��o de aparecer em andamento se for true
|
||||
if (frame.fading_out) then --se tiver uma anima��o de aparecer em andamento se for true
|
||||
frame.fading_out = false
|
||||
end
|
||||
|
||||
@@ -1562,7 +1562,7 @@ end
|
||||
frame:Show()
|
||||
|
||||
if (currentApha < value) then
|
||||
if (frame.fading_in) then --> se tiver uma anima��o de hidar em andamento se for true
|
||||
if (frame.fading_in) then --se tiver uma anima��o de hidar em andamento se for true
|
||||
frame.fading_in = false
|
||||
frame.fadeInfo.finishedFunc = nil
|
||||
end
|
||||
@@ -1573,7 +1573,7 @@ end
|
||||
frame.fadeInfo.finishedArg1 = frame
|
||||
|
||||
else
|
||||
if (frame.fading_out) then --> se tiver uma anima��o de hidar em andamento se for true
|
||||
if (frame.fading_out) then --se tiver uma anima��o de hidar em andamento se for true
|
||||
frame.fading_out = false
|
||||
frame.fadeInfo.finishedFunc = nil
|
||||
end
|
||||
@@ -1584,7 +1584,7 @@ end
|
||||
frame.fadeInfo.finishedArg1 = frame
|
||||
end
|
||||
|
||||
elseif (upper (tipo) == "ALPHA") then --> setando um alpha determinado
|
||||
elseif (upper (tipo) == "ALPHA") then --setando um alpha determinado
|
||||
if (frame.fading_in or frame.fading_out) then
|
||||
frame.fadeInfo.finishedFunc = nil
|
||||
-- _UIFrameFadeIn (frame, velocidade, frame:GetAlpha(), frame:GetAlpha())
|
||||
@@ -1601,19 +1601,19 @@ end
|
||||
function _detalhes:name_space (barra)
|
||||
--if (barra.icone_secundario_ativo) then
|
||||
-- local tamanho = barra:GetWidth()-barra.lineText4:GetStringWidth()-16-barra:GetHeight()
|
||||
-- barra.lineText1:SetSize (tamanho-2, 15)
|
||||
-- barra.lineText1:SetSize(tamanho-2, 15)
|
||||
--else
|
||||
barra.lineText1:SetSize (barra:GetWidth()-barra.lineText4:GetStringWidth()-18, 15)
|
||||
barra.lineText1:SetSize(barra:GetWidth()-barra.lineText4:GetStringWidth()-18, 15)
|
||||
--end
|
||||
end
|
||||
|
||||
function _detalhes:name_space_info (barra)
|
||||
if (barra.icone_secundario_ativo) then
|
||||
local tamanho = barra:GetWidth()-barra.lineText4:GetStringWidth()-16-barra:GetHeight()
|
||||
barra.lineText1:SetSize (tamanho-10, 15)
|
||||
barra.lineText1:SetSize(tamanho-10, 15)
|
||||
else
|
||||
local tamanho = barra:GetWidth()-barra.lineText4:GetStringWidth()-16
|
||||
barra.lineText1:SetSize (tamanho-10, 15)
|
||||
barra.lineText1:SetSize(tamanho-10, 15)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1621,10 +1621,10 @@ end
|
||||
local texto_direita_tamanho = barra.lineText4:GetStringWidth()
|
||||
local tamanho = barra:GetWidth()-texto_direita_tamanho-16
|
||||
if (separador) then
|
||||
barra.lineText1:SetSize (tamanho+separador, 10)
|
||||
barra.lineText4:SetSize (texto_direita_tamanho+15, 10)
|
||||
barra.lineText1:SetSize(tamanho+separador, 10)
|
||||
barra.lineText4:SetSize(texto_direita_tamanho+15, 10)
|
||||
else
|
||||
barra.lineText1:SetSize (tamanho-10, 15)
|
||||
barra.lineText4:SetSize (texto_direita_tamanho+5, 15)
|
||||
barra.lineText1:SetSize(tamanho-10, 15)
|
||||
barra.lineText4:SetSize(texto_direita_tamanho+5, 15)
|
||||
end
|
||||
end
|
||||
|
||||
+639
-639
File diff suppressed because it is too large
Load Diff
+83
-83
@@ -13,7 +13,7 @@ function _detalhes:PlayGlow (frame)
|
||||
--PlaySound ("LFG_Rewards", "master")
|
||||
end
|
||||
|
||||
--> WatchFrame copy, got removed on WoD
|
||||
--WatchFrame copy, got removed on WoD
|
||||
local function DetailsTutorialAlertFrame_OnFinishSlideIn (frame)
|
||||
frame.ScrollChild.Shine:Show();
|
||||
frame.ScrollChild.IconShine:Show();
|
||||
@@ -85,40 +85,40 @@ function _detalhes.PlayBestDamageOnGuild (damage)
|
||||
|
||||
damage = damage or 100000000
|
||||
|
||||
--> create the main frame
|
||||
local DetailsNewDamageRecord = CreateFrame ("frame", "DetailsNewDamageRecordAnimationFrame", UIParent)
|
||||
DetailsNewDamageRecord:SetPoint ("CENTER", UIParent, "CENTER", 0, -200)
|
||||
DetailsNewDamageRecord:SetSize (300, 300)
|
||||
--create the main frame
|
||||
local DetailsNewDamageRecord = CreateFrame("frame", "DetailsNewDamageRecordAnimationFrame", UIParent)
|
||||
DetailsNewDamageRecord:SetPoint("CENTER", UIParent, "CENTER", 0, -200)
|
||||
DetailsNewDamageRecord:SetSize(300, 300)
|
||||
|
||||
--> single animation group
|
||||
--single animation group
|
||||
local MainAnimationGroup = DetailsNewDamageRecord:CreateAnimationGroup ("DetailsNewDamageRecordAnimationGroup")
|
||||
MainAnimationGroup:SetLooping ("NONE")
|
||||
|
||||
--> widgets:
|
||||
--widgets:
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
local BaseTexture = DetailsNewDamageRecord:CreateTexture ("BaseTextureTexture", "ARTWORK")
|
||||
BaseTexture:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-Alert-Background-Mini]])
|
||||
local BaseTexture = DetailsNewDamageRecord:CreateTexture("BaseTextureTexture", "ARTWORK")
|
||||
BaseTexture:SetTexture([[Interface\ACHIEVEMENTFRAME\UI-Achievement-Alert-Background-Mini]])
|
||||
BaseTexture:SetDrawLayer ("ARTWORK", -5)
|
||||
BaseTexture:SetPoint ("center", DetailsNewDamageRecord, "center", 0, 0)
|
||||
BaseTexture:SetSize (256, 64)
|
||||
BaseTexture:SetPoint("center", DetailsNewDamageRecord, "center", 0, 0)
|
||||
BaseTexture:SetSize(256, 64)
|
||||
BaseTexture:SetVertexColor (0.99999779462814, 0.99999779462814, 0.99999779462814, 0.99999779462814)
|
||||
|
||||
--> animations for BaseTexture
|
||||
--animations for BaseTexture
|
||||
|
||||
BaseTexture.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
BaseTexture.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
|
||||
BaseTexture.alpha:SetTarget (BaseTexture)
|
||||
BaseTexture.alpha:SetOrder (1)
|
||||
BaseTexture.alpha:SetDuration (0.14869952201843)
|
||||
BaseTexture.alpha:SetDuration(0.14869952201843)
|
||||
BaseTexture.alpha:SetStartDelay (0)
|
||||
BaseTexture.alpha:SetEndDelay (0)
|
||||
BaseTexture.alpha:SetFromAlpha (0)
|
||||
BaseTexture.alpha:SetToAlpha (1)
|
||||
BaseTexture.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
BaseTexture.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
|
||||
BaseTexture.alpha:SetTarget (BaseTexture)
|
||||
BaseTexture.alpha:SetOrder (2)
|
||||
BaseTexture.alpha:SetDuration (1)
|
||||
BaseTexture.alpha:SetDuration(1)
|
||||
BaseTexture.alpha:SetStartDelay (5)
|
||||
BaseTexture.alpha:SetEndDelay (0)
|
||||
BaseTexture.alpha:SetFromAlpha (1)
|
||||
@@ -126,11 +126,11 @@ function _detalhes.PlayBestDamageOnGuild (damage)
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
local BigFlash = DetailsNewDamageRecord:CreateTexture ("BigFlashTexture", "OVERLAY")
|
||||
BigFlash:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-Alert-Glow]])
|
||||
local BigFlash = DetailsNewDamageRecord:CreateTexture("BigFlashTexture", "OVERLAY")
|
||||
BigFlash:SetTexture([[Interface\ACHIEVEMENTFRAME\UI-Achievement-Alert-Glow]])
|
||||
BigFlash:SetDrawLayer ("OVERLAY", 0)
|
||||
BigFlash:SetPoint ("center", DetailsNewDamageRecord, "center", -2, 2)
|
||||
BigFlash:SetSize (314, 100)
|
||||
BigFlash:SetPoint("center", DetailsNewDamageRecord, "center", -2, 2)
|
||||
BigFlash:SetSize(314, 100)
|
||||
BigFlash:SetDesaturated (false)
|
||||
BigFlash:SetTexCoord (0.0010000000149012, 0.77400001525879, 0.0010000000149012, 0.65800003051758)
|
||||
if (0 ~= 0) then
|
||||
@@ -138,22 +138,22 @@ function _detalhes.PlayBestDamageOnGuild (damage)
|
||||
end
|
||||
BigFlash:SetVertexColor (0.96470373868942, 0.98823314905167, 0.99999779462814, 0.99999779462814)
|
||||
BigFlash:SetAlpha (1)
|
||||
BigFlash:SetBlendMode ("ADD")
|
||||
BigFlash:SetBlendMode("ADD")
|
||||
|
||||
--> animations for BigFlash
|
||||
--animations for BigFlash
|
||||
|
||||
BigFlash.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
BigFlash.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
|
||||
BigFlash.alpha:SetTarget (BigFlash)
|
||||
BigFlash.alpha:SetOrder (1)
|
||||
BigFlash.alpha:SetDuration (0.11600000411272)
|
||||
BigFlash.alpha:SetDuration(0.11600000411272)
|
||||
BigFlash.alpha:SetStartDelay (0)
|
||||
BigFlash.alpha:SetEndDelay (0)
|
||||
BigFlash.alpha:SetFromAlpha (0)
|
||||
BigFlash.alpha:SetToAlpha (1)
|
||||
BigFlash.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
BigFlash.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
|
||||
BigFlash.alpha:SetTarget (BigFlash)
|
||||
BigFlash.alpha:SetOrder (2)
|
||||
BigFlash.alpha:SetDuration (0.31600001454353)
|
||||
BigFlash.alpha:SetDuration(0.31600001454353)
|
||||
BigFlash.alpha:SetStartDelay (0)
|
||||
BigFlash.alpha:SetEndDelay (0)
|
||||
BigFlash.alpha:SetFromAlpha (1)
|
||||
@@ -161,11 +161,11 @@ function _detalhes.PlayBestDamageOnGuild (damage)
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
local FlashSwipe = DetailsNewDamageRecord:CreateTexture ("FlashSwipeTexture", "OVERLAY")
|
||||
FlashSwipe:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-Alert-Glow]])
|
||||
local FlashSwipe = DetailsNewDamageRecord:CreateTexture("FlashSwipeTexture", "OVERLAY")
|
||||
FlashSwipe:SetTexture([[Interface\ACHIEVEMENTFRAME\UI-Achievement-Alert-Glow]])
|
||||
FlashSwipe:SetDrawLayer ("OVERLAY", 7)
|
||||
FlashSwipe:SetPoint ("center", DetailsNewDamageRecord, "center", -99, 0)
|
||||
FlashSwipe:SetSize (100, 57)
|
||||
FlashSwipe:SetPoint("center", DetailsNewDamageRecord, "center", -99, 0)
|
||||
FlashSwipe:SetSize(100, 57)
|
||||
FlashSwipe:SetDesaturated (false)
|
||||
FlashSwipe:SetTexCoord (0.78199996948242, 0.91900001525879, 0.0010000000149012, 0.2760000038147)
|
||||
if (0 ~= 0) then
|
||||
@@ -173,29 +173,29 @@ function _detalhes.PlayBestDamageOnGuild (damage)
|
||||
end
|
||||
FlashSwipe:SetVertexColor (0.86666476726532, 0.54117530584335, 0, 0.99999779462814)
|
||||
FlashSwipe:SetAlpha (1)
|
||||
FlashSwipe:SetBlendMode ("ADD")
|
||||
FlashSwipe:SetBlendMode("ADD")
|
||||
|
||||
--> animations for FlashSwipe
|
||||
--animations for FlashSwipe
|
||||
|
||||
FlashSwipe.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
FlashSwipe.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
|
||||
FlashSwipe.alpha:SetTarget (FlashSwipe)
|
||||
FlashSwipe.alpha:SetOrder (1)
|
||||
FlashSwipe.alpha:SetDuration (0.31600001454353)
|
||||
FlashSwipe.alpha:SetDuration(0.31600001454353)
|
||||
FlashSwipe.alpha:SetStartDelay (0.20000000298023)
|
||||
FlashSwipe.alpha:SetEndDelay (0)
|
||||
FlashSwipe.alpha:SetFromAlpha (0)
|
||||
FlashSwipe.alpha:SetToAlpha (0.501051902771)
|
||||
FlashSwipe.translation = MainAnimationGroup:CreateAnimation ("TRANSLATION")
|
||||
FlashSwipe.translation = MainAnimationGroup:CreateAnimation("TRANSLATION")
|
||||
FlashSwipe.translation:SetTarget (FlashSwipe)
|
||||
FlashSwipe.translation:SetOrder (1)
|
||||
FlashSwipe.translation:SetDuration (0.81599998474121)
|
||||
FlashSwipe.translation:SetDuration(0.81599998474121)
|
||||
FlashSwipe.translation:SetStartDelay (0.20000000298023)
|
||||
FlashSwipe.translation:SetEndDelay (0)
|
||||
FlashSwipe.translation:SetOffset (200, 0)
|
||||
FlashSwipe.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
FlashSwipe.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
|
||||
FlashSwipe.alpha:SetTarget (FlashSwipe)
|
||||
FlashSwipe.alpha:SetOrder (1)
|
||||
FlashSwipe.alpha:SetDuration (0.31600001454353)
|
||||
FlashSwipe.alpha:SetDuration(0.31600001454353)
|
||||
FlashSwipe.alpha:SetStartDelay (0.69999998807907)
|
||||
FlashSwipe.alpha:SetEndDelay (0)
|
||||
FlashSwipe.alpha:SetFromAlpha (0.501051902771)
|
||||
@@ -203,11 +203,11 @@ function _detalhes.PlayBestDamageOnGuild (damage)
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
local Portrait = DetailsNewDamageRecord:CreateTexture ("PortraitTexture", "OVERLAY")
|
||||
Portrait:SetTexture ([[Interface\ARCHEOLOGY\ARCH-FLAREEFFECT]])
|
||||
local Portrait = DetailsNewDamageRecord:CreateTexture("PortraitTexture", "OVERLAY")
|
||||
Portrait:SetTexture([[Interface\ARCHEOLOGY\ARCH-FLAREEFFECT]])
|
||||
Portrait:SetDrawLayer ("OVERLAY", -5)
|
||||
Portrait:SetPoint ("center", DetailsNewDamageRecord, "center", 3, 0)
|
||||
Portrait:SetSize (246, 44)
|
||||
Portrait:SetPoint("center", DetailsNewDamageRecord, "center", 3, 0)
|
||||
Portrait:SetSize(246, 44)
|
||||
Portrait:SetDesaturated (false)
|
||||
Portrait:SetTexCoord (0.051753740310669, 0.81701484680176, 0.086334381103516, 0.25102617263794)
|
||||
if (0 ~= 0) then
|
||||
@@ -215,22 +215,22 @@ function _detalhes.PlayBestDamageOnGuild (damage)
|
||||
end
|
||||
Portrait:SetVertexColor (0.99999779462814, 0.99999779462814, 0.99999779462814, 0.99999779462814)
|
||||
Portrait:SetAlpha (1)
|
||||
Portrait:SetBlendMode ("BLEND")
|
||||
Portrait:SetBlendMode("BLEND")
|
||||
|
||||
--> animations for Portrait
|
||||
--animations for Portrait
|
||||
|
||||
Portrait.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
Portrait.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
|
||||
Portrait.alpha:SetTarget (Portrait)
|
||||
Portrait.alpha:SetOrder (1)
|
||||
Portrait.alpha:SetDuration (0.41600000858307)
|
||||
Portrait.alpha:SetDuration(0.41600000858307)
|
||||
Portrait.alpha:SetStartDelay (0)
|
||||
Portrait.alpha:SetEndDelay (0)
|
||||
Portrait.alpha:SetFromAlpha (0)
|
||||
Portrait.alpha:SetToAlpha (1)
|
||||
Portrait.scale = MainAnimationGroup:CreateAnimation ("SCALE")
|
||||
Portrait.scale = MainAnimationGroup:CreateAnimation("SCALE")
|
||||
Portrait.scale:SetTarget (Portrait)
|
||||
Portrait.scale:SetOrder (1)
|
||||
Portrait.scale:SetDuration (0.21600000560284)
|
||||
Portrait.scale:SetDuration(0.21600000560284)
|
||||
Portrait.scale:SetStartDelay (0)
|
||||
Portrait.scale:SetEndDelay (0)
|
||||
|
||||
@@ -243,10 +243,10 @@ function _detalhes.PlayBestDamageOnGuild (damage)
|
||||
end
|
||||
|
||||
Portrait.scale:SetOrigin ("center", 0, 0)
|
||||
Portrait.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
Portrait.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
|
||||
Portrait.alpha:SetTarget (Portrait)
|
||||
Portrait.alpha:SetOrder (2)
|
||||
Portrait.alpha:SetDuration (1)
|
||||
Portrait.alpha:SetDuration(1)
|
||||
Portrait.alpha:SetStartDelay (4.7000002861023)
|
||||
Portrait.alpha:SetEndDelay (0)
|
||||
Portrait.alpha:SetFromAlpha (1)
|
||||
@@ -254,11 +254,11 @@ function _detalhes.PlayBestDamageOnGuild (damage)
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
local DamageIcon = DetailsNewDamageRecord:CreateTexture ("DamageIconTexture", "OVERLAY")
|
||||
DamageIcon:SetTexture ([[Interface\LFGFRAME\UI-LFG-ICON-ROLES]])
|
||||
local DamageIcon = DetailsNewDamageRecord:CreateTexture("DamageIconTexture", "OVERLAY")
|
||||
DamageIcon:SetTexture([[Interface\LFGFRAME\UI-LFG-ICON-ROLES]])
|
||||
DamageIcon:SetDrawLayer ("OVERLAY", 2)
|
||||
DamageIcon:SetPoint ("center", DetailsNewDamageRecord, "center", -97, 1)
|
||||
DamageIcon:SetSize (32, 32)
|
||||
DamageIcon:SetPoint("center", DetailsNewDamageRecord, "center", -97, 1)
|
||||
DamageIcon:SetSize(32, 32)
|
||||
DamageIcon:SetDesaturated (false)
|
||||
DamageIcon:SetTexCoord (0.27200000762939, 0.51899997711182, 0.25837841033936, 0.51399997711182)
|
||||
if (0 ~= 0) then
|
||||
@@ -266,22 +266,22 @@ function _detalhes.PlayBestDamageOnGuild (damage)
|
||||
end
|
||||
DamageIcon:SetVertexColor (0.99999779462814, 0.99999779462814, 0.99999779462814, 0.99999779462814)
|
||||
DamageIcon:SetAlpha (1)
|
||||
DamageIcon:SetBlendMode ("BLEND")
|
||||
DamageIcon:SetBlendMode("BLEND")
|
||||
|
||||
--> animations for DamageIcon
|
||||
--animations for DamageIcon
|
||||
|
||||
DamageIcon.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
DamageIcon.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
|
||||
DamageIcon.alpha:SetTarget (DamageIcon)
|
||||
DamageIcon.alpha:SetOrder (1)
|
||||
DamageIcon.alpha:SetDuration (0.51599997282028)
|
||||
DamageIcon.alpha:SetDuration(0.51599997282028)
|
||||
DamageIcon.alpha:SetStartDelay (0)
|
||||
DamageIcon.alpha:SetEndDelay (0)
|
||||
DamageIcon.alpha:SetFromAlpha (0)
|
||||
DamageIcon.alpha:SetToAlpha (1)
|
||||
DamageIcon.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
DamageIcon.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
|
||||
DamageIcon.alpha:SetTarget (DamageIcon)
|
||||
DamageIcon.alpha:SetOrder (2)
|
||||
DamageIcon.alpha:SetDuration (1)
|
||||
DamageIcon.alpha:SetDuration(1)
|
||||
DamageIcon.alpha:SetStartDelay (4.5999999046326)
|
||||
DamageIcon.alpha:SetEndDelay (0)
|
||||
DamageIcon.alpha:SetFromAlpha (1)
|
||||
@@ -291,36 +291,36 @@ function _detalhes.PlayBestDamageOnGuild (damage)
|
||||
|
||||
local NewDamageRecord = DetailsNewDamageRecord:CreateFontString ("NewDamageRecordFontString", "OVERLAY")
|
||||
NewDamageRecord:SetFont ([=[Fonts\FRIZQT__.TTF]=], 12, "OUTLINE")
|
||||
NewDamageRecord:SetText ("Damage Record!")
|
||||
NewDamageRecord:SetText("Damage Record!")
|
||||
NewDamageRecord:SetDrawLayer ("OVERLAY", 0)
|
||||
NewDamageRecord:SetPoint ("center", DetailsNewDamageRecord, "center", 18, 7)
|
||||
NewDamageRecord:SetSize (181, 20)
|
||||
NewDamageRecord:SetPoint("center", DetailsNewDamageRecord, "center", 18, 7)
|
||||
NewDamageRecord:SetSize(181, 20)
|
||||
NewDamageRecord:SetTextColor (1, 1, 1)
|
||||
NewDamageRecord:SetAlpha (1)
|
||||
NewDamageRecord:SetJustifyH ("CENTER")
|
||||
NewDamageRecord:SetJustifyH("CENTER")
|
||||
|
||||
--> animations for NewDamageRecord
|
||||
--animations for NewDamageRecord
|
||||
|
||||
NewDamageRecord.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
NewDamageRecord.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
|
||||
NewDamageRecord.alpha:SetTarget (NewDamageRecord)
|
||||
NewDamageRecord.alpha:SetOrder (1)
|
||||
NewDamageRecord.alpha:SetDuration (0.016000000759959)
|
||||
NewDamageRecord.alpha:SetDuration(0.016000000759959)
|
||||
NewDamageRecord.alpha:SetStartDelay (0)
|
||||
NewDamageRecord.alpha:SetEndDelay (0)
|
||||
NewDamageRecord.alpha:SetFromAlpha (0)
|
||||
NewDamageRecord.alpha:SetToAlpha (0)
|
||||
NewDamageRecord.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
NewDamageRecord.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
|
||||
NewDamageRecord.alpha:SetTarget (NewDamageRecord)
|
||||
NewDamageRecord.alpha:SetOrder (2)
|
||||
NewDamageRecord.alpha:SetDuration (0.51599997282028)
|
||||
NewDamageRecord.alpha:SetDuration(0.51599997282028)
|
||||
NewDamageRecord.alpha:SetStartDelay (0.40000000596046)
|
||||
NewDamageRecord.alpha:SetEndDelay (4.0999999046326)
|
||||
NewDamageRecord.alpha:SetFromAlpha (0)
|
||||
NewDamageRecord.alpha:SetToAlpha (1)
|
||||
NewDamageRecord.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
NewDamageRecord.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
|
||||
NewDamageRecord.alpha:SetTarget (NewDamageRecord)
|
||||
NewDamageRecord.alpha:SetOrder (3)
|
||||
NewDamageRecord.alpha:SetDuration (1)
|
||||
NewDamageRecord.alpha:SetDuration(1)
|
||||
NewDamageRecord.alpha:SetStartDelay (0.10000000149012)
|
||||
NewDamageRecord.alpha:SetEndDelay (0)
|
||||
NewDamageRecord.alpha:SetFromAlpha (1)
|
||||
@@ -330,42 +330,42 @@ function _detalhes.PlayBestDamageOnGuild (damage)
|
||||
|
||||
local DamageAmount = DetailsNewDamageRecord:CreateFontString ("DamageAmountFontString", "OVERLAY")
|
||||
DamageAmount:SetFont ([=[Fonts\FRIZQT__.TTF]=], 12, "THICKOUTLINE")
|
||||
DamageAmount:SetText (_detalhes:comma_value (damage))
|
||||
DamageAmount:SetText(_detalhes:comma_value (damage))
|
||||
DamageAmount:SetDrawLayer ("OVERLAY", 0)
|
||||
DamageAmount:SetPoint ("center", DetailsNewDamageRecord, "center", 18, -7)
|
||||
DamageAmount:SetSize (100, 20)
|
||||
DamageAmount:SetPoint("center", DetailsNewDamageRecord, "center", 18, -7)
|
||||
DamageAmount:SetSize(100, 20)
|
||||
DamageAmount:SetTextColor (1, 1, 1)
|
||||
DamageAmount:SetAlpha (1)
|
||||
DamageAmount:SetJustifyH ("CENTER")
|
||||
DamageAmount:SetJustifyH("CENTER")
|
||||
|
||||
--> animations for DamageAmount
|
||||
--animations for DamageAmount
|
||||
|
||||
DamageAmount.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
DamageAmount.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
|
||||
DamageAmount.alpha:SetTarget (DamageAmount)
|
||||
DamageAmount.alpha:SetOrder (1)
|
||||
DamageAmount.alpha:SetDuration (0.016000000759959)
|
||||
DamageAmount.alpha:SetDuration(0.016000000759959)
|
||||
DamageAmount.alpha:SetStartDelay (0)
|
||||
DamageAmount.alpha:SetEndDelay (0)
|
||||
DamageAmount.alpha:SetFromAlpha (0)
|
||||
DamageAmount.alpha:SetToAlpha (0)
|
||||
DamageAmount.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
DamageAmount.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
|
||||
DamageAmount.alpha:SetTarget (DamageAmount)
|
||||
DamageAmount.alpha:SetOrder (2)
|
||||
DamageAmount.alpha:SetDuration (0.51599997282028)
|
||||
DamageAmount.alpha:SetDuration(0.51599997282028)
|
||||
DamageAmount.alpha:SetStartDelay (0.40000000596046)
|
||||
DamageAmount.alpha:SetEndDelay (0)
|
||||
DamageAmount.alpha:SetFromAlpha (0)
|
||||
DamageAmount.alpha:SetToAlpha (1)
|
||||
DamageAmount.alpha = MainAnimationGroup:CreateAnimation ("ALPHA")
|
||||
DamageAmount.alpha = MainAnimationGroup:CreateAnimation("ALPHA")
|
||||
DamageAmount.alpha:SetTarget (DamageAmount)
|
||||
DamageAmount.alpha:SetOrder (3)
|
||||
DamageAmount.alpha:SetDuration (1.0160000324249)
|
||||
DamageAmount.alpha:SetDuration(1.0160000324249)
|
||||
DamageAmount.alpha:SetStartDelay (4.2000002861023)
|
||||
DamageAmount.alpha:SetEndDelay (0)
|
||||
DamageAmount.alpha:SetFromAlpha (1)
|
||||
DamageAmount.alpha:SetToAlpha (0)
|
||||
|
||||
--> test the animation
|
||||
--test the animation
|
||||
MainAnimationGroup:Play()
|
||||
|
||||
|
||||
|
||||
+110
-110
@@ -21,7 +21,7 @@ function gump:NewLabel2 (parent, container, member, text, font, size, color)
|
||||
if (member) then
|
||||
container [member] = newFontString
|
||||
end
|
||||
newFontString:SetText (text)
|
||||
newFontString:SetText(text)
|
||||
|
||||
if (size) then
|
||||
_detalhes:SetFontSize (newFontString, size)
|
||||
@@ -31,7 +31,7 @@ function gump:NewLabel2 (parent, container, member, text, font, size, color)
|
||||
newFontString:SetTextColor (unpack (color))
|
||||
end
|
||||
|
||||
newFontString:SetJustifyH ("LEFT")
|
||||
newFontString:SetJustifyH("LEFT")
|
||||
|
||||
return newFontString
|
||||
end
|
||||
@@ -48,13 +48,13 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
|
||||
|
||||
local new_button
|
||||
if (ischeck) then
|
||||
new_button = CreateFrame ("CheckButton", FrameName, parent, inherits)
|
||||
new_button = CreateFrame("CheckButton", FrameName, parent, inherits)
|
||||
else
|
||||
new_button = CreateFrame ("Button", FrameName, parent)
|
||||
new_button = CreateFrame("Button", FrameName, parent)
|
||||
end
|
||||
|
||||
new_button:SetWidth (w)
|
||||
new_button:SetHeight (h)
|
||||
new_button:SetWidth(w)
|
||||
new_button:SetHeight(h)
|
||||
|
||||
if (not pic_down and pic_up) then
|
||||
pic_down = pic_up
|
||||
@@ -66,32 +66,32 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
|
||||
pic_highlight = pic_up
|
||||
end
|
||||
|
||||
new_button:SetNormalTexture (pic_up)
|
||||
new_button:SetPushedTexture (pic_down)
|
||||
new_button:SetNormalTexture(pic_up)
|
||||
new_button:SetPushedTexture(pic_down)
|
||||
new_button:SetDisabledTexture (pic_disabled)
|
||||
new_button:SetHighlightTexture (pic_highlight, "ADD")
|
||||
new_button:SetHighlightTexture(pic_highlight, "ADD")
|
||||
|
||||
local new_text = new_button:CreateFontString (nil, "OVERLAY", "GameFontNormal")
|
||||
new_text:SetPoint ("center", new_button, "center")
|
||||
new_text:SetPoint("center", new_button, "center")
|
||||
new_button.text = new_text
|
||||
|
||||
new_button.supportFrame = CreateFrame ("frame", nil, new_button)
|
||||
new_button.supportFrame:SetPoint ("topleft", new_button, "topleft")
|
||||
new_button.supportFrame:SetPoint ("bottomright", new_button, "bottomright")
|
||||
new_button.supportFrame = CreateFrame("frame", nil, new_button)
|
||||
new_button.supportFrame:SetPoint("topleft", new_button, "topleft")
|
||||
new_button.supportFrame:SetPoint("bottomright", new_button, "bottomright")
|
||||
new_button.supportFrame:SetFrameLevel (new_button:GetFrameLevel()+1)
|
||||
|
||||
new_button.supportFrame.disable_overlay = new_button.supportFrame:CreateTexture (nil, "overlay")
|
||||
new_button.supportFrame.disable_overlay:SetTexture ("Interface\\AddOns\\Details\\images\\button_disable_overlay")
|
||||
new_button.supportFrame.disable_overlay:SetPoint ("topleft", new_button.supportFrame, "topleft")
|
||||
new_button.supportFrame.disable_overlay:SetPoint ("bottomright", new_button.supportFrame, "bottomright")
|
||||
new_button.supportFrame.disable_overlay = new_button.supportFrame:CreateTexture(nil, "overlay")
|
||||
new_button.supportFrame.disable_overlay:SetTexture("Interface\\AddOns\\Details\\images\\button_disable_overlay")
|
||||
new_button.supportFrame.disable_overlay:SetPoint("topleft", new_button.supportFrame, "topleft")
|
||||
new_button.supportFrame.disable_overlay:SetPoint("bottomright", new_button.supportFrame, "bottomright")
|
||||
new_button.supportFrame.disable_overlay:Hide()
|
||||
|
||||
local rightFunction = options.rightFunc
|
||||
|
||||
new_button:SetScript ("OnDisable", function()
|
||||
new_button:SetScript("OnDisable", function()
|
||||
new_button.supportFrame.disable_overlay:Show()
|
||||
end)
|
||||
new_button:SetScript ("OnEnable", function()
|
||||
new_button:SetScript("OnEnable", function()
|
||||
new_button.supportFrame.disable_overlay:Hide()
|
||||
end)
|
||||
|
||||
@@ -106,7 +106,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
|
||||
|
||||
new_button.enter = false
|
||||
|
||||
new_button:SetScript ("OnMouseDown", function(self, button)
|
||||
new_button:SetScript("OnMouseDown", function(self, button)
|
||||
if (not self:IsEnabled()) then
|
||||
return
|
||||
end
|
||||
@@ -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
|
||||
@@ -181,7 +181,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
|
||||
|
||||
new_button.tooltip = nil
|
||||
|
||||
new_button:SetScript ("OnEnter", function()
|
||||
new_button:SetScript("OnEnter", function()
|
||||
|
||||
new_button.enter = true
|
||||
|
||||
@@ -203,7 +203,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
|
||||
end
|
||||
end)
|
||||
|
||||
new_button:SetScript ("OnLeave", function()
|
||||
new_button:SetScript("OnLeave", function()
|
||||
|
||||
new_button.enter = false
|
||||
|
||||
@@ -221,10 +221,10 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
|
||||
end)
|
||||
|
||||
function new_button:ChangeIcon (icon1, icon2, icon3, icon4)
|
||||
new_button:SetNormalTexture (icon1)
|
||||
new_button:SetPushedTexture (icon2)
|
||||
new_button:SetNormalTexture(icon1)
|
||||
new_button:SetPushedTexture(icon2)
|
||||
new_button:SetDisabledTexture (icon3)
|
||||
new_button:SetHighlightTexture (icon4, "ADD")
|
||||
new_button:SetHighlightTexture(icon4, "ADD")
|
||||
end
|
||||
|
||||
function new_button:InstallCustomTexture (texture, rect)
|
||||
@@ -233,17 +233,17 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
|
||||
new_button:SetDisabledTexture("")
|
||||
new_button:SetHighlightTexture("")
|
||||
texture = texture or "Interface\\AddOns\\Details\\images\\default_button"
|
||||
new_button.texture = new_button:CreateTexture (nil, "background")
|
||||
new_button.texture = new_button:CreateTexture(nil, "background")
|
||||
|
||||
if (not rect) then
|
||||
new_button.texture:SetAllPoints (new_button)
|
||||
new_button.texture:SetAllPoints(new_button)
|
||||
else
|
||||
new_button.texture:SetPoint ("topleft", new_button, "topleft", rect.x1, rect.y1)
|
||||
new_button.texture:SetPoint ("bottomright", new_button, "bottomright", rect.x2, rect.y2)
|
||||
new_button.texture:SetPoint("topleft", new_button, "topleft", rect.x1, rect.y1)
|
||||
new_button.texture:SetPoint("bottomright", new_button, "bottomright", rect.x2, rect.y2)
|
||||
end
|
||||
|
||||
new_button.texture:SetTexCoord (0, 1, 0, 0.24609375)
|
||||
new_button.texture:SetTexture (texture)
|
||||
new_button.texture:SetTexture(texture)
|
||||
end
|
||||
|
||||
new_button.textColor = {}
|
||||
@@ -260,21 +260,21 @@ local EditBoxBackdrop = {
|
||||
|
||||
function gump:NewTextBox (parent, container, member, func, param1, param2, w, h, options)
|
||||
|
||||
local editbox = CreateFrame ("EditBox", "DetailsEditBox1", parent)
|
||||
local editbox = CreateFrame("EditBox", "DetailsEditBox1", parent)
|
||||
container [member] = editbox
|
||||
options = options or {}
|
||||
|
||||
editbox:SetAutoFocus (false)
|
||||
editbox:SetFontObject (GameFontHighlightSmall)
|
||||
|
||||
editbox:SetWidth (w)
|
||||
editbox:SetHeight (h)
|
||||
editbox:SetWidth(w)
|
||||
editbox:SetHeight(h)
|
||||
editbox:SetJustifyH("CENTER")
|
||||
editbox:EnableMouse (true)
|
||||
editbox:SetBackdrop (EditBoxBackdrop)
|
||||
editbox:SetBackdropColor (0, 0, 0, 0.5)
|
||||
editbox:SetBackdropBorderColor (0.3, 0.3, 0.30, 0.80)
|
||||
editbox:SetText ("") --localize-me
|
||||
editbox:SetBackdrop(EditBoxBackdrop)
|
||||
editbox:SetBackdropColor(0, 0, 0, 0.5)
|
||||
editbox:SetBackdropBorderColor(0.3, 0.3, 0.30, 0.80)
|
||||
editbox:SetText("") --localize-me
|
||||
|
||||
editbox.perdeu_foco = nil
|
||||
|
||||
@@ -284,15 +284,15 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
|
||||
editbox.tab_on_enter = options.TabOnEnterPress
|
||||
editbox.space = options.MySpace
|
||||
|
||||
gump:NewLabel (editbox, editbox, nil, "label", "", "GameFontHighlightSmall")
|
||||
gump:NewLabel(editbox, editbox, nil, "label", "", "GameFontHighlightSmall")
|
||||
editbox ["label"]: SetPoint ("right", editbox, "left", -2, 0)
|
||||
editbox.label:SetTextColor (.8, .8, .8, 1)
|
||||
|
||||
function editbox:SetPointAndSpace (MyAnchor, SnapTo, HisAnchor, x, y, Width)
|
||||
|
||||
if (type (MyAnchor) == "boolean" and MyAnchor and editbox.space) then
|
||||
if (type(MyAnchor) == "boolean" and MyAnchor and editbox.space) then
|
||||
local textWidth = editbox ["label"]:GetStringWidth()+2
|
||||
editbox:SetWidth (editbox.space - textWidth - 15)
|
||||
editbox:SetWidth(editbox.space - textWidth - 15)
|
||||
return
|
||||
|
||||
elseif (not editbox.space and not Width) then
|
||||
@@ -304,23 +304,23 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
|
||||
if (editbox.space) then
|
||||
editbox ["label"]:ClearAllPoints()
|
||||
editbox:ClearAllPoints()
|
||||
editbox ["label"]:SetPoint (MyAnchor, SnapTo, HisAnchor, x, y)
|
||||
editbox:SetPoint ("left", editbox["label"].widget, "right", 2, 0)
|
||||
editbox ["label"]:SetPoint(MyAnchor, SnapTo, HisAnchor, x, y)
|
||||
editbox:SetPoint("left", editbox["label"].widget, "right", 2, 0)
|
||||
|
||||
local textWidth = editbox ["label"]:GetStringWidth()+2
|
||||
editbox:SetWidth (editbox.space - textWidth - 15)
|
||||
editbox:SetWidth(editbox.space - textWidth - 15)
|
||||
end
|
||||
end
|
||||
|
||||
function editbox:SetLabelText (text)
|
||||
if (text) then
|
||||
editbox ["label"]:SetText (text)
|
||||
editbox ["label"]:SetText(text)
|
||||
else
|
||||
editbox ["label"]:SetText ("")
|
||||
editbox ["label"]:SetText("")
|
||||
end
|
||||
|
||||
if (editbox.space) then
|
||||
editbox:SetPointAndSpace (true) --> refresh
|
||||
editbox:SetPointAndSpace (true) --refresh
|
||||
end
|
||||
end
|
||||
|
||||
@@ -337,10 +337,10 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
|
||||
func (param1, param2, texto, editbox, byScript)
|
||||
end
|
||||
else
|
||||
editbox:SetText ("")
|
||||
editbox:SetText("")
|
||||
editbox.text = ""
|
||||
end
|
||||
editbox.perdeu_foco = true --> isso aqui pra quando estiver editando e clicar em outra caixa
|
||||
editbox.perdeu_foco = true --isso aqui pra quando estiver editando e clicar em outra caixa
|
||||
editbox:ClearFocus()
|
||||
|
||||
if (editbox.tab_on_enter and editbox.next) then
|
||||
@@ -352,9 +352,9 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
|
||||
EnterPress (byScript)
|
||||
end
|
||||
|
||||
editbox:SetScript ("OnEnterPressed", EnterPress)
|
||||
editbox:SetScript("OnEnterPressed", EnterPress)
|
||||
|
||||
editbox:SetScript ("OnEscapePressed", function()
|
||||
editbox:SetScript("OnEscapePressed", function()
|
||||
editbox:SetText("")
|
||||
editbox.text = ""
|
||||
editbox.perdeu_foco = true
|
||||
@@ -365,10 +365,10 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
|
||||
end
|
||||
end)
|
||||
|
||||
editbox:SetScript ("OnEnter", function()
|
||||
editbox:SetScript("OnEnter", function()
|
||||
editbox.mouse_over = true
|
||||
if (editbox:IsEnabled()) then
|
||||
editbox:SetBackdropBorderColor (0.5, 0.5, 0.5, 1)
|
||||
editbox:SetBackdropBorderColor(0.5, 0.5, 0.5, 1)
|
||||
end
|
||||
if (editbox.tooltip) then
|
||||
GameCooltip:Reset()
|
||||
@@ -384,7 +384,7 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
|
||||
end
|
||||
end)
|
||||
|
||||
editbox:SetScript ("OnLeave", function()
|
||||
editbox:SetScript("OnLeave", function()
|
||||
editbox.mouse_over = false
|
||||
if (editbox:IsEnabled()) then
|
||||
editbox:SetBackdropBorderColor(0.3, 0.3, 0.3, 0.8)
|
||||
@@ -408,7 +408,7 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
|
||||
|
||||
end)
|
||||
|
||||
editbox:SetScript ("OnEditFocusGained", function()
|
||||
editbox:SetScript("OnEditFocusGained", function()
|
||||
if (editbox.label) then
|
||||
editbox.label:SetTextColor (1, 1, 1, 1)
|
||||
end
|
||||
@@ -417,7 +417,7 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
|
||||
end
|
||||
end)
|
||||
|
||||
editbox:SetScript ("OnEditFocusLost", function()
|
||||
editbox:SetScript("OnEditFocusLost", function()
|
||||
|
||||
if (editbox:IsShown()) then
|
||||
if (editbox.perdeu_foco == nil) then
|
||||
@@ -428,7 +428,7 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
|
||||
func (param1, param2, texto, editbox, nil)
|
||||
end
|
||||
else
|
||||
editbox:SetText ("")
|
||||
editbox:SetText("")
|
||||
end
|
||||
else
|
||||
editbox.perdeu_foco = nil
|
||||
@@ -444,19 +444,19 @@ 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
|
||||
end)
|
||||
|
||||
editbox:SetScript ("OnTabPressed", function()
|
||||
editbox:SetScript("OnTabPressed", function()
|
||||
if (editbox.next) then
|
||||
EnterPress()
|
||||
editbox.next:SetFocus()
|
||||
@@ -491,20 +491,20 @@ end
|
||||
|
||||
function gump:NewScrollBar2 (master, slave, x, y)
|
||||
|
||||
local slider_gump = CreateFrame ("Slider", master:GetName() and master:GetName() .. "SliderGump" or "DetailsSliderGump" .. math.random (1, 10000000), master)
|
||||
local slider_gump = CreateFrame("Slider", master:GetName() and master:GetName() .. "SliderGump" or "DetailsSliderGump" .. math.random (1, 10000000), master)
|
||||
slider_gump.scrollMax = 560 --default - tamanho da janela de fundo
|
||||
|
||||
-- ///// SLIDER /////
|
||||
slider_gump:SetPoint ("TOPLEFT", master, "TOPRIGHT", x, y)
|
||||
slider_gump:SetPoint("TOPLEFT", master, "TOPRIGHT", x, y)
|
||||
slider_gump.ativo = true
|
||||
|
||||
slider_gump.bg = slider_gump:CreateTexture (nil, "BACKGROUND")
|
||||
slider_gump.bg:SetAllPoints (true)
|
||||
slider_gump.bg:SetTexture (0, 0, 0, 0)
|
||||
slider_gump.bg = slider_gump:CreateTexture(nil, "BACKGROUND")
|
||||
slider_gump.bg:SetAllPoints(true)
|
||||
slider_gump.bg:SetTexture(0, 0, 0, 0)
|
||||
--coisinha do meio
|
||||
slider_gump.thumb = slider_gump:CreateTexture (nil, "OVERLAY")
|
||||
slider_gump.thumb:SetTexture ("Interface\\Buttons\\UI-ScrollBar-Knob")
|
||||
slider_gump.thumb:SetSize (29, 30)
|
||||
slider_gump.thumb = slider_gump:CreateTexture(nil, "OVERLAY")
|
||||
slider_gump.thumb:SetTexture("Interface\\Buttons\\UI-ScrollBar-Knob")
|
||||
slider_gump.thumb:SetSize(29, 30)
|
||||
slider_gump:SetThumbTexture (slider_gump.thumb)
|
||||
|
||||
slider_gump:SetOrientation ("VERTICAL")
|
||||
@@ -513,29 +513,29 @@ function gump:NewScrollBar2 (master, slave, x, y)
|
||||
slider_gump:SetValue(0)
|
||||
slider_gump.ultimo = 0
|
||||
|
||||
local botao_cima = CreateFrame ("Button", slider_gump:GetName() .. "UpButton", master)
|
||||
local botao_cima = CreateFrame("Button", slider_gump:GetName() .. "UpButton", master)
|
||||
|
||||
botao_cima:SetWidth (29)
|
||||
botao_cima:SetHeight (32)
|
||||
botao_cima:SetNormalTexture ([[Interface\Buttons\Arrow-Up-Up]])
|
||||
botao_cima:SetPushedTexture ([[Interface\Buttons\Arrow-Up-Down]])
|
||||
botao_cima:SetWidth(29)
|
||||
botao_cima:SetHeight(32)
|
||||
botao_cima:SetNormalTexture([[Interface\Buttons\Arrow-Up-Up]])
|
||||
botao_cima:SetPushedTexture([[Interface\Buttons\Arrow-Up-Down]])
|
||||
botao_cima:SetDisabledTexture ([[Interface\Buttons\Arrow-Up-Disabled]])
|
||||
botao_cima:Show()
|
||||
botao_cima:Disable()
|
||||
|
||||
botao_cima:SetPoint ("BOTTOM", slider_gump, "TOP", 0, -12)
|
||||
botao_cima:SetPoint("BOTTOM", slider_gump, "TOP", 0, -12)
|
||||
botao_cima.x = 0
|
||||
botao_cima.y = -12
|
||||
|
||||
local botao_baixo = CreateFrame ("Button", slider_gump:GetName() .. "DownButton", master)
|
||||
botao_baixo:SetPoint ("TOP", slider_gump, "BOTTOM", 0, 12)
|
||||
local botao_baixo = CreateFrame("Button", slider_gump:GetName() .. "DownButton", master)
|
||||
botao_baixo:SetPoint("TOP", slider_gump, "BOTTOM", 0, 12)
|
||||
botao_baixo.x = 0
|
||||
botao_baixo.y = 12
|
||||
|
||||
botao_baixo:SetWidth (29)
|
||||
botao_baixo:SetHeight (32)
|
||||
botao_baixo:SetNormalTexture ([[Interface\Buttons\Arrow-Down-Up]])
|
||||
botao_baixo:SetPushedTexture ([[Interface\Buttons\Arrow-Down-Down]])
|
||||
botao_baixo:SetWidth(29)
|
||||
botao_baixo:SetHeight(32)
|
||||
botao_baixo:SetNormalTexture([[Interface\Buttons\Arrow-Down-Up]])
|
||||
botao_baixo:SetPushedTexture([[Interface\Buttons\Arrow-Down-Down]])
|
||||
botao_baixo:SetDisabledTexture ([[Interface\Buttons\Arrow-Down-Disabled]])
|
||||
botao_baixo:Show()
|
||||
botao_baixo:Disable()
|
||||
@@ -544,7 +544,7 @@ function gump:NewScrollBar2 (master, slave, x, y)
|
||||
master.cima = botao_cima
|
||||
master.slider = slider_gump
|
||||
|
||||
botao_baixo:SetScript ("OnMouseDown", function(self)
|
||||
botao_baixo:SetScript("OnMouseDown", function(self)
|
||||
if (not slider_gump:IsEnabled()) then
|
||||
return
|
||||
end
|
||||
@@ -552,70 +552,70 @@ function gump:NewScrollBar2 (master, slave, x, y)
|
||||
local current = slider_gump:GetValue()
|
||||
local minValue, maxValue = slider_gump:GetMinMaxValues()
|
||||
if (current+5 < maxValue) then
|
||||
slider_gump:SetValue (current+5)
|
||||
slider_gump:SetValue(current+5)
|
||||
else
|
||||
slider_gump:SetValue (maxValue)
|
||||
slider_gump:SetValue(maxValue)
|
||||
end
|
||||
self.precionado = true
|
||||
self.last_up = -0.3
|
||||
self:SetScript ("OnUpdate", function(self, elapsed)
|
||||
self:SetScript("OnUpdate", function(self, elapsed)
|
||||
self.last_up = self.last_up + elapsed
|
||||
if (self.last_up > 0.03) then
|
||||
self.last_up = 0
|
||||
local current = slider_gump:GetValue()
|
||||
local minValue, maxValue = slider_gump:GetMinMaxValues()
|
||||
if (current+2 < maxValue) then
|
||||
slider_gump:SetValue (current+2)
|
||||
slider_gump:SetValue(current+2)
|
||||
else
|
||||
slider_gump:SetValue (maxValue)
|
||||
slider_gump:SetValue(maxValue)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end)
|
||||
botao_baixo:SetScript ("OnMouseUp", function(self)
|
||||
botao_baixo:SetScript("OnMouseUp", function(self)
|
||||
self.precionado = false
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
self:SetScript("OnUpdate", nil)
|
||||
end)
|
||||
|
||||
botao_cima:SetScript ("OnMouseDown", function(self)
|
||||
botao_cima:SetScript("OnMouseDown", function(self)
|
||||
if (not slider_gump:IsEnabled()) then
|
||||
return
|
||||
end
|
||||
|
||||
local current = slider_gump:GetValue()
|
||||
if (current-5 > 0) then
|
||||
slider_gump:SetValue (current-5)
|
||||
slider_gump:SetValue(current-5)
|
||||
else
|
||||
slider_gump:SetValue (0)
|
||||
slider_gump:SetValue(0)
|
||||
end
|
||||
self.precionado = true
|
||||
self.last_up = -0.3
|
||||
self:SetScript ("OnUpdate", function(self, elapsed)
|
||||
self:SetScript("OnUpdate", function(self, elapsed)
|
||||
self.last_up = self.last_up + elapsed
|
||||
if (self.last_up > 0.03) then
|
||||
self.last_up = 0
|
||||
local current = slider_gump:GetValue()
|
||||
if (current-2 > 0) then
|
||||
slider_gump:SetValue (current-2)
|
||||
slider_gump:SetValue(current-2)
|
||||
else
|
||||
slider_gump:SetValue (0)
|
||||
slider_gump:SetValue(0)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end)
|
||||
botao_cima:SetScript ("OnMouseUp", function(self)
|
||||
botao_cima:SetScript("OnMouseUp", function(self)
|
||||
self.precionado = false
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
self:SetScript("OnUpdate", nil)
|
||||
end)
|
||||
--> isso aqui pra quando o slider ativar, o scroll fica na posi��o zero
|
||||
botao_cima:SetScript ("OnEnable", function(self)
|
||||
--isso aqui pra quando o slider ativar, o scroll fica na posi��o zero
|
||||
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
|
||||
@@ -660,22 +660,22 @@ function gump:NewScrollBar2 (master, slave, x, y)
|
||||
--baixo
|
||||
local minValue, maxValue = slider_gump:GetMinMaxValues()
|
||||
if (current + (master.wheel_jump or 20) < maxValue) then
|
||||
slider_gump:SetValue (current + (master.wheel_jump or 20))
|
||||
slider_gump:SetValue(current + (master.wheel_jump or 20))
|
||||
else
|
||||
slider_gump:SetValue (maxValue)
|
||||
slider_gump:SetValue(maxValue)
|
||||
end
|
||||
elseif (delta > 0) then
|
||||
--cima
|
||||
if (current + (master.wheel_jump or 20) > 0) then
|
||||
slider_gump:SetValue (current - (master.wheel_jump or 20))
|
||||
slider_gump:SetValue(current - (master.wheel_jump or 20))
|
||||
else
|
||||
slider_gump:SetValue (0)
|
||||
slider_gump:SetValue(0)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
function slider_gump:Altura (h)
|
||||
self:SetHeight (h)
|
||||
self:SetHeight(h)
|
||||
end
|
||||
|
||||
function slider_gump:Update (desativar)
|
||||
@@ -705,11 +705,11 @@ function gump:NewScrollBar2 (master, slave, x, y)
|
||||
end
|
||||
|
||||
function slider_gump:cimaPoint (x, y)
|
||||
botao_cima:SetPoint ("BOTTOM", slider_gump, "TOP", x, (y)-12)
|
||||
botao_cima:SetPoint("BOTTOM", slider_gump, "TOP", x, (y)-12)
|
||||
end
|
||||
|
||||
function slider_gump:baixoPoint (x, y)
|
||||
botao_baixo:SetPoint ("TOP", slider_gump, "BOTTOM", x, (y)+12)
|
||||
botao_baixo:SetPoint("TOP", slider_gump, "BOTTOM", x, (y)+12)
|
||||
end
|
||||
|
||||
return slider_gump
|
||||
|
||||
+88
-88
@@ -28,7 +28,7 @@ function Details:CreateAPI2Frame()
|
||||
local Api2Frame = _G.DetailsAPI2Frame
|
||||
|
||||
Api2Frame:SetFrameStrata ("FULLSCREEN")
|
||||
Api2Frame:SetPoint ("center")
|
||||
Api2Frame:SetPoint("center")
|
||||
DetailsFramework:ApplyStandardBackdrop (Api2Frame, false, 1.2)
|
||||
|
||||
--store
|
||||
@@ -43,14 +43,14 @@ function Details:CreateAPI2Frame()
|
||||
local onSelectAPI = function(self)
|
||||
local apiName = apiFunctionNames [self.index]
|
||||
if (not apiName) then
|
||||
Details:Msg ("API name not found:", apiName)
|
||||
Details:Msg("API name not found:", apiName)
|
||||
return
|
||||
end
|
||||
|
||||
--fill the box in the right with information about the API
|
||||
local apiInfo = api [self.index]
|
||||
if (not apiInfo) then
|
||||
Details:Msg ("API information for api not found", apiName)
|
||||
Details:Msg("API information for api not found", apiName)
|
||||
return
|
||||
end
|
||||
|
||||
@@ -62,7 +62,7 @@ function Details:CreateAPI2Frame()
|
||||
|
||||
--update the copy line text box
|
||||
local parameters = ""
|
||||
for parameterIndex, parameterInfo in ipairs (apiInfo.parameters) do
|
||||
for parameterIndex, parameterInfo in ipairs(apiInfo.parameters) do
|
||||
if (parameterInfo.required) then
|
||||
parameters = parameters .. parameterInfo.name .. ", "
|
||||
end
|
||||
@@ -70,7 +70,7 @@ function Details:CreateAPI2Frame()
|
||||
parameters = parameters:gsub (", $", "")
|
||||
|
||||
local returnValues = "local "
|
||||
for returnIndex, returnInfo in ipairs (apiInfo.returnValues) do
|
||||
for returnIndex, returnInfo in ipairs(apiInfo.returnValues) do
|
||||
returnValues = returnValues .. returnInfo.name .. ", "
|
||||
end
|
||||
returnValues = returnValues:gsub (", $", "")
|
||||
@@ -130,29 +130,29 @@ function Details:CreateAPI2Frame()
|
||||
local apiName = data [index]
|
||||
if (apiName) then
|
||||
local line = self:GetLine (i)
|
||||
line.text:SetText (apiName)
|
||||
line.text:SetText(apiName)
|
||||
line.index = index
|
||||
|
||||
if (currentSelected == index) then
|
||||
line:SetBackdropColor (unpack (backdropColorSelected))
|
||||
line:SetBackdropColor(unpack (backdropColorSelected))
|
||||
else
|
||||
line:SetBackdropColor (unpack (backdropColor))
|
||||
line:SetBackdropColor(unpack (backdropColor))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for apiIndex, apiDesc in ipairs (api) do
|
||||
for apiIndex, apiDesc in ipairs(api) do
|
||||
tinsert (apiFunctionNames, apiDesc.name)
|
||||
end
|
||||
|
||||
local api2ScrollMenu = DetailsFramework:CreateScrollBox (Api2Frame, "$parentApi2MenuScroll", apiMenuScrollRefresh, apiFunctionNames, scrollWidth, scrollHeight, lineAmount, lineHeight)
|
||||
DetailsFramework:ReskinSlider(api2ScrollMenu)
|
||||
api2ScrollMenu:SetPoint ("topleft", Api2Frame, "topleft", 10, yStart)
|
||||
api2ScrollMenu:SetPoint("topleft", Api2Frame, "topleft", 10, yStart)
|
||||
Api2Frame.scrollMenu = api2ScrollMenu
|
||||
|
||||
local lineOnEnter = function(self)
|
||||
self:SetBackdropColor (unpack (backdropColorOnEnter))
|
||||
self:SetBackdropColor(unpack (backdropColorOnEnter))
|
||||
|
||||
local apiName = apiFunctionNames [self.index]
|
||||
if (not apiName) then
|
||||
@@ -173,9 +173,9 @@ function Details:CreateAPI2Frame()
|
||||
|
||||
local lineOnLeave = function(self)
|
||||
if (currentSelected == self.index) then
|
||||
self:SetBackdropColor (unpack (backdropColorSelected))
|
||||
self:SetBackdropColor(unpack (backdropColorSelected))
|
||||
else
|
||||
self:SetBackdropColor (unpack (backdropColor))
|
||||
self:SetBackdropColor(unpack (backdropColor))
|
||||
end
|
||||
|
||||
GameCooltip2:Hide()
|
||||
@@ -184,21 +184,21 @@ function Details:CreateAPI2Frame()
|
||||
--create lines
|
||||
for i = 1, lineAmount do
|
||||
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)
|
||||
local line = CreateFrame("button", "$parentLine" .. index, self, "BackdropTemplate")
|
||||
line:SetPoint("topleft", self, "topleft", 1, -((index-1)*(lineHeight+1)) - 1)
|
||||
line:SetSize(scrollWidth - 2, lineHeight)
|
||||
line.index = index
|
||||
|
||||
line:SetScript ("OnEnter", lineOnEnter)
|
||||
line:SetScript ("OnLeave", lineOnLeave)
|
||||
line:SetScript("OnEnter", lineOnEnter)
|
||||
line:SetScript("OnLeave", lineOnLeave)
|
||||
|
||||
line:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
line:SetBackdropColor (unpack (backdropColor))
|
||||
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
line:SetBackdropColor(unpack (backdropColor))
|
||||
|
||||
line.text = DetailsFramework:CreateLabel (line)
|
||||
line.text:SetPoint ("left", line, "left", 2, 0)
|
||||
line.text = DetailsFramework:CreateLabel(line)
|
||||
line.text:SetPoint("left", line, "left", 2, 0)
|
||||
|
||||
line:SetScript ("OnMouseDown", onSelectAPI)
|
||||
line:SetScript("OnMouseDown", onSelectAPI)
|
||||
|
||||
return line
|
||||
end)
|
||||
@@ -207,43 +207,43 @@ function Details:CreateAPI2Frame()
|
||||
--info box
|
||||
local infoWidth = panelWidth - xAnchorPoint - 10
|
||||
--api name
|
||||
Api2Frame.ApiFunctionName = DetailsFramework:CreateLabel (Api2Frame, "", 14, "orange")
|
||||
Api2Frame.ApiFunctionName:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, yStart)
|
||||
Api2Frame.ApiFunctionName = DetailsFramework:CreateLabel(Api2Frame, "", 14, "orange")
|
||||
Api2Frame.ApiFunctionName:SetPoint("topleft", Api2Frame, "topleft", xAnchorPoint, yStart)
|
||||
--api desc
|
||||
Api2Frame.ApiFunctionDesc = DetailsFramework:CreateLabel (Api2Frame)
|
||||
Api2Frame.ApiFunctionDesc:SetPoint ("topleft", Api2Frame.ApiFunctionName, "bottomleft", 0, -2)
|
||||
Api2Frame.ApiFunctionDesc = DetailsFramework:CreateLabel(Api2Frame)
|
||||
Api2Frame.ApiFunctionDesc:SetPoint("topleft", Api2Frame.ApiFunctionName, "bottomleft", 0, -2)
|
||||
Api2Frame.ApiFunctionDesc.width = infoWidth
|
||||
Api2Frame.ApiFunctionDesc.height = 22
|
||||
Api2Frame.ApiFunctionDesc.valign = "top"
|
||||
|
||||
--api func to copy
|
||||
local apiCopyString = DetailsFramework:CreateLabel (Api2Frame, "Copy String", 12, "orange")
|
||||
apiCopyString:SetPoint ("topleft", Api2Frame.ApiFunctionDesc, "bottomleft", 0, -20)
|
||||
local apiCopyString = DetailsFramework:CreateLabel(Api2Frame, "Copy String", 12, "orange")
|
||||
apiCopyString:SetPoint("topleft", Api2Frame.ApiFunctionDesc, "bottomleft", 0, -20)
|
||||
Api2Frame.ApiCopy = DetailsFramework:CreateTextEntry (Api2Frame, function() end, infoWidth, 20)
|
||||
Api2Frame.ApiCopy:SetPoint ("topleft", apiCopyString, "bottomleft", 0, -2)
|
||||
Api2Frame.ApiCopy:SetPoint("topleft", apiCopyString, "bottomleft", 0, -2)
|
||||
Api2Frame.ApiCopy:SetTemplate (DetailsFramework:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX"))
|
||||
|
||||
--parameters
|
||||
local parametersYStart = yStart - 110
|
||||
local parametersString = DetailsFramework:CreateLabel (Api2Frame, "Parameters", 12, "orange")
|
||||
parametersString:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, parametersYStart)
|
||||
local parametersString = DetailsFramework:CreateLabel(Api2Frame, "Parameters", 12, "orange")
|
||||
parametersString:SetPoint("topleft", Api2Frame, "topleft", xAnchorPoint, parametersYStart)
|
||||
|
||||
parametersYStart = parametersYStart - 20
|
||||
|
||||
local space1, space2, space3 = 150, 300, 450
|
||||
local parametersHeader = CreateFrame ("frame", nil, Api2Frame, "BackdropTemplate")
|
||||
parametersHeader:SetSize (infoWidth, 20)
|
||||
parametersHeader:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, parametersYStart)
|
||||
parametersHeader:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
parametersHeader:SetBackdropColor (unpack (backdropColor))
|
||||
parametersHeader.name = DetailsFramework:CreateLabel (parametersHeader, "Name", 12, "yellow")
|
||||
parametersHeader.typeData = DetailsFramework:CreateLabel (parametersHeader, "Type", 12, "yellow")
|
||||
parametersHeader.required = DetailsFramework:CreateLabel (parametersHeader, "Is Required", 12, "yellow")
|
||||
parametersHeader.default = DetailsFramework:CreateLabel (parametersHeader, "Default Value", 12, "yellow")
|
||||
parametersHeader.name:SetPoint ("left", parametersHeader, "left", 2, 0)
|
||||
parametersHeader.typeData:SetPoint ("left", parametersHeader, "left", space1, 0)
|
||||
parametersHeader.required:SetPoint ("left", parametersHeader, "left", space2, 0)
|
||||
parametersHeader.default:SetPoint ("left", parametersHeader, "left", space3, 0)
|
||||
local parametersHeader = CreateFrame("frame", nil, Api2Frame, "BackdropTemplate")
|
||||
parametersHeader:SetSize(infoWidth, 20)
|
||||
parametersHeader:SetPoint("topleft", Api2Frame, "topleft", xAnchorPoint, parametersYStart)
|
||||
parametersHeader:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
parametersHeader:SetBackdropColor(unpack (backdropColor))
|
||||
parametersHeader.name = DetailsFramework:CreateLabel(parametersHeader, "Name", 12, "yellow")
|
||||
parametersHeader.typeData = DetailsFramework:CreateLabel(parametersHeader, "Type", 12, "yellow")
|
||||
parametersHeader.required = DetailsFramework:CreateLabel(parametersHeader, "Is Required", 12, "yellow")
|
||||
parametersHeader.default = DetailsFramework:CreateLabel(parametersHeader, "Default Value", 12, "yellow")
|
||||
parametersHeader.name:SetPoint("left", parametersHeader, "left", 2, 0)
|
||||
parametersHeader.typeData:SetPoint("left", parametersHeader, "left", space1, 0)
|
||||
parametersHeader.required:SetPoint("left", parametersHeader, "left", space2, 0)
|
||||
parametersHeader.default:SetPoint("left", parametersHeader, "left", space3, 0)
|
||||
|
||||
local parameterOnEnter = function(self)
|
||||
GameCooltip2:Preset(2)
|
||||
@@ -257,87 +257,87 @@ function Details:CreateAPI2Frame()
|
||||
GameCooltip2:AddLine (apiInfo.parameters [self.index].desc)
|
||||
GameCooltip2:ShowCooltip()
|
||||
|
||||
self:SetBackdropColor (unpack (backdropColorOnEnter))
|
||||
self:SetBackdropColor(unpack (backdropColorOnEnter))
|
||||
end
|
||||
local parameterOnLeave = function(self)
|
||||
GameCooltip2:Hide()
|
||||
self:SetBackdropColor (unpack (backdropColor))
|
||||
self:SetBackdropColor(unpack (backdropColor))
|
||||
end
|
||||
|
||||
for i = 1, parametersAmount do
|
||||
local parameterLine = {}
|
||||
local f = CreateFrame ("frame", nil, Api2Frame, "BackdropTemplate")
|
||||
f:SetSize (infoWidth, 20)
|
||||
f:SetScript ("OnEnter", parameterOnEnter)
|
||||
f:SetScript ("OnLeave", parameterOnLeave)
|
||||
f:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (unpack (backdropColor))
|
||||
local f = CreateFrame("frame", nil, Api2Frame, "BackdropTemplate")
|
||||
f:SetSize(infoWidth, 20)
|
||||
f:SetScript("OnEnter", parameterOnEnter)
|
||||
f:SetScript("OnLeave", parameterOnLeave)
|
||||
f:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor(unpack (backdropColor))
|
||||
f:Hide()
|
||||
|
||||
f.name = DetailsFramework:CreateLabel (f)
|
||||
f.typeData = DetailsFramework:CreateLabel (f)
|
||||
f.required = DetailsFramework:CreateLabel (f)
|
||||
f.default = DetailsFramework:CreateLabel (f)
|
||||
f.name = DetailsFramework:CreateLabel(f)
|
||||
f.typeData = DetailsFramework:CreateLabel(f)
|
||||
f.required = DetailsFramework:CreateLabel(f)
|
||||
f.default = DetailsFramework:CreateLabel(f)
|
||||
|
||||
f:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, parametersYStart + (-i * 20))
|
||||
f:SetPoint("topleft", Api2Frame, "topleft", xAnchorPoint, parametersYStart + (-i * 20))
|
||||
|
||||
f.name:SetPoint ("left", f, "left", 2, 0)
|
||||
f.typeData:SetPoint ("left", f, "left", space1, 0)
|
||||
f.required:SetPoint ("left", f, "left", space2, 0)
|
||||
f.default:SetPoint ("left", f, "left", space3, 0)
|
||||
f.name:SetPoint("left", f, "left", 2, 0)
|
||||
f.typeData:SetPoint("left", f, "left", space1, 0)
|
||||
f.required:SetPoint("left", f, "left", space2, 0)
|
||||
f.default:SetPoint("left", f, "left", space3, 0)
|
||||
|
||||
tinsert (parametersLines, f)
|
||||
end
|
||||
|
||||
--return value box
|
||||
local returnYStart = yStart - 260
|
||||
local returnString = DetailsFramework:CreateLabel (Api2Frame, "Return Values", 12, "orange")
|
||||
returnString:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, returnYStart)
|
||||
local returnString = DetailsFramework:CreateLabel(Api2Frame, "Return Values", 12, "orange")
|
||||
returnString:SetPoint("topleft", Api2Frame, "topleft", xAnchorPoint, returnYStart)
|
||||
|
||||
returnYStart = returnYStart - 20
|
||||
|
||||
local space1 = 200
|
||||
local returnHeader = CreateFrame ("frame", nil, Api2Frame, "BackdropTemplate")
|
||||
returnHeader:SetSize (infoWidth, 20)
|
||||
returnHeader:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, returnYStart)
|
||||
returnHeader:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
returnHeader:SetBackdropColor (unpack (backdropColor))
|
||||
returnHeader.name = DetailsFramework:CreateLabel (returnHeader, "Name", 12, "yellow")
|
||||
returnHeader.typeData = DetailsFramework:CreateLabel (returnHeader, "Type", 12, "yellow")
|
||||
returnHeader.name:SetPoint ("left", returnHeader, "left", 2, 0)
|
||||
returnHeader.typeData:SetPoint ("left", returnHeader, "left", space1, 0)
|
||||
local returnHeader = CreateFrame("frame", nil, Api2Frame, "BackdropTemplate")
|
||||
returnHeader:SetSize(infoWidth, 20)
|
||||
returnHeader:SetPoint("topleft", Api2Frame, "topleft", xAnchorPoint, returnYStart)
|
||||
returnHeader:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
returnHeader:SetBackdropColor(unpack (backdropColor))
|
||||
returnHeader.name = DetailsFramework:CreateLabel(returnHeader, "Name", 12, "yellow")
|
||||
returnHeader.typeData = DetailsFramework:CreateLabel(returnHeader, "Type", 12, "yellow")
|
||||
returnHeader.name:SetPoint("left", returnHeader, "left", 2, 0)
|
||||
returnHeader.typeData:SetPoint("left", returnHeader, "left", space1, 0)
|
||||
|
||||
local returnOnEnter = function(self)
|
||||
self:SetBackdropColor (unpack (backdropColorOnEnter))
|
||||
self:SetBackdropColor(unpack (backdropColorOnEnter))
|
||||
end
|
||||
local returnOnLeave = function(self)
|
||||
self:SetBackdropColor (unpack (backdropColor))
|
||||
self:SetBackdropColor(unpack (backdropColor))
|
||||
end
|
||||
|
||||
for i = 1, returnAmount do
|
||||
local parameterLine = {}
|
||||
local f = CreateFrame ("frame", nil, Api2Frame, "BackdropTemplate")
|
||||
f:SetSize (infoWidth, 20)
|
||||
f:SetScript ("OnEnter", returnOnEnter)
|
||||
f:SetScript ("OnLeave", returnOnLeave)
|
||||
f:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (unpack (backdropColor))
|
||||
local f = CreateFrame("frame", nil, Api2Frame, "BackdropTemplate")
|
||||
f:SetSize(infoWidth, 20)
|
||||
f:SetScript("OnEnter", returnOnEnter)
|
||||
f:SetScript("OnLeave", returnOnLeave)
|
||||
f:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor(unpack (backdropColor))
|
||||
f:Hide()
|
||||
|
||||
f.name = DetailsFramework:CreateLabel (f)
|
||||
f.typeData = DetailsFramework:CreateLabel (f)
|
||||
f.name = DetailsFramework:CreateLabel(f)
|
||||
f.typeData = DetailsFramework:CreateLabel(f)
|
||||
|
||||
f.desc = DetailsFramework:CreateLabel (f, "", 10, "gray")
|
||||
f.desc = DetailsFramework:CreateLabel(f, "", 10, "gray")
|
||||
f.desc.width = infoWidth
|
||||
f.desc.height = 60
|
||||
f.desc.valign = "top"
|
||||
|
||||
f:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, returnYStart + (-i * 20))
|
||||
f:SetPoint("topleft", Api2Frame, "topleft", xAnchorPoint, returnYStart + (-i * 20))
|
||||
|
||||
f.name:SetPoint ("left", f, "left", 2, 0)
|
||||
f.typeData:SetPoint ("left", f, "left", space1, 0)
|
||||
f.name:SetPoint("left", f, "left", 2, 0)
|
||||
f.typeData:SetPoint("left", f, "left", space1, 0)
|
||||
|
||||
f.desc:SetPoint ("topleft", f.name, "bottomleft", 0, -5)
|
||||
f.desc:SetPoint("topleft", f.name, "bottomleft", 0, -5)
|
||||
|
||||
tinsert (returnLines, f)
|
||||
end
|
||||
|
||||
+68
-68
@@ -7,7 +7,7 @@ local Details = _G.Details
|
||||
local DF = _G.DetailsFramework
|
||||
local libwindow = LibStub("LibWindow-1.1")
|
||||
|
||||
--> this function isn't in use
|
||||
--this function isn't in use
|
||||
function Details.OpenDpsBenchmark()
|
||||
|
||||
--main frame
|
||||
@@ -16,15 +16,15 @@ local libwindow = LibStub("LibWindow-1.1")
|
||||
local _ = nil
|
||||
|
||||
--declaration
|
||||
local f = CreateFrame ("frame", "DetailsBenchmark", UIParent,"BackdropTemplate")
|
||||
f:SetSize (800, 600)
|
||||
f:SetPoint ("left", UIParent, "left")
|
||||
local f = CreateFrame("frame", "DetailsBenchmark", UIParent,"BackdropTemplate")
|
||||
f:SetSize(800, 600)
|
||||
f:SetPoint("left", UIParent, "left")
|
||||
f:SetFrameStrata ("LOW")
|
||||
f:EnableMouse (true)
|
||||
f:SetMovable (true)
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (0, 0, 0, 0.9)
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor(0, 0, 0, 0.9)
|
||||
f:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--register to libwindow
|
||||
local LibWindow = LibStub ("LibWindow-1.1")
|
||||
@@ -34,32 +34,32 @@ local libwindow = LibStub("LibWindow-1.1")
|
||||
LibWindow.SavePosition (f)
|
||||
|
||||
--titlebar
|
||||
f.TitleBar = CreateFrame ("frame", "$parentTitleBar", f,"BackdropTemplate")
|
||||
f.TitleBar:SetPoint ("topleft", f, "topleft", 2, -3)
|
||||
f.TitleBar:SetPoint ("topright", f, "topright", -2, -3)
|
||||
f.TitleBar:SetHeight (20)
|
||||
f.TitleBar:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f.TitleBar:SetBackdropColor (.2, .2, .2, 1)
|
||||
f.TitleBar:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
f.TitleBar = CreateFrame("frame", "$parentTitleBar", f,"BackdropTemplate")
|
||||
f.TitleBar:SetPoint("topleft", f, "topleft", 2, -3)
|
||||
f.TitleBar:SetPoint("topright", f, "topright", -2, -3)
|
||||
f.TitleBar:SetHeight(20)
|
||||
f.TitleBar:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f.TitleBar:SetBackdropColor(.2, .2, .2, 1)
|
||||
f.TitleBar:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--close button
|
||||
f.Close = CreateFrame ("button", "$parentCloseButton", f,"BackdropTemplate")
|
||||
f.Close:SetPoint ("right", f.TitleBar, "right", -2, 0)
|
||||
f.Close:SetSize (16, 16)
|
||||
f.Close:SetNormalTexture (_detalhes.gump.folder .. "icons")
|
||||
f.Close:SetHighlightTexture (_detalhes.gump.folder .. "icons")
|
||||
f.Close:SetPushedTexture (_detalhes.gump.folder .. "icons")
|
||||
f.Close = CreateFrame("button", "$parentCloseButton", f,"BackdropTemplate")
|
||||
f.Close:SetPoint("right", f.TitleBar, "right", -2, 0)
|
||||
f.Close:SetSize(16, 16)
|
||||
f.Close:SetNormalTexture(_detalhes.gump.folder .. "icons")
|
||||
f.Close:SetHighlightTexture(_detalhes.gump.folder .. "icons")
|
||||
f.Close:SetPushedTexture(_detalhes.gump.folder .. "icons")
|
||||
f.Close:GetNormalTexture():SetTexCoord (0, 16/128, 0, 1)
|
||||
f.Close:GetHighlightTexture():SetTexCoord (0, 16/128, 0, 1)
|
||||
f.Close:GetPushedTexture():SetTexCoord (0, 16/128, 0, 1)
|
||||
f.Close:SetAlpha (0.7)
|
||||
f.Close:SetScript ("OnClick", function() f:Hide() end)
|
||||
f.Close:SetScript("OnClick", function() f:Hide() end)
|
||||
|
||||
--title
|
||||
f.Title = f.TitleBar:CreateFontString ("$parentTitle", "overlay", "GameFontNormal")
|
||||
f.Title:SetPoint ("center", f.TitleBar, "center")
|
||||
f.Title:SetPoint("center", f.TitleBar, "center")
|
||||
f.Title:SetTextColor (.8, .8, .8, 1)
|
||||
f.Title:SetText ("Details! Benchmark")
|
||||
f.Title:SetText("Details! Benchmark")
|
||||
|
||||
DF:InstallTemplate ("font", "DETAILS_BENCHMARK_NORMAL", {color = "white", size = 10, font = "Friz Quadrata TT"})
|
||||
|
||||
@@ -89,14 +89,14 @@ local libwindow = LibStub("LibWindow-1.1")
|
||||
end
|
||||
end
|
||||
function f.StartUpdateOnTick()
|
||||
f:SetScript ("OnUpdate", f.UpdateOnTick)
|
||||
f:SetScript("OnUpdate", f.UpdateOnTick)
|
||||
end
|
||||
|
||||
--events
|
||||
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()
|
||||
|
||||
@@ -126,12 +126,12 @@ local libwindow = LibStub("LibWindow-1.1")
|
||||
--summary block
|
||||
|
||||
--declaration
|
||||
local summaryFrame = CreateFrame ("frame", "$parentSummaryFrame", f,"BackdropTemplate")
|
||||
summaryFrame:SetPoint ("topleft", f, "topleft", unpack (f.FrameLocations.summary))
|
||||
summaryFrame:SetSize (unpack (f.FrameSizes.default))
|
||||
summaryFrame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
summaryFrame:SetBackdropColor (0, 0, 0, 0.9)
|
||||
summaryFrame:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
local summaryFrame = CreateFrame("frame", "$parentSummaryFrame", f,"BackdropTemplate")
|
||||
summaryFrame:SetPoint("topleft", f, "topleft", unpack (f.FrameLocations.summary))
|
||||
summaryFrame:SetSize(unpack (f.FrameSizes.default))
|
||||
summaryFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
summaryFrame:SetBackdropColor(0, 0, 0, 0.9)
|
||||
summaryFrame:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--time to test string and dropdown
|
||||
local build_time_list = function()
|
||||
@@ -146,18 +146,18 @@ local libwindow = LibStub("LibWindow-1.1")
|
||||
return t
|
||||
end
|
||||
|
||||
summaryFrame.TimeToTestLabel = DF:CreateLabel (summaryFrame, "Amount of Time", normal_text_template)
|
||||
summaryFrame.TimeToTestLabel = DF:CreateLabel(summaryFrame, "Amount of Time", normal_text_template)
|
||||
summaryFrame.TimeToTestDropdown = DF:CreateDropDown (summaryFrame, build_time_list, default, 150, 20, _, _, options_dropdown_template)
|
||||
|
||||
--description string and text entry
|
||||
summaryFrame.DescriptionLabel = DF:CreateLabel (summaryFrame, "Description", normal_text_template)
|
||||
summaryFrame.DescriptionLabel = DF:CreateLabel(summaryFrame, "Description", normal_text_template)
|
||||
summaryFrame.DescriptionEntry = DF:CreateTextEntry (summaryFrame, function()end, 120, 20, nil, _, nil, options_dropdown_template)
|
||||
|
||||
--DPS Amount string
|
||||
summaryFrame.DPSLabel = DF:CreateLabel (summaryFrame, "100K", normal_text_template)
|
||||
summaryFrame.DPSLabel = DF:CreateLabel(summaryFrame, "100K", normal_text_template)
|
||||
|
||||
--TIME ELAPSED string
|
||||
summaryFrame.TimeElapsedLabel = DF:CreateLabel (summaryFrame, "01:00", normal_text_template)
|
||||
summaryFrame.TimeElapsedLabel = DF:CreateLabel(summaryFrame, "01:00", normal_text_template)
|
||||
|
||||
--boss simulation string and dropdown
|
||||
local build_bosssimulation_list, default = function()
|
||||
@@ -166,40 +166,40 @@ local libwindow = LibStub("LibWindow-1.1")
|
||||
}
|
||||
return t
|
||||
end
|
||||
summaryFrame.BossSimulationLabel = DF:CreateLabel (summaryFrame, "Boss Simulation", normal_text_template)
|
||||
summaryFrame.BossSimulationLabel = DF:CreateLabel(summaryFrame, "Boss Simulation", normal_text_template)
|
||||
summaryFrame.BossSimulationDropdown = DF:CreateDropDown (summaryFrame, build_bosssimulation_list, default, 150, 20, _, _, options_dropdown_template)
|
||||
|
||||
--boss records line with a tooltip importing data from the storage
|
||||
summaryFrame.BossRecordsFrame = CreateFrame ("frame", nil, summaryFrame,"BackdropTemplate")
|
||||
summaryFrame.BossRecordsFrame:SetSize (f.FrameSizes.default[1]-20, 20)
|
||||
summaryFrame.BossRecordsFrame:SetBackdropColor (0, 0, 0, 0.3)
|
||||
summaryFrame.BossRecordsFrame:SetScript ("OnEnter", function()
|
||||
summaryFrame.BossRecordsFrame = CreateFrame("frame", nil, summaryFrame,"BackdropTemplate")
|
||||
summaryFrame.BossRecordsFrame:SetSize(f.FrameSizes.default[1]-20, 20)
|
||||
summaryFrame.BossRecordsFrame:SetBackdropColor(0, 0, 0, 0.3)
|
||||
summaryFrame.BossRecordsFrame:SetScript("OnEnter", function()
|
||||
|
||||
end)
|
||||
summaryFrame.BossRecordsFrame:SetScript ("OnLeave", function()
|
||||
summaryFrame.BossRecordsFrame:SetScript("OnLeave", function()
|
||||
|
||||
end)
|
||||
|
||||
--set the points
|
||||
do
|
||||
local x, y = 10, -10
|
||||
summaryFrame.TimeToTestLabel:SetPoint ("topleft", summaryFrame, "topleft", x, y)
|
||||
summaryFrame.TimeToTestDropdown:SetPoint ("topleft", summaryFrame.TimeToTestLabel, "bottomleft", 0, -2)
|
||||
summaryFrame.TimeToTestLabel:SetPoint("topleft", summaryFrame, "topleft", x, y)
|
||||
summaryFrame.TimeToTestDropdown:SetPoint("topleft", summaryFrame.TimeToTestLabel, "bottomleft", 0, -2)
|
||||
|
||||
--y = y - 40
|
||||
summaryFrame.DescriptionLabel:SetPoint ("topleft", summaryFrame, "topleft", x+160, y)
|
||||
summaryFrame.DescriptionEntry:SetPoint ("topleft", summaryFrame.DescriptionLabel, "bottomleft", 0, -2)
|
||||
summaryFrame.DescriptionLabel:SetPoint("topleft", summaryFrame, "topleft", x+160, y)
|
||||
summaryFrame.DescriptionEntry:SetPoint("topleft", summaryFrame.DescriptionLabel, "bottomleft", 0, -2)
|
||||
|
||||
y = y - 40
|
||||
summaryFrame.DPSLabel:SetPoint ("topleft", summaryFrame, "topleft", x, y)
|
||||
summaryFrame.TimeElapsedLabel:SetPoint ("topleft", summaryFrame, "topleft", x + 100, y)
|
||||
summaryFrame.DPSLabel:SetPoint("topleft", summaryFrame, "topleft", x, y)
|
||||
summaryFrame.TimeElapsedLabel:SetPoint("topleft", summaryFrame, "topleft", x + 100, y)
|
||||
|
||||
y = y - 40
|
||||
summaryFrame.BossSimulationLabel:SetPoint ("topleft", summaryFrame, "topleft", x, y)
|
||||
summaryFrame.BossSimulationDropdown:SetPoint ("topleft", summaryFrame.BossSimulationLabel, "bottomleft", 0, -2)
|
||||
summaryFrame.BossSimulationLabel:SetPoint("topleft", summaryFrame, "topleft", x, y)
|
||||
summaryFrame.BossSimulationDropdown:SetPoint("topleft", summaryFrame.BossSimulationLabel, "bottomleft", 0, -2)
|
||||
|
||||
y = y - 40
|
||||
summaryFrame.BossRecordsFrame:SetPoint ("topleft", summaryFrame, "topleft", 0, 0)
|
||||
summaryFrame.BossRecordsFrame:SetPoint("topleft", summaryFrame, "topleft", 0, 0)
|
||||
end
|
||||
|
||||
|
||||
@@ -208,12 +208,12 @@ local libwindow = LibStub("LibWindow-1.1")
|
||||
--spells block
|
||||
|
||||
--declaration
|
||||
local spellsFrame = CreateFrame ("frame", "$parentSpellsFrame", f,"BackdropTemplate")
|
||||
spellsFrame:SetPoint ("topleft", f, "topleft", unpack (f.FrameLocations.spells))
|
||||
spellsFrame:SetSize (unpack (f.FrameSizes.default))
|
||||
spellsFrame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
spellsFrame:SetBackdropColor (0, 0, 0, 0.9)
|
||||
spellsFrame:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
local spellsFrame = CreateFrame("frame", "$parentSpellsFrame", f,"BackdropTemplate")
|
||||
spellsFrame:SetPoint("topleft", f, "topleft", unpack (f.FrameLocations.spells))
|
||||
spellsFrame:SetSize(unpack (f.FrameSizes.default))
|
||||
spellsFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
spellsFrame:SetBackdropColor(0, 0, 0, 0.9)
|
||||
spellsFrame:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--header with the string titles:
|
||||
--Spell Icon | DPS | Damage | Casts | Criticals | Highest Damage
|
||||
@@ -227,12 +227,12 @@ local libwindow = LibStub("LibWindow-1.1")
|
||||
--auras block
|
||||
|
||||
--declaration
|
||||
local aurasFrame = CreateFrame ("frame", "$parentAurasFrame", f,"BackdropTemplate")
|
||||
aurasFrame:SetPoint ("topleft", f, "topleft", unpack (f.FrameLocations.auras))
|
||||
aurasFrame:SetSize (unpack (f.FrameSizes.default))
|
||||
aurasFrame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
aurasFrame:SetBackdropColor (0, 0, 0, 0.9)
|
||||
aurasFrame:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
local aurasFrame = CreateFrame("frame", "$parentAurasFrame", f,"BackdropTemplate")
|
||||
aurasFrame:SetPoint("topleft", f, "topleft", unpack (f.FrameLocations.auras))
|
||||
aurasFrame:SetSize(unpack (f.FrameSizes.default))
|
||||
aurasFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
aurasFrame:SetBackdropColor(0, 0, 0, 0.9)
|
||||
aurasFrame:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--will be 9 blocks?
|
||||
|
||||
@@ -244,12 +244,12 @@ local libwindow = LibStub("LibWindow-1.1")
|
||||
--history block
|
||||
|
||||
--declaration
|
||||
local historyFrame = CreateFrame ("frame", "$parentHistoryFrame", f,"BackdropTemplate")
|
||||
historyFrame:SetPoint ("topleft", f, "topleft", unpack (f.FrameLocations.history))
|
||||
historyFrame:SetSize (unpack (f.FrameSizes.default))
|
||||
historyFrame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
historyFrame:SetBackdropColor (0, 0, 0, 0.9)
|
||||
historyFrame:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
local historyFrame = CreateFrame("frame", "$parentHistoryFrame", f,"BackdropTemplate")
|
||||
historyFrame:SetPoint("topleft", f, "topleft", unpack (f.FrameLocations.history))
|
||||
historyFrame:SetSize(unpack (f.FrameSizes.default))
|
||||
historyFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
historyFrame:SetBackdropColor(0, 0, 0, 0.9)
|
||||
historyFrame:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--header with the string titles:
|
||||
--Spec | ILevel | DPS | Time | Talents | Crit | Haste | Versatility | Mastery | Int | Description
|
||||
|
||||
+22
-22
@@ -4,7 +4,7 @@ local Details = _G.Details
|
||||
local DF = _G.DetailsFramework
|
||||
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
|
||||
|
||||
--> config bookmarks
|
||||
--config bookmarks
|
||||
function Details:OpenBookmarkConfig()
|
||||
|
||||
if (not _G.DetailsBookmarkManager) then
|
||||
@@ -42,10 +42,10 @@ function Details:OpenBookmarkConfig()
|
||||
Details:MontaAtributosOption (Details:GetInstance(1), select_attribute)
|
||||
GameCooltip:SetColor (1, cooltip_color)
|
||||
GameCooltip:SetColor (2, cooltip_color)
|
||||
GameCooltip:SetOption ("HeightAnchorMod", -7)
|
||||
GameCooltip:SetOption ("TextSize", Details.font_sizes.menus)
|
||||
GameCooltip:SetBackdrop (1, Details.tooltip_backdrop, nil, Details.tooltip_border_color)
|
||||
GameCooltip:SetBackdrop (2, Details.tooltip_backdrop, nil, Details.tooltip_border_color)
|
||||
GameCooltip:SetOption("HeightAnchorMod", -7)
|
||||
GameCooltip:SetOption("TextSize", Details.font_sizes.menus)
|
||||
GameCooltip:SetBackdrop(1, Details.tooltip_backdrop, nil, Details.tooltip_border_color)
|
||||
GameCooltip:SetBackdrop(2, Details.tooltip_backdrop, nil, Details.tooltip_border_color)
|
||||
|
||||
GameCooltip:ShowCooltip()
|
||||
end
|
||||
@@ -53,32 +53,32 @@ 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)
|
||||
self:SetBackdropColor (1, 1, 1, 0.9)
|
||||
capsule.icon:SetBlendMode ("ADD")
|
||||
self:SetBackdropColor(1, 1, 1, 0.9)
|
||||
capsule.icon:SetBlendMode("ADD")
|
||||
end
|
||||
local set_onleave = function(self, capsule)
|
||||
self:SetBackdropColor (0, 0, 0, 0.5)
|
||||
capsule.icon:SetBlendMode ("BLEND")
|
||||
self:SetBackdropColor(0, 0, 0, 0.5)
|
||||
capsule.icon:SetBlendMode("BLEND")
|
||||
end
|
||||
|
||||
for i = 1, 40 do
|
||||
local clear = DF:CreateButton (panel, clear_func, 16, 16, nil, i, nil, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]])
|
||||
if (i%2 ~= 0) then
|
||||
--impar
|
||||
clear:SetPoint (15, (( i*10 ) * -1) - 35) --left
|
||||
clear:SetPoint(15, (( i*10 ) * -1) - 35) --left
|
||||
else
|
||||
--par
|
||||
local o = i-1
|
||||
clear:SetPoint (250, (( o*10 ) * -1) - 35) --right
|
||||
clear:SetPoint(250, (( o*10 ) * -1) - 35) --right
|
||||
end
|
||||
|
||||
local set = DF:CreateButton (panel, set_att, 16, 16, nil, i)
|
||||
set:SetPoint ("left", clear, "right")
|
||||
set:SetPoint ("right", clear, "right", 180, 0)
|
||||
set:SetBackdrop (button_backdrop)
|
||||
set:SetBackdropColor (0, 0, 0, 0.5)
|
||||
set:SetHook ("OnEnter", set_onenter)
|
||||
set:SetHook ("OnLeave", set_onleave)
|
||||
set:SetPoint("left", clear, "right")
|
||||
set:SetPoint("right", clear, "right", 180, 0)
|
||||
set:SetBackdrop(button_backdrop)
|
||||
set:SetBackdropColor(0, 0, 0, 0.5)
|
||||
set:SetHook("OnEnter", set_onenter)
|
||||
set:SetHook("OnLeave", set_onleave)
|
||||
|
||||
--set:InstallCustomTexture (nil, nil, nil, nil, true)
|
||||
set:SetTemplate (DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
@@ -88,10 +88,10 @@ function Details:OpenBookmarkConfig()
|
||||
set.bg = bg_texture
|
||||
|
||||
local icon = DF:CreateImage (set, nil, 16, 16, nil, nil, "icon")
|
||||
icon:SetPoint ("left", clear, "right", 4, 0)
|
||||
icon:SetPoint("left", clear, "right", 4, 0)
|
||||
|
||||
local label = DF:CreateLabel (set, "")
|
||||
label:SetPoint ("left", icon, "right", 2, 0)
|
||||
local label = DF:CreateLabel(set, "")
|
||||
label:SetPoint("left", icon, "right", 2, 0)
|
||||
|
||||
tinsert (panel.blocks, {icon = icon, label = label, bg = set.bg, button = set})
|
||||
end
|
||||
@@ -106,9 +106,9 @@ function Details:OpenBookmarkConfig()
|
||||
local bookmark = bookmarks [i]
|
||||
local this_block = panel.blocks [i]
|
||||
if (bookmark and bookmark.atributo and bookmark.sub_atributo) then
|
||||
if (bookmark.atributo == 5) then --> custom
|
||||
if (bookmark.atributo == 5) then --custom
|
||||
local CustomObject = Details.custom [bookmark.sub_atributo]
|
||||
if (not CustomObject) then --> ele j� foi deletado
|
||||
if (not CustomObject) then --ele j� foi deletado
|
||||
this_block.label.text = "-- x -- x --"
|
||||
this_block.icon.texture = "Interface\\ICONS\\Ability_DualWield"
|
||||
this_block.icon.texcoord = normal_coords
|
||||
|
||||
@@ -18,18 +18,18 @@ function Details:OpenBrokerTextEditor()
|
||||
local titleBar = DF:CreateTitleBar (panel, "Broker Text Editor")
|
||||
|
||||
local textentry = DF:NewSpecialLuaEditorEntry (panel, 650, 270, "editbox", "$parentEntry", true)
|
||||
textentry:SetPoint ("topleft", panel, "topleft", 2, -25)
|
||||
textentry:SetPoint("topleft", panel, "topleft", 2, -25)
|
||||
|
||||
DF:ApplyStandardBackdrop(textentry)
|
||||
DF:ReskinSlider(textentry.scroll)
|
||||
|
||||
textentry.editbox:SetScript ("OnTextChanged", function()
|
||||
textentry.editbox:SetScript("OnTextChanged", function()
|
||||
local text = panel.editbox:GetText()
|
||||
Details.data_broker_text = text
|
||||
Details:BrokerTick()
|
||||
if (_G.DetailsOptionsWindow) then
|
||||
local dataBrokerString = _G["DetailsOptionsWindowTab" .. tabIndex].widget_list_by_type.textentry[1]
|
||||
dataBrokerString:SetText (Details.data_broker_text)
|
||||
dataBrokerString:SetText(Details.data_broker_text)
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -55,7 +55,7 @@ function Details:OpenBrokerTextEditor()
|
||||
end
|
||||
|
||||
local d = DF:NewDropDown (panel, _, "$parentTextOptionsDropdown", "TextOptionsDropdown", 150, 20, buildAddMenu, 1)
|
||||
d:SetPoint ("topright", panel, "topright", -12, -25)
|
||||
d:SetPoint("topright", panel, "topright", -12, -25)
|
||||
d:SetTemplate(DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
|
||||
local optiontable = {"{dmg}", "{dps}", "{dpos}", "{ddiff}", "{heal}", "{hps}", "{hpos}", "{hdiff}", "{time}"}
|
||||
@@ -64,7 +64,7 @@ function Details:OpenBrokerTextEditor()
|
||||
textentry.editbox:Insert (optiontable [option_selected])
|
||||
end,
|
||||
nil, nil, nil, "<-")
|
||||
add_button:SetPoint ("right", d, "left", -2, 0)
|
||||
add_button:SetPoint("right", d, "left", -2, 0)
|
||||
add_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
|
||||
|
||||
@@ -178,8 +178,8 @@ function Details:OpenBrokerTextEditor()
|
||||
end
|
||||
|
||||
local color_button = DF:NewColorPickButton (panel, "$parentButton5", nil, color_func)
|
||||
color_button:SetSize (80, 20)
|
||||
color_button:SetPoint ("topright", panel, "topright", -12, -102)
|
||||
color_button:SetSize(80, 20)
|
||||
color_button:SetPoint("topright", panel, "topright", -12, -102)
|
||||
color_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_COLOR_TOOLTIP"]
|
||||
color_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
|
||||
@@ -188,7 +188,7 @@ function Details:OpenBrokerTextEditor()
|
||||
Details.data_broker_text = text
|
||||
if (_G.DetailsOptionsWindow) then
|
||||
local dataBrokerString = _G["DetailsOptionsWindowTab" .. tabIndex].widget_list_by_type.textentry[1]
|
||||
dataBrokerString:SetText (Details.data_broker_text)
|
||||
dataBrokerString:SetText(Details.data_broker_text)
|
||||
end
|
||||
Details:BrokerTick()
|
||||
panel:Hide()
|
||||
@@ -196,17 +196,17 @@ function Details:OpenBrokerTextEditor()
|
||||
|
||||
local ok_button = DF:NewButton (panel, nil, "$parentButtonOk", nil, 80, 20, done, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_DONE"], 1)
|
||||
ok_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_DONE_TOOLTIP"]
|
||||
ok_button:SetPoint ("topright", panel, "topright", -12, -174)
|
||||
ok_button:SetPoint("topright", panel, "topright", -12, -174)
|
||||
ok_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
|
||||
local reset_button = DF:NewButton (panel, nil, "$parentDefaultOk", nil, 80, 20, function() textentry.editbox:SetText ("") end, nil, nil, nil, "Reset", 1)
|
||||
local reset_button = DF:NewButton (panel, nil, "$parentDefaultOk", nil, 80, 20, function() textentry.editbox:SetText("") end, nil, nil, nil, "Reset", 1)
|
||||
reset_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_RESET_TOOLTIP"]
|
||||
reset_button:SetPoint ("topright", panel, "topright", -100, -152)
|
||||
reset_button:SetPoint("topright", panel, "topright", -100, -152)
|
||||
reset_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
|
||||
local cancel_button = DF:NewButton (panel, nil, "$parentDefaultCancel", nil, 80, 20, function() textentry.editbox:SetText (panel.default_text); done(); end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL"], 1)
|
||||
local cancel_button = DF:NewButton (panel, nil, "$parentDefaultCancel", nil, 80, 20, function() textentry.editbox:SetText(panel.default_text); done(); end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL"], 1)
|
||||
cancel_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL_TOOLTIP"]
|
||||
cancel_button:SetPoint ("topright", panel, "topright", -100, -174)
|
||||
cancel_button:SetPoint("topright", panel, "topright", -100, -174)
|
||||
cancel_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
|
||||
end
|
||||
@@ -215,7 +215,7 @@ function Details:OpenBrokerTextEditor()
|
||||
|
||||
local text = Details.data_broker_text:gsub ("||", "|")
|
||||
panel.default_text = text
|
||||
panel.editbox:SetText (text)
|
||||
panel.editbox:SetText(text)
|
||||
|
||||
panel:Show()
|
||||
end
|
||||
@@ -42,7 +42,7 @@ function Details.CooldownTracking.DisableTracker()
|
||||
end
|
||||
|
||||
|
||||
--> Library Open Raid Callbacks
|
||||
--Library Open Raid Callbacks
|
||||
--callback on the event 'CooldownListUpdate', this is triggered when a player in the group sent the list of cooldowns
|
||||
--@unitId: which unit got updated
|
||||
--@unitCooldows: a table with [spellId] = cooldownInfo
|
||||
@@ -100,10 +100,10 @@ end
|
||||
end
|
||||
|
||||
|
||||
--> Frames
|
||||
--Frames
|
||||
--hide all bars created
|
||||
function Details.CooldownTracking.HideAllBars()
|
||||
for _, bar in ipairs (DetailsOnlineCDTrackerScreenPanel.bars) do
|
||||
for _, bar in ipairs(DetailsOnlineCDTrackerScreenPanel.bars) do
|
||||
bar:ClearAllPoints()
|
||||
bar:Hide()
|
||||
|
||||
@@ -210,7 +210,7 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
--> update cooldown frames based on the amount of players in the group or raid
|
||||
--update cooldown frames based on the amount of players in the group or raid
|
||||
function Details.CooldownTracking.RefreshCooldownFrames()
|
||||
local screenPanel = DetailsOnlineCDTrackerScreenPanel
|
||||
|
||||
@@ -333,7 +333,7 @@ end
|
||||
end
|
||||
|
||||
|
||||
--> Options panel
|
||||
--Options panel
|
||||
|
||||
--initialize the cooldown options window and embed it to Details! options panel
|
||||
function Details:InitializeCDTrackerWindow()
|
||||
|
||||
@@ -4,7 +4,7 @@ local Details = _G.Details
|
||||
local DF = _G.DetailsFramework
|
||||
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
|
||||
|
||||
--> config class colors
|
||||
--config class colors
|
||||
function Details:OpenClassColorsConfig()
|
||||
if (not _G.DetailsClassColorManager) then
|
||||
DF:CreateSimplePanel (UIParent, 300, 425, Loc ["STRING_OPTIONS_CLASSCOLOR_MODIFY"], "DetailsClassColorManager")
|
||||
@@ -13,8 +13,8 @@ function Details:OpenClassColorsConfig()
|
||||
DF:ApplyStandardBackdrop(panel)
|
||||
panel:SetBackdropColor(.1, .1, .1, .9)
|
||||
|
||||
local upper_panel = CreateFrame ("frame", nil, panel,"BackdropTemplate")
|
||||
upper_panel:SetAllPoints (panel)
|
||||
local upper_panel = CreateFrame("frame", nil, panel,"BackdropTemplate")
|
||||
upper_panel:SetAllPoints(panel)
|
||||
upper_panel:SetFrameLevel (panel:GetFrameLevel()+3)
|
||||
|
||||
local y = -50
|
||||
@@ -24,7 +24,7 @@ function Details:OpenClassColorsConfig()
|
||||
Details.class_colors [self.MyObject.my_class][1] = r
|
||||
Details.class_colors [self.MyObject.my_class][2] = g
|
||||
Details.class_colors [self.MyObject.my_class][3] = b
|
||||
Details:RefreshMainWindow (-1, true)
|
||||
Details:RefreshMainWindow(-1, true)
|
||||
end
|
||||
|
||||
local set_color = function(self, button, class, index)
|
||||
@@ -40,7 +40,7 @@ function Details:OpenClassColorsConfig()
|
||||
Details.class_colors [self.MyObject.my_class][1] = r
|
||||
Details.class_colors [self.MyObject.my_class][2] = g
|
||||
Details.class_colors [self.MyObject.my_class][3] = b
|
||||
Details:RefreshMainWindow (-1, true)
|
||||
Details:RefreshMainWindow(-1, true)
|
||||
end
|
||||
|
||||
local on_enter = function(self, capsule)
|
||||
@@ -86,8 +86,8 @@ function Details:OpenClassColorsConfig()
|
||||
button.my_icon = icon
|
||||
button.my_texture = backgroundTexture
|
||||
button.my_class = className
|
||||
button:SetHook ("OnEnter", on_enter)
|
||||
button:SetHook ("OnLeave", on_leave)
|
||||
button:SetHook("OnEnter", on_enter)
|
||||
button:SetHook("OnLeave", on_leave)
|
||||
button:SetClickFunction (reset_color, nil, nil, "RightClick")
|
||||
panel.buttons [className] = button
|
||||
end
|
||||
|
||||
+15
-15
@@ -3,19 +3,19 @@ do
|
||||
local _detalhes = _G._detalhes
|
||||
local DetailsFrameWork = _detalhes.gump
|
||||
local _
|
||||
--> panel
|
||||
--panel
|
||||
|
||||
function _detalhes:CreateCopyPasteWindow()
|
||||
|
||||
local panel = CreateFrame ("frame", "DetailsCopy", UIParent, "ButtonFrameTemplate")
|
||||
panel:SetSize (512, 148)
|
||||
local panel = CreateFrame("frame", "DetailsCopy", UIParent, "ButtonFrameTemplate")
|
||||
panel:SetSize(512, 148)
|
||||
tinsert (UISpecialFrames, "DetailsCopy")
|
||||
panel:SetFrameStrata ("TOOLTIP")
|
||||
panel:SetPoint ("center", UIParent, "center")
|
||||
panel:SetPoint("center", UIParent, "center")
|
||||
panel.locked = false
|
||||
panel:SetToplevel (true)
|
||||
panel:SetMovable (true)
|
||||
panel:SetScript ("OnMouseDown", function(self, button)
|
||||
panel:SetScript("OnMouseDown", function(self, button)
|
||||
if (self.isMoving) then
|
||||
return
|
||||
end
|
||||
@@ -26,7 +26,7 @@ do
|
||||
self.isMoving = true
|
||||
end
|
||||
end)
|
||||
panel:SetScript ("OnMouseUp", function(self, button)
|
||||
panel:SetScript("OnMouseUp", function(self, button)
|
||||
if (self.isMoving and button == "LeftButton") then
|
||||
self:StopMovingOrSizing()
|
||||
self.isMoving = nil
|
||||
@@ -34,19 +34,19 @@ do
|
||||
end)
|
||||
|
||||
DetailsFrameWork:NewImage (panel, "Interface\\AddOns\\Details\\images\\copy", 512, 128, "overlay", nil, "background", "$parentBackGround")
|
||||
panel.background:SetPoint (0, -25)
|
||||
panel.background:SetPoint(0, -25)
|
||||
|
||||
--> title
|
||||
--panel.TitleText:SetText ("Paste & Copy") --10.0 fuck
|
||||
--panel.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]])
|
||||
--title
|
||||
--panel.TitleText:SetText("Paste & Copy") --10.0 fuck
|
||||
--panel.portrait:SetTexture([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]])
|
||||
|
||||
DetailsFrameWork:NewTextEntry (panel, _, "$parentTextEntry", "text", 476, 14)
|
||||
panel.text:SetPoint (20, -127)
|
||||
panel.text:SetHook ("OnEditFocusLost", function() panel:Hide() end)
|
||||
panel.text:SetHook ("OnChar", function() panel:Hide() end)
|
||||
panel.text:SetPoint(20, -127)
|
||||
panel.text:SetHook("OnEditFocusLost", function() panel:Hide() end)
|
||||
panel.text:SetHook("OnChar", function() panel:Hide() end)
|
||||
|
||||
DetailsFrameWork:NewLabel (panel, _, _, "desc", "paste on your web browser address bar", "OptionsFontHighlightSmall", 12)
|
||||
panel.desc:SetPoint (340, -78)
|
||||
DetailsFrameWork:NewLabel(panel, _, _, "desc", "paste on your web browser address bar", "OptionsFontHighlightSmall", 12)
|
||||
panel.desc:SetPoint(340, -78)
|
||||
panel.desc.width = 150
|
||||
panel.desc.height = 25
|
||||
panel.desc.align = "|"
|
||||
|
||||
+101
-101
@@ -17,9 +17,9 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
|
||||
local DF = _detalhes.gump
|
||||
|
||||
local f = DF:CreateSimplePanel (UIParent, 700, 400, "Details! Arena Damage Bar Options", "DetailsCurrentRealDPSOptions")
|
||||
f:SetPoint ("center", UIParent, "center")
|
||||
f:SetScript ("OnMouseDown", nil)
|
||||
f:SetScript ("OnMouseUp", nil)
|
||||
f:SetPoint("center", UIParent, "center")
|
||||
f:SetScript("OnMouseDown", nil)
|
||||
f:SetScript("OnMouseUp", nil)
|
||||
|
||||
--scale bar
|
||||
local scaleBar = DF:CreateScaleBar(f, _detalhes.realtime_dps_meter.options_frame)
|
||||
@@ -51,7 +51,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
|
||||
|
||||
local testUsing = "arena" --mythicdungeon
|
||||
|
||||
--> frame strata options
|
||||
--frame strata options
|
||||
local set_frame_strata = function(_, _, strata)
|
||||
Details.realtime_dps_meter.frame_settings.strata = strata
|
||||
Details:UpdateTheRealCurrentDPSFrame(testUsing)
|
||||
@@ -63,7 +63,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
|
||||
strataTable [4] = {value = "HIGH", label = "HIGH", onclick = set_frame_strata}
|
||||
strataTable [5] = {value = "DIALOG", label = "DIALOG", onclick = set_frame_strata}
|
||||
|
||||
--> font options
|
||||
--font options
|
||||
local set_font_shadow= function(_, _, shadow)
|
||||
Details.realtime_dps_meter.font_shadow = shadow
|
||||
Details:UpdateTheRealCurrentDPSFrame(testUsing)
|
||||
@@ -91,7 +91,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
|
||||
end
|
||||
end
|
||||
|
||||
--> options table
|
||||
--options table
|
||||
local options = {
|
||||
|
||||
{type = "label", get = function() return "Frame Settings:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
|
||||
@@ -289,17 +289,17 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
|
||||
|
||||
DF:BuildMenu (f, options, 7, -50, 500, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
|
||||
|
||||
f:SetScript ("OnHide" , function()
|
||||
f:SetScript("OnHide" , function()
|
||||
if (DetailsCurrentDpsMeter) then
|
||||
--> check if can hide the main frame as well
|
||||
--> we force show the main frame for the user see the frame while editing the options
|
||||
--check if can hide the main frame as well
|
||||
--we force show the main frame for the user see the frame while editing the options
|
||||
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
|
||||
if ((instanceType ~= "party" and difficultyID ~= 8) and instanceType ~= "arena") then
|
||||
DetailsCurrentDpsMeter:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
--> reopen the options panel
|
||||
--reopen the options panel
|
||||
if (f.FromOptionsPanel) then
|
||||
C_Timer.After (0.2, function()
|
||||
Details:OpenOptionsWindow(Details:GetInstance(1))
|
||||
@@ -310,17 +310,17 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
|
||||
C_Timer.After(1, lockCallback)
|
||||
end
|
||||
|
||||
--> check if the frame was been created
|
||||
--check if the frame was been created
|
||||
if (not DetailsCurrentDpsMeter) then
|
||||
Details:CreateCurrentDpsFrame(UIParent, "DetailsCurrentDpsMeter")
|
||||
end
|
||||
|
||||
--> show the options
|
||||
--show the options
|
||||
DetailsCurrentRealDPSOptions:Show()
|
||||
DetailsCurrentRealDPSOptions:RefreshOptions()
|
||||
DetailsCurrentRealDPSOptions.FromOptionsPanel = from_options_panel
|
||||
|
||||
--> start the frame for viewing while editing the options
|
||||
--start the frame for viewing while editing the options
|
||||
DetailsCurrentDpsMeter:StartForArenaMatch()
|
||||
end
|
||||
|
||||
@@ -333,17 +333,17 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
green_team_color = Details.class_colors.ARENA_GREEN --{.5, 1, .5, 1}
|
||||
yellow_team_color = Details.class_colors.ARENA_YELLOW --{1, 1, .5, 1}
|
||||
|
||||
--> some constants
|
||||
--some constants
|
||||
local header_size = 12 --title bar size
|
||||
local spacing_vertical = -6 --vertical space between the group anchor and the group dps
|
||||
|
||||
--> main farame
|
||||
local f = CreateFrame ("frame", name, parent or UIParent, "BackdropTemplate")
|
||||
f:SetPoint ("top", UIParent, "top", 0, -110)
|
||||
f:SetSize (_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height)
|
||||
--main farame
|
||||
local f = CreateFrame("frame", name, parent or UIParent, "BackdropTemplate")
|
||||
f:SetPoint("top", UIParent, "top", 0, -110)
|
||||
f:SetSize(_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height)
|
||||
|
||||
f:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
|
||||
f:SetBackdropColor (unpack (_detalhes.realtime_dps_meter.frame_settings.backdrop_color))
|
||||
f:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
|
||||
f:SetBackdropColor(unpack (_detalhes.realtime_dps_meter.frame_settings.backdrop_color))
|
||||
f:EnableMouse (true)
|
||||
f:SetMovable (true)
|
||||
f:SetClampedToScreen (true)
|
||||
@@ -404,7 +404,7 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
end
|
||||
end)
|
||||
|
||||
--> arena dps bars
|
||||
--arena dps bars
|
||||
--code for the dps bars shown in arenas
|
||||
|
||||
--frame to support the two bars, one for the dps and another for heal
|
||||
@@ -463,26 +463,26 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
rightOrnamentTexture:SetSize(32, 32)
|
||||
rightOrnamentTexture:SetAlpha(0.6)
|
||||
|
||||
--> title bar
|
||||
--title bar
|
||||
local TitleString = f:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
TitleString:SetPoint ("top", f, "top", 0, -5)
|
||||
TitleString:SetText ("Details! Arena Real Time DPS Tracker")
|
||||
TitleString:SetPoint("top", f, "top", 0, -5)
|
||||
TitleString:SetText("Details! Arena Real Time DPS Tracker")
|
||||
DF:SetFontSize (TitleString, 9)
|
||||
local TitleBackground = f:CreateTexture (nil, "artwork")
|
||||
TitleBackground:SetTexture ([[Interface\Tooltips\UI-Tooltip-Background]])
|
||||
local TitleBackground = f:CreateTexture(nil, "artwork")
|
||||
TitleBackground:SetTexture([[Interface\Tooltips\UI-Tooltip-Background]])
|
||||
TitleBackground:SetVertexColor (.1, .1, .1, .9)
|
||||
TitleBackground:SetVertexColor (.1, .1, .1, 0)
|
||||
TitleBackground:SetPoint ("topleft", f, "topleft")
|
||||
TitleBackground:SetPoint ("topright", f, "topright")
|
||||
TitleBackground:SetHeight (header_size)
|
||||
TitleBackground:SetPoint("topleft", f, "topleft")
|
||||
TitleBackground:SetPoint("topright", f, "topright")
|
||||
TitleBackground:SetHeight(header_size)
|
||||
|
||||
--> labels for arena
|
||||
--labels for arena
|
||||
local labelPlayerTeam_DPS = barFrame.splitBar:CreateFontString(nil, "overlay", "GameFontNormal")
|
||||
local labelYellowTeam_DPS = barFrame.splitBar:CreateFontString(nil, "overlay", "GameFontNormal")
|
||||
labelPlayerTeam_DPS:SetText ("0")
|
||||
labelYellowTeam_DPS:SetText ("0")
|
||||
labelPlayerTeam_DPS:SetPoint ("left", barFrame.splitBar.widget, "left", 4, 0)
|
||||
labelYellowTeam_DPS:SetPoint ("right", barFrame.splitBar.widget, "right", -4, 0)
|
||||
labelPlayerTeam_DPS:SetText("0")
|
||||
labelYellowTeam_DPS:SetText("0")
|
||||
labelPlayerTeam_DPS:SetPoint("left", barFrame.splitBar.widget, "left", 4, 0)
|
||||
labelYellowTeam_DPS:SetPoint("right", barFrame.splitBar.widget, "right", -4, 0)
|
||||
|
||||
function f.SwapArenaTeamColors()
|
||||
green_team_color = Details.class_colors.ARENA_GREEN
|
||||
@@ -497,27 +497,27 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
end
|
||||
end
|
||||
|
||||
--> labels for mythic dungeon / group party
|
||||
--labels for mythic dungeon / group party
|
||||
local labelGroupDamage = f:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
labelGroupDamage:SetText ("Real Time Group DPS")
|
||||
labelGroupDamage:SetText("Real Time Group DPS")
|
||||
DF:SetFontSize (labelGroupDamage, 14)
|
||||
DF:SetFontOutline (labelGroupDamage, "NONE")
|
||||
|
||||
local labelGroupDamage_DPS = f:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
labelGroupDamage_DPS:SetText ("0")
|
||||
labelGroupDamage_DPS:SetText("0")
|
||||
|
||||
labelGroupDamage:SetPoint ("center", f, "center", 0, 10)
|
||||
labelGroupDamage_DPS:SetPoint ("center", labelGroupDamage, "center")
|
||||
labelGroupDamage_DPS:SetPoint ("top", labelGroupDamage, "bottom", 0, spacing_vertical)
|
||||
labelGroupDamage:SetPoint("center", f, "center", 0, 10)
|
||||
labelGroupDamage_DPS:SetPoint("center", labelGroupDamage, "center")
|
||||
labelGroupDamage_DPS:SetPoint("top", labelGroupDamage, "bottom", 0, spacing_vertical)
|
||||
|
||||
--> frame update function
|
||||
--frame update function
|
||||
|
||||
--> update
|
||||
--update
|
||||
local time_fraction = 100/1000 --one tick per 100ms
|
||||
f.NextUpdate = time_fraction --when the next tick occur
|
||||
f.NextScreenUpdate = _detalhes.realtime_dps_meter.update_interval --when the labels on the frame receive update
|
||||
|
||||
--> arena
|
||||
--arena
|
||||
f.PlayerTeamBuffer = {}
|
||||
f.YellowTeamBuffer = {}
|
||||
f.PlayerTeamDamage = 0
|
||||
@@ -525,18 +525,18 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
f.LastPlayerTeamDamage = 0
|
||||
f.LastYellowDamage = 0
|
||||
|
||||
--> mythic dungeon / party group
|
||||
--mythic dungeon / party group
|
||||
f.GroupBuffer = {}
|
||||
f.GroupTotalDamage = 0
|
||||
f.LastTickGroupDamage = 0
|
||||
|
||||
--> general
|
||||
--general
|
||||
f.SampleSize = _detalhes.realtime_dps_meter.sample_size
|
||||
f.MaxBufferIndex = 1
|
||||
f.ShowingArena = false
|
||||
|
||||
function _detalhes:UpdateTheRealCurrentDPSFrame(scenario)
|
||||
--> don't run if the featured hasn't loaded
|
||||
--don't run if the featured hasn't loaded
|
||||
if (not f) then
|
||||
return
|
||||
end
|
||||
@@ -553,7 +553,7 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
return
|
||||
end
|
||||
|
||||
--> where the player are
|
||||
--where the player are
|
||||
if (scenario == "arena") then
|
||||
|
||||
f.SampleSize = _detalhes.realtime_dps_meter.sample_size
|
||||
@@ -561,26 +561,26 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
labelPlayerTeam_DPS:Show()
|
||||
labelYellowTeam_DPS:Show()
|
||||
|
||||
--> update arena labels
|
||||
DF:SetFontColor (labelPlayerTeam_DPS, _detalhes.realtime_dps_meter.font_color)
|
||||
--update arena labels
|
||||
DF:SetFontColor(labelPlayerTeam_DPS, _detalhes.realtime_dps_meter.font_color)
|
||||
DF:SetFontFace (labelPlayerTeam_DPS, _detalhes.realtime_dps_meter.font_face)
|
||||
DF:SetFontSize (labelPlayerTeam_DPS, _detalhes.realtime_dps_meter.font_size)
|
||||
DF:SetFontOutline (labelPlayerTeam_DPS, _detalhes.realtime_dps_meter.font_shadow)
|
||||
|
||||
DF:SetFontColor (labelYellowTeam_DPS, _detalhes.realtime_dps_meter.font_color)
|
||||
DF:SetFontColor(labelYellowTeam_DPS, _detalhes.realtime_dps_meter.font_color)
|
||||
DF:SetFontFace (labelYellowTeam_DPS, _detalhes.realtime_dps_meter.font_face)
|
||||
DF:SetFontSize (labelYellowTeam_DPS, _detalhes.realtime_dps_meter.font_size)
|
||||
DF:SetFontOutline (labelYellowTeam_DPS, _detalhes.realtime_dps_meter.font_shadow)
|
||||
|
||||
--> wipe current data for arena
|
||||
--wipe current data for arena
|
||||
wipe (f.PlayerTeamBuffer)
|
||||
wipe (f.YellowTeamBuffer)
|
||||
|
||||
--> reset damage
|
||||
--reset damage
|
||||
f.PlayerTeamDamage = 0
|
||||
f.YellowDamage = 0
|
||||
|
||||
--> reset last tick damage
|
||||
--reset last tick damage
|
||||
f.LastPlayerTeamDamage = 0
|
||||
f.LastYellowDamage = 0
|
||||
|
||||
@@ -606,18 +606,18 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
labelGroupDamage:Show()
|
||||
labelGroupDamage_DPS:Show()
|
||||
|
||||
DF:SetFontColor (labelGroupDamage_DPS, _detalhes.realtime_dps_meter.font_color)
|
||||
DF:SetFontColor(labelGroupDamage_DPS, _detalhes.realtime_dps_meter.font_color)
|
||||
DF:SetFontFace (labelGroupDamage_DPS, _detalhes.realtime_dps_meter.font_face)
|
||||
DF:SetFontSize (labelGroupDamage_DPS, _detalhes.realtime_dps_meter.font_size)
|
||||
DF:SetFontOutline (labelGroupDamage_DPS, _detalhes.realtime_dps_meter.font_shadow)
|
||||
|
||||
--> wipe current data for mythic dungeon
|
||||
--wipe current data for mythic dungeon
|
||||
f.GroupBuffer = {}
|
||||
|
||||
--> reset damage
|
||||
--reset damage
|
||||
f.GroupTotalDamage = 0
|
||||
|
||||
--> reset last tick damage
|
||||
--reset last tick damage
|
||||
f.LastTickGroupDamage = 0
|
||||
|
||||
--show the frame
|
||||
@@ -630,25 +630,25 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
labelYellowTeam_DPS:Hide()
|
||||
end
|
||||
|
||||
--> frame position
|
||||
f:SetSize (_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height)
|
||||
--frame position
|
||||
f:SetSize(_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height)
|
||||
LibWindow.RegisterConfig (f, _detalhes.realtime_dps_meter.frame_settings)
|
||||
LibWindow.RestorePosition (f)
|
||||
|
||||
--> backdrop color
|
||||
f:SetBackdropColor (unpack (_detalhes.realtime_dps_meter.frame_settings.backdrop_color))
|
||||
--backdrop color
|
||||
f:SetBackdropColor(unpack (_detalhes.realtime_dps_meter.frame_settings.backdrop_color))
|
||||
|
||||
--> set frame size
|
||||
f:SetSize (_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height)
|
||||
--set frame size
|
||||
f:SetSize(_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height)
|
||||
|
||||
--> frame is locked
|
||||
--frame is locked
|
||||
if (_detalhes.realtime_dps_meter.frame_settings.locked) then
|
||||
f:EnableMouse (false)
|
||||
else
|
||||
f:EnableMouse (true)
|
||||
end
|
||||
|
||||
--> frame can show title
|
||||
--frame can show title
|
||||
if (_detalhes.realtime_dps_meter.frame_settings.show_title) then
|
||||
TitleString:Show()
|
||||
TitleBackground:Show()
|
||||
@@ -657,13 +657,13 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
TitleBackground:Hide()
|
||||
end
|
||||
|
||||
--> frame strata
|
||||
--frame strata
|
||||
f:SetFrameStrata (_detalhes.realtime_dps_meter.frame_settings.strata)
|
||||
|
||||
--> calcule buffer size
|
||||
--calcule buffer size
|
||||
f.MaxBufferIndex = f.SampleSize * time_fraction * 100 --sample size in seconds * fraction * tick milliseconds
|
||||
|
||||
--> interval to update the frame
|
||||
--interval to update the frame
|
||||
f.NextScreenUpdate = _detalhes.realtime_dps_meter.update_interval
|
||||
|
||||
|
||||
@@ -677,13 +677,13 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
self.NextUpdate = self.NextUpdate - deltaTime
|
||||
|
||||
if (self.NextUpdate <= 0) then
|
||||
--> update string
|
||||
--update string
|
||||
local currentCombat = _detalhes:GetCombat()
|
||||
local damageContainer = currentCombat:GetContainer (DETAILS_ATTRIBUTE_DAMAGE)
|
||||
|
||||
--> show the current dps during an arena match
|
||||
--show the current dps during an arena match
|
||||
if (self.ShowingArena) then
|
||||
--> the team damage done at this tick
|
||||
--the team damage done at this tick
|
||||
local thisTickPlayerTeamDamage = 0
|
||||
local thisTickYellowDamage = 0
|
||||
|
||||
@@ -699,7 +699,7 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
end
|
||||
|
||||
if (actor.nome == _detalhes.playername) then
|
||||
--> if player isn't in green team > swap colors
|
||||
--if player isn't in green team > swap colors
|
||||
if (f.PlayerTeam ~= actor.arena_team) then
|
||||
f.SwapArenaTeamColors()
|
||||
f.PlayerTeam = actor.arena_team
|
||||
@@ -708,41 +708,41 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
end
|
||||
end
|
||||
|
||||
--> calculate how much damage the team made on this tick
|
||||
--calculate how much damage the team made on this tick
|
||||
local playerTeamDamageDone = thisTickPlayerTeamDamage - f.LastPlayerTeamDamage
|
||||
local yellowDamageDone = thisTickYellowDamage - f.LastYellowDamage
|
||||
|
||||
--> add the damage to buffer
|
||||
--add the damage to buffer
|
||||
tinsert (f.PlayerTeamBuffer, 1, playerTeamDamageDone)
|
||||
tinsert (f.YellowTeamBuffer, 1, yellowDamageDone)
|
||||
|
||||
--> save the current damage amount
|
||||
--save the current damage amount
|
||||
f.LastPlayerTeamDamage = thisTickPlayerTeamDamage
|
||||
f.LastYellowDamage = thisTickYellowDamage
|
||||
|
||||
--> add the damage to current total damage
|
||||
--add the damage to current total damage
|
||||
f.PlayerTeamDamage = f.PlayerTeamDamage + playerTeamDamageDone
|
||||
f.YellowDamage = f.YellowDamage + yellowDamageDone
|
||||
|
||||
--> remove player team damage
|
||||
--remove player team damage
|
||||
local removedDamage = tremove (f.PlayerTeamBuffer, f.MaxBufferIndex+1)
|
||||
if (removedDamage) then
|
||||
f.PlayerTeamDamage = f.PlayerTeamDamage - removedDamage
|
||||
--> be save
|
||||
--be save
|
||||
f.PlayerTeamDamage = max (0, f.PlayerTeamDamage)
|
||||
end
|
||||
|
||||
--> remove yellow damage
|
||||
--remove yellow damage
|
||||
local removedDamage = tremove (f.YellowTeamBuffer, f.MaxBufferIndex+1)
|
||||
if (removedDamage) then
|
||||
f.YellowDamage = f.YellowDamage - removedDamage
|
||||
--> be save
|
||||
--be save
|
||||
f.YellowDamage = max (0, f.YellowDamage)
|
||||
end
|
||||
|
||||
self.NextScreenUpdate = self.NextScreenUpdate - time_fraction --always 0.1
|
||||
|
||||
--> update double bar
|
||||
--update double bar
|
||||
local teamGreenDps = self.PlayerTeamDamage / self.SampleSize
|
||||
local teamYellowDps = self.YellowDamage / self.SampleSize
|
||||
local totalDamage = teamGreenDps + teamYellowDps
|
||||
@@ -784,11 +784,11 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
|
||||
if (self.NextScreenUpdate <= 0) then
|
||||
if (f.PlayerTeam == 0) then
|
||||
labelPlayerTeam_DPS:SetText (_detalhes:ToK2 (self.PlayerTeamDamage / self.SampleSize))
|
||||
labelYellowTeam_DPS:SetText (_detalhes:ToK2 (self.YellowDamage / self.SampleSize))
|
||||
labelPlayerTeam_DPS:SetText(_detalhes:ToK2 (self.PlayerTeamDamage / self.SampleSize))
|
||||
labelYellowTeam_DPS:SetText(_detalhes:ToK2 (self.YellowDamage / self.SampleSize))
|
||||
else
|
||||
labelPlayerTeam_DPS:SetText (_detalhes:ToK2 (self.YellowDamage / self.SampleSize))
|
||||
labelYellowTeam_DPS:SetText (_detalhes:ToK2 (self.PlayerTeamDamage / self.SampleSize))
|
||||
labelPlayerTeam_DPS:SetText(_detalhes:ToK2 (self.YellowDamage / self.SampleSize))
|
||||
labelYellowTeam_DPS:SetText(_detalhes:ToK2 (self.PlayerTeamDamage / self.SampleSize))
|
||||
end
|
||||
f.NextScreenUpdate = _detalhes.realtime_dps_meter.update_interval
|
||||
end
|
||||
@@ -798,7 +798,7 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
--iniciava um novo combate e tinha o buffer do combate anterior
|
||||
--ent�o dava o total de dano do combate recente menos o que tinha no buffer do round anterior
|
||||
|
||||
--> the party damage done at this tick
|
||||
--the party damage done at this tick
|
||||
local thisTickGroupDamage = 0
|
||||
|
||||
for i, actor in damageContainer:ListActors() do
|
||||
@@ -807,44 +807,44 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
end
|
||||
end
|
||||
|
||||
--> calculate how much damage the team made on this tick
|
||||
--calculate how much damage the team made on this tick
|
||||
local groupDamageDoneOnThisTick = thisTickGroupDamage - f.LastTickGroupDamage
|
||||
|
||||
--> add the damage to buffer
|
||||
--add the damage to buffer
|
||||
tinsert (f.GroupBuffer, 1, groupDamageDoneOnThisTick)
|
||||
|
||||
--> save the current damage amount
|
||||
--save the current damage amount
|
||||
f.LastTickGroupDamage = thisTickGroupDamage
|
||||
|
||||
--> add the damage to current total damage
|
||||
--add the damage to current total damage
|
||||
f.GroupTotalDamage = f.GroupTotalDamage + groupDamageDoneOnThisTick
|
||||
|
||||
--> cicle buffer removing the last index and subtract its damage
|
||||
--cicle buffer removing the last index and subtract its damage
|
||||
local removedDamage = tremove (f.GroupBuffer, f.MaxBufferIndex+1)
|
||||
if (removedDamage) then
|
||||
--> remove the value from the total damage
|
||||
--remove the value from the total damage
|
||||
f.GroupTotalDamage = f.GroupTotalDamage - removedDamage
|
||||
--> be save
|
||||
--be save
|
||||
f.GroupTotalDamage = max (0, f.GroupTotalDamage)
|
||||
end
|
||||
|
||||
self.NextScreenUpdate = self.NextScreenUpdate - time_fraction
|
||||
if (self.NextScreenUpdate <= 0) then
|
||||
labelGroupDamage_DPS:SetText (_detalhes:ToK2 (f.GroupTotalDamage / self.SampleSize))
|
||||
labelGroupDamage_DPS:SetText(_detalhes:ToK2 (f.GroupTotalDamage / self.SampleSize))
|
||||
f.NextScreenUpdate = _detalhes.realtime_dps_meter.update_interval
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--> set next update time
|
||||
--set next update time
|
||||
self.NextUpdate = time_fraction
|
||||
end
|
||||
end
|
||||
|
||||
f:SetScript ("OnHide", function()
|
||||
f:SetScript("OnHide", function()
|
||||
f.ShowingArena = false
|
||||
f.ShowingMythicDungeon = false
|
||||
f:SetScript ("OnUpdate", nil)
|
||||
f:SetScript("OnUpdate", nil)
|
||||
end)
|
||||
|
||||
function f:StartForArenaMatch()
|
||||
@@ -853,14 +853,14 @@ function Details:CreateCurrentDpsFrame(parent, name)
|
||||
Details:UpdateTheRealCurrentDPSFrame("arena")
|
||||
|
||||
f.ShowingArena = true
|
||||
f:SetScript ("OnUpdate", on_tick)
|
||||
f:SetScript("OnUpdate", on_tick)
|
||||
end
|
||||
end
|
||||
|
||||
function f:StartForMythicDungeon()
|
||||
if (not f.ShowingMythicDungeon) then
|
||||
f.ShowingMythicDungeon = true
|
||||
f:SetScript ("OnUpdate", on_tick)
|
||||
f:SetScript("OnUpdate", on_tick)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -915,7 +915,7 @@ end
|
||||
|
||||
function DetailsTestSplitBar()
|
||||
|
||||
--> create the frame
|
||||
--create the frame
|
||||
local f = CreateFrame("frame", "DetailsTestSplitBarFrame", UIParent)
|
||||
f:SetSize(400, 200)
|
||||
f:SetPoint("center")
|
||||
@@ -939,7 +939,7 @@ function DetailsTestSplitBar()
|
||||
barFrame.splitBar:SetLeftColor(unpack (green_team_color))
|
||||
barFrame.splitBar:SetRightColor(unpack (yellow_team_color))
|
||||
|
||||
--> test the splitbar
|
||||
--test the splitbar
|
||||
local loopTime = 0.1
|
||||
f:SetScript("OnUpdate", function(self, deltaTime)
|
||||
loopTime = loopTime - deltaTime
|
||||
|
||||
+338
-338
File diff suppressed because it is too large
Load Diff
@@ -57,7 +57,7 @@ DF:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_BUTTON", {
|
||||
backdropbordercolor = {0, 0, 0, 1},
|
||||
})
|
||||
|
||||
DF:NewColor ("DETAILS_CUSTOMDISPLAY_ICON", .7, .6, .5, 1)
|
||||
DF:NewColor("DETAILS_CUSTOMDISPLAY_ICON", .7, .6, .5, 1)
|
||||
|
||||
local CONST_CODETEXTENTRY_TEMPLATE = DF:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX")
|
||||
local CONST_CODETEXTENTRYEXPANDED_TEMPLATE = DF:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_EXPANDED")
|
||||
|
||||
+27
-27
@@ -5,7 +5,7 @@ local DetailsFramework = _G.DetailsFramework
|
||||
local C_Timer = _G.C_Timer
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> dump table frame
|
||||
--dump table frame
|
||||
|
||||
function Details:DumpTable (t)
|
||||
return Details:Dump (t)
|
||||
@@ -20,24 +20,24 @@ end
|
||||
function Details:Dump (...)
|
||||
if (not DetailsDumpFrame) then
|
||||
DetailsDumpFrame = DetailsFramework:CreateSimplePanel (_G.UIParent)
|
||||
DetailsDumpFrame:SetSize (700, 600)
|
||||
DetailsDumpFrame:SetSize(700, 600)
|
||||
DetailsDumpFrame:SetTitle ("Details! Dump Table [|cFFFF3333Ready Only|r]")
|
||||
|
||||
local text_editor = DetailsFramework:NewSpecialLuaEditorEntry (DetailsDumpFrame, 680, 560, "Editbox", "$parentEntry", true)
|
||||
text_editor:SetPoint ("topleft", DetailsDumpFrame, "topleft", 10, -30)
|
||||
text_editor:SetPoint("topleft", DetailsDumpFrame, "topleft", 10, -30)
|
||||
|
||||
text_editor.scroll:SetBackdrop (nil)
|
||||
text_editor.editbox:SetBackdrop (nil)
|
||||
text_editor:SetBackdrop (nil)
|
||||
text_editor.scroll:SetBackdrop(nil)
|
||||
text_editor.editbox:SetBackdrop(nil)
|
||||
text_editor:SetBackdrop(nil)
|
||||
|
||||
DetailsFramework:ReskinSlider(text_editor.scroll)
|
||||
|
||||
if (not text_editor.__background) then
|
||||
text_editor.__background = text_editor:CreateTexture (nil, "background")
|
||||
text_editor.__background = text_editor:CreateTexture(nil, "background")
|
||||
end
|
||||
|
||||
text_editor:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
text_editor:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
text_editor:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
text_editor:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
text_editor.__background:SetColorTexture (0.2317647, 0.2317647, 0.2317647)
|
||||
text_editor.__background:SetVertexColor (0.27, 0.27, 0.27)
|
||||
@@ -69,7 +69,7 @@ end
|
||||
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> import export window
|
||||
--import export window
|
||||
--show a window with a big text editor and 2 buttons: okay and cancel.
|
||||
--cancel button always closes the window and okay calls the comfirm function passed in the argument
|
||||
--default text is the text shown show the window is show()
|
||||
@@ -82,27 +82,27 @@ function _detalhes:ShowImportWindow (defaultText, confirmFunc, titleText)
|
||||
if (not _G.DetailsExportWindow) then
|
||||
local importWindow = DetailsFramework:CreateSimplePanel (_G.UIParent, 800, 610, "Details! Dump String", "DetailsExportWindow")
|
||||
importWindow:SetFrameStrata ("FULLSCREEN")
|
||||
importWindow:SetPoint ("center")
|
||||
importWindow:SetPoint("center")
|
||||
DetailsFramework:ApplyStandardBackdrop (importWindow, false, 1.2)
|
||||
|
||||
local importTextEditor = DetailsFramework:NewSpecialLuaEditorEntry (importWindow, 780, 540, "ImportEditor", "$parentEditor", true)
|
||||
importTextEditor:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
importTextEditor:SetBackdropColor (.2, .2, .2, .5)
|
||||
importTextEditor:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
importTextEditor:SetPoint ("topleft", importWindow, "topleft", 10, -30)
|
||||
importTextEditor:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
importTextEditor:SetBackdropColor(.2, .2, .2, .5)
|
||||
importTextEditor:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
importTextEditor:SetPoint("topleft", importWindow, "topleft", 10, -30)
|
||||
|
||||
importTextEditor.scroll:SetBackdrop (nil)
|
||||
importTextEditor.editbox:SetBackdrop (nil)
|
||||
importTextEditor:SetBackdrop (nil)
|
||||
importTextEditor.scroll:SetBackdrop(nil)
|
||||
importTextEditor.editbox:SetBackdrop(nil)
|
||||
importTextEditor:SetBackdrop(nil)
|
||||
|
||||
DetailsFramework:ReskinSlider(importTextEditor.scroll)
|
||||
|
||||
if (not importTextEditor.__background) then
|
||||
importTextEditor.__background = importTextEditor:CreateTexture (nil, "background")
|
||||
importTextEditor.__background = importTextEditor:CreateTexture(nil, "background")
|
||||
end
|
||||
|
||||
importTextEditor:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
importTextEditor:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
importTextEditor:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
importTextEditor:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
importTextEditor.__background:SetColorTexture (0.2317647, 0.2317647, 0.2317647)
|
||||
importTextEditor.__background:SetVertexColor (0.27, 0.27, 0.27)
|
||||
@@ -118,25 +118,25 @@ function _detalhes:ShowImportWindow (defaultText, confirmFunc, titleText)
|
||||
end
|
||||
importWindow:Hide()
|
||||
end
|
||||
local okayButton = DetailsFramework:CreateButton (importTextEditor, onClickImportButton, 120, 20, "Okay", -1, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), _detalhes.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")) --> localize-me
|
||||
local okayButton = DetailsFramework:CreateButton (importTextEditor, onClickImportButton, 120, 20, "Okay", -1, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), _detalhes.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")) --localize-me
|
||||
okayButton:SetIcon ([[Interface\BUTTONS\UI-Panel-BiggerButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9})
|
||||
importTextEditor.OkayButton = okayButton
|
||||
|
||||
--cancel button
|
||||
local cancelButton = DetailsFramework:CreateButton (importTextEditor, function() importWindow:Hide() end, 120, 20, "Cancel", -1, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), _detalhes.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")) --> localize-me
|
||||
local cancelButton = DetailsFramework:CreateButton (importTextEditor, function() importWindow:Hide() end, 120, 20, "Cancel", -1, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), _detalhes.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")) --localize-me
|
||||
cancelButton:SetIcon ([[Interface\BUTTONS\UI-Panel-MinimizeButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9})
|
||||
|
||||
okayButton:SetPoint ("topright", importTextEditor, "bottomright", 0, -10)
|
||||
cancelButton:SetPoint ("right", okayButton, "left", -20, 0)
|
||||
okayButton:SetPoint("topright", importTextEditor, "bottomright", 0, -10)
|
||||
cancelButton:SetPoint("right", okayButton, "left", -20, 0)
|
||||
|
||||
end
|
||||
|
||||
_G.DetailsExportWindow.ConfirmFunction = confirmFunc
|
||||
_G.DetailsExportWindow.ImportEditor:SetText (defaultText or "")
|
||||
_G.DetailsExportWindow.ImportEditor:SetText(defaultText or "")
|
||||
_G.DetailsExportWindow:Show()
|
||||
|
||||
titleText = titleText or "Details! Dump String"
|
||||
_G.DetailsExportWindow.Title:SetText (titleText)
|
||||
_G.DetailsExportWindow.Title:SetText(titleText)
|
||||
|
||||
C_Timer.After (.2, function()
|
||||
_G.DetailsExportWindow.ImportEditor:SetFocus (true)
|
||||
|
||||
+136
-136
@@ -11,9 +11,9 @@ function Details:OpenEventTrackerOptions (from_options_panel)
|
||||
local DF = _detalhes.gump
|
||||
|
||||
local f = DF:CreateSimplePanel (_G.UIParent, 700, 400, "Details! Event Tracker Options", "DetailsEventTrackerOptions")
|
||||
f:SetPoint ("center", _G.UIParent, "center")
|
||||
f:SetScript ("OnMouseDown", nil)
|
||||
f:SetScript ("OnMouseUp", nil)
|
||||
f:SetPoint("center", _G.UIParent, "center")
|
||||
f:SetScript("OnMouseDown", nil)
|
||||
f:SetScript("OnMouseUp", nil)
|
||||
local LibWindow = _G.LibStub("LibWindow-1.1")
|
||||
LibWindow.RegisterConfig (f, _detalhes.event_tracker.options_frame)
|
||||
LibWindow.MakeDraggable (f)
|
||||
@@ -25,7 +25,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
|
||||
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
|
||||
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
|
||||
--> frame strata options
|
||||
--frame strata options
|
||||
local set_frame_strata = function(_, _, strata)
|
||||
Details.event_tracker.frame.strata = strata
|
||||
Details:UpdateEventTrackerFrame()
|
||||
@@ -37,7 +37,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
|
||||
strataTable [4] = {value = "HIGH", label = "HIGH", onclick = set_frame_strata}
|
||||
strataTable [5] = {value = "DIALOG", label = "DIALOG", onclick = set_frame_strata}
|
||||
|
||||
--> font options
|
||||
--font options
|
||||
local set_font_shadow= function(_, _, shadow)
|
||||
Details.event_tracker.font_shadow = shadow
|
||||
Details:UpdateEventTrackerFrame()
|
||||
@@ -52,7 +52,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
|
||||
Details:UpdateEventTrackerFrame()
|
||||
end
|
||||
|
||||
--> texture options
|
||||
--texture options
|
||||
local set_bar_texture = function(_, _, value)
|
||||
Details.event_tracker.line_texture = value
|
||||
Details:UpdateEventTrackerFrame()
|
||||
@@ -66,7 +66,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
|
||||
end
|
||||
table.sort (texTable, function(t1, t2) return t1.label < t2.label end)
|
||||
|
||||
--> options table
|
||||
--options table
|
||||
local options = {
|
||||
|
||||
{type = "label", get = function() return "Frame Settings:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
|
||||
@@ -214,8 +214,8 @@ function Details:OpenEventTrackerOptions (from_options_panel)
|
||||
|
||||
DF:BuildMenu (f, options, 7, -30, 500, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
|
||||
|
||||
f:SetScript ("OnHide", function()
|
||||
--> reopen the options panel
|
||||
f:SetScript("OnHide", function()
|
||||
--reopen the options panel
|
||||
if (f.FromOptionsPanel) then
|
||||
C_Timer.After (0.2, function()
|
||||
Details:OpenOptionsWindow(Details:GetInstance(1))
|
||||
@@ -235,9 +235,9 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
local DF = _detalhes.gump
|
||||
local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
|
||||
|
||||
--> main farame
|
||||
local f = CreateFrame ("frame", name, parent or UIParent,"BackdropTemplate")
|
||||
f:SetPoint ("center", UIParent, "center")
|
||||
--main farame
|
||||
local f = CreateFrame("frame", name, parent or UIParent,"BackdropTemplate")
|
||||
f:SetPoint("center", UIParent, "center")
|
||||
|
||||
if (not DetailsFramework.IsDragonflight()) then
|
||||
f:SetMinResize (150, 40)
|
||||
@@ -246,13 +246,13 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
--f:SetResizeBounds(150, 40, 800, 1024)
|
||||
end
|
||||
|
||||
f:SetSize (_detalhes.event_tracker.frame.width, _detalhes.event_tracker.frame.height)
|
||||
f:SetSize(_detalhes.event_tracker.frame.width, _detalhes.event_tracker.frame.height)
|
||||
|
||||
f:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
|
||||
f:SetBackdropColor (unpack (_detalhes.event_tracker.frame.backdrop_color))
|
||||
f:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
|
||||
f:SetBackdropColor(unpack (_detalhes.event_tracker.frame.backdrop_color))
|
||||
f:EnableMouse (true)
|
||||
f:SetMovable (true)
|
||||
f:SetResizable (true)
|
||||
f:SetResizable(true)
|
||||
f:SetClampedToScreen (true)
|
||||
|
||||
local LibWindow = LibStub ("LibWindow-1.1")
|
||||
@@ -260,17 +260,17 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
LibWindow.MakeDraggable (f)
|
||||
LibWindow.RestorePosition (f)
|
||||
|
||||
--> two resizers
|
||||
--two resizers
|
||||
|
||||
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,33 +293,33 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
end
|
||||
end)
|
||||
|
||||
f:SetScript ("OnSizeChanged", function(self)
|
||||
f:SetScript("OnSizeChanged", function(self)
|
||||
|
||||
end)
|
||||
|
||||
--> scroll frame
|
||||
--scroll frame
|
||||
|
||||
--> frame config
|
||||
--frame config
|
||||
|
||||
local scroll_line_amount = 1
|
||||
local scroll_width = 195
|
||||
local header_size = 20
|
||||
|
||||
--> on tick script
|
||||
--on tick script
|
||||
local lineOnTick = function(self, deltaTime)
|
||||
--> when this event occured on combat log
|
||||
--when this event occured on combat log
|
||||
local gameTime = self.GameTime
|
||||
|
||||
--> calculate how much time elapsed since the event got triggered
|
||||
--calculate how much time elapsed since the event got triggered
|
||||
local elapsedTime = GetTime() - gameTime
|
||||
|
||||
--> set the bar animation:
|
||||
--set the bar animation:
|
||||
local animationPercent = min (elapsedTime, 1)
|
||||
self.Statusbar:SetValue (animationPercent)
|
||||
self.Statusbar:SetValue(animationPercent)
|
||||
|
||||
--> set the spark location
|
||||
--set the spark location
|
||||
if (animationPercent < 1) then
|
||||
self.Spark:SetPoint ("left", self, "left", (self:GetWidth() * animationPercent) - 10, 0)
|
||||
self.Spark:SetPoint("left", self, "left", (self:GetWidth() * animationPercent) - 10, 0)
|
||||
if (not self.Spark:IsShown()) then
|
||||
self.Spark:Show()
|
||||
end
|
||||
@@ -330,53 +330,53 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
end
|
||||
end
|
||||
|
||||
--> create a line on the scroll frame
|
||||
--create a line on the scroll frame
|
||||
local scroll_createline = function(self, index)
|
||||
|
||||
local line = CreateFrame ("frame", "$parentLine" .. index, self,"BackdropTemplate")
|
||||
local line = CreateFrame("frame", "$parentLine" .. index, self,"BackdropTemplate")
|
||||
line:EnableMouse (false)
|
||||
line.Index = index --> hack to not trigger error on UpdateWorldTrackerLines since Index is set after this function is ran
|
||||
line.Index = index --hack to not trigger error on UpdateWorldTrackerLines since Index is set after this function is ran
|
||||
|
||||
--> set its backdrop
|
||||
line:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
|
||||
--line:SetBackdropColor (1, 1, 1, 0.75)
|
||||
--set its backdrop
|
||||
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
|
||||
--line:SetBackdropColor(1, 1, 1, 0.75)
|
||||
|
||||
--> statusbar
|
||||
local statusbar = CreateFrame ("statusbar", "$parentStatusBar", line,"BackdropTemplate")
|
||||
--statusbar
|
||||
local statusbar = CreateFrame("statusbar", "$parentStatusBar", line,"BackdropTemplate")
|
||||
statusbar:SetAllPoints()
|
||||
local statusbartexture = statusbar:CreateTexture (nil, "border")
|
||||
local statusbartexture = statusbar:CreateTexture(nil, "border")
|
||||
statusbar:SetStatusBarTexture (statusbartexture)
|
||||
statusbar:SetMinMaxValues (0, 1)
|
||||
statusbar:SetValue (0)
|
||||
statusbar:SetValue(0)
|
||||
|
||||
local statusbarspark = statusbar:CreateTexture (nil, "artwork")
|
||||
statusbarspark:SetTexture ([[Interface\CastingBar\UI-CastingBar-Spark]])
|
||||
statusbarspark:SetSize (16, 30)
|
||||
statusbarspark:SetBlendMode ("ADD")
|
||||
local statusbarspark = statusbar:CreateTexture(nil, "artwork")
|
||||
statusbarspark:SetTexture([[Interface\CastingBar\UI-CastingBar-Spark]])
|
||||
statusbarspark:SetSize(16, 30)
|
||||
statusbarspark:SetBlendMode("ADD")
|
||||
statusbarspark:Hide()
|
||||
|
||||
--> create the icon textures and texts - they are all statusbar childs
|
||||
local lefticon = statusbar:CreateTexture ("$parentLeftIcon", "overlay")
|
||||
lefticon:SetPoint ("left", line, "left", 0, 0)
|
||||
--create the icon textures and texts - they are all statusbar childs
|
||||
local lefticon = statusbar:CreateTexture("$parentLeftIcon", "overlay")
|
||||
lefticon:SetPoint("left", line, "left", 0, 0)
|
||||
|
||||
local righticon = statusbar:CreateTexture ("$parentRightIcon", "overlay")
|
||||
righticon:SetPoint ("right", line, "right", 0, 0)
|
||||
local righticon = statusbar:CreateTexture("$parentRightIcon", "overlay")
|
||||
righticon:SetPoint("right", line, "right", 0, 0)
|
||||
|
||||
local lefttext = statusbar:CreateFontString ("$parentLeftText", "overlay", "GameFontNormal")
|
||||
DF:SetFontSize (lefttext, 9)
|
||||
lefttext:SetPoint ("left", lefticon, "right", 2, 0)
|
||||
lefttext:SetPoint("left", lefticon, "right", 2, 0)
|
||||
|
||||
local righttext = statusbar:CreateFontString ("$parentRightText", "overlay", "GameFontNormal")
|
||||
DF:SetFontSize (righttext, 9)
|
||||
righttext:SetPoint ("right", righticon, "left", -2, 0)
|
||||
righttext:SetPoint("right", righticon, "left", -2, 0)
|
||||
|
||||
lefttext:SetJustifyH ("left")
|
||||
righttext:SetJustifyH ("right")
|
||||
lefttext:SetJustifyH("left")
|
||||
righttext:SetJustifyH("right")
|
||||
|
||||
local actionicon = statusbar:CreateTexture ("$parentRightIcon", "overlay")
|
||||
actionicon:SetPoint ("center", line, "center")
|
||||
local actionicon = statusbar:CreateTexture("$parentRightIcon", "overlay")
|
||||
actionicon:SetPoint("center", line, "center")
|
||||
|
||||
--> set members
|
||||
--set members
|
||||
line.LeftIcon = lefticon
|
||||
line.RightIcon = righticon
|
||||
line.LeftText = lefttext
|
||||
@@ -386,16 +386,16 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
line.Spark = statusbarspark
|
||||
line.ActionIcon = actionicon
|
||||
|
||||
--> set some parameters
|
||||
--set some parameters
|
||||
_detalhes:UpdateWorldTrackerLines (line)
|
||||
|
||||
--> set scripts
|
||||
line:SetScript ("OnUpdate", lineOnTick)
|
||||
--set scripts
|
||||
line:SetScript("OnUpdate", lineOnTick)
|
||||
|
||||
return line
|
||||
end
|
||||
|
||||
--> some consts to help work with indexes
|
||||
--some consts to help work with indexes
|
||||
local SPELLTYPE_COOLDOWN = "cooldown"
|
||||
local SPELLTYPE_INTERRUPT = "interrupt"
|
||||
local SPELLTYPE_OFFENSIVE = "offensive"
|
||||
@@ -442,11 +442,11 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
|
||||
local add_role_and_class_color = function(player_name, player_serial)
|
||||
|
||||
--> get the actor object
|
||||
--get the actor object
|
||||
local actor = _detalhes.tabela_vigente[1]:GetActor (player_name)
|
||||
|
||||
if (actor) then
|
||||
--> remove realm name
|
||||
--remove realm name
|
||||
player_name = _detalhes:GetOnlyName (player_name)
|
||||
|
||||
local class, spec, role = actor.classe, actor.spec, actor.role
|
||||
@@ -454,15 +454,15 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
spec, class = get_spec_or_class (player_serial, player_name)
|
||||
end
|
||||
|
||||
--> add the class color
|
||||
--add the class color
|
||||
if (_detalhes.player_class [class]) then
|
||||
--> is a player, add the class color
|
||||
--is a player, add the class color
|
||||
player_name = _detalhes:AddColorString (player_name, class)
|
||||
end
|
||||
|
||||
--add the role icon
|
||||
if (role ~= "NONE") then
|
||||
--> have a role
|
||||
--have a role
|
||||
player_name = _detalhes:AddRoleIcon (player_name, role, _detalhes.event_tracker.line_height)
|
||||
end
|
||||
|
||||
@@ -471,9 +471,9 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
player_name = _detalhes:GetOnlyName (player_name)
|
||||
|
||||
if (class) then
|
||||
--> add the class color
|
||||
--add the class color
|
||||
if (_detalhes.player_class [class]) then
|
||||
--> is a player, add the class color
|
||||
--is a player, add the class color
|
||||
player_name = _detalhes:AddColorString (player_name, class)
|
||||
end
|
||||
end
|
||||
@@ -497,7 +497,7 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
local loops = 20
|
||||
while (fontstring:GetStringWidth() > size and loops > 0) do
|
||||
text = strsub (text, 1, #text-1)
|
||||
fontstring:SetText (text)
|
||||
fontstring:SetText(text)
|
||||
loops = loops - 1
|
||||
end
|
||||
|
||||
@@ -518,19 +518,19 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
|
||||
local spec, class = get_spec_or_class (ability [ABILITYTABLE_CASTERSERIAL], ability [ABILITYTABLE_CASTERNAME])
|
||||
local texture, L, R, T, B = get_player_icon (spec, class)
|
||||
line.LeftIcon:SetTexture (texture)
|
||||
line.LeftIcon:SetTexture(texture)
|
||||
line.LeftIcon:SetTexCoord (L, R, T, B)
|
||||
line.LeftText:SetText (_detalhes:GetOnlyName (ability [ABILITYTABLE_CASTERNAME]))
|
||||
line.LeftText:SetText(_detalhes:GetOnlyName (ability [ABILITYTABLE_CASTERNAME]))
|
||||
|
||||
if (ability [ABILITYTABLE_ISENEMY]) then
|
||||
line:SetBackdropColor (1, .3, .3, 0.5)
|
||||
line:SetBackdropColor(1, .3, .3, 0.5)
|
||||
else
|
||||
line:SetBackdropColor (1, 1, 1, 0.5)
|
||||
line:SetBackdropColor(1, 1, 1, 0.5)
|
||||
end
|
||||
|
||||
if (ability [ABILITYTABLE_SPELLTYPE] == SPELLTYPE_COOLDOWN) then
|
||||
local spellName, _, spellIcon = GetSpellInfo(ability [ABILITYTABLE_SPELLID])
|
||||
line.RightIcon:SetTexture (spellIcon)
|
||||
line.RightIcon:SetTexture(spellIcon)
|
||||
line.RightIcon:SetTexCoord (.06, .94, .06, .94)
|
||||
|
||||
local targetName = ability [ABILITYTABLE_TARGETNAME]
|
||||
@@ -539,32 +539,32 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
targetName = add_role_and_class_color (targetName, targetSerial)
|
||||
end
|
||||
|
||||
line.RightText:SetText (targetName or spellName)
|
||||
line.RightText:SetText(targetName or spellName)
|
||||
|
||||
line.ActionIcon:SetTexture ([[Interface\AddOns\Details\images\event_tracker_icons]])
|
||||
line.ActionIcon:SetTexture([[Interface\AddOns\Details\images\event_tracker_icons]])
|
||||
line.ActionIcon:SetTexCoord (0, 0.125, 0, 1)
|
||||
|
||||
elseif (ability [ABILITYTABLE_SPELLTYPE] == SPELLTYPE_OFFENSIVE) then
|
||||
local spellName, _, spellIcon = GetSpellInfo(ability [ABILITYTABLE_SPELLID])
|
||||
line.RightIcon:SetTexture (spellIcon)
|
||||
line.RightIcon:SetTexture(spellIcon)
|
||||
line.RightIcon:SetTexCoord (.06, .94, .06, .94)
|
||||
line.RightText:SetText (spellName)
|
||||
line.RightText:SetText(spellName)
|
||||
|
||||
line.ActionIcon:SetTexture ([[Interface\AddOns\Details\images\event_tracker_icons]])
|
||||
line.ActionIcon:SetTexture([[Interface\AddOns\Details\images\event_tracker_icons]])
|
||||
line.ActionIcon:SetTexCoord (0.127, 0.25, 0, 1)
|
||||
|
||||
elseif (ability [ABILITYTABLE_SPELLTYPE] == SPELLTYPE_INTERRUPT) then
|
||||
local spellNameInterrupted, _, spellIconInterrupted = GetSpellInfo(ability [ABILITYTABLE_EXTRASPELLID])
|
||||
line.RightIcon:SetTexture (spellIconInterrupted)
|
||||
line.RightIcon:SetTexture(spellIconInterrupted)
|
||||
line.RightIcon:SetTexCoord (.06, .94, .06, .94)
|
||||
line.RightText:SetText (spellNameInterrupted)
|
||||
line.RightText:SetText(spellNameInterrupted)
|
||||
|
||||
line.ActionIcon:SetTexture ([[Interface\AddOns\Details\images\event_tracker_icons]])
|
||||
line.ActionIcon:SetTexture([[Interface\AddOns\Details\images\event_tracker_icons]])
|
||||
line.ActionIcon:SetTexCoord (0.251, 0.375, 0, 1)
|
||||
|
||||
elseif (ability [ABILITYTABLE_SPELLTYPE] == SPELLTYPE_CROWDCONTROL) then
|
||||
local spellName, _, spellIcon = GetSpellInfo(ability [ABILITYTABLE_SPELLID])
|
||||
line.RightIcon:SetTexture (spellIcon)
|
||||
line.RightIcon:SetTexture(spellIcon)
|
||||
line.RightIcon:SetTexCoord (.06, .94, .06, .94)
|
||||
|
||||
local targetName = ability [ABILITYTABLE_TARGETNAME]
|
||||
@@ -573,9 +573,9 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
targetName = add_role_and_class_color (targetName, targetSerial)
|
||||
end
|
||||
|
||||
line.RightText:SetText (targetName or "unknown target")
|
||||
line.RightText:SetText(targetName or "unknown target")
|
||||
|
||||
line.ActionIcon:SetTexture ([[Interface\AddOns\Details\images\event_tracker_icons]])
|
||||
line.ActionIcon:SetTexture([[Interface\AddOns\Details\images\event_tracker_icons]])
|
||||
line.ActionIcon:SetTexCoord (0.376, 0.5, 0, 1)
|
||||
|
||||
end
|
||||
@@ -583,7 +583,7 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
shrink_string (line.LeftText, textSize)
|
||||
shrink_string (line.RightText, textSize)
|
||||
|
||||
--> set when the ability was registered on combat log
|
||||
--set when the ability was registered on combat log
|
||||
line.GameTime = ability [ABILITYTABLE_GAMETIME]
|
||||
line:Show()
|
||||
end
|
||||
@@ -592,59 +592,59 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
|
||||
--title text
|
||||
local TitleString = f:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
TitleString:SetPoint ("top", f, "top", 0, -3)
|
||||
TitleString:SetText ("Details!: Event Tracker")
|
||||
local TitleBackground = f:CreateTexture (nil, "artwork")
|
||||
TitleBackground:SetTexture ([[Interface\Tooltips\UI-Tooltip-Background]])
|
||||
TitleString:SetPoint("top", f, "top", 0, -3)
|
||||
TitleString:SetText("Details!: Event Tracker")
|
||||
local TitleBackground = f:CreateTexture(nil, "artwork")
|
||||
TitleBackground:SetTexture([[Interface\Tooltips\UI-Tooltip-Background]])
|
||||
TitleBackground:SetVertexColor (.1, .1, .1, .9)
|
||||
TitleBackground:SetPoint ("topleft", f, "topleft")
|
||||
TitleBackground:SetPoint ("topright", f, "topright")
|
||||
TitleBackground:SetHeight (header_size)
|
||||
TitleBackground:SetPoint("topleft", f, "topleft")
|
||||
TitleBackground:SetPoint("topright", f, "topright")
|
||||
TitleBackground:SetHeight(header_size)
|
||||
|
||||
--> table with spells showing on the scroll frame
|
||||
--table with spells showing on the scroll frame
|
||||
local CurrentShowing = {}
|
||||
|
||||
--> scrollframe
|
||||
--scrollframe
|
||||
local scrollframe = DF:CreateScrollBox (f, "$parentScrollFrame", scroll_refresh, CurrentShowing, scroll_width, 400, scroll_line_amount, _detalhes.event_tracker.line_height, scroll_createline, true, true)
|
||||
scrollframe:SetPoint ("topleft", f, "topleft", 0, -header_size)
|
||||
scrollframe:SetPoint ("topright", f, "topright", 0, -header_size)
|
||||
scrollframe:SetPoint ("bottomleft", f, "bottomleft", 0, 0)
|
||||
scrollframe:SetPoint ("bottomright", f, "bottomright", 0, 0)
|
||||
scrollframe:SetPoint("topleft", f, "topleft", 0, -header_size)
|
||||
scrollframe:SetPoint("topright", f, "topright", 0, -header_size)
|
||||
scrollframe:SetPoint("bottomleft", f, "bottomleft", 0, 0)
|
||||
scrollframe:SetPoint("bottomright", f, "bottomright", 0, 0)
|
||||
|
||||
--> update line - used by 'UpdateWorldTrackerLines' function
|
||||
--update line - used by 'UpdateWorldTrackerLines' function
|
||||
local update_line = function(line)
|
||||
|
||||
--> get the line index
|
||||
--get the line index
|
||||
local index = line.Index
|
||||
|
||||
--> update left text
|
||||
DF:SetFontColor (line.LeftText, _detalhes.event_tracker.font_color)
|
||||
--update left text
|
||||
DF:SetFontColor(line.LeftText, _detalhes.event_tracker.font_color)
|
||||
DF:SetFontFace (line.LeftText, _detalhes.event_tracker.font_face)
|
||||
DF:SetFontSize (line.LeftText, _detalhes.event_tracker.font_size)
|
||||
DF:SetFontOutline (line.LeftText, _detalhes.event_tracker.font_shadow)
|
||||
|
||||
--> update right text
|
||||
DF:SetFontColor (line.RightText, _detalhes.event_tracker.font_color)
|
||||
--update right text
|
||||
DF:SetFontColor(line.RightText, _detalhes.event_tracker.font_color)
|
||||
DF:SetFontFace (line.RightText, _detalhes.event_tracker.font_face)
|
||||
DF:SetFontSize (line.RightText, _detalhes.event_tracker.font_size)
|
||||
DF:SetFontOutline (line.RightText, _detalhes.event_tracker.font_shadow)
|
||||
|
||||
--> adjust where the line is anchored
|
||||
line:SetPoint ("topleft", line:GetParent(), "topleft", 0, -((index-1)*(_detalhes.event_tracker.line_height+1)))
|
||||
line:SetPoint ("topright", line:GetParent(), "topright", 0, -((index-1)*(_detalhes.event_tracker.line_height+1)))
|
||||
--adjust where the line is anchored
|
||||
line:SetPoint("topleft", line:GetParent(), "topleft", 0, -((index-1)*(_detalhes.event_tracker.line_height+1)))
|
||||
line:SetPoint("topright", line:GetParent(), "topright", 0, -((index-1)*(_detalhes.event_tracker.line_height+1)))
|
||||
|
||||
--> set its height
|
||||
line:SetHeight (_detalhes.event_tracker.line_height)
|
||||
--set its height
|
||||
line:SetHeight(_detalhes.event_tracker.line_height)
|
||||
|
||||
--> set texture
|
||||
--set texture
|
||||
local texture = SharedMedia:Fetch ("statusbar", _detalhes.event_tracker.line_texture)
|
||||
line.StatusbarTexture:SetTexture (texture)
|
||||
line.StatusbarTexture:SetTexture(texture)
|
||||
line.StatusbarTexture:SetVertexColor (unpack (_detalhes.event_tracker.line_color))
|
||||
|
||||
--> set icon size
|
||||
line.LeftIcon:SetSize (_detalhes.event_tracker.line_height, _detalhes.event_tracker.line_height)
|
||||
line.RightIcon:SetSize (_detalhes.event_tracker.line_height, _detalhes.event_tracker.line_height)
|
||||
line.ActionIcon:SetSize (_detalhes.event_tracker.line_height-4, _detalhes.event_tracker.line_height-4)
|
||||
--set icon size
|
||||
line.LeftIcon:SetSize(_detalhes.event_tracker.line_height, _detalhes.event_tracker.line_height)
|
||||
line.RightIcon:SetSize(_detalhes.event_tracker.line_height, _detalhes.event_tracker.line_height)
|
||||
line.ActionIcon:SetSize(_detalhes.event_tracker.line_height-4, _detalhes.event_tracker.line_height-4)
|
||||
line.ActionIcon:SetAlpha (0.65)
|
||||
end
|
||||
|
||||
@@ -652,7 +652,7 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
-- /run _detalhes:UpdateWorldTrackerLines()
|
||||
|
||||
function _detalhes:UpdateWorldTrackerLines (line)
|
||||
--> don't run if the featured hasn't loaded
|
||||
--don't run if the featured hasn't loaded
|
||||
if (not f) then
|
||||
return
|
||||
end
|
||||
@@ -660,8 +660,8 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
if (line) then
|
||||
update_line (line)
|
||||
else
|
||||
--> update all lines
|
||||
for index, line in ipairs (scrollframe:GetFrames()) do
|
||||
--update all lines
|
||||
for index, line in ipairs(scrollframe:GetFrames()) do
|
||||
update_line (line)
|
||||
end
|
||||
scrollframe:SetFramesHeight (_detalhes.event_tracker.line_height)
|
||||
@@ -670,12 +670,12 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
end
|
||||
|
||||
function _detalhes:UpdateEventTrackerFrame()
|
||||
--> don't run if the featured hasn't loaded
|
||||
--don't run if the featured hasn't loaded
|
||||
if (not f) then
|
||||
return
|
||||
end
|
||||
|
||||
f:SetSize (_detalhes.event_tracker.frame.width, _detalhes.event_tracker.frame.height)
|
||||
f:SetSize(_detalhes.event_tracker.frame.width, _detalhes.event_tracker.frame.height)
|
||||
LibWindow.RegisterConfig (f, _detalhes.event_tracker.frame)
|
||||
LibWindow.RestorePosition (f)
|
||||
scrollframe:OnSizeChanged()
|
||||
@@ -693,16 +693,16 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
if (_detalhes.event_tracker.frame.show_title) then
|
||||
TitleString:Show()
|
||||
TitleBackground:Show()
|
||||
scrollframe:SetPoint ("topleft", f, "topleft", 0, -header_size)
|
||||
scrollframe:SetPoint ("topright", f, "topright", 0, -header_size)
|
||||
scrollframe:SetPoint("topleft", f, "topleft", 0, -header_size)
|
||||
scrollframe:SetPoint("topright", f, "topright", 0, -header_size)
|
||||
else
|
||||
TitleString:Hide()
|
||||
TitleBackground:Hide()
|
||||
scrollframe:SetPoint ("topleft", f, "topleft", 0, 0)
|
||||
scrollframe:SetPoint ("topright", f, "topright", 0, 0)
|
||||
scrollframe:SetPoint("topleft", f, "topleft", 0, 0)
|
||||
scrollframe:SetPoint("topright", f, "topright", 0, 0)
|
||||
end
|
||||
|
||||
f:SetBackdropColor (unpack (_detalhes.event_tracker.frame.backdrop_color))
|
||||
f:SetBackdropColor(unpack (_detalhes.event_tracker.frame.backdrop_color))
|
||||
scrollframe.__background:SetVertexColor (unpack (_detalhes.event_tracker.frame.backdrop_color))
|
||||
|
||||
f:SetFrameStrata (_detalhes.event_tracker.frame.strata)
|
||||
@@ -716,20 +716,20 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
scrollframe:CreateLine (scroll_createline)
|
||||
end
|
||||
f.scrollframe = scrollframe
|
||||
scrollframe:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16})
|
||||
scrollframe:SetBackdropColor (0, 0, 0, 0)
|
||||
scrollframe:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16})
|
||||
scrollframe:SetBackdropColor(0, 0, 0, 0)
|
||||
|
||||
--> get tables used inside the combat parser
|
||||
--get tables used inside the combat parser
|
||||
local cooldownListFromFramework = DetailsFramework.CooldownsAllDeffensive
|
||||
local attackCooldownsFromFramework = DetailsFramework.CooldownsAttack
|
||||
local crowdControlFromFramework = DetailsFramework.CrowdControlSpells
|
||||
|
||||
local combatLog = CreateFrame ("frame")
|
||||
local combatLog = CreateFrame("frame")
|
||||
combatLog:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
|
||||
local OBJECT_TYPE_PLAYER = 0x00000400
|
||||
local OBJECT_TYPE_ENEMY = 0x00000040
|
||||
|
||||
--> combat parser
|
||||
--combat parser
|
||||
local is_player = function(flag)
|
||||
if (not flag) then
|
||||
return false
|
||||
@@ -743,22 +743,22 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
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
|
||||
|
||||
--> defensive cooldown
|
||||
--defensive cooldown
|
||||
if (token == "SPELL_CAST_SUCCESS" and (cooldownListFromFramework [spellid]) and is_player (caster_flags)) then
|
||||
tinsert (CurrentShowing, 1, {SPELLTYPE_COOLDOWN, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
|
||||
added = true
|
||||
|
||||
--> offensive cooldown
|
||||
--offensive cooldown
|
||||
elseif (token == "SPELL_CAST_SUCCESS" and (attackCooldownsFromFramework [spellid]) and is_player (caster_flags)) then
|
||||
tinsert (CurrentShowing, 1, {SPELLTYPE_OFFENSIVE, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
|
||||
added = true
|
||||
|
||||
--> crowd control
|
||||
--crowd control
|
||||
elseif (token == "SPELL_AURA_APPLIED" and (crowdControlFromFramework [spellid])) then
|
||||
--check if isnt a pet
|
||||
if (target_flags and is_player (target_flags)) then
|
||||
@@ -766,7 +766,7 @@ function Details:CreateEventTrackerFrame(parent, name)
|
||||
added = true
|
||||
end
|
||||
|
||||
--> spell interrupt
|
||||
--spell interrupt
|
||||
elseif (token == "SPELL_INTERRUPT") then
|
||||
tinsert (CurrentShowing, 1, {SPELLTYPE_INTERRUPT, spellid, caster_name, target_name, time, extraSpellID, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
|
||||
added = true
|
||||
|
||||
+135
-135
@@ -2,7 +2,7 @@
|
||||
local Details = _G.Details
|
||||
local L = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
--> default weaktable
|
||||
--default weaktable
|
||||
Details.weaktable = {__mode = "v"}
|
||||
|
||||
Details:GetFramework():InstallTemplate("button", "DETAILS_FORGE_TEXTENTRY_TEMPLATE", {
|
||||
@@ -45,7 +45,7 @@ function Details:OpenForge()
|
||||
|
||||
--main frame
|
||||
local f = DetailsForgePanel or Details.gump:CreateSimplePanel (UIParent, 960, 600, "Details! " .. L["STRING_SPELLLIST"], "DetailsForgePanel")
|
||||
f:SetPoint ("center", UIParent, "center")
|
||||
f:SetPoint("center", UIParent, "center")
|
||||
f:SetFrameStrata ("HIGH")
|
||||
f:SetToplevel (true)
|
||||
f:SetMovable (true)
|
||||
@@ -62,39 +62,39 @@ function Details:OpenForge()
|
||||
|
||||
if (not have_plugins_enabled and false) then
|
||||
local nopluginLabel = f:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
local nopluginIcon = f:CreateTexture (nil, "overlay")
|
||||
nopluginIcon:SetPoint ("bottomleft", f, "bottomleft", 10, 10)
|
||||
nopluginIcon:SetSize (16, 16)
|
||||
nopluginIcon:SetTexture ([[Interface\DialogFrame\UI-Dialog-Icon-AlertNew]])
|
||||
nopluginLabel:SetPoint ("left", nopluginIcon, "right", 5, 0)
|
||||
nopluginLabel:SetText (L["STRING_FORGE_ENABLEPLUGINS"])
|
||||
local nopluginIcon = f:CreateTexture(nil, "overlay")
|
||||
nopluginIcon:SetPoint("bottomleft", f, "bottomleft", 10, 10)
|
||||
nopluginIcon:SetSize(16, 16)
|
||||
nopluginIcon:SetTexture([[Interface\DialogFrame\UI-Dialog-Icon-AlertNew]])
|
||||
nopluginLabel:SetPoint("left", nopluginIcon, "right", 5, 0)
|
||||
nopluginLabel:SetText(L["STRING_FORGE_ENABLEPLUGINS"])
|
||||
end
|
||||
|
||||
if (not Details:GetTutorialCVar ("FORGE_TUTORIAL") and false) then
|
||||
local tutorialFrame = CreateFrame ("frame", "$parentTutorialFrame", f,"BackdropTemplate")
|
||||
tutorialFrame:SetPoint ("center", f, "center")
|
||||
local tutorialFrame = CreateFrame("frame", "$parentTutorialFrame", f,"BackdropTemplate")
|
||||
tutorialFrame:SetPoint("center", f, "center")
|
||||
tutorialFrame:SetFrameStrata ("DIALOG")
|
||||
tutorialFrame:SetSize (400, 300)
|
||||
tutorialFrame:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16,
|
||||
tutorialFrame:SetSize(400, 300)
|
||||
tutorialFrame:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16,
|
||||
insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize=1})
|
||||
tutorialFrame:SetBackdropColor (0, 0, 0, 1)
|
||||
tutorialFrame:SetBackdropColor(0, 0, 0, 1)
|
||||
|
||||
tutorialFrame.Title = Details.gump:CreateLabel (tutorialFrame, L["STRING_FORGE_TUTORIAL_TITLE"], 12, "orange")
|
||||
tutorialFrame.Desc = Details.gump:CreateLabel (tutorialFrame, L["STRING_FORGE_TUTORIAL_DESC"], 12)
|
||||
tutorialFrame.Title = Details.gump:CreateLabel(tutorialFrame, L["STRING_FORGE_TUTORIAL_TITLE"], 12, "orange")
|
||||
tutorialFrame.Desc = Details.gump:CreateLabel(tutorialFrame, L["STRING_FORGE_TUTORIAL_DESC"], 12)
|
||||
tutorialFrame.Desc.width = 370
|
||||
tutorialFrame.Example = Details.gump:CreateLabel (tutorialFrame, L["STRING_FORGE_TUTORIAL_VIDEO"], 12)
|
||||
tutorialFrame.Example = Details.gump:CreateLabel(tutorialFrame, L["STRING_FORGE_TUTORIAL_VIDEO"], 12)
|
||||
|
||||
tutorialFrame.Title:SetPoint ("top", tutorialFrame, "top", 0, -5)
|
||||
tutorialFrame.Desc:SetPoint ("topleft", tutorialFrame, "topleft", 10, -45)
|
||||
tutorialFrame.Example:SetPoint ("topleft", tutorialFrame, "topleft", 10, -110)
|
||||
tutorialFrame.Title:SetPoint("top", tutorialFrame, "top", 0, -5)
|
||||
tutorialFrame.Desc:SetPoint("topleft", tutorialFrame, "topleft", 10, -45)
|
||||
tutorialFrame.Example:SetPoint("topleft", tutorialFrame, "topleft", 10, -110)
|
||||
|
||||
local editBox = Details.gump:CreateTextEntry (tutorialFrame, function()end, 375, 20, nil, nil, nil, entry_template, label_template)
|
||||
editBox:SetPoint ("topleft", tutorialFrame.Example, "bottomleft", 0, -10)
|
||||
editBox:SetText ([[https://www.youtube.com/watch?v=om0k1Yj2pEw]])
|
||||
editBox:SetPoint("topleft", tutorialFrame.Example, "bottomleft", 0, -10)
|
||||
editBox:SetText([[https://www.youtube.com/watch?v=om0k1Yj2pEw]])
|
||||
editBox:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
|
||||
local closeButton = Details.gump:CreateButton (tutorialFrame, function() Details:SetTutorialCVar ("FORGE_TUTORIAL", true); tutorialFrame:Hide() end, 80, 20, L["STRING_OPTIONS_CHART_CLOSE"])
|
||||
closeButton:SetPoint ("bottom", tutorialFrame, "bottom", 0, 10)
|
||||
closeButton:SetPoint("bottom", tutorialFrame, "bottom", 0, 10)
|
||||
closeButton:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
end
|
||||
|
||||
@@ -102,8 +102,8 @@ function Details:OpenForge()
|
||||
local all_modules = {}
|
||||
local spell_already_added = {}
|
||||
|
||||
f:SetScript ("OnHide", function()
|
||||
for _, module in ipairs (all_modules) do
|
||||
f:SetScript("OnHide", function()
|
||||
for _, module in ipairs(all_modules) do
|
||||
if (module.data) then
|
||||
wipe (module.data)
|
||||
end
|
||||
@@ -111,37 +111,37 @@ function Details:OpenForge()
|
||||
wipe (spell_already_added)
|
||||
end)
|
||||
|
||||
f.bg1 = f:CreateTexture (nil, "background")
|
||||
f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
|
||||
f.bg1 = f:CreateTexture(nil, "background")
|
||||
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
|
||||
f.bg1:SetAlpha (0.7)
|
||||
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
|
||||
f.bg1:SetVertTile (true)
|
||||
f.bg1:SetHorizTile (true)
|
||||
f.bg1:SetSize (790, 454)
|
||||
f.bg1:SetSize(790, 454)
|
||||
f.bg1:SetAllPoints()
|
||||
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (.5, .5, .5, .5)
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor(.5, .5, .5, .5)
|
||||
f:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--[=[
|
||||
--scroll gradient
|
||||
local blackdiv = f:CreateTexture (nil, "artwork")
|
||||
blackdiv:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
|
||||
local blackdiv = f:CreateTexture(nil, "artwork")
|
||||
blackdiv:SetTexture([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
|
||||
blackdiv:SetVertexColor (0, 0, 0)
|
||||
blackdiv:SetAlpha (1)
|
||||
blackdiv:SetPoint ("topleft", f, "topleft", 170, -100)
|
||||
blackdiv:SetHeight (461)
|
||||
blackdiv:SetWidth (200)
|
||||
blackdiv:SetPoint("topleft", f, "topleft", 170, -100)
|
||||
blackdiv:SetHeight(461)
|
||||
blackdiv:SetWidth(200)
|
||||
|
||||
--big gradient
|
||||
local blackdiv = f:CreateTexture (nil, "artwork")
|
||||
blackdiv:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
|
||||
local blackdiv = f:CreateTexture(nil, "artwork")
|
||||
blackdiv:SetTexture([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
|
||||
blackdiv:SetVertexColor (0, 0, 0)
|
||||
blackdiv:SetAlpha (0.7)
|
||||
blackdiv:SetPoint ("topleft", f, "topleft", 0, 0)
|
||||
blackdiv:SetPoint ("bottomleft", f, "bottomleft", 0, 0)
|
||||
blackdiv:SetWidth (200)
|
||||
blackdiv:SetPoint("topleft", f, "topleft", 0, 0)
|
||||
blackdiv:SetPoint("bottomleft", f, "bottomleft", 0, 0)
|
||||
blackdiv:SetWidth(200)
|
||||
--]=]
|
||||
|
||||
local no_func = function()end
|
||||
@@ -160,16 +160,16 @@ function Details:OpenForge()
|
||||
desc = L["STRING_FORGE_BUTTON_PLAYERS_DESC"],
|
||||
filters_widgets = function()
|
||||
if (not DetailsForgeAllPlayersFilterPanel) then
|
||||
local w = CreateFrame ("frame", "DetailsForgeAllPlayersFilterPanel", f, "BackdropTemplate")
|
||||
w:SetSize (600, 20)
|
||||
w:SetPoint ("topleft", f, "topleft", 164, -40)
|
||||
local w = CreateFrame("frame", "DetailsForgeAllPlayersFilterPanel", f, "BackdropTemplate")
|
||||
w:SetSize(600, 20)
|
||||
w:SetPoint("topleft", f, "topleft", 164, -40)
|
||||
--
|
||||
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
label:SetText (L["STRING_FORGE_FILTER_PLAYERNAME"] .. ": ")
|
||||
label:SetPoint ("left", w, "left", 5, 0)
|
||||
label:SetText(L["STRING_FORGE_FILTER_PLAYERNAME"] .. ": ")
|
||||
label:SetPoint("left", w, "left", 5, 0)
|
||||
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllPlayersNameFilter")
|
||||
entry:SetHook ("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint ("left", label, "right", 2, 0)
|
||||
entry:SetHook("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint("left", label, "right", 2, 0)
|
||||
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
end
|
||||
return DetailsForgeAllPlayersFilterPanel
|
||||
@@ -177,7 +177,7 @@ function Details:OpenForge()
|
||||
search = function()
|
||||
local t = {}
|
||||
local filter = DetailsForgeAllPlayersNameFilter:GetText()
|
||||
for _, actor in ipairs (Details:GetCombat("current"):GetActorList (DETAILS_ATTRIBUTE_DAMAGE)) do
|
||||
for _, actor in ipairs(Details:GetCombat("current"):GetActorList (DETAILS_ATTRIBUTE_DAMAGE)) do
|
||||
if (actor:IsGroupPlayer()) then
|
||||
if (filter ~= "") then
|
||||
filter = lower (filter)
|
||||
@@ -224,24 +224,24 @@ function Details:OpenForge()
|
||||
desc = L["STRING_FORGE_BUTTON_PETS_DESC"],
|
||||
filters_widgets = function()
|
||||
if (not DetailsForgeAllPetsFilterPanel) then
|
||||
local w = CreateFrame ("frame", "DetailsForgeAllPetsFilterPanel", f, "BackdropTemplate")
|
||||
w:SetSize (600, 20)
|
||||
w:SetPoint ("topleft", f, "topleft", 164, -40)
|
||||
local w = CreateFrame("frame", "DetailsForgeAllPetsFilterPanel", f, "BackdropTemplate")
|
||||
w:SetSize(600, 20)
|
||||
w:SetPoint("topleft", f, "topleft", 164, -40)
|
||||
--
|
||||
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
label:SetText (L["STRING_FORGE_FILTER_PETNAME"] .. ": ")
|
||||
label:SetPoint ("left", w, "left", 5, 0)
|
||||
label:SetText(L["STRING_FORGE_FILTER_PETNAME"] .. ": ")
|
||||
label:SetPoint("left", w, "left", 5, 0)
|
||||
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllPetsNameFilter")
|
||||
entry:SetHook ("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint ("left", label, "right", 2, 0)
|
||||
entry:SetHook("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint("left", label, "right", 2, 0)
|
||||
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
--
|
||||
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
label:SetText (L["STRING_FORGE_FILTER_OWNERNAME"] .. ": ")
|
||||
label:SetPoint ("left", entry.widget, "right", 20, 0)
|
||||
label:SetText(L["STRING_FORGE_FILTER_OWNERNAME"] .. ": ")
|
||||
label:SetPoint("left", entry.widget, "right", 20, 0)
|
||||
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllPetsOwnerFilter")
|
||||
entry:SetHook ("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint ("left", label, "right", 2, 0)
|
||||
entry:SetHook("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint("left", label, "right", 2, 0)
|
||||
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
end
|
||||
return DetailsForgeAllPetsFilterPanel
|
||||
@@ -250,7 +250,7 @@ function Details:OpenForge()
|
||||
local t = {}
|
||||
local filter_petname = DetailsForgeAllPetsNameFilter:GetText()
|
||||
local filter_ownername = DetailsForgeAllPetsOwnerFilter:GetText()
|
||||
for _, actor in ipairs (Details:GetCombat("current"):GetActorList (DETAILS_ATTRIBUTE_DAMAGE)) do
|
||||
for _, actor in ipairs(Details:GetCombat("current"):GetActorList (DETAILS_ATTRIBUTE_DAMAGE)) do
|
||||
if (actor.owner) then
|
||||
local can_add = true
|
||||
if (filter_petname ~= "") then
|
||||
@@ -311,16 +311,16 @@ function Details:OpenForge()
|
||||
desc = L["STRING_FORGE_BUTTON_ENEMIES_DESC"],
|
||||
filters_widgets = function()
|
||||
if (not DetailsForgeAllEnemiesFilterPanel) then
|
||||
local w = CreateFrame ("frame", "DetailsForgeAllEnemiesFilterPanel", f, "BackdropTemplate")
|
||||
w:SetSize (600, 20)
|
||||
w:SetPoint ("topleft", f, "topleft", 164, -40)
|
||||
local w = CreateFrame("frame", "DetailsForgeAllEnemiesFilterPanel", f, "BackdropTemplate")
|
||||
w:SetSize(600, 20)
|
||||
w:SetPoint("topleft", f, "topleft", 164, -40)
|
||||
--
|
||||
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
label:SetText (L["STRING_FORGE_FILTER_ENEMYNAME"] .. ": ")
|
||||
label:SetPoint ("left", w, "left", 5, 0)
|
||||
label:SetText(L["STRING_FORGE_FILTER_ENEMYNAME"] .. ": ")
|
||||
label:SetPoint("left", w, "left", 5, 0)
|
||||
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllEnemiesNameFilter")
|
||||
entry:SetHook ("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint ("left", label, "right", 2, 0)
|
||||
entry:SetHook("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint("left", label, "right", 2, 0)
|
||||
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
end
|
||||
return DetailsForgeAllEnemiesFilterPanel
|
||||
@@ -328,7 +328,7 @@ function Details:OpenForge()
|
||||
search = function()
|
||||
local t = {}
|
||||
local filter = DetailsForgeAllEnemiesNameFilter:GetText()
|
||||
for _, actor in ipairs (Details:GetCombat("current"):GetActorList (DETAILS_ATTRIBUTE_DAMAGE)) do
|
||||
for _, actor in ipairs(Details:GetCombat("current"):GetActorList (DETAILS_ATTRIBUTE_DAMAGE)) do
|
||||
if (actor:IsNeutralOrEnemy()) then
|
||||
if (filter ~= "") then
|
||||
filter = lower (filter)
|
||||
@@ -408,24 +408,24 @@ function Details:OpenForge()
|
||||
desc = L["STRING_FORGE_BUTTON_ALLSPELLS_DESC"],
|
||||
filters_widgets = function()
|
||||
if (not DetailsForgeAllSpellsFilterPanel) then
|
||||
local w = CreateFrame ("frame", "DetailsForgeAllSpellsFilterPanel", f, "BackdropTemplate")
|
||||
w:SetSize (600, 20)
|
||||
w:SetPoint ("topleft", f, "topleft", 164, -40)
|
||||
local w = CreateFrame("frame", "DetailsForgeAllSpellsFilterPanel", f, "BackdropTemplate")
|
||||
w:SetSize(600, 20)
|
||||
w:SetPoint("topleft", f, "topleft", 164, -40)
|
||||
--
|
||||
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
label:SetText (L["STRING_FORGE_FILTER_SPELLNAME"] .. ": ")
|
||||
label:SetPoint ("left", w, "left", 5, 0)
|
||||
label:SetText(L["STRING_FORGE_FILTER_SPELLNAME"] .. ": ")
|
||||
label:SetPoint("left", w, "left", 5, 0)
|
||||
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllSpellsNameFilter")
|
||||
entry:SetHook ("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint ("left", label, "right", 2, 0)
|
||||
entry:SetHook("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint("left", label, "right", 2, 0)
|
||||
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
--
|
||||
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
label:SetText (L["STRING_FORGE_FILTER_CASTERNAME"] .. ": ")
|
||||
label:SetPoint ("left", entry.widget, "right", 20, 0)
|
||||
label:SetText(L["STRING_FORGE_FILTER_CASTERNAME"] .. ": ")
|
||||
label:SetPoint("left", entry.widget, "right", 20, 0)
|
||||
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllSpellsCasterFilter")
|
||||
entry:SetHook ("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint ("left", label, "right", 2, 0)
|
||||
entry:SetHook("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint("left", label, "right", 2, 0)
|
||||
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
end
|
||||
return DetailsForgeAllSpellsFilterPanel
|
||||
@@ -441,14 +441,14 @@ function Details:OpenForge()
|
||||
local SpellPoll = Details.spell_pool
|
||||
for spellID, className in pairs (SpellPoll) do
|
||||
|
||||
if (type (spellID) == "number" and spellID > 12) then
|
||||
if (type(spellID) == "number" and spellID > 12) then
|
||||
|
||||
local can_add = true
|
||||
|
||||
if (lower_FilterCaster ~= "") then
|
||||
--class name are stored as numbers for players and string for non-player characters
|
||||
local classNameOriginal = className
|
||||
if (type (className) == "number") then
|
||||
if (type(className) == "number") then
|
||||
className = Details.classid_to_classstring [className]
|
||||
className = lower (className)
|
||||
else
|
||||
@@ -538,32 +538,32 @@ function Details:OpenForge()
|
||||
filters_widgets = function()
|
||||
if (not DetailsForgeEncounterBossSpellsFilterPanel) then
|
||||
|
||||
local w = CreateFrame ("frame", "DetailsForgeEncounterBossSpellsFilterPanel", f, "BackdropTemplate")
|
||||
w:SetSize (600, 20)
|
||||
w:SetPoint ("topleft", f, "topleft", 164, -40)
|
||||
local w = CreateFrame("frame", "DetailsForgeEncounterBossSpellsFilterPanel", f, "BackdropTemplate")
|
||||
w:SetSize(600, 20)
|
||||
w:SetPoint("topleft", f, "topleft", 164, -40)
|
||||
--
|
||||
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
label:SetText (L["STRING_FORGE_FILTER_SPELLNAME"] .. ": ")
|
||||
label:SetPoint ("left", w, "left", 5, 0)
|
||||
label:SetText(L["STRING_FORGE_FILTER_SPELLNAME"] .. ": ")
|
||||
label:SetPoint("left", w, "left", 5, 0)
|
||||
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeEncounterSpellsNameFilter")
|
||||
entry:SetHook ("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint ("left", label, "right", 2, 0)
|
||||
entry:SetHook("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint("left", label, "right", 2, 0)
|
||||
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
--
|
||||
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
label:SetText (L["STRING_FORGE_FILTER_CASTERNAME"] .. ": ")
|
||||
label:SetPoint ("left", entry.widget, "right", 20, 0)
|
||||
label:SetText(L["STRING_FORGE_FILTER_CASTERNAME"] .. ": ")
|
||||
label:SetPoint("left", entry.widget, "right", 20, 0)
|
||||
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeEncounterSpellsCasterFilter")
|
||||
entry:SetHook ("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint ("left", label, "right", 2, 0)
|
||||
entry:SetHook("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint("left", label, "right", 2, 0)
|
||||
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
--
|
||||
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
label:SetText (L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
|
||||
label:SetPoint ("left", entry.widget, "right", 20, 0)
|
||||
label:SetText(L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
|
||||
label:SetPoint("left", entry.widget, "right", 20, 0)
|
||||
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeEncounterSpellsEncounterFilter")
|
||||
entry:SetHook ("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint ("left", label, "right", 2, 0)
|
||||
entry:SetHook("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint("left", label, "right", 2, 0)
|
||||
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
end
|
||||
return DetailsForgeEncounterBossSpellsFilterPanel
|
||||
@@ -698,13 +698,13 @@ function Details:OpenForge()
|
||||
|
||||
filters_widgets = function()
|
||||
if (not DetailsForgeEncounterNpcIDsFilterPanel) then
|
||||
local npcIdFrame = CreateFrame ("frame", "DetailsForgeEncounterNpcIDsFilterPanel", f, "BackdropTemplate")
|
||||
npcIdFrame:SetSize (600, 20)
|
||||
npcIdFrame:SetPoint ("topleft", f, "topleft", 164, -40)
|
||||
local npcIdFrame = CreateFrame("frame", "DetailsForgeEncounterNpcIDsFilterPanel", f, "BackdropTemplate")
|
||||
npcIdFrame:SetSize(600, 20)
|
||||
npcIdFrame:SetPoint("topleft", f, "topleft", 164, -40)
|
||||
|
||||
local filterSpellNameLabel = npcIdFrame:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
filterSpellNameLabel:SetText (L["STRING_FORGE_FILTER_SPELLNAME"] .. ": ")
|
||||
filterSpellNameLabel:SetPoint ("left", npcIdFrame, "left", 5, 0)
|
||||
filterSpellNameLabel:SetText(L["STRING_FORGE_FILTER_SPELLNAME"] .. ": ")
|
||||
filterSpellNameLabel:SetPoint("left", npcIdFrame, "left", 5, 0)
|
||||
|
||||
local searchEntry = fw:CreateTextEntry(npcIdFrame, nil, 120, 20, "entry", "DetailsForgeEncounterNpcIDsFilter")
|
||||
searchEntry:SetHook("OnTextChanged", function() f:refresh() end)
|
||||
@@ -772,7 +772,7 @@ function Details:OpenForge()
|
||||
local data = all_modules [4].data [row]
|
||||
|
||||
local spellname, spellicon, _
|
||||
if (type (data [7]) == "number") then
|
||||
if (type(data [7]) == "number") then
|
||||
spellname, _, spellicon = GetSpellInfo(data [7])
|
||||
else
|
||||
if (data [7]) then
|
||||
@@ -793,24 +793,24 @@ function Details:OpenForge()
|
||||
desc = L["STRING_FORGE_BUTTON_DBMTIMERS_DESC"],
|
||||
filters_widgets = function()
|
||||
if (not DetailsForgeDBMBarsFilterPanel) then
|
||||
local w = CreateFrame ("frame", "DetailsForgeDBMBarsFilterPanel", f, "BackdropTemplate")
|
||||
w:SetSize (600, 20)
|
||||
w:SetPoint ("topleft", f, "topleft", 164, -40)
|
||||
local w = CreateFrame("frame", "DetailsForgeDBMBarsFilterPanel", f, "BackdropTemplate")
|
||||
w:SetSize(600, 20)
|
||||
w:SetPoint("topleft", f, "topleft", 164, -40)
|
||||
--
|
||||
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
label:SetText (L["STRING_FORGE_FILTER_BARTEXT"] .. ": ")
|
||||
label:SetPoint ("left", w, "left", 5, 0)
|
||||
label:SetText(L["STRING_FORGE_FILTER_BARTEXT"] .. ": ")
|
||||
label:SetPoint("left", w, "left", 5, 0)
|
||||
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeDBMBarsTextFilter")
|
||||
entry:SetHook ("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint ("left", label, "right", 2, 0)
|
||||
entry:SetHook("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint("left", label, "right", 2, 0)
|
||||
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
--
|
||||
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
label:SetText (L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
|
||||
label:SetPoint ("left", entry.widget, "right", 20, 0)
|
||||
label:SetText(L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
|
||||
label:SetPoint("left", entry.widget, "right", 20, 0)
|
||||
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeDBMBarsEncounterFilter")
|
||||
entry:SetHook ("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint ("left", label, "right", 2, 0)
|
||||
entry:SetHook("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint("left", label, "right", 2, 0)
|
||||
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
end
|
||||
return DetailsForgeDBMBarsFilterPanel
|
||||
@@ -904,7 +904,7 @@ function Details:OpenForge()
|
||||
local spellname, spellicon, _
|
||||
local spellid = tonumber (data [2])
|
||||
|
||||
if (type (spellid) == "number") then
|
||||
if (type(spellid) == "number") then
|
||||
if (spellid < 0) then
|
||||
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
|
||||
@@ -913,8 +913,8 @@ function Details:OpenForge()
|
||||
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})
|
||||
|
||||
elseif (type (data [2]) == "string") then
|
||||
--> "Xhul'horac" Imps
|
||||
elseif (type(data [2]) == "string") then
|
||||
--"Xhul'horac" Imps
|
||||
Details:OpenAuraPanel (data [2], data[3], data[5], data.id, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = data [2], text = "Next " .. (data[3] or "") .. " In", text_size = 72, icon = data[5]})
|
||||
end
|
||||
end
|
||||
@@ -924,24 +924,24 @@ function Details:OpenForge()
|
||||
desc = L["STRING_FORGE_BUTTON_BWTIMERS_DESC"],
|
||||
filters_widgets = function()
|
||||
if (not DetailsForgeBigWigsBarsFilterPanel) then
|
||||
local w = CreateFrame ("frame", "DetailsForgeBigWigsBarsFilterPanel", f, "BackdropTemplate")
|
||||
w:SetSize (600, 20)
|
||||
w:SetPoint ("topleft", f, "topleft", 164, -40)
|
||||
local w = CreateFrame("frame", "DetailsForgeBigWigsBarsFilterPanel", f, "BackdropTemplate")
|
||||
w:SetSize(600, 20)
|
||||
w:SetPoint("topleft", f, "topleft", 164, -40)
|
||||
--
|
||||
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
label:SetText (L["STRING_FORGE_FILTER_BARTEXT"] .. ": ")
|
||||
label:SetPoint ("left", w, "left", 5, 0)
|
||||
label:SetText(L["STRING_FORGE_FILTER_BARTEXT"] .. ": ")
|
||||
label:SetPoint("left", w, "left", 5, 0)
|
||||
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeBigWigsBarsTextFilter")
|
||||
entry:SetHook ("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint ("left", label, "right", 2, 0)
|
||||
entry:SetHook("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint("left", label, "right", 2, 0)
|
||||
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
--
|
||||
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
label:SetText (L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
|
||||
label:SetPoint ("left", entry.widget, "right", 20, 0)
|
||||
label:SetText(L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
|
||||
label:SetPoint("left", entry.widget, "right", 20, 0)
|
||||
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeBWBarsEncounterFilter")
|
||||
entry:SetHook ("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint ("left", label, "right", 2, 0)
|
||||
entry:SetHook("OnTextChanged", function() f:refresh() end)
|
||||
entry:SetPoint("left", label, "right", 2, 0)
|
||||
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
--
|
||||
end
|
||||
@@ -1041,7 +1041,7 @@ function Details:OpenForge()
|
||||
end
|
||||
end
|
||||
|
||||
for index, button in ipairs (buttons) do
|
||||
for index, button in ipairs(buttons) do
|
||||
button:SetTemplate (CONST_BUTTON_TEMPLATE)
|
||||
end
|
||||
buttons[module_number]:SetTemplate (CONST_BUTTONSELECTED_TEMPLATE)
|
||||
@@ -1053,10 +1053,10 @@ function Details:OpenForge()
|
||||
local fillpanel = module.fill_panel
|
||||
if (not fillpanel) then
|
||||
fillpanel = fw:NewFillPanel (f, module.header, module.fill_name, nil, 740, 481, module.fill_gettotal, module.fill_fillrows, false)
|
||||
fillpanel:SetPoint (170, -80)
|
||||
fillpanel:SetPoint(170, -80)
|
||||
fillpanel.module = module
|
||||
|
||||
local background = fillpanel:CreateTexture (nil, "background")
|
||||
local background = fillpanel:CreateTexture(nil, "background")
|
||||
background:SetAllPoints()
|
||||
background:SetColorTexture (0, 0, 0, 0.2)
|
||||
|
||||
@@ -1074,7 +1074,7 @@ function Details:OpenForge()
|
||||
|
||||
for o = 1, #fillpanel.scrollframe.lines do
|
||||
for i = 1, #fillpanel.scrollframe.lines [o].entry_inuse do
|
||||
--> text entry
|
||||
--text entry
|
||||
fillpanel.scrollframe.lines [o].entry_inuse [i]:SetTemplate (fw:GetTemplate ("button", "DETAILS_FORGE_TEXTENTRY_TEMPLATE"))
|
||||
end
|
||||
end
|
||||
@@ -1114,16 +1114,16 @@ function Details:OpenForge()
|
||||
|
||||
b:SetTemplate (CONST_BUTTON_TEMPLATE)
|
||||
b:SetIcon ([[Interface\BUTTONS\UI-GuildButton-PublicNote-Up]], nil, nil, nil, nil, {1, 1, 1, 0.7})
|
||||
b:SetWidth (140)
|
||||
b:SetWidth(140)
|
||||
|
||||
if (lastButton) then
|
||||
if (brackets[i]) then
|
||||
b:SetPoint ("topleft", lastButton, "bottomleft", 0, -23)
|
||||
b:SetPoint("topleft", lastButton, "bottomleft", 0, -23)
|
||||
else
|
||||
b:SetPoint ("topleft", lastButton, "bottomleft", 0, -8)
|
||||
b:SetPoint("topleft", lastButton, "bottomleft", 0, -8)
|
||||
end
|
||||
else
|
||||
b:SetPoint ("topleft", f, "topleft", 10, (i*16*-1) - 67)
|
||||
b:SetPoint("topleft", f, "topleft", 10, (i*16*-1) - 67)
|
||||
end
|
||||
|
||||
lastButton = b
|
||||
|
||||
+31
-31
@@ -35,32 +35,32 @@ function Details.OpenMacrosWindow()
|
||||
local scrollbox_line_height = 79.5
|
||||
local scrollbox_size = {890, 563}
|
||||
|
||||
f.bg1 = f:CreateTexture (nil, "background")
|
||||
f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
|
||||
f.bg1 = f:CreateTexture(nil, "background")
|
||||
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
|
||||
f.bg1:SetAlpha (0.8)
|
||||
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
|
||||
f.bg1:SetVertTile (true)
|
||||
f.bg1:SetHorizTile (true)
|
||||
f.bg1:SetSize (790, 454)
|
||||
f.bg1:SetSize(790, 454)
|
||||
f.bg1:SetAllPoints()
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (.5, .5, .5, .7)
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor(.5, .5, .5, .7)
|
||||
f:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
local macrosAvailable = Details.MacroList
|
||||
|
||||
local OnEnterMacroButton = function(self)
|
||||
self:SetBackdropColor (unpack (scrollbox_line_backdrop_color_onenter))
|
||||
self:SetBackdropColor(unpack (scrollbox_line_backdrop_color_onenter))
|
||||
end
|
||||
|
||||
local onLeaveMacroButton = function(self)
|
||||
self:SetBackdropColor (unpack (scrollbox_line_backdrop_color))
|
||||
self:SetBackdropColor(unpack (scrollbox_line_backdrop_color))
|
||||
end
|
||||
|
||||
local updateMacroLine = function(self, index, title, desc, macroText)
|
||||
self.Title:SetText (title)
|
||||
self.Desc:SetText (desc)
|
||||
self.MacroTextEntry:SetText (macroText)
|
||||
self.Title:SetText(title)
|
||||
self.Desc:SetText(desc)
|
||||
self.MacroTextEntry:SetText(macroText)
|
||||
end
|
||||
|
||||
local textEntryOnFocusGained = function(self)
|
||||
@@ -84,21 +84,21 @@ function Details.OpenMacrosWindow()
|
||||
|
||||
local macroListCreateLine = function(self, index)
|
||||
--create a new line
|
||||
local line = CreateFrame ("button", "$parentLine" .. index, self,"BackdropTemplate")
|
||||
local line = CreateFrame("button", "$parentLine" .. index, self,"BackdropTemplate")
|
||||
|
||||
--set its parameters
|
||||
line:SetPoint ("topleft", self, "topleft", 0, -((index-1) * (scrollbox_line_height+1)))
|
||||
line:SetSize (scrollbox_size[1], scrollbox_line_height)
|
||||
line:SetScript ("OnEnter", OnEnterMacroButton)
|
||||
line:SetScript ("OnLeave", onLeaveMacroButton)
|
||||
line:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
line:SetBackdropColor (unpack (scrollbox_line_backdrop_color))
|
||||
line:SetBackdropBorderColor (0, 0, 0, 0.3)
|
||||
line:SetPoint("topleft", self, "topleft", 0, -((index-1) * (scrollbox_line_height+1)))
|
||||
line:SetSize(scrollbox_size[1], scrollbox_line_height)
|
||||
line:SetScript("OnEnter", OnEnterMacroButton)
|
||||
line:SetScript("OnLeave", onLeaveMacroButton)
|
||||
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
line:SetBackdropColor(unpack (scrollbox_line_backdrop_color))
|
||||
line:SetBackdropBorderColor(0, 0, 0, 0.3)
|
||||
|
||||
local titleLabel = DF:CreateLabel (line, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
|
||||
local titleLabel = DF:CreateLabel(line, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
|
||||
titleLabel.textsize = 14
|
||||
titleLabel.textcolor = "yellow"
|
||||
local descLabel = DF:CreateLabel (line, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
|
||||
local descLabel = DF:CreateLabel(line, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
|
||||
descLabel.textsize = 12
|
||||
|
||||
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
|
||||
@@ -107,14 +107,14 @@ function Details.OpenMacrosWindow()
|
||||
options_dropdown_template.onenterbordercolor = {.51, .51, .51, .2}
|
||||
|
||||
local textEntry = DF:CreateTextEntry (line, function()end, scrollbox_size[1] - 10, 40, "MacroTextEntry", _, _, options_dropdown_template)
|
||||
textEntry:SetHook ("OnEditFocusGained", textEntryOnFocusGained)
|
||||
textEntry:SetHook ("OnEditFocusLost", textEntryOnFocusLost)
|
||||
textEntry:SetJustifyH ("left")
|
||||
textEntry:SetHook("OnEditFocusGained", textEntryOnFocusGained)
|
||||
textEntry:SetHook("OnEditFocusLost", textEntryOnFocusLost)
|
||||
textEntry:SetJustifyH("left")
|
||||
textEntry:SetTextInsets (8, 8, 0, 0)
|
||||
|
||||
titleLabel:SetPoint ("topleft", line, "topleft", 5, -5)
|
||||
descLabel:SetPoint ("topleft", titleLabel, "bottomleft", 0, -2)
|
||||
textEntry:SetPoint ("topleft", descLabel, "bottomleft", 0, -4)
|
||||
titleLabel:SetPoint("topleft", line, "topleft", 5, -5)
|
||||
descLabel:SetPoint("topleft", titleLabel, "bottomleft", 0, -2)
|
||||
textEntry:SetPoint("topleft", descLabel, "bottomleft", 0, -4)
|
||||
|
||||
line.Title = titleLabel
|
||||
line.Desc = descLabel
|
||||
@@ -127,10 +127,10 @@ function Details.OpenMacrosWindow()
|
||||
end
|
||||
|
||||
local macroScrollbox = DF:CreateScrollBox (f, "$parentMacroScrollbox", refreshMacroScrollbox, macrosAvailable, scrollbox_size[1], scrollbox_size[2], scrollbox_lines, scrollbox_line_height)
|
||||
macroScrollbox:SetPoint ("topleft", f, "topleft", 5, -30)
|
||||
macroScrollbox:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
macroScrollbox:SetBackdropColor (0, 0, 0, 0)
|
||||
macroScrollbox:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
macroScrollbox:SetPoint("topleft", f, "topleft", 5, -30)
|
||||
macroScrollbox:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
macroScrollbox:SetBackdropColor(0, 0, 0, 0)
|
||||
macroScrollbox:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
f.MacroScrollbox = macroScrollbox
|
||||
DF:ReskinSlider(macroScrollbox)
|
||||
|
||||
|
||||
+2156
-2160
File diff suppressed because it is too large
Load Diff
+19
-19
@@ -35,7 +35,7 @@ function Details:OpenNewsWindow(textToShow, dumpValues, keeptext)
|
||||
newsFrame:Text((DetailsNewsWindowText:GetText() or "") .. "\n\n" .. returnString)
|
||||
else
|
||||
if (dumpValues) then
|
||||
newsFrame.DumpTableFrame:SetText (returnString)
|
||||
newsFrame.DumpTableFrame:SetText(returnString)
|
||||
else
|
||||
newsFrame:Text (returnString)
|
||||
end
|
||||
@@ -94,30 +94,30 @@ function Details:CreateOrOpenNewsWindow()
|
||||
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)
|
||||
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},})
|
||||
frameUpper:SetBackdropColor (.1, .1, .1, .3)
|
||||
frameUpper:SetBackdropColor(.1, .1, .1, .3)
|
||||
frameUpper:SetScrollChild (frameLower)
|
||||
|
||||
local slider = CreateFrame ("slider", "DetailsNewsWindowSlider", frame, "BackdropTemplate")
|
||||
slider.bg = slider:CreateTexture (nil, "background")
|
||||
slider.bg:SetAllPoints (true)
|
||||
slider.bg:SetTexture (0, 0, 0, 0.5)
|
||||
local slider = CreateFrame("slider", "DetailsNewsWindowSlider", frame, "BackdropTemplate")
|
||||
slider.bg = slider:CreateTexture(nil, "background")
|
||||
slider.bg:SetAllPoints(true)
|
||||
slider.bg:SetTexture(0, 0, 0, 0.5)
|
||||
|
||||
slider.thumb = slider:CreateTexture (nil, "OVERLAY")
|
||||
slider.thumb:SetTexture ("Interface\\Buttons\\UI-ScrollBar-Knob")
|
||||
slider.thumb:SetSize (25, 25)
|
||||
slider.thumb = slider:CreateTexture(nil, "OVERLAY")
|
||||
slider.thumb:SetTexture("Interface\\Buttons\\UI-ScrollBar-Knob")
|
||||
slider.thumb:SetSize(25, 25)
|
||||
|
||||
slider:SetThumbTexture (slider.thumb)
|
||||
slider:SetOrientation ("vertical");
|
||||
slider:SetSize (16, 499)
|
||||
slider:SetPoint ("topleft", frameUpper, "topright")
|
||||
slider:SetSize(16, 499)
|
||||
slider:SetPoint("topleft", frameUpper, "topright")
|
||||
slider:SetMinMaxValues (0, 2000)
|
||||
slider:SetValue(0)
|
||||
slider:SetScript("OnValueChanged", function(self)
|
||||
@@ -130,15 +130,15 @@ function Details:CreateOrOpenNewsWindow()
|
||||
if (IsShiftKeyDown() and (delta > 0)) then
|
||||
slider:SetValue(0)
|
||||
elseif (IsShiftKeyDown() and (delta < 0)) then
|
||||
slider:SetValue (2000)
|
||||
slider:SetValue(2000)
|
||||
elseif ((delta < 0) and (current < 2000)) then
|
||||
slider:SetValue (current + 20)
|
||||
slider:SetValue(current + 20)
|
||||
elseif ((delta > 0) and (current > 1)) then
|
||||
slider:SetValue (current - 20)
|
||||
slider:SetValue(current - 20)
|
||||
end
|
||||
end)
|
||||
|
||||
--> text box
|
||||
--text box
|
||||
local texto = frameLower:CreateFontString("DetailsNewsWindowText", "overlay", "GameFontNormal")
|
||||
texto:SetPoint("topleft", frameLower, "topleft")
|
||||
texto:SetJustifyH("left")
|
||||
@@ -165,7 +165,7 @@ function Details:CreateOrOpenNewsWindow()
|
||||
DetailsFramework:ApplyStandardBackdrop(statusBar)
|
||||
statusBar:SetAlpha (0.8)
|
||||
DetailsFramework:BuildStatusbarAuthorInfo(statusBar, "", "")
|
||||
statusBar.authorName:SetPoint ("left", statusBar, "left", 207, 0)
|
||||
statusBar.authorName:SetPoint("left", statusBar, "left", 207, 0)
|
||||
|
||||
|
||||
function frame:Title (title)
|
||||
@@ -173,7 +173,7 @@ function Details:CreateOrOpenNewsWindow()
|
||||
end
|
||||
|
||||
function frame:Text (text)
|
||||
texto:SetText (text or "")
|
||||
texto:SetText(text or "")
|
||||
end
|
||||
|
||||
frame:Hide()
|
||||
|
||||
@@ -174,8 +174,8 @@ function Details.options.InitializeOptionsWindow(instance)
|
||||
editingGroupCheckBox:SetPoint("left", editingGroupLabel, "right", 2, 0)
|
||||
formatFooterText(editingGroupLabel)
|
||||
|
||||
--> create test bars
|
||||
DF:NewColor ("C_OptionsButtonOrange", 0.9999, 0.8196, 0, 1)
|
||||
--create test bars
|
||||
DF:NewColor("C_OptionsButtonOrange", 0.9999, 0.8196, 0, 1)
|
||||
local create_test_bars_func = function()
|
||||
_detalhes.CreateTestBars()
|
||||
if (not _detalhes.test_bar_update) then
|
||||
@@ -185,17 +185,17 @@ function Details.options.InitializeOptionsWindow(instance)
|
||||
end
|
||||
end
|
||||
local fillbars = DF:NewButton(footerFrame, _, "$parentCreateExampleBarsButton", nil, 140, 20, create_test_bars_func, nil, nil, nil, Loc ["STRING_OPTIONS_TESTBARS"], 1)
|
||||
fillbars:SetPoint ("bottomleft", f.widget, "bottomleft", 10, 10)
|
||||
fillbars:SetPoint("bottomleft", f.widget, "bottomleft", 10, 10)
|
||||
fillbars:SetTemplate(options_button_template)
|
||||
fillbars:SetIcon ("Interface\\AddOns\\Details\\images\\icons", nil, nil, nil, {323/512, 365/512, 42/512, 78/512}, {1, 1, 1, 0.6}, 4, 2)
|
||||
|
||||
--> change log
|
||||
--change log
|
||||
local changelog = DF:NewButton(footerFrame, _, "$parentOpenChangeLogButton", nil, 140, 20, _detalhes.OpenNewsWindow, "change_log", nil, nil, Loc ["STRING_OPTIONS_CHANGELOG"], 1)
|
||||
changelog:SetPoint ("left", fillbars, "right", 10, 0)
|
||||
changelog:SetPoint("left", fillbars, "right", 10, 0)
|
||||
changelog:SetTemplate (options_button_template)
|
||||
changelog:SetIcon ("Interface\\AddOns\\Details\\images\\icons", nil, nil, nil, {367/512, 399/512, 43/512, 76/512}, {1, 1, 1, 0.8}, 4, 2)
|
||||
|
||||
--> search field
|
||||
--search field
|
||||
local searchBox = DF:CreateTextEntry(footerFrame, function()end, 140, 20, _, _, _, options_dropdown_template)
|
||||
searchBox:SetPoint("left", changelog, "right", 10, 0)
|
||||
|
||||
|
||||
+408
-408
File diff suppressed because it is too large
Load Diff
+46
-46
@@ -28,19 +28,19 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
local f = DetailsPlaterIntegrationPanel or DF:CreateSimplePanel (UIParent, 700, 480, "Details! Plater Nameplates Integration", "DetailsPlaterIntegrationPanel")
|
||||
|
||||
--background
|
||||
f.bg1 = f:CreateTexture (nil, "background")
|
||||
f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
|
||||
f.bg1 = f:CreateTexture(nil, "background")
|
||||
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
|
||||
f.bg1:SetAlpha (0.8)
|
||||
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
|
||||
f.bg1:SetVertTile (true)
|
||||
f.bg1:SetHorizTile (true)
|
||||
f.bg1:SetSize (790, 454)
|
||||
f.bg1:SetSize(790, 454)
|
||||
f.bg1:SetAllPoints()
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (.5, .5, .5, .7)
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor(.5, .5, .5, .7)
|
||||
f:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--> anchor text function
|
||||
--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 t = {}
|
||||
@@ -63,7 +63,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
|
||||
{type = "label", get = function() return "Add Real Time DPS Info in the Nameplate:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
|
||||
|
||||
--> real time dps from all sources
|
||||
--real time dps from all sources
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return Details.plater.realtime_dps_enabled end,
|
||||
@@ -73,7 +73,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
Details:RefreshPlaterIntegration()
|
||||
|
||||
if (not value) then
|
||||
Details:Msg ("a /reload might be needed to disable this setting.")
|
||||
Details:Msg("a /reload might be needed to disable this setting.")
|
||||
else
|
||||
if (Plater) then
|
||||
Plater.RefreshDBUpvalues()
|
||||
@@ -83,7 +83,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Show Real Time Dps",
|
||||
desc = "Show Real Time DPS on the nameplate.\n\nReal time DPS is how much damage has been inflicted to the unit in the last 5 seconds.",
|
||||
},
|
||||
--> text size
|
||||
--text size
|
||||
{
|
||||
type = "range",
|
||||
get = function() return Details.plater.realtime_dps_size end,
|
||||
@@ -99,7 +99,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Size",
|
||||
desc = "Text Size",
|
||||
},
|
||||
--> text color
|
||||
--text color
|
||||
{
|
||||
type = "color",
|
||||
get = function()
|
||||
@@ -117,7 +117,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Color",
|
||||
text_template = options_text_template,
|
||||
},
|
||||
--> text shadow
|
||||
--text shadow
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return Details.plater.realtime_dps_shadow end,
|
||||
@@ -130,7 +130,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Shadow",
|
||||
desc = "Text Shadow",
|
||||
},
|
||||
--> text anchor
|
||||
--text anchor
|
||||
--anchor location
|
||||
{
|
||||
type = "select",
|
||||
@@ -175,7 +175,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
{type = "breakline"},
|
||||
{type = "label", get = function() return "Add Real Time DPS Info Only From You in the Nameplate:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
|
||||
|
||||
--> real time dps from the player only
|
||||
--real time dps from the player only
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return Details.plater.realtime_dps_player_enabled end,
|
||||
@@ -185,7 +185,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
Details:RefreshPlaterIntegration()
|
||||
|
||||
if (not value) then
|
||||
Details:Msg ("a /reload might be needed to disable this setting.")
|
||||
Details:Msg("a /reload might be needed to disable this setting.")
|
||||
else
|
||||
if (Plater) then
|
||||
Plater.RefreshDBUpvalues()
|
||||
@@ -195,7 +195,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Show Real Time Dps (From You)",
|
||||
desc = "Show Real Time DPS you are currently applying in the unit.\n\nReal time DPS is how much damage has been inflicted to the unit in the last 5 seconds.",
|
||||
},
|
||||
--> text size
|
||||
--text size
|
||||
{
|
||||
type = "range",
|
||||
get = function() return Details.plater.realtime_dps_player_size end,
|
||||
@@ -211,7 +211,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Size",
|
||||
desc = "Text Size",
|
||||
},
|
||||
--> text color
|
||||
--text color
|
||||
{
|
||||
type = "color",
|
||||
get = function()
|
||||
@@ -229,7 +229,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Color",
|
||||
text_template = options_text_template,
|
||||
},
|
||||
--> text shadow
|
||||
--text shadow
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return Details.plater.realtime_dps_player_shadow end,
|
||||
@@ -242,7 +242,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Shadow",
|
||||
desc = "Text Shadow",
|
||||
},
|
||||
--> text anchor
|
||||
--text anchor
|
||||
--anchor location
|
||||
{
|
||||
type = "select",
|
||||
@@ -287,7 +287,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
{type = "breakline"},
|
||||
{type = "label", get = function() return "Add Total Damage Taken in the Nameplate:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
|
||||
|
||||
--> total damage taken from all sources
|
||||
--total damage taken from all sources
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return Details.plater.damage_taken_enabled end,
|
||||
@@ -297,7 +297,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
Details:RefreshPlaterIntegration()
|
||||
|
||||
if (not value) then
|
||||
Details:Msg ("a /reload might be needed to disable this setting.")
|
||||
Details:Msg("a /reload might be needed to disable this setting.")
|
||||
else
|
||||
if (Plater) then
|
||||
Plater.RefreshDBUpvalues()
|
||||
@@ -307,7 +307,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Show Total Damage Taken",
|
||||
desc = "Show the total damage taken by the unit",
|
||||
},
|
||||
--> text size
|
||||
--text size
|
||||
{
|
||||
type = "range",
|
||||
get = function() return Details.plater.damage_taken_size end,
|
||||
@@ -323,7 +323,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Size",
|
||||
desc = "Text Size",
|
||||
},
|
||||
--> text color
|
||||
--text color
|
||||
{
|
||||
type = "color",
|
||||
get = function()
|
||||
@@ -341,7 +341,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Color",
|
||||
text_template = options_text_template,
|
||||
},
|
||||
--> text shadow
|
||||
--text shadow
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return Details.plater.damage_taken_shadow end,
|
||||
@@ -354,7 +354,7 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
name = "Text Shadow",
|
||||
desc = "Text Shadow",
|
||||
},
|
||||
--> text anchor
|
||||
--text anchor
|
||||
--anchor location
|
||||
{
|
||||
type = "select",
|
||||
@@ -403,46 +403,46 @@ function Details.OpenPlaterIntegrationWindow()
|
||||
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
|
||||
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
|
||||
local titleBackground = CreateFrame ("frame", nil, f,"BackdropTemplate")
|
||||
titleBackground:SetPoint ("topleft", f, "topleft", 10, -30)
|
||||
titleBackground:SetPoint ("topright", f, "topright", -10, -30)
|
||||
titleBackground:SetHeight (80)
|
||||
local titleBackground = CreateFrame("frame", nil, f,"BackdropTemplate")
|
||||
titleBackground:SetPoint("topleft", f, "topleft", 10, -30)
|
||||
titleBackground:SetPoint("topright", f, "topright", -10, -30)
|
||||
titleBackground:SetHeight(80)
|
||||
|
||||
--background
|
||||
titleBackground.bg1 = titleBackground:CreateTexture (nil, "background")
|
||||
titleBackground.bg1:SetTexture ([[Interface\AddOns\Details\images\background]])
|
||||
titleBackground.bg1 = titleBackground:CreateTexture(nil, "background")
|
||||
titleBackground.bg1:SetTexture([[Interface\AddOns\Details\images\background]])
|
||||
titleBackground.bg1:SetAlpha (0.8)
|
||||
titleBackground.bg1:SetVertexColor (0.27, 0.27, 0.27)
|
||||
titleBackground.bg1:SetVertTile (true)
|
||||
titleBackground.bg1:SetHorizTile (true)
|
||||
titleBackground.bg1:SetSize (790, 454)
|
||||
titleBackground.bg1:SetSize(790, 454)
|
||||
titleBackground.bg1:SetAllPoints()
|
||||
titleBackground:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
titleBackground:SetBackdropColor (.5, .5, .5, .7)
|
||||
titleBackground:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
titleBackground:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
titleBackground:SetBackdropColor(.5, .5, .5, .7)
|
||||
titleBackground:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
local platerTitle = DF:CreateLabel (titleBackground, "Plater Nameplates Integration", 16, "white")
|
||||
local platerDesc1 = DF:CreateLabel (titleBackground, "Add DPS and Damage information directly into the nameplate", 11, "silver")
|
||||
local platerDesc2 = DF:CreateLabel (titleBackground, "See how much damage the enemy is taking in real time!", 11, "silver")
|
||||
local platerTitle = DF:CreateLabel(titleBackground, "Plater Nameplates Integration", 16, "white")
|
||||
local platerDesc1 = DF:CreateLabel(titleBackground, "Add DPS and Damage information directly into the nameplate", 11, "silver")
|
||||
local platerDesc2 = DF:CreateLabel(titleBackground, "See how much damage the enemy is taking in real time!", 11, "silver")
|
||||
local platerImage = DF:CreateImage (titleBackground, "Interface\\AddOns\\Details\\images\\plater_image")
|
||||
platerImage:SetSize (256, 64)
|
||||
platerImage:SetSize(256, 64)
|
||||
|
||||
platerImage:SetPoint ("topright", f, "topright", -150, -35)
|
||||
platerTitle:SetPoint (10, -15)
|
||||
platerDesc1:SetPoint (10, -35)
|
||||
platerDesc2:SetPoint (10, -47)
|
||||
platerImage:SetPoint("topright", f, "topright", -150, -35)
|
||||
platerTitle:SetPoint(10, -15)
|
||||
platerDesc1:SetPoint(10, -35)
|
||||
platerDesc2:SetPoint(10, -47)
|
||||
|
||||
DF:BuildMenu (f, menu_table, 10, -140, 460, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
|
||||
|
||||
if (not Plater) then
|
||||
for _, widget in ipairs (f.widget_list) do
|
||||
for _, widget in ipairs(f.widget_list) do
|
||||
if (widget.Disable) then
|
||||
widget:Disable()
|
||||
end
|
||||
end
|
||||
|
||||
local PlaterDisabled1 = DF:CreateLabel (f, "Plater isn't installed! you may download it from the Curseforge app.", 16, "red")
|
||||
PlaterDisabled1:SetPoint (10, -330)
|
||||
local PlaterDisabled1 = DF:CreateLabel(f, "Plater isn't installed! you may download it from the Curseforge app.", 16, "red")
|
||||
PlaterDisabled1:SetPoint(10, -330)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
+1464
-1464
File diff suppressed because it is too large
Load Diff
+18
-18
@@ -4,7 +4,7 @@ local L = _G.LibStub ("AceLocale-3.0"):GetLocale( "Details" )
|
||||
|
||||
function Details:OpenProfiler()
|
||||
|
||||
--> isn't first run, so just quit
|
||||
--isn't first run, so just quit
|
||||
if (not Details.character_first_run) then
|
||||
return
|
||||
|
||||
@@ -15,7 +15,7 @@ function Details:OpenProfiler()
|
||||
return
|
||||
|
||||
else
|
||||
--> check is this is the first run of the addon (after being installed)
|
||||
--check is this is the first run of the addon (after being installed)
|
||||
local amount = 0
|
||||
for name, profile in pairs (_detalhes_global.__profiles) do
|
||||
amount = amount + 1
|
||||
@@ -26,26 +26,26 @@ function Details:OpenProfiler()
|
||||
end
|
||||
|
||||
local f = Details:CreateWelcomePanel (nil, nil, 250, 300, true)
|
||||
f:SetPoint ("right", UIParent, "right", -5, 0)
|
||||
f:SetPoint("right", UIParent, "right", -5, 0)
|
||||
|
||||
local logo = f:CreateTexture (nil, "artwork")
|
||||
logo:SetTexture ([[Interface\AddOns\Details\images\logotipo]])
|
||||
logo:SetSize (256*0.8, 128*0.8)
|
||||
logo:SetPoint ("center", f, "center", 0, 0)
|
||||
logo:SetPoint ("top", f, "top", 20, 20)
|
||||
local logo = f:CreateTexture(nil, "artwork")
|
||||
logo:SetTexture([[Interface\AddOns\Details\images\logotipo]])
|
||||
logo:SetSize(256*0.8, 128*0.8)
|
||||
logo:SetPoint("center", f, "center", 0, 0)
|
||||
logo:SetPoint("top", f, "top", 20, 20)
|
||||
|
||||
local string_profiler = f:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
string_profiler:SetPoint ("top", logo, "bottom", -20, 10)
|
||||
string_profiler:SetText ("Profiler!")
|
||||
string_profiler:SetPoint("top", logo, "bottom", -20, 10)
|
||||
string_profiler:SetText("Profiler!")
|
||||
|
||||
local string_profiler = f:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
string_profiler:SetPoint ("topleft", f, "topleft", 10, -130)
|
||||
string_profiler:SetText (L["STRING_OPTIONS_PROFILE_SELECTEXISTING"])
|
||||
string_profiler:SetWidth (230)
|
||||
string_profiler:SetPoint("topleft", f, "topleft", 10, -130)
|
||||
string_profiler:SetText(L["STRING_OPTIONS_PROFILE_SELECTEXISTING"])
|
||||
string_profiler:SetWidth(230)
|
||||
Details:SetFontSize (string_profiler, 11)
|
||||
Details:SetFontColor (string_profiler, "white")
|
||||
Details:SetFontColor(string_profiler, "white")
|
||||
|
||||
--> get the new profile name
|
||||
--get the new profile name
|
||||
local current_profile = Details:GetCurrentProfileName()
|
||||
|
||||
local on_select_profile = function(_, _, profilename)
|
||||
@@ -63,7 +63,7 @@ function Details:OpenProfiler()
|
||||
local t = {
|
||||
{value = current_profile, label = L["STRING_OPTIONS_PROFILE_USENEW"], onclick = on_select_profile, icon = [[Interface\FriendsFrame\UI-Toast-FriendRequestIcon]], texcoord = {4/32, 30/32, 4/32, 28/32}, iconcolor = "orange"}
|
||||
}
|
||||
for _, profilename in ipairs (Details:GetProfileList()) do
|
||||
for _, profilename in ipairs(Details:GetProfileList()) do
|
||||
if (profilename ~= current_profile) then
|
||||
t[#t+1] = {value = profilename, label = profilename, onclick = on_select_profile, icon = [[Interface\FriendsFrame\UI-Toast-FriendOnlineIcon]], texcoord = texcoord, iconcolor = "yellow"}
|
||||
end
|
||||
@@ -72,7 +72,7 @@ function Details:OpenProfiler()
|
||||
end
|
||||
|
||||
local dropdown = Details.gump:NewDropDown (f, f, "DetailsProfilerProfileSelectorDropdown", "dropdown", 220, 20, fill_dropdown, 1)
|
||||
dropdown:SetPoint (15, -190)
|
||||
dropdown:SetPoint(15, -190)
|
||||
|
||||
local confirm_func = function()
|
||||
if (current_profile ~= Details:GetCurrentProfileName()) then
|
||||
@@ -81,6 +81,6 @@ function Details:OpenProfiler()
|
||||
f:Hide()
|
||||
end
|
||||
local confirm = Details.gump:NewButton (f, f, "DetailsProfilerProfileConfirmButton", "button", 150, 20, confirm_func, nil, nil, nil, "Okey!")
|
||||
confirm:SetPoint (50, -250)
|
||||
confirm:SetPoint(50, -250)
|
||||
confirm:InstallCustomTexture()
|
||||
end
|
||||
+12
-12
@@ -5,7 +5,7 @@ local Details = _G._detalhes
|
||||
local gump = Details.gump
|
||||
local _
|
||||
|
||||
--> details API functions -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--details API functions -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function Details:FastReportWindow(window)
|
||||
if (not DetailsReportWindow) then
|
||||
@@ -154,7 +154,7 @@ local _
|
||||
Details.copypasteframe.EditBox:SetFocus(true)
|
||||
end
|
||||
|
||||
--> internal details report functions -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--internal details report functions -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function Details:Reportar(param2, options, arg3, id)
|
||||
GameCooltip2:Hide()
|
||||
|
||||
@@ -305,10 +305,10 @@ local createDropdown = function(thisFrame)
|
||||
end
|
||||
end
|
||||
|
||||
local channels = {GetChannelList()} --> coloca o resultado em uma tabela .. {id1, canal1, id2, canal2}
|
||||
local channels = {GetChannelList()} --coloca o resultado em uma tabela .. {id1, canal1, id2, canal2}
|
||||
--09/august/2018: GetChannelList passed to return 3 values for each channel instead of 2
|
||||
|
||||
for i = 1, #channels, 3 do --> total de canais
|
||||
for i = 1, #channels, 3 do --total de canais
|
||||
reportChannelsTable[#reportChannelsTable + 1] = {iconsize = iconsize, value = "CHANNEL|" .. channels[i+1], label = channels[i] .. ". " .. channels[i+1], onclick = onClick, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], texcoord = {0.3046875, 0.4453125, 0.109375, 0.390625}, iconcolor = {149/255, 112/255, 112/255}}
|
||||
end
|
||||
|
||||
@@ -484,7 +484,7 @@ local createDropdown = function(thisFrame)
|
||||
editbox:SetText("")
|
||||
end
|
||||
|
||||
editbox.perdeu_foco = true --> isso aqui pra quando estiver editando e clicar em outra caixa
|
||||
editbox.perdeu_foco = true --isso aqui pra quando estiver editando e clicar em outra caixa
|
||||
editbox:ClearFocus()
|
||||
end)
|
||||
|
||||
@@ -608,7 +608,7 @@ local createDropdown = function(thisFrame)
|
||||
window.dropdown:SetPoint("topleft", window, "topleft", anchorX, -30)
|
||||
window.dropdown:SetBackdrop({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, tile=true,
|
||||
tileSize = 64, insets = {left = 0, right = 0, top = 0, bottom = 0}})
|
||||
window.dropdown:SetBackdropBorderColor (0, 0, 0, 0.5)
|
||||
window.dropdown:SetBackdropBorderColor(0, 0, 0, 0.5)
|
||||
window.dropdown:SetBackdropColor(0, 0, 0, 0.1)
|
||||
|
||||
window.wisp_who:ClearAllPoints()
|
||||
@@ -619,7 +619,7 @@ local createDropdown = function(thisFrame)
|
||||
window.editbox:SetHeight(20)
|
||||
window.editbox:SetBackdrop({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, tile=true,
|
||||
tileSize = 64, insets = {left = 0, right = 0, top = 0, bottom = 0}})
|
||||
window.editbox:SetBackdropBorderColor (0, 0, 0, 0.5)
|
||||
window.editbox:SetBackdropBorderColor(0, 0, 0, 0.5)
|
||||
window.editbox:SetBackdropColor(0, 0, 0, 0.3)
|
||||
|
||||
window.linhas_amt:ClearAllPoints()
|
||||
@@ -629,7 +629,7 @@ local createDropdown = function(thisFrame)
|
||||
window.slider:SetPoint("topleft", window.linhas_amt, "bottomleft", 0, -3)
|
||||
window.slider:SetBackdrop({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, tile=true,
|
||||
tileSize = 64, insets = {left = 0, right = 0, top = 0, bottom = 0}})
|
||||
window.slider:SetBackdropBorderColor (0, 0, 0, 0.5)
|
||||
window.slider:SetBackdropBorderColor(0, 0, 0, 0.5)
|
||||
window.slider:SetBackdropColor(0, 0, 0, 0.3)
|
||||
|
||||
window.slider.thumb:SetTexture([[Interface\AddOns\Details\images\icons2]])
|
||||
@@ -643,7 +643,7 @@ local createDropdown = function(thisFrame)
|
||||
reverse_checkbox:ClearAllPoints()
|
||||
reverse_checkbox:SetBackdrop({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, tile=true,
|
||||
tileSize = 64, insets = {left = 0, right = 0, top = 0, bottom = 0}})
|
||||
reverse_checkbox:SetBackdropBorderColor (0, 0, 0, 0.5)
|
||||
reverse_checkbox:SetBackdropBorderColor(0, 0, 0, 0.5)
|
||||
reverse_checkbox:SetBackdropColor(0, 0, 0, 0.3)
|
||||
reverse_checkbox:SetPoint("topleft", window.slider, "bottomleft", 0, -8)
|
||||
reverse_checkbox:SetSize(14, 14)
|
||||
@@ -665,7 +665,7 @@ local createDropdown = function(thisFrame)
|
||||
window:SetHeight(195)
|
||||
window:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
window:SetBackdropColor(1, 1, 1, 1)
|
||||
window:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
window:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
if (not window.widgets) then
|
||||
window.widgets = {}
|
||||
@@ -676,7 +676,7 @@ local createDropdown = function(thisFrame)
|
||||
titlebar:SetHeight(20)
|
||||
titlebar:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
titlebar:SetBackdropColor(.5, .5, .5, 1)
|
||||
titlebar:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
titlebar:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
local bg1 = window:CreateTexture(nil, "background")
|
||||
bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
|
||||
@@ -895,7 +895,7 @@ local createDropdown = function(thisFrame)
|
||||
--close button
|
||||
window.fechar = CreateFrame("Button", nil, window, "UIPanelCloseButton")
|
||||
window.fechar:SetScript("OnClick", function()
|
||||
Details.FadeHandler.Fader (window, 1)
|
||||
Details.FadeHandler.Fader(window, 1)
|
||||
Details.janela_report.ativa = false
|
||||
end)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ local windowWidth = 950
|
||||
local scrollWidth = 825
|
||||
|
||||
local panel = Details:CreateWelcomePanel ("DetailsWindowOptionsBarTextEditor", nil, windowWidth, 600, true)
|
||||
panel:SetPoint ("center", UIParent, "center")
|
||||
panel:SetPoint("center", UIParent, "center")
|
||||
panel:Hide()
|
||||
panel:SetFrameStrata ("FULLSCREEN")
|
||||
DF:ApplyStandardBackdrop (panel)
|
||||
@@ -19,12 +19,12 @@ DF:CreateTitleBar (panel, "Details! Custom Line Text Editor")
|
||||
function panel:Open (text, callback, host, default)
|
||||
if (host) then
|
||||
panel:ClearAllPoints()
|
||||
panel:SetPoint ("center", host, "center")
|
||||
panel:SetPoint("center", host, "center")
|
||||
end
|
||||
|
||||
text = text:gsub ("||", "|")
|
||||
panel.default_text = text
|
||||
panel.editbox:SetText (text)
|
||||
panel.editbox:SetText(text)
|
||||
panel.callback = callback
|
||||
panel.default = default or ""
|
||||
panel:Show()
|
||||
@@ -34,7 +34,7 @@ local y = -32
|
||||
local buttonTemplate = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
|
||||
local textentry = DF:NewSpecialLuaEditorEntry (panel, scrollWidth, 555, "editbox", "$parentEntry")
|
||||
textentry:SetPoint ("topleft", panel, "topleft", 10, y)
|
||||
textentry:SetPoint("topleft", panel, "topleft", 10, y)
|
||||
DF:ApplyStandardBackdrop (textentry)
|
||||
DF:SetFontSize (textentry.editbox, 14)
|
||||
DF:ReskinSlider(textentry.scroll)
|
||||
@@ -42,9 +42,9 @@ 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)
|
||||
local arg3_button = DF:NewButton (panel, nil, "$parentButton3", nil, 80, 20, function() textentry.editbox:Insert ("{data3}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "3"), 1)
|
||||
arg1_button:SetPoint ("topright", panel, "topright", -12, y)
|
||||
arg2_button:SetPoint ("topright", panel, "topright", -12, y - (20*1))
|
||||
arg3_button:SetPoint ("topright", panel, "topright", -12, y - (20*2))
|
||||
arg1_button:SetPoint("topright", panel, "topright", -12, y)
|
||||
arg2_button:SetPoint("topright", panel, "topright", -12, y - (20*1))
|
||||
arg3_button:SetPoint("topright", panel, "topright", -12, y - (20*2))
|
||||
arg1_button:SetTemplate (buttonTemplate)
|
||||
arg2_button:SetTemplate (buttonTemplate)
|
||||
arg3_button:SetTemplate (buttonTemplate)
|
||||
@@ -164,10 +164,10 @@ end
|
||||
|
||||
local func_button = DF:NewButton (panel, nil, "$parentButton4", nil, 80, 20, function() textentry.editbox:Insert ("{func local player, combat = ...; return 0;}") end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_FUNC"], 1)
|
||||
local color_button = DF:NewColorPickButton (panel, "$parentButton5", nil, color_func)
|
||||
color_button:SetSize (80, 20)
|
||||
color_button:SetSize(80, 20)
|
||||
color_button:SetTemplate (buttonTemplate)
|
||||
|
||||
func_button:SetPoint ("topright", panel, "topright", -12, y - (20*3))
|
||||
func_button:SetPoint("topright", panel, "topright", -12, y - (20*3))
|
||||
func_button:SetTemplate (buttonTemplate)
|
||||
|
||||
color_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_COLOR_TOOLTIP"]
|
||||
@@ -180,19 +180,19 @@ end
|
||||
|
||||
local apply_button = DF:NewButton (panel, nil, "$parentApply", nil, 80, 20, function() panel.callback(panel.editbox:GetText()) end, nil, nil, nil, "Apply", 1) --localize-me
|
||||
apply_button:SetTemplate (buttonTemplate)
|
||||
apply_button:SetPoint ("topright", panel, "topright", -14, -128)
|
||||
apply_button:SetPoint("topright", panel, "topright", -14, -128)
|
||||
|
||||
local ok_button = DF:NewButton (panel, nil, "$parentButtonOk", nil, 80, 20, done, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_DONE"], 1)
|
||||
ok_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_DONE_TOOLTIP"]
|
||||
ok_button:SetTemplate (buttonTemplate)
|
||||
ok_button:SetPoint ("topright", panel, "topright", -14, -194)
|
||||
ok_button:SetPoint("topright", panel, "topright", -14, -194)
|
||||
|
||||
local reset_button = DF:NewButton (panel, nil, "$parentDefaultOk", nil, 80, 20, function() textentry.editbox:SetText(panel.default); panel.callback(panel.editbox:GetText()) end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_RESET"], 1)
|
||||
reset_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_RESET_TOOLTIP"]
|
||||
reset_button:SetTemplate (buttonTemplate)
|
||||
reset_button:SetPoint ("topright", panel, "topright", -14, -150)
|
||||
reset_button:SetPoint("topright", panel, "topright", -14, -150)
|
||||
|
||||
local cancel_button = DF:NewButton (panel, nil, "$parentDefaultCancel", nil, 80, 20, function() textentry.editbox:SetText (panel.default_text); done(); end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL"], 1)
|
||||
local cancel_button = DF:NewButton (panel, nil, "$parentDefaultCancel", nil, 80, 20, function() textentry.editbox:SetText(panel.default_text); done(); end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL"], 1)
|
||||
cancel_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL_TOOLTIP"]
|
||||
cancel_button:SetTemplate (buttonTemplate)
|
||||
cancel_button:SetPoint ("topright", panel, "topright", -14, -172)
|
||||
cancel_button:SetPoint("topright", panel, "topright", -14, -172)
|
||||
+38
-38
@@ -32,24 +32,24 @@ function Details.OpenRunCodeWindow()
|
||||
|
||||
local f = DetailsRunCodePanel or DF:CreateSimplePanel (UIParent, 700, 480, "Details! Run Code", "DetailsRunCodePanel")
|
||||
|
||||
--> lua editor
|
||||
--lua editor
|
||||
local code_editor = DF:NewSpecialLuaEditorEntry (f, 885, 510, "text", "$parentCodeEditorWindow")
|
||||
f.CodeEditor = code_editor
|
||||
code_editor:SetPoint ("topleft", f, "topleft", 20, -56)
|
||||
code_editor:SetPoint("topleft", f, "topleft", 20, -56)
|
||||
|
||||
--> code editor appearance
|
||||
code_editor.scroll:SetBackdrop (nil)
|
||||
code_editor.editbox:SetBackdrop (nil)
|
||||
code_editor:SetBackdrop (nil)
|
||||
--code editor appearance
|
||||
code_editor.scroll:SetBackdrop(nil)
|
||||
code_editor.editbox:SetBackdrop(nil)
|
||||
code_editor:SetBackdrop(nil)
|
||||
|
||||
DF:ReskinSlider(code_editor.scroll)
|
||||
|
||||
if (not code_editor.__background) then
|
||||
code_editor.__background = code_editor:CreateTexture (nil, "background")
|
||||
code_editor.__background = code_editor:CreateTexture(nil, "background")
|
||||
end
|
||||
|
||||
code_editor:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
code_editor:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
code_editor:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
code_editor:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
code_editor.__background:SetColorTexture (0.2317647, 0.2317647, 0.2317647)
|
||||
code_editor.__background:SetVertexColor (0.27, 0.27, 0.27)
|
||||
@@ -58,20 +58,20 @@ function Details.OpenRunCodeWindow()
|
||||
code_editor.__background:SetHorizTile (true)
|
||||
code_editor.__background:SetAllPoints()
|
||||
|
||||
--> code compile error warning
|
||||
local errortext_frame = CreateFrame ("frame", nil, code_editor,"BackdropTemplate")
|
||||
errortext_frame:SetPoint ("bottomleft", code_editor, "bottomleft", 1, 1)
|
||||
errortext_frame:SetPoint ("bottomright", code_editor, "bottomright", -1, 1)
|
||||
errortext_frame:SetHeight (20)
|
||||
errortext_frame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
errortext_frame:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
errortext_frame:SetBackdropColor (0, 0, 0)
|
||||
--code compile error warning
|
||||
local errortext_frame = CreateFrame("frame", nil, code_editor,"BackdropTemplate")
|
||||
errortext_frame:SetPoint("bottomleft", code_editor, "bottomleft", 1, 1)
|
||||
errortext_frame:SetPoint("bottomright", code_editor, "bottomright", -1, 1)
|
||||
errortext_frame:SetHeight(20)
|
||||
errortext_frame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
errortext_frame:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
errortext_frame:SetBackdropColor(0, 0, 0)
|
||||
|
||||
DF:CreateFlashAnimation (errortext_frame)
|
||||
|
||||
local errortext_label = DF:CreateLabel (errortext_frame, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
|
||||
local errortext_label = DF:CreateLabel(errortext_frame, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
|
||||
errortext_label.textcolor = "red"
|
||||
errortext_label:SetPoint ("left", errortext_frame, "left", 3, 0)
|
||||
errortext_label:SetPoint("left", errortext_frame, "left", 3, 0)
|
||||
code_editor.NextCodeCheck = 0.33
|
||||
|
||||
code_editor:HookScript ("OnUpdate", function(self, deltaTime)
|
||||
@@ -96,15 +96,15 @@ function Details.OpenRunCodeWindow()
|
||||
end
|
||||
end)
|
||||
|
||||
--> script selector
|
||||
--script selector
|
||||
local on_select_CodeType_option = function(self, fixedParameter, value)
|
||||
--> set the current editing code type
|
||||
--set the current editing code type
|
||||
f.EditingCode = Details.RunCodeTypes [value].Value
|
||||
f.EditingCodeKey = Details.RunCodeTypes [value].ProfileKey
|
||||
|
||||
--> load the code for the event
|
||||
--load the code for the event
|
||||
local code = Details.run_code [f.EditingCodeKey]
|
||||
code_editor:SetText (code)
|
||||
code_editor:SetText(code)
|
||||
end
|
||||
|
||||
local build_CodeType_dropdown_options = function()
|
||||
@@ -118,13 +118,13 @@ function Details.OpenRunCodeWindow()
|
||||
return t
|
||||
end
|
||||
|
||||
local code_type_label = DF:CreateLabel (f, "Event:", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
|
||||
local code_type_label = DF:CreateLabel(f, "Event:", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
|
||||
local code_type_dropdown = DF:CreateDropDown (f, build_CodeType_dropdown_options, 1, 160, 20, "CodeTypeDropdown", _, DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
code_type_dropdown:SetPoint ("left", code_type_label, "right", 2, 0)
|
||||
code_type_dropdown:SetPoint("left", code_type_label, "right", 2, 0)
|
||||
code_type_dropdown:SetFrameLevel (code_editor:GetFrameLevel() + 10)
|
||||
code_type_label:SetPoint ("bottomleft", code_editor, "topleft", 0, 8)
|
||||
code_type_label:SetPoint("bottomleft", code_editor, "topleft", 0, 8)
|
||||
|
||||
--> create save button
|
||||
--create save button
|
||||
local save_script = function()
|
||||
local code = code_editor:GetText()
|
||||
local func, errortext = loadstring (code, "Q")
|
||||
@@ -132,11 +132,11 @@ function Details.OpenRunCodeWindow()
|
||||
if (func) then
|
||||
Details.run_code [f.EditingCodeKey] = code
|
||||
Details:RecompileAutoRunCode()
|
||||
Details:Msg ("Code saved!")
|
||||
Details:Msg("Code saved!")
|
||||
code_editor:ClearFocus()
|
||||
else
|
||||
errortext_frame:Flash (0.2, 0.2, 0.4, true, nil, nil, "NONE")
|
||||
Details:Msg ("Can't save the code: it has errors.")
|
||||
Details:Msg("Can't save the code: it has errors.")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -144,20 +144,20 @@ function Details.OpenRunCodeWindow()
|
||||
|
||||
local save_script_button = DF:CreateButton (f, save_script, 120, 20, "Save", -1, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", "PLATER_BUTTON"))
|
||||
save_script_button:SetIcon ([[Interface\BUTTONS\UI-Panel-ExpandButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9})
|
||||
save_script_button:SetPoint ("topright", code_editor, "bottomright", 0, button_y)
|
||||
save_script_button:SetPoint("topright", code_editor, "bottomright", 0, button_y)
|
||||
|
||||
--> create cancel button
|
||||
--create cancel button
|
||||
local cancel_script = function()
|
||||
code_editor:SetText (Details.run_code [f.EditingCodeKey])
|
||||
Details:Msg ("Code cancelled!")
|
||||
code_editor:SetText(Details.run_code [f.EditingCodeKey])
|
||||
Details:Msg("Code cancelled!")
|
||||
code_editor:ClearFocus()
|
||||
end
|
||||
|
||||
local cancel_script_button = DF:CreateButton (f, cancel_script, 120, 20, "Cancel", -1, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", "PLATER_BUTTON"))
|
||||
cancel_script_button:SetIcon ([[Interface\BUTTONS\UI-Panel-MinimizeButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9})
|
||||
cancel_script_button:SetPoint ("topleft", code_editor, "bottomleft", 0, button_y)
|
||||
cancel_script_button:SetPoint("topleft", code_editor, "bottomleft", 0, button_y)
|
||||
|
||||
--> create run now button
|
||||
--create run now button
|
||||
|
||||
local execute_script = function()
|
||||
local script = code_editor:GetText()
|
||||
@@ -173,17 +173,17 @@ function Details.OpenRunCodeWindow()
|
||||
|
||||
local run_script_button = DF:CreateButton (f, execute_script, 120, 20, "Test Code", -1, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", "PLATER_BUTTON"))
|
||||
run_script_button:SetIcon ([[Interface\BUTTONS\UI-SpellbookIcon-NextPage-Up]], 20, 20, "overlay", {0.05, 0.95, 0.05, 0.95})
|
||||
run_script_button:SetPoint ("bottomright", code_editor, "topright", 0, 3)
|
||||
run_script_button:SetPoint("bottomright", code_editor, "topright", 0, 3)
|
||||
|
||||
end
|
||||
|
||||
DetailsPluginContainerWindow.OpenPlugin (DetailsRunCodePanel)
|
||||
DetailsRunCodePanel.CodeTypeDropdown:Select (1, true)
|
||||
|
||||
--> show the initialization code when showing up this window
|
||||
--show the initialization code when showing up this window
|
||||
DetailsRunCodePanel.EditingCode = Details.RunCodeTypes [1].Value
|
||||
DetailsRunCodePanel.EditingCodeKey = Details.RunCodeTypes [1].ProfileKey
|
||||
|
||||
local code = Details.run_code [DetailsRunCodePanel.EditingCodeKey]
|
||||
DetailsRunCodePanel.CodeEditor:SetText (code)
|
||||
DetailsRunCodePanel.CodeEditor:SetText(code)
|
||||
end
|
||||
|
||||
@@ -7,11 +7,11 @@ local _
|
||||
function Details:ScrollDamage()
|
||||
if (not DetailsScrollDamage) then
|
||||
DetailsScrollDamage = DetailsFramework:CreateSimplePanel(UIParent)
|
||||
DetailsScrollDamage:SetSize (427 - 40 - 20 - 20, 505 - 150 + 20 + 40)
|
||||
DetailsScrollDamage:SetSize(427 - 40 - 20 - 20, 505 - 150 + 20 + 40)
|
||||
DetailsScrollDamage:SetTitle ("Details! Scroll Damage (/details scroll)")
|
||||
DetailsScrollDamage.Data = {}
|
||||
DetailsScrollDamage:ClearAllPoints()
|
||||
DetailsScrollDamage:SetPoint ("left", UIParent, "left", 10, 0)
|
||||
DetailsScrollDamage:SetPoint("left", UIParent, "left", 10, 0)
|
||||
DetailsScrollDamage:Hide()
|
||||
|
||||
local scroll_width = 395 - 40 - 20 - 20
|
||||
|
||||
+127
-127
@@ -10,7 +10,7 @@ local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
|
||||
local CONST_GUILD_SYNC = "GS"
|
||||
|
||||
function Details:InitializeRaidHistoryWindow()
|
||||
local DetailsRaidHistoryWindow = CreateFrame ("frame", "DetailsRaidHistoryWindow", UIParent,"BackdropTemplate")
|
||||
local DetailsRaidHistoryWindow = CreateFrame("frame", "DetailsRaidHistoryWindow", UIParent,"BackdropTemplate")
|
||||
DetailsRaidHistoryWindow.Frame = DetailsRaidHistoryWindow
|
||||
DetailsRaidHistoryWindow.__name = Loc ["STRING_STATISTICS"]
|
||||
DetailsRaidHistoryWindow.real_name = "DETAILS_STATISTICS"
|
||||
@@ -33,14 +33,14 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
|
||||
DetailsRaidHistoryWindow.Initialized = true
|
||||
|
||||
local f = DetailsRaidHistoryWindow or CreateFrame ("frame", "DetailsRaidHistoryWindow", UIParent,"BackdropTemplate") --, "ButtonFrameTemplate"
|
||||
f:SetPoint ("center", UIParent, "center")
|
||||
local f = DetailsRaidHistoryWindow or CreateFrame("frame", "DetailsRaidHistoryWindow", UIParent,"BackdropTemplate") --, "ButtonFrameTemplate"
|
||||
f:SetPoint("center", UIParent, "center")
|
||||
f:SetFrameStrata ("HIGH")
|
||||
f:SetToplevel (true)
|
||||
|
||||
f:SetMovable (true)
|
||||
f:SetWidth (850)
|
||||
f:SetHeight (500)
|
||||
f:SetWidth(850)
|
||||
f:SetHeight(500)
|
||||
tinsert (UISpecialFrames, "DetailsRaidHistoryWindow")
|
||||
|
||||
function f.OpenDB()
|
||||
@@ -65,54 +65,54 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
|
||||
f.Mode = 2
|
||||
|
||||
f.bg1 = f:CreateTexture (nil, "background")
|
||||
f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
|
||||
f.bg1 = f:CreateTexture(nil, "background")
|
||||
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
|
||||
f.bg1:SetAlpha (0.7)
|
||||
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
|
||||
f.bg1:SetVertTile (true)
|
||||
f.bg1:SetHorizTile (true)
|
||||
f.bg1:SetSize (790, 454)
|
||||
f.bg1:SetSize(790, 454)
|
||||
f.bg1:SetAllPoints()
|
||||
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (.5, .5, .5, .5)
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor(.5, .5, .5, .5)
|
||||
f:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
local titlebar = DF:CreateTitleBar(f, "Details! " .. Loc ["STRING_STATISTICS"])
|
||||
|
||||
if (not Details:GetTutorialCVar ("HISTORYPANEL_TUTORIAL")) then
|
||||
local tutorialFrame = CreateFrame ("frame", "$parentTutorialFrame",f,"BackdropTemplate")
|
||||
tutorialFrame:SetPoint ("center", f, "center")
|
||||
local tutorialFrame = CreateFrame("frame", "$parentTutorialFrame",f,"BackdropTemplate")
|
||||
tutorialFrame:SetPoint("center", f, "center")
|
||||
tutorialFrame:SetFrameStrata ("DIALOG")
|
||||
tutorialFrame:SetSize (400, 300)
|
||||
tutorialFrame:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16,
|
||||
tutorialFrame:SetSize(400, 300)
|
||||
tutorialFrame:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16,
|
||||
insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize=1})
|
||||
tutorialFrame:SetBackdropColor (0, 0, 0, 1)
|
||||
tutorialFrame:SetBackdropColor(0, 0, 0, 1)
|
||||
|
||||
tutorialFrame.Title = DF:CreateLabel (tutorialFrame, "Statistics" , 12, "orange") --curse localization isn't adding new strings (and I deleted the old one)
|
||||
tutorialFrame.Title:SetPoint ("top", tutorialFrame, "top", 0, -5)
|
||||
tutorialFrame.Title = DF:CreateLabel(tutorialFrame, "Statistics" , 12, "orange") --curse localization isn't adding new strings (and I deleted the old one)
|
||||
tutorialFrame.Title:SetPoint("top", tutorialFrame, "top", 0, -5)
|
||||
|
||||
tutorialFrame.Desc = DF:CreateLabel (tutorialFrame, Loc ["STRING_GUILDDAMAGERANK_TUTORIAL_DESC"], 12)
|
||||
tutorialFrame.Desc = DF:CreateLabel(tutorialFrame, Loc ["STRING_GUILDDAMAGERANK_TUTORIAL_DESC"], 12)
|
||||
tutorialFrame.Desc.width = 370
|
||||
tutorialFrame.Desc:SetPoint ("topleft", tutorialFrame, "topleft", 10, -45)
|
||||
tutorialFrame.Desc:SetPoint("topleft", tutorialFrame, "topleft", 10, -45)
|
||||
|
||||
local closeButton = DF:CreateButton (tutorialFrame, function() Details:SetTutorialCVar ("HISTORYPANEL_TUTORIAL", true); tutorialFrame:Hide() end, 80, 20, Loc ["STRING_OPTIONS_CHART_CLOSE"])
|
||||
closeButton:SetPoint ("bottom", tutorialFrame, "bottom", 0, 10)
|
||||
closeButton:SetPoint("bottom", tutorialFrame, "bottom", 0, 10)
|
||||
closeButton:SetTemplate (DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
end
|
||||
|
||||
--> background
|
||||
local background = f:CreateTexture ("$parentBackgroundImage", "border")
|
||||
--background
|
||||
local background = f:CreateTexture("$parentBackgroundImage", "border")
|
||||
background:SetAlpha (0.3)
|
||||
background:SetPoint ("topleft", f, "topleft", 6, -65)
|
||||
background:SetPoint ("bottomright", f, "bottomright", -10, 28)
|
||||
background:SetPoint("topleft", f, "topleft", 6, -65)
|
||||
background:SetPoint("bottomright", f, "bottomright", -10, 28)
|
||||
|
||||
--> separate menu and main list
|
||||
local div = f:CreateTexture (nil, "artwork")
|
||||
div:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-MetalBorder-Left]])
|
||||
--separate menu and main list
|
||||
local div = f:CreateTexture(nil, "artwork")
|
||||
div:SetTexture([[Interface\ACHIEVEMENTFRAME\UI-Achievement-MetalBorder-Left]])
|
||||
div:SetAlpha (0.1)
|
||||
div:SetPoint ("topleft", f, "topleft", 180, -64)
|
||||
div:SetHeight (574)
|
||||
div:SetPoint("topleft", f, "topleft", 180, -64)
|
||||
div:SetHeight(574)
|
||||
|
||||
--select history or guild rank
|
||||
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
|
||||
@@ -120,16 +120,16 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
|
||||
local selectKillTimeline = function()
|
||||
f.GuildRankCheckBox:SetValue (false)
|
||||
f.HistoryCheckBox:SetValue (true)
|
||||
f.GuildRankCheckBox:SetValue(false)
|
||||
f.HistoryCheckBox:SetValue(true)
|
||||
f.Mode = 1
|
||||
_G.DetailsRaidHistoryWindow:Refresh()
|
||||
f.ReportButton:Hide()
|
||||
end
|
||||
|
||||
local selectGuildRank = function()
|
||||
f.HistoryCheckBox:SetValue (false)
|
||||
f.GuildRankCheckBox:SetValue (true)
|
||||
f.HistoryCheckBox:SetValue(false)
|
||||
f.GuildRankCheckBox:SetValue(true)
|
||||
_G.DetailsRaidHistoryWindow.select_player:Select (1, true)
|
||||
f.select_player2:Hide()
|
||||
f.select_player2_label:Hide()
|
||||
@@ -142,19 +142,19 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
local HistoryCheckBox, HistoryLabel = DF:CreateSwitch (f, selectKillTimeline, false, 18, 18, "", "", "HistoryCheckBox", nil, nil, nil, nil, Loc ["STRING_GUILDDAMAGERANK_SHOWHISTORY"], options_switch_template) --, options_text_template
|
||||
HistoryLabel:ClearAllPoints()
|
||||
HistoryCheckBox:ClearAllPoints()
|
||||
HistoryCheckBox:SetPoint ("topleft", f, "topleft", 100, -34)
|
||||
HistoryLabel:SetPoint ("left", HistoryCheckBox, "right", 2, 0)
|
||||
HistoryCheckBox:SetPoint("topleft", f, "topleft", 100, -34)
|
||||
HistoryLabel:SetPoint("left", HistoryCheckBox, "right", 2, 0)
|
||||
HistoryCheckBox:SetAsCheckBox()
|
||||
|
||||
--guildrank
|
||||
local GuildRankCheckBox, GuildRankLabel = DF:CreateSwitch (f, selectGuildRank, true, 18, 18, "", "", "GuildRankCheckBox", nil, nil, nil, nil, Loc ["STRING_GUILDDAMAGERANK_SHOWRANK"], options_switch_template) --, options_text_template
|
||||
GuildRankLabel:ClearAllPoints()
|
||||
GuildRankCheckBox:ClearAllPoints()
|
||||
GuildRankCheckBox:SetPoint ("topleft", f, "topleft", 240, -34)
|
||||
GuildRankLabel:SetPoint ("left", GuildRankCheckBox, "right", 2, 0)
|
||||
GuildRankCheckBox:SetPoint("topleft", f, "topleft", 240, -34)
|
||||
GuildRankLabel:SetPoint("left", GuildRankCheckBox, "right", 2, 0)
|
||||
GuildRankCheckBox:SetAsCheckBox()
|
||||
|
||||
--> guild sync
|
||||
--guild sync
|
||||
local doGuildSync = function()
|
||||
f.RequestedAmount = 0
|
||||
f.DownloadedAmount = 0
|
||||
@@ -166,35 +166,35 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
f.GuildSyncButton:Disable()
|
||||
|
||||
if (not f.SyncTexture) then
|
||||
local workingFrame = CreateFrame ("frame", nil, f,"BackdropTemplate")
|
||||
local workingFrame = CreateFrame("frame", nil, f,"BackdropTemplate")
|
||||
f.WorkingFrame = workingFrame
|
||||
workingFrame:SetSize (1, 1)
|
||||
f.SyncTextureBackground = workingFrame:CreateTexture (nil, "border")
|
||||
f.SyncTextureBackground:SetPoint ("bottomright", f, "bottomright", -5, -1)
|
||||
f.SyncTextureBackground:SetTexture ([[Interface\COMMON\StreamBackground]])
|
||||
f.SyncTextureBackground:SetSize (32, 32)
|
||||
f.SyncTextureCircle = workingFrame:CreateTexture (nil, "artwork")
|
||||
f.SyncTextureCircle:SetPoint ("center", f.SyncTextureBackground, "center", 0, 0)
|
||||
f.SyncTextureCircle:SetTexture ([[Interface\COMMON\StreamCircle]])
|
||||
f.SyncTextureCircle:SetSize (32, 32)
|
||||
f.SyncTextureGrade = workingFrame:CreateTexture (nil, "overlay")
|
||||
f.SyncTextureGrade:SetPoint ("center", f.SyncTextureBackground, "center", 0, 0)
|
||||
f.SyncTextureGrade:SetTexture ([[Interface\COMMON\StreamFrame]])
|
||||
f.SyncTextureGrade:SetSize (32, 32)
|
||||
workingFrame:SetSize(1, 1)
|
||||
f.SyncTextureBackground = workingFrame:CreateTexture(nil, "border")
|
||||
f.SyncTextureBackground:SetPoint("bottomright", f, "bottomright", -5, -1)
|
||||
f.SyncTextureBackground:SetTexture([[Interface\COMMON\StreamBackground]])
|
||||
f.SyncTextureBackground:SetSize(32, 32)
|
||||
f.SyncTextureCircle = workingFrame:CreateTexture(nil, "artwork")
|
||||
f.SyncTextureCircle:SetPoint("center", f.SyncTextureBackground, "center", 0, 0)
|
||||
f.SyncTextureCircle:SetTexture([[Interface\COMMON\StreamCircle]])
|
||||
f.SyncTextureCircle:SetSize(32, 32)
|
||||
f.SyncTextureGrade = workingFrame:CreateTexture(nil, "overlay")
|
||||
f.SyncTextureGrade:SetPoint("center", f.SyncTextureBackground, "center", 0, 0)
|
||||
f.SyncTextureGrade:SetTexture([[Interface\COMMON\StreamFrame]])
|
||||
f.SyncTextureGrade:SetSize(32, 32)
|
||||
|
||||
local animationHub = DF:CreateAnimationHub (workingFrame)
|
||||
animationHub:SetLooping ("Repeat")
|
||||
f.WorkingAnimation = animationHub
|
||||
|
||||
local rotation = DF:CreateAnimation (animationHub, "ROTATION", 1, 3, -360)
|
||||
local rotation = DF:CreateAnimation(animationHub, "ROTATION", 1, 3, -360)
|
||||
rotation:SetTarget (f.SyncTextureCircle)
|
||||
|
||||
f.SyncText = workingFrame:CreateFontString (nil, "border", "GameFontNormal")
|
||||
f.SyncText:SetPoint ("right", f.SyncTextureBackground, "left", 0, 0)
|
||||
f.SyncText:SetText ("working")
|
||||
f.SyncText:SetPoint("right", f.SyncTextureBackground, "left", 0, 0)
|
||||
f.SyncText:SetText("working")
|
||||
|
||||
local endAnimationHub = DF:CreateAnimationHub (workingFrame, nil, function() workingFrame:Hide() end)
|
||||
DF:CreateAnimation (endAnimationHub, "ALPHA", 1, 0.5, 1, 0)
|
||||
DF:CreateAnimation(endAnimationHub, "ALPHA", 1, 0.5, 1, 0)
|
||||
f.EndAnimationHub = endAnimationHub
|
||||
end
|
||||
|
||||
@@ -215,10 +215,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
end
|
||||
|
||||
local GuildSyncButton = DF:CreateButton (f, doGuildSync, 130, 20, Loc ["STRING_GUILDDAMAGERANK_SYNCBUTTONTEXT"], nil, nil, nil, "GuildSyncButton", nil, nil, options_button_template, options_text_template)
|
||||
GuildSyncButton:SetPoint ("topright", f, "topright", -20, -34)
|
||||
GuildSyncButton:SetPoint("topright", f, "topright", -20, -34)
|
||||
GuildSyncButton:SetIcon ([[Interface\GLUES\CharacterSelect\RestoreButton]], 12, 12, "overlay", {0.2, .8, 0.2, .8}, nil, 4)
|
||||
|
||||
--> listen to comm events
|
||||
--listen to comm events
|
||||
local eventListener = Details:CreateEventListener()
|
||||
|
||||
function eventListener:OnCommReceived (event, length, prefix, playerName, realmName, detailsVersion, guildSyncID, data)
|
||||
@@ -239,7 +239,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
f.DownloadedSize = f.DownloadedSize + length
|
||||
local downloadSpeed = f.DownloadedSize / (time() - f.SyncStartTime)
|
||||
|
||||
f.SyncText:SetText ("working [downloading " .. f.DownloadedAmount .. "/" .. f.RequestedAmount .. ", " .. format ("%.2f", downloadSpeed/1024) .. "Kbps]")
|
||||
f.SyncText:SetText("working [downloading " .. f.DownloadedAmount .. "/" .. f.RequestedAmount .. ", " .. format ("%.2f", downloadSpeed/1024) .. "Kbps]")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -252,7 +252,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
--requested to download a selected list of encounter tables
|
||||
elseif (guildSyncID == "G") then
|
||||
f.RequestedAmount = f.RequestedAmount + #missingIDs
|
||||
f.SyncText:SetText ("working [downloading " .. f.DownloadedAmount .. "/" .. f.RequestedAmount .. "]")
|
||||
f.SyncText:SetText("working [downloading " .. f.DownloadedAmount .. "/" .. f.RequestedAmount .. "]")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -260,7 +260,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
eventListener:RegisterEvent ("COMM_EVENT_RECEIVED", "OnCommReceived")
|
||||
eventListener:RegisterEvent ("COMM_EVENT_SENT", "OnCommSent")
|
||||
|
||||
--> report results
|
||||
--report results
|
||||
function f.BuildReport()
|
||||
if (f.LatestResourceTable) then
|
||||
local reportFunc = function(IsCurrent, IsReverse, AmtLines)
|
||||
@@ -291,7 +291,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
end
|
||||
|
||||
local ReportButton = DF:CreateButton (f, f.BuildReport, 130, 20, Loc ["STRING_OPTIONS_REPORT_ANCHOR"]:gsub (":", ""), nil, nil, nil, "ReportButton", nil, nil, options_button_template, options_text_template)
|
||||
ReportButton:SetPoint ("right", GuildSyncButton, "left", -2, 0)
|
||||
ReportButton:SetPoint("right", GuildSyncButton, "left", -2, 0)
|
||||
ReportButton:SetIcon ([[Interface\GLUES\CharacterSelect\RestoreButton]], 12, 12, "overlay", {0.2, .8, 0.2, .8}, nil, 4)
|
||||
|
||||
--
|
||||
@@ -313,8 +313,8 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
end
|
||||
end
|
||||
|
||||
--> window script handlers
|
||||
f:SetScript ("OnMouseDown", function(self, button)
|
||||
--window script handlers
|
||||
f:SetScript("OnMouseDown", function(self, button)
|
||||
if (self.isMoving) then
|
||||
return
|
||||
end
|
||||
@@ -326,15 +326,15 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
end
|
||||
end)
|
||||
|
||||
f:SetScript ("OnMouseUp", function(self, button)
|
||||
f:SetScript("OnMouseUp", function(self, button)
|
||||
if (self.isMoving and button == "LeftButton") then
|
||||
self:StopMovingOrSizing()
|
||||
self.isMoving = nil
|
||||
end
|
||||
end)
|
||||
|
||||
f:SetScript ("OnHide", function()
|
||||
--> save latest shown state
|
||||
f:SetScript("OnHide", function()
|
||||
--save latest shown state
|
||||
f.LatestSelection = f.LatestSelection or {}
|
||||
f.LatestSelection.Raid = DetailsRaidHistoryWindow.select_raid.value
|
||||
f.LatestSelection.Boss = DetailsRaidHistoryWindow.select_boss.value
|
||||
@@ -362,7 +362,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
end
|
||||
end
|
||||
|
||||
--> select raid:
|
||||
--select raid:
|
||||
local onRaidSelect = function(_, _, raid)
|
||||
Details.rank_window.last_raid = raid
|
||||
f:UpdateDropdowns (true)
|
||||
@@ -372,10 +372,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
return raidList
|
||||
end
|
||||
local raid_dropdown = DF:CreateDropDown (f, buildRaidList, 1, dropdownWidth, 20, "select_raid")
|
||||
local raid_string = DF:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_RAID"] .. ":", _, _, "GameFontNormal", "select_raid_label")
|
||||
local raid_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_RAID"] .. ":", _, _, "GameFontNormal", "select_raid_label")
|
||||
raid_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
|
||||
--> select boss:
|
||||
--select boss:
|
||||
local on_boss_select = function(_, _, boss)
|
||||
on_select()
|
||||
end
|
||||
@@ -383,10 +383,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
return bossList
|
||||
end
|
||||
local boss_dropdown = DF:CreateDropDown (f, build_boss_list, 1, dropdownWidth, 20, "select_boss")
|
||||
local boss_string = DF:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_BOSS"] .. ":", _, _, "GameFontNormal", "select_boss_label")
|
||||
local boss_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_BOSS"] .. ":", _, _, "GameFontNormal", "select_boss_label")
|
||||
boss_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
|
||||
--> select difficulty:
|
||||
--select difficulty:
|
||||
local on_diff_select = function(_, _, diff)
|
||||
Details.rank_window.last_difficulty = diff
|
||||
on_select()
|
||||
@@ -396,10 +396,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
return difficultyList
|
||||
end
|
||||
local diff_dropdown = DF:CreateDropDown (f, build_diff_list, 1, dropdownWidth, 20, "select_diff")
|
||||
local diff_string = DF:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_DIFF"] .. ":", _, _, "GameFontNormal", "select_diff_label")
|
||||
local diff_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_DIFF"] .. ":", _, _, "GameFontNormal", "select_diff_label")
|
||||
diff_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
|
||||
--> select role:
|
||||
--select role:
|
||||
local on_role_select = function(_, _, role)
|
||||
on_select()
|
||||
end
|
||||
@@ -410,10 +410,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
}
|
||||
end
|
||||
local role_dropdown = DF:CreateDropDown (f, build_role_list, 1, dropdownWidth, 20, "select_role")
|
||||
local role_string = DF:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_ROLE"] .. ":", _, _, "GameFontNormal", "select_role_label")
|
||||
local role_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_ROLE"] .. ":", _, _, "GameFontNormal", "select_role_label")
|
||||
role_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
|
||||
--> select guild:
|
||||
--select guild:
|
||||
local on_guild_select = function(_, _, guild)
|
||||
on_select()
|
||||
end
|
||||
@@ -421,10 +421,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
return guildList
|
||||
end
|
||||
local guild_dropdown = DF:CreateDropDown (f, build_guild_list, 1, dropdownWidth, 20, "select_guild")
|
||||
local guild_string = DF:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_GUILD"] .. ":", _, _, "GameFontNormal", "select_guild_label")
|
||||
local guild_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_GUILD"] .. ":", _, _, "GameFontNormal", "select_guild_label")
|
||||
guild_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
|
||||
--> select playerbase:
|
||||
--select playerbase:
|
||||
local on_player_select = function(_, _, player)
|
||||
on_select()
|
||||
end
|
||||
@@ -435,10 +435,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
}
|
||||
end
|
||||
local player_dropdown = DF:CreateDropDown (f, build_player_list, 1, dropdownWidth, 20, "select_player")
|
||||
local player_string = DF:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_PLAYERBASE"] .. ":", _, _, "GameFontNormal", "select_player_label")
|
||||
local player_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_PLAYERBASE"] .. ":", _, _, "GameFontNormal", "select_player_label")
|
||||
player_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
|
||||
--> select player:
|
||||
--select player:
|
||||
local onPlayer2Select = function(_, _, player)
|
||||
f.latest_player_selected = player
|
||||
f:BuildPlayerTable (player)
|
||||
@@ -448,7 +448,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
local t = {}
|
||||
local alreadyListed = {}
|
||||
if (encounterTable) then
|
||||
for encounterIndex, encounter in ipairs (encounterTable) do
|
||||
for encounterIndex, encounter in ipairs(encounterTable) do
|
||||
if (encounter.guild == guild) then
|
||||
local roleTable = encounter [role]
|
||||
for playerName, _ in pairs (roleTable) do
|
||||
@@ -465,7 +465,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
return t
|
||||
end
|
||||
local player2_dropdown = DF:CreateDropDown (f, build_player2_list, 1, dropdownWidth, 20, "select_player2")
|
||||
local player2_string = DF:CreateLabel (f, Loc ["STRING_GUILDDAMAGERANK_PLAYERBASE_PLAYER"] .. ":", _, _, "GameFontNormal", "select_player2_label")
|
||||
local player2_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_PLAYERBASE_PLAYER"] .. ":", _, _, "GameFontNormal", "select_player2_label")
|
||||
player2_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
|
||||
|
||||
function f:UpdateDropdowns(DoNotSelectRaid)
|
||||
@@ -510,7 +510,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
|
||||
elseif (difficulty == 16) then
|
||||
local alreadyHave = false
|
||||
for i, t in ipairs (difficultyList) do
|
||||
for i, t in ipairs(difficultyList) do
|
||||
if (t.label == "Mythic") then
|
||||
alreadyHave = true
|
||||
end
|
||||
@@ -540,7 +540,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
end
|
||||
end
|
||||
|
||||
for index, encounter in ipairs (encounterTable) do
|
||||
for index, encounter in ipairs(encounterTable) do
|
||||
local guild = encounter.guild
|
||||
if (not guildRepeated [guild]) then
|
||||
tinsert (guildList, {value = guild, label = guild, icon = icon, onclick = on_guild_select})
|
||||
@@ -578,13 +578,13 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
wipe (bossList)
|
||||
|
||||
for difficulty, encounterIdTable in pairs (db) do
|
||||
if (type (difficulty) == "number") then
|
||||
if (type(difficulty) == "number") then
|
||||
if (difficulty == 14) then
|
||||
--tinsert (difficultyList, {value = 14, label = "Normal", icon = icon, onclick = on_diff_select})
|
||||
--print ("has normal encounter")
|
||||
elseif (difficulty == 15) then
|
||||
local alreadyHave = false
|
||||
for i, t in ipairs (difficultyList) do
|
||||
for i, t in ipairs(difficultyList) do
|
||||
if (t.label == "Heroic") then
|
||||
alreadyHave = true
|
||||
end
|
||||
@@ -594,7 +594,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
end
|
||||
elseif (difficulty == 16) then
|
||||
local alreadyHave = false
|
||||
for i, t in ipairs (difficultyList) do
|
||||
for i, t in ipairs(difficultyList) do
|
||||
if (t.label == "Mythic") then
|
||||
alreadyHave = true
|
||||
end
|
||||
@@ -636,39 +636,39 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
boss_dropdown:Refresh()
|
||||
end
|
||||
|
||||
--> anchors:
|
||||
raid_string:SetPoint ("topleft", f, "topleft", 10, -70)
|
||||
raid_dropdown:SetPoint ("topleft", f, "topleft", 10, -85)
|
||||
--anchors:
|
||||
raid_string:SetPoint("topleft", f, "topleft", 10, -70)
|
||||
raid_dropdown:SetPoint("topleft", f, "topleft", 10, -85)
|
||||
|
||||
boss_string:SetPoint ("topleft", f, "topleft", 10, -110)
|
||||
boss_dropdown:SetPoint ("topleft", f, "topleft", 10, -125)
|
||||
boss_string:SetPoint("topleft", f, "topleft", 10, -110)
|
||||
boss_dropdown:SetPoint("topleft", f, "topleft", 10, -125)
|
||||
|
||||
diff_string:SetPoint ("topleft", f, "topleft", 10, -150)
|
||||
diff_dropdown:SetPoint ("topleft", f, "topleft", 10, -165)
|
||||
diff_string:SetPoint("topleft", f, "topleft", 10, -150)
|
||||
diff_dropdown:SetPoint("topleft", f, "topleft", 10, -165)
|
||||
|
||||
role_string:SetPoint ("topleft", f, "topleft", 10, -190)
|
||||
role_dropdown:SetPoint ("topleft", f, "topleft", 10, -205)
|
||||
role_string:SetPoint("topleft", f, "topleft", 10, -190)
|
||||
role_dropdown:SetPoint("topleft", f, "topleft", 10, -205)
|
||||
|
||||
guild_string:SetPoint ("topleft", f, "topleft", 10, -230)
|
||||
guild_dropdown:SetPoint ("topleft", f, "topleft", 10, -245)
|
||||
guild_string:SetPoint("topleft", f, "topleft", 10, -230)
|
||||
guild_dropdown:SetPoint("topleft", f, "topleft", 10, -245)
|
||||
|
||||
player_string:SetPoint ("topleft", f, "topleft", 10, -270)
|
||||
player_dropdown:SetPoint ("topleft", f, "topleft", 10, -285)
|
||||
player_string:SetPoint("topleft", f, "topleft", 10, -270)
|
||||
player_dropdown:SetPoint("topleft", f, "topleft", 10, -285)
|
||||
|
||||
player2_string:SetPoint ("topleft", f, "topleft", 10, -310)
|
||||
player2_dropdown:SetPoint ("topleft", f, "topleft", 10, -325)
|
||||
player2_string:SetPoint("topleft", f, "topleft", 10, -310)
|
||||
player2_dropdown:SetPoint("topleft", f, "topleft", 10, -325)
|
||||
player2_string:Hide()
|
||||
player2_dropdown:Hide()
|
||||
|
||||
--> refresh the window:
|
||||
--refresh the window:
|
||||
|
||||
function f:BuildPlayerTable (playerName)
|
||||
|
||||
local encounterTable, guild, role = unpack (f.build_player2_data or {})
|
||||
local data = {}
|
||||
|
||||
if (type (playerName) == "string" and string.len (playerName) > 1) then
|
||||
for encounterIndex, encounter in ipairs (encounterTable) do
|
||||
if (type(playerName) == "string" and string.len (playerName) > 1) then
|
||||
for encounterIndex, encounter in ipairs(encounterTable) do
|
||||
|
||||
if (encounter.guild == guild) then
|
||||
local roleTable = encounter [role]
|
||||
@@ -687,7 +687,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
end
|
||||
end
|
||||
|
||||
--> update graphic
|
||||
--update graphic
|
||||
if (not f.gframe) then
|
||||
|
||||
local onenter = function(self)
|
||||
@@ -707,7 +707,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
GameCooltip:Hide()
|
||||
end
|
||||
f.gframe = DF:CreateGFrame (f, 650, 400, 35, onenter, onleave, "gframe", "$parentGF")
|
||||
f.gframe:SetPoint ("topleft", f, "topleft", 190, -65)
|
||||
f.gframe:SetPoint("topleft", f, "topleft", 190, -65)
|
||||
end
|
||||
|
||||
f.gframe:Reset()
|
||||
@@ -717,7 +717,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
end
|
||||
|
||||
local fillpanel = DF:NewFillPanel (f, {}, "$parentFP", "fillpanel", 710, 501, false, false, true, nil)
|
||||
fillpanel:SetPoint ("topleft", f, "topleft", 195, -65)
|
||||
fillpanel:SetPoint("topleft", f, "topleft", 195, -65)
|
||||
|
||||
|
||||
function f:BuildGuildRankTable (encounterTable, guild, role)
|
||||
@@ -729,7 +729,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
local playerScore = {}
|
||||
|
||||
--get the best of each player
|
||||
for encounterIndex, encounter in ipairs (encounterTable) do
|
||||
for encounterIndex, encounter in ipairs(encounterTable) do
|
||||
if (encounter.guild == guild) then
|
||||
local roleTable = encounter [role]
|
||||
|
||||
@@ -789,7 +789,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
|
||||
table.sort (sortTable, function(a, b) return a[8] > b[8] end)
|
||||
|
||||
--> add the number before the player name
|
||||
--add the number before the player name
|
||||
for i = 1, #sortTable do
|
||||
local t = sortTable [i]
|
||||
t [1] = i .. ". " .. t [1]
|
||||
@@ -816,7 +816,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
local player_class = {}
|
||||
local amt_encounters = 0
|
||||
|
||||
for encounterIndex, encounter in ipairs (encounterTable) do
|
||||
for encounterIndex, encounter in ipairs(encounterTable) do
|
||||
if (encounter.guild == guild) then
|
||||
local roleTable = encounter [role]
|
||||
|
||||
@@ -854,10 +854,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
end
|
||||
end
|
||||
|
||||
--> sort alphabetical
|
||||
--sort alphabetical
|
||||
table.sort (players, function(a, b) return a[1] < b[1] end)
|
||||
|
||||
for index, playerTable in ipairs (players) do
|
||||
for index, playerTable in ipairs(players) do
|
||||
for i = #playerTable, amt_encounters do
|
||||
tinsert (playerTable, "")
|
||||
end
|
||||
@@ -876,11 +876,11 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
fillpanel:UpdateRows (header)
|
||||
|
||||
fillpanel:Refresh()
|
||||
fillpanel:SetPoint ("topleft", f, "topleft", 200, -65)
|
||||
fillpanel:SetPoint("topleft", f, "topleft", 200, -65)
|
||||
end
|
||||
|
||||
function f:Refresh (player_name)
|
||||
--> build the main table
|
||||
--build the main table
|
||||
local diff = diff_dropdown.value
|
||||
local boss = boss_dropdown.value
|
||||
local role = role_dropdown.value
|
||||
@@ -895,7 +895,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
if (diffTable) then
|
||||
local encounters = diffTable [boss]
|
||||
if (encounters) then
|
||||
if (player == 1) then --> raid
|
||||
if (player == 1) then --raid
|
||||
fillpanel:Show()
|
||||
if (f.gframe) then
|
||||
f.gframe:Hide()
|
||||
@@ -904,7 +904,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
player2_dropdown:Hide()
|
||||
f:BuildRaidTable (encounters, guild, role)
|
||||
|
||||
elseif (player == 2) then --> only one player
|
||||
elseif (player == 2) then --only one player
|
||||
fillpanel:Hide()
|
||||
if (f.gframe) then
|
||||
f.gframe:Show()
|
||||
@@ -925,7 +925,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
f:BuildPlayerTable (player2_dropdown.value)
|
||||
end
|
||||
else
|
||||
if (player == 1) then --> raid
|
||||
if (player == 1) then --raid
|
||||
fillpanel:Show()
|
||||
if (f.gframe) then
|
||||
f.gframe:Hide()
|
||||
@@ -934,7 +934,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
player2_dropdown:Hide()
|
||||
f:BuildRaidTable ({}, guild, role)
|
||||
|
||||
elseif (player == 2) then --> only one player
|
||||
elseif (player == 2) then --only one player
|
||||
fillpanel:Hide()
|
||||
if (f.gframe) then
|
||||
f.gframe:Show()
|
||||
@@ -955,8 +955,8 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
|
||||
local statsWindow = _G.DetailsRaidHistoryWindow
|
||||
|
||||
--> table means some button send the request - nil for other ways
|
||||
if (type (_raid) == "table" or (not _raid and not _boss and not _difficulty and not _role and not _guild and not _player_base and not _player_name)) then
|
||||
--table means some button send the request - nil for other ways
|
||||
if (type(_raid) == "table" or (not _raid and not _boss and not _difficulty and not _role and not _guild and not _player_base and not _player_name)) then
|
||||
local f = statsWindow
|
||||
if (f.LatestSelection) then
|
||||
_raid = f.LatestSelection.Raid
|
||||
@@ -997,12 +997,12 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
statsWindow.Mode = _history_type
|
||||
if (statsWindow.Mode == 1) then
|
||||
--overall
|
||||
statsWindow.HistoryCheckBox:SetValue (true)
|
||||
statsWindow.GuildRankCheckBox:SetValue (false)
|
||||
statsWindow.HistoryCheckBox:SetValue(true)
|
||||
statsWindow.GuildRankCheckBox:SetValue(false)
|
||||
elseif (statsWindow.Mode == 2) then
|
||||
--guild rank
|
||||
statsWindow.GuildRankCheckBox:SetValue (true)
|
||||
statsWindow.HistoryCheckBox:SetValue (false)
|
||||
statsWindow.GuildRankCheckBox:SetValue(true)
|
||||
statsWindow.HistoryCheckBox:SetValue(false)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1028,7 +1028,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
|
||||
end
|
||||
|
||||
if (_guild) then
|
||||
if (type (_guild) == "boolean") then
|
||||
if (type(_guild) == "boolean") then
|
||||
_guild = GetGuildInfo ("player")
|
||||
end
|
||||
statsWindow.select_guild:Select (_guild)
|
||||
|
||||
+89
-89
@@ -170,78 +170,78 @@ do
|
||||
while (text_width > 104) do
|
||||
local text = font_string:GetText()
|
||||
text = strsub (text, 1, #text-1)
|
||||
font_string:SetText (text)
|
||||
font_string:SetText(text)
|
||||
text_width = font_string:GetStringWidth()
|
||||
end
|
||||
end
|
||||
|
||||
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")
|
||||
button.texture:SetPoint ("left", 0, 0)
|
||||
button.texture:SetSize (icon_size, icon_size)
|
||||
local button = CreateFrame("button", "DetailsAllAttributesFrame" .. attribute .. sub_attribute, allDisplaysFrame)
|
||||
button:SetSize(130, 16)
|
||||
button.texture = button:CreateTexture(nil, "overlay")
|
||||
button.texture:SetPoint("left", 0, 0)
|
||||
button.texture:SetSize(icon_size, icon_size)
|
||||
|
||||
local texture_highlight_frame = CreateFrame ("button", "DetailsAllAttributesFrame" .. attribute .. sub_attribute .. "IconFrame", button)
|
||||
texture_highlight_frame:SetSize (icon_size, icon_size)
|
||||
texture_highlight_frame:SetPoint ("left", 0, 0)
|
||||
local texture_highlight_frame = CreateFrame("button", "DetailsAllAttributesFrame" .. attribute .. sub_attribute .. "IconFrame", button)
|
||||
texture_highlight_frame:SetSize(icon_size, icon_size)
|
||||
texture_highlight_frame:SetPoint("left", 0, 0)
|
||||
texture_highlight_frame.texture = button.texture
|
||||
texture_highlight_frame.MainFrame = button
|
||||
|
||||
button.text = button:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
button.text:SetPoint ("left", button.texture, "right", 2, 0)
|
||||
button.text:SetPoint("left", button.texture, "right", 2, 0)
|
||||
button.attribute = attribute
|
||||
button.sub_attribute = sub_attribute
|
||||
button:SetPoint ("topleft", x, y)
|
||||
button:SetPoint("topleft", x, y)
|
||||
Details:SetFontSize(button.text, Details.all_switch_config.font_size)
|
||||
Details:SetFontColor (button.text, text_color)
|
||||
Details:SetFontColor(button.text, text_color)
|
||||
|
||||
button:SetScript ("OnClick", on_click_all_switch_button)
|
||||
button:SetScript ("OnEnter", on_enter_all_switch_button)
|
||||
button:SetScript ("OnLeave", on_leave_all_switch_button)
|
||||
button:SetScript("OnClick", on_click_all_switch_button)
|
||||
button:SetScript("OnEnter", on_enter_all_switch_button)
|
||||
button:SetScript("OnLeave", on_leave_all_switch_button)
|
||||
|
||||
texture_highlight_frame:SetScript ("OnClick", on_click_all_switch_button)
|
||||
texture_highlight_frame:SetScript ("OnEnter", on_enter_all_switch_button_icon)
|
||||
texture_highlight_frame:SetScript ("OnLeave", on_leave_all_switch_button_icon)
|
||||
texture_highlight_frame:SetScript("OnClick", on_click_all_switch_button)
|
||||
texture_highlight_frame:SetScript("OnEnter", on_enter_all_switch_button_icon)
|
||||
texture_highlight_frame:SetScript("OnLeave", on_leave_all_switch_button_icon)
|
||||
|
||||
button:RegisterForClicks ("LeftButtonDown", "RightButtonDown")
|
||||
|
||||
return button
|
||||
end
|
||||
|
||||
allDisplaysFrame:SetScript ("OnShow", function()
|
||||
allDisplaysFrame:SetScript("OnShow", function()
|
||||
|
||||
if (not allDisplaysFrame.already_built) then
|
||||
local x, y = 8, -8
|
||||
allDisplaysFrame.higher_counter = 0
|
||||
|
||||
for attribute = 1, Details.atributos[0] do
|
||||
--> localized attribute name
|
||||
--localized attribute name
|
||||
local loc_attribute_name = Details.atributos.lista [attribute]
|
||||
|
||||
local title_icon = allDisplaysFrame:CreateTexture (nil, "overlay")
|
||||
title_icon:SetPoint ("topleft", x, y)
|
||||
local title_icon = allDisplaysFrame:CreateTexture(nil, "overlay")
|
||||
title_icon:SetPoint("topleft", x, y)
|
||||
local texture, l, r, t, b = Details:GetAttributeIcon (attribute)
|
||||
title_icon:SetTexture (texture)
|
||||
title_icon:SetTexture(texture)
|
||||
title_icon:SetTexCoord (l, r, t, b)
|
||||
title_icon:SetSize (18, 18)
|
||||
title_icon:SetSize(18, 18)
|
||||
local title_str = allDisplaysFrame:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
title_str:SetPoint ("left", title_icon, "right", 2, 0)
|
||||
title_str:SetText (loc_attribute_name)
|
||||
title_str:SetPoint("left", title_icon, "right", 2, 0)
|
||||
title_str:SetText(loc_attribute_name)
|
||||
|
||||
y = y - 20
|
||||
|
||||
allDisplaysFrame.buttons [attribute] = {}
|
||||
for i = 1, #Details.sub_atributos [attribute].lista do
|
||||
--> localized sub attribute name
|
||||
--localized sub attribute name
|
||||
local loc_sub_attribute_name = Details.sub_atributos [attribute].lista [i]
|
||||
local button = create_all_switch_button (attribute, i, x, y)
|
||||
|
||||
button.text:SetText (loc_sub_attribute_name)
|
||||
button.text:SetText(loc_sub_attribute_name)
|
||||
Details:SetFontSize(button.text, Details.all_switch_config.font_size)
|
||||
|
||||
allDisplaysFrame.check_text_size (button.text)
|
||||
button.texture:SetTexture (Details.sub_atributos [attribute].icones [i] [1])
|
||||
button.texture:SetTexture(Details.sub_atributos [attribute].icones [i] [1])
|
||||
button.texture:SetTexCoord (unpack (Details.sub_atributos [attribute].icones [i] [2]))
|
||||
tinsert (allDisplaysFrame.buttons [attribute], button)
|
||||
y = y - 17
|
||||
@@ -255,33 +255,33 @@ do
|
||||
y = -8
|
||||
end
|
||||
|
||||
--> prepare for scripts
|
||||
--prepare for scripts
|
||||
allDisplaysFrame.x = x
|
||||
allDisplaysFrame.y = -8
|
||||
allDisplaysFrame.buttons [Details.atributos[0]+1] = {}
|
||||
|
||||
local title_icon = allDisplaysFrame:CreateTexture (nil, "overlay")
|
||||
local title_icon = allDisplaysFrame:CreateTexture(nil, "overlay")
|
||||
local texture, l, r, t, b = Details:GetAttributeIcon (Details.atributos[0]+1)
|
||||
title_icon:SetTexture([[Interface\AddOns\Details\images\icons]])
|
||||
title_icon:SetTexCoord(412/512, 441/512, 43/512, 79/512)
|
||||
title_icon:SetVertexColor(.7, .6, .5, 1)
|
||||
title_icon:SetSize(16, 16)
|
||||
local title_str = allDisplaysFrame:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
title_str:SetPoint ("left", title_icon, "right", 2, 0)
|
||||
title_str:SetText ("Scripts")
|
||||
title_str:SetPoint("left", title_icon, "right", 2, 0)
|
||||
title_str:SetText("Scripts")
|
||||
|
||||
title_icon:SetPoint ("topleft", allDisplaysFrame.x, allDisplaysFrame.y)
|
||||
title_icon:SetPoint("topleft", allDisplaysFrame.x, allDisplaysFrame.y)
|
||||
allDisplaysFrame.y = allDisplaysFrame.y - 20
|
||||
allDisplaysFrame.title_custom = title_icon
|
||||
|
||||
allDisplaysFrame.already_built = true
|
||||
|
||||
--> prepare for plugins
|
||||
--prepare for plugins
|
||||
allDisplaysFrame.buttons[6] = {}
|
||||
local title_icon = allDisplaysFrame:CreateTexture(nil, "overlay")
|
||||
title_icon:SetTexture ([[Interface\AddOns\Details\images\modo_icones]])
|
||||
title_icon:SetTexture([[Interface\AddOns\Details\images\modo_icones]])
|
||||
title_icon:SetTexCoord (32/256*3, 32/256*4, 0, 1)
|
||||
title_icon:SetSize (16, 16)
|
||||
title_icon:SetSize(16, 16)
|
||||
|
||||
local title_str = allDisplaysFrame:CreateFontString(nil, "overlay", "GameFontNormal")
|
||||
title_str:SetPoint("left", title_icon, "right", 2, 0)
|
||||
@@ -290,9 +290,9 @@ do
|
||||
allDisplaysFrame.title_scripts = title_icon
|
||||
end
|
||||
|
||||
--> update scripts
|
||||
--update scripts
|
||||
local custom_index = Details.atributos[0]+1
|
||||
for _, button in ipairs (allDisplaysFrame.buttons [custom_index]) do
|
||||
for _, button in ipairs(allDisplaysFrame.buttons [custom_index]) do
|
||||
button:Hide()
|
||||
end
|
||||
|
||||
@@ -306,11 +306,11 @@ do
|
||||
end
|
||||
|
||||
local custom = Details.custom [i]
|
||||
button.text:SetText (custom.name)
|
||||
button.text:SetText(custom.name)
|
||||
Details:SetFontSize(button.text, Details.all_switch_config.font_size)
|
||||
|
||||
allDisplaysFrame.check_text_size (button.text)
|
||||
button.texture:SetTexture (custom.icon)
|
||||
button.texture:SetTexture(custom.icon)
|
||||
button.texture:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875)
|
||||
button:Show()
|
||||
|
||||
@@ -321,20 +321,20 @@ do
|
||||
allDisplaysFrame.higher_counter = #Details.custom
|
||||
end
|
||||
|
||||
--> update plugins
|
||||
--update plugins
|
||||
local script_index = Details.atributos[0]+2
|
||||
local button_index = 1
|
||||
allDisplaysFrame.x = allDisplaysFrame.x + 130
|
||||
allDisplaysFrame.y = -28
|
||||
|
||||
for _, button in ipairs (allDisplaysFrame.buttons[script_index]) do
|
||||
for _, button in ipairs(allDisplaysFrame.buttons[script_index]) do
|
||||
button:Hide()
|
||||
end
|
||||
|
||||
--build raid plugins list
|
||||
local raidPlugins = Details.RaidTables:GetAvailablePlugins()
|
||||
if (#raidPlugins >= 0) then
|
||||
for i, ptable in ipairs (raidPlugins) do
|
||||
for i, ptable in ipairs(raidPlugins) do
|
||||
--if a plugin has the member 'NoMenu', it won't be shown on menus to select plugins
|
||||
if (ptable[3].__enabled and not ptable[3].NoMenu) then
|
||||
--PluginName, PluginIcon, PluginObject, PluginAbsoluteName
|
||||
@@ -353,7 +353,7 @@ do
|
||||
Details:SetFontSize(button.text, Details.all_switch_config.font_size)
|
||||
|
||||
allDisplaysFrame.check_text_size(button.text)
|
||||
button.texture:SetTexture (ptable[2])
|
||||
button.texture:SetTexture(ptable[2])
|
||||
button.texture:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875)
|
||||
button:Show()
|
||||
|
||||
@@ -385,14 +385,14 @@ do
|
||||
--they aren't called anymore on showing and hiding the bookmark frame
|
||||
--show animation
|
||||
local animHub = Details.gump:CreateAnimationHub (bookmarkFrame, function() bookmarkFrame:Show() end)
|
||||
Details.gump:CreateAnimation (animHub, "scale", 1, 0.04, 0, 1, 1, 1, "LEFT", 0, 0)
|
||||
Details.gump:CreateAnimation (animHub, "alpha", 1, 0.04, 0, 1)
|
||||
Details.gump:CreateAnimation(animHub, "scale", 1, 0.04, 0, 1, 1, 1, "LEFT", 0, 0)
|
||||
Details.gump:CreateAnimation(animHub, "alpha", 1, 0.04, 0, 1)
|
||||
bookmarkFrame.ShowAnimation = animHub
|
||||
|
||||
--hide animation
|
||||
local animHub = Details.gump:CreateAnimationHub (bookmarkFrame, function() bookmarkFrame:Show() end, function() bookmarkFrame:Hide() end)
|
||||
Details.gump:CreateAnimation (animHub, "scale", 1, 0.04, 1, 1, 0, 1, "RIGHT", 0, 0)
|
||||
Details.gump:CreateAnimation (animHub, "alpha", 1, 0.04, 1, 0)
|
||||
Details.gump:CreateAnimation(animHub, "scale", 1, 0.04, 1, 1, 0, 1, "RIGHT", 0, 0)
|
||||
Details.gump:CreateAnimation(animHub, "alpha", 1, 0.04, 1, 0)
|
||||
bookmarkFrame.HideAnimation = animHub
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -512,17 +512,17 @@ function Details.switch:ShowMe(instancia)
|
||||
end
|
||||
|
||||
local on_enter = function(self)
|
||||
--self.MyObject.this_background:SetBlendMode ("ADD")
|
||||
--self.MyObject.boss_texture:SetBlendMode ("ADD")
|
||||
--self.MyObject.this_background:SetBlendMode("ADD")
|
||||
--self.MyObject.boss_texture:SetBlendMode("ADD")
|
||||
end
|
||||
|
||||
local on_leave = function(self)
|
||||
self.MyObject.this_background:SetBlendMode ("BLEND")
|
||||
self.MyObject.boss_texture:SetBlendMode ("BLEND")
|
||||
self.MyObject.this_background:SetBlendMode("BLEND")
|
||||
self.MyObject.boss_texture:SetBlendMode("BLEND")
|
||||
end
|
||||
|
||||
function Details.switch:CreateSegmentBlock()
|
||||
local s = gump:CreateLabel (Details.switch.frame)
|
||||
local s = gump:CreateLabel(Details.switch.frame)
|
||||
Details:SetFontSize (s, 9)
|
||||
|
||||
local index = #Details.switch.segments_blocks
|
||||
@@ -533,19 +533,19 @@ function Details.switch:ShowMe(instancia)
|
||||
end
|
||||
|
||||
local button = gump:CreateButton (Details.switch.frame, segment_switch, 100, 20, "", index)
|
||||
button:SetPoint ("topleft", s, "topleft", -17, 0)
|
||||
button:SetPoint ("bottomright", s, "bottomright", 0, 0)
|
||||
button:SetPoint("topleft", s, "topleft", -17, 0)
|
||||
button:SetPoint("bottomright", s, "bottomright", 0, 0)
|
||||
button:SetClickFunction (segment_switch, nil, nil, "right")
|
||||
|
||||
local boss_texture = gump:CreateImage (button, nil, 16, 16)
|
||||
boss_texture:SetPoint ("right", s, "left", -2, 0)
|
||||
boss_texture:SetPoint("right", s, "left", -2, 0)
|
||||
|
||||
local background = button:CreateTexture (nil, "background")
|
||||
background:SetTexture ("Interface\\SPELLBOOK\\Spellbook-Parts")
|
||||
local background = button:CreateTexture(nil, "background")
|
||||
background:SetTexture("Interface\\SPELLBOOK\\Spellbook-Parts")
|
||||
background:SetTexCoord (0.31250000, 0.96484375, 0.37109375, 0.52343750)
|
||||
background:SetWidth (85)
|
||||
background:SetPoint ("topleft", s.widget, "topleft", -16, 3)
|
||||
background:SetPoint ("bottomright", s.widget, "bottomright", -3, -5)
|
||||
background:SetWidth(85)
|
||||
background:SetPoint("topleft", s.widget, "topleft", -16, 3)
|
||||
background:SetPoint("bottomright", s.widget, "bottomright", -3, -5)
|
||||
|
||||
button.this_background = background
|
||||
button.boss_texture = boss_texture.widget
|
||||
@@ -554,8 +554,8 @@ function Details.switch:ShowMe(instancia)
|
||||
s.button = button
|
||||
s.background = background
|
||||
|
||||
button:SetScript ("OnEnter", on_enter)
|
||||
button:SetScript ("OnLeave", on_leave)
|
||||
button:SetScript("OnEnter", on_enter)
|
||||
button:SetScript("OnLeave", on_leave)
|
||||
|
||||
s.HideMe = hide_label
|
||||
s.ShowMe = show_label
|
||||
@@ -574,7 +574,7 @@ function Details.switch:ShowMe(instancia)
|
||||
end
|
||||
|
||||
function Details.switch:ClearSegmentBlocks()
|
||||
for _, block in ipairs (Details.switch.segments_blocks) do
|
||||
for _, block in ipairs(Details.switch.segments_blocks) do
|
||||
block:HideMe()
|
||||
end
|
||||
end
|
||||
@@ -600,8 +600,8 @@ function Details.switch:ShowMe(instancia)
|
||||
for horizontal = 1, horizontal_amt do
|
||||
local button = Details.switch:GetSegmentBlock (i)
|
||||
|
||||
button:SetPoint ("topleft", frame, "topleft", x + 16, -y)
|
||||
button:SetSize (size - 22, 12)
|
||||
button:SetPoint("topleft", frame, "topleft", x + 16, -y)
|
||||
button:SetSize(size - 22, 12)
|
||||
button:ShowMe()
|
||||
|
||||
i = i + 1
|
||||
@@ -616,18 +616,18 @@ function Details.switch:ShowMe(instancia)
|
||||
|
||||
Details.switch.segments_blocks = {}
|
||||
|
||||
--> current and overall
|
||||
--current and overall
|
||||
Details.switch:CreateSegmentBlock()
|
||||
Details.switch:CreateSegmentBlock()
|
||||
|
||||
local block1 = Details.switch:GetSegmentBlock (1)
|
||||
block1:SetText (Loc["STRING_CURRENTFIGHT"])
|
||||
block1.texture:SetTexture ([[Interface\Scenarios\ScenariosParts]])
|
||||
block1:SetText(Loc["STRING_CURRENTFIGHT"])
|
||||
block1.texture:SetTexture([[Interface\Scenarios\ScenariosParts]])
|
||||
block1.texture:SetTexCoord (55/512, 81/512, 368/512, 401/512)
|
||||
|
||||
local block2 = Details.switch:GetSegmentBlock (2)
|
||||
block2:SetText (Loc["STRING_SEGMENT_OVERALL"])
|
||||
block2.texture:SetTexture ([[Interface\Scenarios\ScenariosParts]])
|
||||
block2:SetText(Loc["STRING_SEGMENT_OVERALL"])
|
||||
block2.texture:SetTexture([[Interface\Scenarios\ScenariosParts]])
|
||||
block2.texture:SetTexCoord (55/512, 81/512, 368/512, 401/512)
|
||||
end
|
||||
|
||||
@@ -642,33 +642,33 @@ function Details.switch:ShowMe(instancia)
|
||||
local block = Details.switch:GetSegmentBlock (i)
|
||||
local enemy, color, raid_type, killed, is_trash, portrait, background, background_coords = Details:GetSegmentInfo (segment_index)
|
||||
|
||||
block:SetText ("#" .. segment_index .. " " .. enemy)
|
||||
block:SetText("#" .. segment_index .. " " .. enemy)
|
||||
|
||||
if (combat.is_boss and combat.instance_type == "raid") then
|
||||
local L, R, T, B, Texture = Details:GetBossIcon (combat.is_boss.mapid, combat.is_boss.index)
|
||||
if (L) then
|
||||
block.texture:SetTexture (Texture)
|
||||
block.texture:SetTexture(Texture)
|
||||
block.texture:SetTexCoord (L, R, T, B)
|
||||
else
|
||||
block.texture:SetTexture ([[Interface\Scenarios\ScenarioIcon-Boss]])
|
||||
block.texture:SetTexture([[Interface\Scenarios\ScenarioIcon-Boss]])
|
||||
end
|
||||
else
|
||||
block.texture:SetTexture ([[Interface\Scenarios\ScenarioIcon-Boss]])
|
||||
block.texture:SetTexture([[Interface\Scenarios\ScenarioIcon-Boss]])
|
||||
end
|
||||
|
||||
block:ShowMe()
|
||||
segment_index = segment_index + 1
|
||||
end
|
||||
|
||||
Details.switch.frame:SetScale (instancia.window_scale)
|
||||
Details.switch.frame:SetScale(instancia.window_scale)
|
||||
Details.switch:ResizeSegmentBlocks()
|
||||
|
||||
for i = segment_index+2, #Details.switch.segments_blocks do
|
||||
Details.switch.segments_blocks [i]:HideMe()
|
||||
end
|
||||
|
||||
Details.switch.frame:SetPoint ("topleft", instancia.baseframe, "topleft", 0, 1)
|
||||
Details.switch.frame:SetPoint ("bottomright", instancia.baseframe, "bottomright", 0, 1)
|
||||
Details.switch.frame:SetPoint("topleft", instancia.baseframe, "topleft", 0, 1)
|
||||
Details.switch.frame:SetPoint("bottomright", instancia.baseframe, "bottomright", 0, 1)
|
||||
Details.switch.frame:Show()
|
||||
|
||||
return
|
||||
@@ -679,7 +679,7 @@ function Details.switch:ShowMe(instancia)
|
||||
end
|
||||
end
|
||||
|
||||
--> check if there is some custom contidional
|
||||
--check if there is some custom contidional
|
||||
if (instancia.atributo == 5) then
|
||||
local custom_object = instancia:GetCustomObject()
|
||||
if (custom_object and custom_object.OnSwitchShow) then
|
||||
@@ -690,8 +690,8 @@ function Details.switch:ShowMe(instancia)
|
||||
end
|
||||
end
|
||||
|
||||
Details.switch.frame:SetPoint ("topleft", instancia.baseframe, "topleft", 0, 1)
|
||||
Details.switch.frame:SetPoint ("bottomright", instancia.baseframe, "bottomright", 0, 1)
|
||||
Details.switch.frame:SetPoint("topleft", instancia.baseframe, "topleft", 0, 1)
|
||||
Details.switch.frame:SetPoint("bottomright", instancia.baseframe, "bottomright", 0, 1)
|
||||
|
||||
local altura = instancia.baseframe:GetHeight()
|
||||
local mostrar_quantas = floor (altura / Details.switch.button_height) * 2
|
||||
@@ -729,7 +729,7 @@ function Details.switch:ShowMe(instancia)
|
||||
Details.switch:Resize (precisa_mostrar)
|
||||
Details.switch:Update()
|
||||
|
||||
Details.switch.frame:SetScale (instancia.window_scale)
|
||||
Details.switch.frame:SetScale(instancia.window_scale)
|
||||
Details.switch.frame:Show()
|
||||
|
||||
Details.switch:Resize (precisa_mostrar)
|
||||
@@ -953,9 +953,9 @@ function Details.switch:Update()
|
||||
local textColor = "white"
|
||||
|
||||
if (options and options.sub_atributo) then
|
||||
if (options.atributo == 5) then --> custom
|
||||
if (options.atributo == 5) then --custom
|
||||
local CustomObject = Details.custom [options.sub_atributo]
|
||||
if (not CustomObject) then --> ele j� foi deletado
|
||||
if (not CustomObject) then --ele j� foi deletado
|
||||
icone = [[Interface\AddOns\Details\images\icons]]
|
||||
coords = add_coords
|
||||
name = Loc["STRING_SWITCH_CLICKME"]
|
||||
@@ -968,7 +968,7 @@ function Details.switch:Update()
|
||||
vcolor = vertex_color_default
|
||||
end
|
||||
|
||||
elseif (options.atributo == "plugin") then --> plugin
|
||||
elseif (options.atributo == "plugin") then --plugin
|
||||
|
||||
local plugin = Details:GetPlugin (options.sub_atributo)
|
||||
if (plugin) then
|
||||
@@ -976,7 +976,7 @@ function Details.switch:Update()
|
||||
local raidPlugins = Details.RaidTables:GetAvailablePlugins()
|
||||
local isAvailable = false
|
||||
if (#raidPlugins >= 0) then
|
||||
for i, ptable in ipairs (raidPlugins) do
|
||||
for i, ptable in ipairs(raidPlugins) do
|
||||
--check if the plugin is available
|
||||
if (ptable[4] == plugin.real_name) then
|
||||
isAvailable = true
|
||||
@@ -1076,9 +1076,9 @@ function Details.switch:Update()
|
||||
FauxScrollFrame_Update(DetailsSwitchPanelScroll, ceil (40 / Details.switch.vertical_amt) , Details.switch.horizontal_amt, 20)
|
||||
end
|
||||
|
||||
local scroll = CreateFrame ("scrollframe", "DetailsSwitchPanelScroll", DetailsSwitchPanel, "FauxScrollFrameTemplate")
|
||||
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()
|
||||
|
||||
+196
-196
@@ -1,10 +1,10 @@
|
||||
local _detalhes = _G._detalhes
|
||||
local L = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
--> default weaktable
|
||||
--default weaktable
|
||||
_detalhes.weaktable = {__mode = "v"}
|
||||
|
||||
--> globals
|
||||
--globals
|
||||
--[[global]] DETAILS_WA_AURATYPE_ICON = 1
|
||||
--[[global]] DETAILS_WA_AURATYPE_TEXT = 2
|
||||
--[[global]] DETAILS_WA_AURATYPE_BAR = 3
|
||||
@@ -1421,12 +1421,12 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
|
||||
--print (aura_type, spellid, use_spellid, spellname, name, icon_texture, target, stacksize, sound, chat, icon_text, icon_glow, encounter_id, group, icon_size, other_values)
|
||||
|
||||
--> check if wa is installed
|
||||
--check if wa is installed
|
||||
if (not WeakAuras or not WeakAurasSaved) then
|
||||
return
|
||||
end
|
||||
|
||||
--> check if there is a group for our auras
|
||||
--check if there is a group for our auras
|
||||
--[=[
|
||||
if (not WeakAurasSaved.displays ["Details! Aura Group"]) then
|
||||
local group = _detalhes.table.copy ({}, group_prototype)
|
||||
@@ -1443,7 +1443,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
return Details:Msg("feature disabled due to 9.0 changes.")
|
||||
end
|
||||
|
||||
--> create the icon table
|
||||
--create the icon table
|
||||
local new_aura
|
||||
icon_size = icon_size or 40
|
||||
|
||||
@@ -1482,10 +1482,10 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
new_aura.trigger.custom = new_aura.trigger.custom:gsub ("@spellid", spellid)
|
||||
new_aura.trigger.custom = new_aura.trigger.custom:gsub ("@spell_casted", icon_text)
|
||||
|
||||
--> size
|
||||
--size
|
||||
new_aura.fontSize = min (icon_size, 24)
|
||||
|
||||
--> combat only
|
||||
--combat only
|
||||
if (in_combat) then
|
||||
new_aura.load.use_combat = true
|
||||
else
|
||||
@@ -1528,10 +1528,10 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
new_aura.trigger.custom = new_aura.trigger.custom:gsub ("@spellid", spellid)
|
||||
new_aura.trigger.custom = new_aura.trigger.custom:gsub ("@title", icon_text)
|
||||
|
||||
--> size
|
||||
--size
|
||||
new_aura.fontSize = min (icon_size, 24)
|
||||
|
||||
--> combat only
|
||||
--combat only
|
||||
if (in_combat) then
|
||||
new_aura.load.use_combat = true
|
||||
else
|
||||
@@ -1540,7 +1540,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
|
||||
elseif (other_values.dbm_timer_id or other_values.bw_timer_id) then --boss mods
|
||||
|
||||
--> create the default aura table
|
||||
--create the default aura table
|
||||
if (aura_type == "icon") then
|
||||
new_aura = _detalhes.table.copy ({}, icon_dbm_timerbar_prototype)
|
||||
elseif (aura_type == "aurabar") then
|
||||
@@ -1549,7 +1549,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
new_aura = _detalhes.table.copy ({}, text_dbm_timerbar_prototype)
|
||||
end
|
||||
|
||||
--> text and icon
|
||||
--text and icon
|
||||
if (aura_type == "aurabar") then
|
||||
icon_text = icon_text:gsub ("= ", "")
|
||||
icon_text = icon_text:gsub (" =", "")
|
||||
@@ -1561,7 +1561,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
new_aura.displayIcon = icon_texture
|
||||
end
|
||||
|
||||
--> size
|
||||
--size
|
||||
if (aura_type == "icon") then
|
||||
new_aura.width = icon_size
|
||||
new_aura.height = icon_size
|
||||
@@ -1572,7 +1572,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
new_aura.fontSize = min (icon_size, 72)
|
||||
end
|
||||
|
||||
--> trigger
|
||||
--trigger
|
||||
if (aura_type == "text") then
|
||||
local init_start = [[
|
||||
aura_env.ability_text = "@text"
|
||||
@@ -1768,7 +1768,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
_detalhes.table.overwrite (new_aura, add)
|
||||
end
|
||||
|
||||
--> combat only
|
||||
--combat only
|
||||
if (in_combat) then
|
||||
new_aura.load = new_aura.load or {}
|
||||
new_aura.load.use_combat = true
|
||||
@@ -1782,7 +1782,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
tinsert (new_aura.trigger.spellIds, spellid)
|
||||
end
|
||||
|
||||
--> if is a regular aura without using spells ids
|
||||
--if is a regular aura without using spells ids
|
||||
if (not use_spellid) then
|
||||
new_aura.trigger.useExactSpellId = false
|
||||
new_aura.useName = true
|
||||
@@ -1793,7 +1793,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
new_aura.auraspellids = {tostring(spellid)}
|
||||
end
|
||||
|
||||
--> check stack size
|
||||
--check stack size
|
||||
if (stacksize and stacksize >= 1) then
|
||||
stacksize = floor (stacksize)
|
||||
local add = _detalhes.table.copy ({}, stack_prototype)
|
||||
@@ -1801,7 +1801,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
_detalhes.table.overwrite (new_aura, add)
|
||||
end
|
||||
|
||||
--> icon text
|
||||
--icon text
|
||||
if (icon_text and icon_text ~= "") then
|
||||
if (aura_type == "text") then
|
||||
new_aura.displayText = icon_text
|
||||
@@ -1812,7 +1812,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
end
|
||||
end
|
||||
|
||||
--> size
|
||||
--size
|
||||
if (aura_type == "icon") then
|
||||
new_aura.width = icon_size
|
||||
new_aura.height = icon_size
|
||||
@@ -1827,14 +1827,14 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
new_aura.id = name
|
||||
new_aura.displayIcon = icon_texture
|
||||
|
||||
--> load by encounter id
|
||||
--load by encounter id
|
||||
if (encounter_id) then
|
||||
new_aura.load = new_aura.load or {}
|
||||
new_aura.load.use_encounterid = true
|
||||
new_aura.load.encounterid = tostring (encounter_id)
|
||||
end
|
||||
|
||||
--> using sound
|
||||
--using sound
|
||||
if (sound and type (sound) == "table") then
|
||||
local add = _detalhes.table.copy ({}, sound_prototype_custom)
|
||||
add.actions.start.sound_path = sound.sound_path
|
||||
@@ -1847,14 +1847,14 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
_detalhes.table.overwrite (new_aura, add)
|
||||
end
|
||||
|
||||
--> chat message
|
||||
--chat message
|
||||
if (chat and chat ~= "") then
|
||||
local add = _detalhes.table.copy ({}, chat_prototype)
|
||||
add.actions.start.message = chat
|
||||
_detalhes.table.overwrite (new_aura, add)
|
||||
end
|
||||
|
||||
--> check if already exists a aura with this name
|
||||
--check if already exists a aura with this name
|
||||
if (WeakAurasSaved.displays [new_aura.id]) then
|
||||
for i = 2, 100 do
|
||||
if (not WeakAurasSaved.displays [new_aura.id .. " (" .. i .. ")"]) then
|
||||
@@ -1864,7 +1864,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
end
|
||||
end
|
||||
|
||||
--> check is is using glow effect
|
||||
--check is is using glow effect
|
||||
if (icon_glow) then
|
||||
local add = _detalhes.table.copy ({}, glow_prototype)
|
||||
add.actions.start.glow_frame = "WeakAuras:" .. new_aura.id
|
||||
@@ -1876,16 +1876,16 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
new_aura.cooldownTextEnabled = true
|
||||
end
|
||||
|
||||
--> add the aura on a group
|
||||
--add the aura on a group
|
||||
if (group) then
|
||||
new_aura.parent = group
|
||||
|
||||
if (new_aura.regionType == "icon") then
|
||||
--> adjust the width and height of the new aura following the existing auras on the group
|
||||
--adjust the width and height of the new aura following the existing auras on the group
|
||||
local normalWidth, normalHeight, amount = 0, 0, 0
|
||||
local allAurasInTheGroup = WeakAurasSaved.displays [group].controlledChildren
|
||||
|
||||
for index, auraname in ipairs (allAurasInTheGroup) do
|
||||
for index, auraname in ipairs(allAurasInTheGroup) do
|
||||
local auraObject = WeakAurasSaved.displays [auraname]
|
||||
if (auraObject and auraObject.regionType == "icon") then
|
||||
amount = amount + 1
|
||||
@@ -1907,10 +1907,10 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
|
||||
new_aura.parent = nil
|
||||
end
|
||||
|
||||
--> add the aura
|
||||
--add the aura
|
||||
WeakAuras.Add (new_aura)
|
||||
|
||||
--> check if the options panel has loaded
|
||||
--check if the options panel has loaded
|
||||
local options_frame = WeakAuras.OptionsFrame and WeakAuras.OptionsFrame()
|
||||
if (options_frame) then
|
||||
if (options_frame and not options_frame:IsShown()) then
|
||||
@@ -1936,7 +1936,7 @@ end
|
||||
-- text_size 72
|
||||
|
||||
function _detalhes:InitializeAuraCreationWindow() if true then return end
|
||||
local DetailsAuraPanel = CreateFrame ("frame", "DetailsAuraPanel", UIParent,"BackdropTemplate")
|
||||
local DetailsAuraPanel = CreateFrame("frame", "DetailsAuraPanel", UIParent,"BackdropTemplate")
|
||||
DetailsAuraPanel.Frame = DetailsAuraPanel
|
||||
DetailsAuraPanel.__name = L["STRING_CREATEAURA"]
|
||||
DetailsAuraPanel.real_name = "DETAILS_CREATEAURA"
|
||||
@@ -1968,7 +1968,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
|
||||
DetailsAuraPanel.Initialized = true
|
||||
|
||||
--> check if there is a group for our auras
|
||||
--check if there is a group for our auras
|
||||
if (WeakAuras and WeakAurasSaved) then
|
||||
if (not WeakAurasSaved.displays ["Details! Aura Group"]) then
|
||||
local group = _detalhes.table.copy ({}, group_prototype)
|
||||
@@ -1980,26 +1980,26 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
end
|
||||
end
|
||||
|
||||
local f = DetailsAuraPanel or CreateFrame ("frame", "DetailsAuraPanel", UIParent,"BackdropTemplate")
|
||||
f:SetSize (800, 600)
|
||||
f:SetPoint ("center", UIParent, "center", 0, 150)
|
||||
local f = DetailsAuraPanel or CreateFrame("frame", "DetailsAuraPanel", UIParent,"BackdropTemplate")
|
||||
f:SetSize(800, 600)
|
||||
f:SetPoint("center", UIParent, "center", 0, 150)
|
||||
f:SetFrameStrata ("DIALOG")
|
||||
f:EnableMouse (true)
|
||||
f:SetMovable (true)
|
||||
f:SetToplevel (true)
|
||||
|
||||
--background
|
||||
f.bg1 = f:CreateTexture (nil, "background")
|
||||
f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
|
||||
f.bg1 = f:CreateTexture(nil, "background")
|
||||
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
|
||||
f.bg1:SetAlpha (0.8)
|
||||
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
|
||||
f.bg1:SetVertTile (true)
|
||||
f.bg1:SetHorizTile (true)
|
||||
f.bg1:SetSize (790, 454)
|
||||
f.bg1:SetSize(790, 454)
|
||||
f.bg1:SetAllPoints()
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (.5, .5, .5, .7)
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor(.5, .5, .5, .7)
|
||||
f:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--register to libwindow
|
||||
local LibWindow = LibStub ("LibWindow-1.1")
|
||||
@@ -2008,40 +2008,40 @@ 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
|
||||
end)
|
||||
|
||||
--titlebar
|
||||
f.TitleBar = CreateFrame ("frame", "$parentTitleBar", f,"BackdropTemplate")
|
||||
f.TitleBar:SetPoint ("topleft", f, "topleft", 2, -3)
|
||||
f.TitleBar:SetPoint ("topright", f, "topright", -2, -3)
|
||||
f.TitleBar:SetHeight (20)
|
||||
f.TitleBar:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f.TitleBar:SetBackdropColor (.2, .2, .2, 1)
|
||||
f.TitleBar:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
f.TitleBar = CreateFrame("frame", "$parentTitleBar", f,"BackdropTemplate")
|
||||
f.TitleBar:SetPoint("topleft", f, "topleft", 2, -3)
|
||||
f.TitleBar:SetPoint("topright", f, "topright", -2, -3)
|
||||
f.TitleBar:SetHeight(20)
|
||||
f.TitleBar:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f.TitleBar:SetBackdropColor(.2, .2, .2, 1)
|
||||
f.TitleBar:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--close button
|
||||
f.Close = CreateFrame ("button", "$parentCloseButton", f, "BackdropTemplate")
|
||||
f.Close:SetPoint ("right", f.TitleBar, "right", -2, 0)
|
||||
f.Close:SetSize (16, 16)
|
||||
f.Close = CreateFrame("button", "$parentCloseButton", f, "BackdropTemplate")
|
||||
f.Close:SetPoint("right", f.TitleBar, "right", -2, 0)
|
||||
f.Close:SetSize(16, 16)
|
||||
|
||||
f.Close:SetNormalTexture ([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
|
||||
f.Close:SetHighlightTexture ([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
|
||||
f.Close:SetPushedTexture ([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
|
||||
f.Close:SetNormalTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
|
||||
f.Close:SetHighlightTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
|
||||
f.Close:SetPushedTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
|
||||
f.Close:GetNormalTexture():SetDesaturated(true)
|
||||
f.Close:GetHighlightTexture():SetDesaturated(true)
|
||||
f.Close:GetPushedTexture():SetDesaturated(true)
|
||||
|
||||
f.Close:SetAlpha (0.7)
|
||||
f.Close:SetScript ("OnClick", function() f:Hide() end)
|
||||
f.Close:SetScript("OnClick", function() f:Hide() end)
|
||||
|
||||
--title
|
||||
f.Title = f.TitleBar:CreateFontString ("$parentTitle", "overlay", "GameFontNormal")
|
||||
f.Title:SetPoint ("center", f.TitleBar, "center")
|
||||
f.Title:SetText ("Details! Create Aura")
|
||||
f.Title:SetPoint("center", f.TitleBar, "center")
|
||||
f.Title:SetText("Details! Create Aura")
|
||||
|
||||
local fw = _detalhes:GetFramework()
|
||||
|
||||
@@ -2052,10 +2052,10 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
local button_template = fw:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
|
||||
--aura name
|
||||
local name_label = fw:CreateLabel (f, "Aura Name: ", nil, nil, "GameFontNormal")
|
||||
local name_label = fw:CreateLabel(f, "Aura Name: ", nil, nil, "GameFontNormal")
|
||||
local name_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraName", "$parentAuraName")
|
||||
name_textentry:SetTemplate (slider_template)
|
||||
name_textentry:SetPoint ("left", name_label, "right", 2, 0)
|
||||
name_textentry:SetPoint("left", name_label, "right", 2, 0)
|
||||
f.name = name_textentry
|
||||
|
||||
--aura type
|
||||
@@ -2073,18 +2073,18 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
return aura_type_table
|
||||
end
|
||||
local aura_type = fw:CreateDropDown (f, aura_type_options, 1, 150, 20, "AuraTypeDropdown", "$parentAuraTypeDropdown")
|
||||
local aura_type_label = fw:CreateLabel (f, "Aura Type: ", nil, nil, "GameFontNormal")
|
||||
aura_type:SetPoint ("left", aura_type_label, "right", 2, 0)
|
||||
local aura_type_label = fw:CreateLabel(f, "Aura Type: ", nil, nil, "GameFontNormal")
|
||||
aura_type:SetPoint("left", aura_type_label, "right", 2, 0)
|
||||
aura_type:Hide()
|
||||
|
||||
local Icon_IconAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 32, 32, "overlay", {200/512, 232/512, 336/512, 368/512}, nil, nil)
|
||||
Icon_IconAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 10, -16)
|
||||
Icon_IconAuraType:SetPoint("topleft", aura_type_label, "bottomleft", 10, -16)
|
||||
|
||||
local Icon_StatusbarAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 92, 12, "overlay", {235/512, 327/512, 336/512, 348/512}, nil, nil)
|
||||
Icon_StatusbarAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 60, -26)
|
||||
Icon_StatusbarAuraType:SetPoint("topleft", aura_type_label, "bottomleft", 60, -26)
|
||||
|
||||
local Icon_TextOnlyAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 57, 8, "overlay", {250/512, 306/512, 360/512, 367/512}, nil, nil)
|
||||
Icon_TextOnlyAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 170, -28)
|
||||
Icon_TextOnlyAuraType:SetPoint("topleft", aura_type_label, "bottomleft", 170, -28)
|
||||
|
||||
local AuraTypeSelectedColor = {1, 1, 1, 0.3}
|
||||
local AuraTypeBorderColor = {.3, .3, .3, 0.5}
|
||||
@@ -2092,7 +2092,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
|
||||
local OnSelectAuraType = function(self, fixedParam, auraType, noUpdate)
|
||||
|
||||
if (type (auraType) == "number") then
|
||||
if (type(auraType) == "number") then
|
||||
if (auraType == 1) then
|
||||
auraType = "icon"
|
||||
elseif (auraType == 2) then
|
||||
@@ -2102,57 +2102,57 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
end
|
||||
end
|
||||
|
||||
f.IconAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
|
||||
f.StatusbarAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
|
||||
f.TextOnlyAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
|
||||
f.IconAuraTypeButton:SetBackdropColor(0, 0, 0, 0.05)
|
||||
f.StatusbarAuraTypeButton:SetBackdropColor(0, 0, 0, 0.05)
|
||||
f.TextOnlyAuraTypeButton:SetBackdropColor(0, 0, 0, 0.05)
|
||||
|
||||
f.IconAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
f.StatusbarAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
f.TextOnlyAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
f.IconAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
|
||||
f.StatusbarAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
|
||||
f.TextOnlyAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
|
||||
|
||||
if (auraType == "icon") then
|
||||
f.IconAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
|
||||
f.IconAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderSelectedColor))
|
||||
f.IconAuraTypeButton:SetBackdropColor(unpack (AuraTypeSelectedColor))
|
||||
f.IconAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderSelectedColor))
|
||||
elseif (auraType == "aurabar") then
|
||||
f.StatusbarAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
|
||||
f.StatusbarAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderSelectedColor))
|
||||
f.StatusbarAuraTypeButton:SetBackdropColor(unpack (AuraTypeSelectedColor))
|
||||
f.StatusbarAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderSelectedColor))
|
||||
elseif (auraType == "text") then
|
||||
f.TextOnlyAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
|
||||
f.TextOnlyAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderSelectedColor))
|
||||
f.TextOnlyAuraTypeButton:SetBackdropColor(unpack (AuraTypeSelectedColor))
|
||||
f.TextOnlyAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderSelectedColor))
|
||||
end
|
||||
|
||||
aura_type:SetValue (auraType)
|
||||
aura_type:SetValue(auraType)
|
||||
if (f.UpdateLabels and not noUpdate) then
|
||||
f:UpdateLabels()
|
||||
end
|
||||
end
|
||||
f.OnSelectAuraType = OnSelectAuraType
|
||||
|
||||
local AuraTypeBackground = f:CreateTexture (nil, "border")
|
||||
local AuraTypeBackground = f:CreateTexture(nil, "border")
|
||||
AuraTypeBackground:SetColorTexture (.4, .4, .4, .1)
|
||||
AuraTypeBackground:SetHeight (64)
|
||||
AuraTypeBackground:SetPoint ("topleft", f, "topleft", 10, -79)
|
||||
AuraTypeBackground:SetPoint ("topright", f, "topright", -10, -79)
|
||||
AuraTypeBackground:SetHeight(64)
|
||||
AuraTypeBackground:SetPoint("topleft", f, "topleft", 10, -79)
|
||||
AuraTypeBackground:SetPoint("topright", f, "topright", -10, -79)
|
||||
|
||||
local Icon_IconAuraTypeButton = fw:CreateButton (f, OnSelectAuraType, 46, 46, "", "icon", nil, nil, "IconAuraTypeButton")
|
||||
local Icon_StatusbarAuraTypeButton = fw:CreateButton (f, OnSelectAuraType, 100, 46, "", "aurabar", nil, nil, "StatusbarAuraTypeButton")
|
||||
local Icon_TextOnlyAuraTypeButton = fw:CreateButton (f, OnSelectAuraType, 69, 46, "", "text", nil, nil, "TextOnlyAuraTypeButton")
|
||||
|
||||
Icon_IconAuraTypeButton:SetPoint ("center", Icon_IconAuraType, "center")
|
||||
Icon_StatusbarAuraTypeButton:SetPoint ("center", Icon_StatusbarAuraType, "center")
|
||||
Icon_TextOnlyAuraTypeButton:SetPoint ("center", Icon_TextOnlyAuraType, "center")
|
||||
Icon_IconAuraTypeButton:SetPoint("center", Icon_IconAuraType, "center")
|
||||
Icon_StatusbarAuraTypeButton:SetPoint("center", Icon_StatusbarAuraType, "center")
|
||||
Icon_TextOnlyAuraTypeButton:SetPoint("center", Icon_TextOnlyAuraType, "center")
|
||||
|
||||
Icon_IconAuraTypeButton:SetBackdrop ({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
Icon_IconAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
|
||||
Icon_IconAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
Icon_IconAuraTypeButton:SetBackdrop({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
Icon_IconAuraTypeButton:SetBackdropColor(unpack (AuraTypeSelectedColor))
|
||||
Icon_IconAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
|
||||
|
||||
Icon_StatusbarAuraTypeButton:SetBackdrop ({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
Icon_StatusbarAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
|
||||
Icon_StatusbarAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
Icon_StatusbarAuraTypeButton:SetBackdrop({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
Icon_StatusbarAuraTypeButton:SetBackdropColor(0, 0, 0, 0.05)
|
||||
Icon_StatusbarAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
|
||||
|
||||
Icon_TextOnlyAuraTypeButton:SetBackdrop ({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
Icon_TextOnlyAuraTypeButton:SetBackdropColor (0, 0, 0, 0.05)
|
||||
Icon_TextOnlyAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderColor))
|
||||
Icon_TextOnlyAuraTypeButton:SetBackdrop({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
Icon_TextOnlyAuraTypeButton:SetBackdropColor(0, 0, 0, 0.05)
|
||||
Icon_TextOnlyAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
|
||||
|
||||
--trigger list
|
||||
--target
|
||||
@@ -2185,8 +2185,8 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
return aura_on_table
|
||||
end
|
||||
local aura_on = fw:CreateDropDown (f, aura_on_options, 1, 150, 20, "AuraOnDropdown", "$parentAuraOnDropdown")
|
||||
local aura_on_label = fw:CreateLabel (f, "Trigger On: ", nil, nil, "GameFontNormal")
|
||||
aura_on:SetPoint ("left", aura_on_label, "right", 2, 0)
|
||||
local aura_on_label = fw:CreateLabel(f, "Trigger On: ", nil, nil, "GameFontNormal")
|
||||
aura_on:SetPoint("left", aura_on_label, "right", 2, 0)
|
||||
aura_on:Hide()
|
||||
|
||||
local triggerList = {
|
||||
@@ -2206,9 +2206,9 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
|
||||
local SetTriggerState = function(triggerID)
|
||||
for i = 1, #triggerList do
|
||||
triggerList[i].checkBox:SetValue (false)
|
||||
triggerList[i].checkBox:SetValue(false)
|
||||
if (triggerList[i].value == triggerID) then
|
||||
triggerList[i].checkBox:SetValue (true)
|
||||
triggerList[i].checkBox:SetValue(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -2218,7 +2218,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
|
||||
local OnChangeTriggerState = function(self, triggerID, state)
|
||||
SetTriggerState (triggerID)
|
||||
aura_on:SetValue (triggerID)
|
||||
aura_on:SetValue(triggerID)
|
||||
|
||||
if (f.UpdateLabels) then
|
||||
f:UpdateLabels()
|
||||
@@ -2231,10 +2231,10 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
checkBox:SetAsCheckBox()
|
||||
checkBox:SetFixedParameter (triggerList [i].value)
|
||||
|
||||
checkBox:SetSize (20, 20)
|
||||
checkBox:SetPoint ("topleft", aura_on_label, "bottomleft", 0, 12 + (-i*20))
|
||||
local label = fw:CreateLabel (f, triggerList [i].name)
|
||||
label:SetPoint ("left", checkBox, "right", 2, 0)
|
||||
checkBox:SetSize(20, 20)
|
||||
checkBox:SetPoint("topleft", aura_on_label, "bottomleft", 0, 12 + (-i*20))
|
||||
local label = fw:CreateLabel(f, triggerList [i].name)
|
||||
label:SetPoint("left", checkBox, "right", 2, 0)
|
||||
|
||||
triggerList [i].checkBox = checkBox
|
||||
end
|
||||
@@ -2243,39 +2243,39 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
|
||||
|
||||
--spellname
|
||||
local spellname_label = fw:CreateLabel (f, "Spell Name: ", nil, nil, "GameFontNormal")
|
||||
local spellname_label = fw:CreateLabel(f, "Spell Name: ", nil, nil, "GameFontNormal")
|
||||
local spellname_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "SpellName", "$parentSpellName")
|
||||
spellname_textentry:SetTemplate (slider_template)
|
||||
spellname_textentry:SetPoint ("left", spellname_label, "right", 2, 0)
|
||||
spellname_textentry:SetPoint("left", spellname_label, "right", 2, 0)
|
||||
f.spellname = spellname_textentry
|
||||
spellname_textentry.tooltip = "Spell/Debuff/Buff to be tracked."
|
||||
|
||||
--spellid
|
||||
local auraid_label = fw:CreateLabel (f, "Spell Id: ", nil, nil, "GameFontNormal")
|
||||
local auraid_label = fw:CreateLabel(f, "Spell Id: ", nil, nil, "GameFontNormal")
|
||||
local auraid_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraSpellId", "$parentAuraSpellId")
|
||||
auraid_textentry:SetTemplate (slider_template)
|
||||
auraid_textentry:Disable()
|
||||
auraid_textentry:SetPoint ("left", auraid_label, "right", 2, 0)
|
||||
auraid_textentry:SetPoint("left", auraid_label, "right", 2, 0)
|
||||
|
||||
--use spellid
|
||||
local usespellid_label = fw:CreateLabel (f, "Use SpellId: ", nil, nil, "GameFontNormal")
|
||||
local usespellid_label = fw:CreateLabel(f, "Use SpellId: ", nil, nil, "GameFontNormal")
|
||||
local aura_use_spellid = fw:CreateSwitch (f, function(_, _, state) if (state) then auraid_textentry:Enable() else auraid_textentry:Disable() end end, false, nil, nil, nil, nil, "UseSpellId")
|
||||
aura_use_spellid:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
|
||||
aura_use_spellid:SetAsCheckBox()
|
||||
|
||||
aura_use_spellid:SetPoint ("left", usespellid_label, "right", 2, 0)
|
||||
aura_use_spellid:SetPoint("left", usespellid_label, "right", 2, 0)
|
||||
aura_use_spellid.tooltip = "Use the spell id instead of the spell name, for advanced users."
|
||||
|
||||
--in combat only
|
||||
local incombat_label = fw:CreateLabel (f, "Only in Combat: ", nil, nil, "GameFontNormal")
|
||||
local incombat_label = fw:CreateLabel(f, "Only in Combat: ", nil, nil, "GameFontNormal")
|
||||
local aura_incombat = fw:CreateSwitch (f, function(_, _, state) end, true, nil, nil, nil, nil, "UseInCombat")
|
||||
aura_incombat:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
|
||||
aura_incombat:SetAsCheckBox()
|
||||
aura_incombat:SetPoint ("left", incombat_label, "right", 2, 0)
|
||||
aura_incombat:SetPoint("left", incombat_label, "right", 2, 0)
|
||||
aura_incombat.tooltip = "Only active when in combat."
|
||||
|
||||
--aura icon
|
||||
local icon_label = fw:CreateLabel (f, "Icon: ", nil, nil, "GameFontNormal")
|
||||
local icon_label = fw:CreateLabel(f, "Icon: ", nil, nil, "GameFontNormal")
|
||||
local icon_button_func = function(texture)
|
||||
f.IconButton.icon.texture = texture
|
||||
end
|
||||
@@ -2283,30 +2283,30 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
local icon_button_icon = fw:NewImage (icon_pick_button, [[Interface\ICONS\TEMP]], 19, 19, "background", nil, "icon", "$parentIcon")
|
||||
icon_pick_button:InstallCustomTexture()
|
||||
|
||||
icon_pick_button:SetPoint ("left", icon_label, "right", 2, 0)
|
||||
icon_button_icon:SetPoint ("left", icon_label, "right", 2, 0)
|
||||
icon_pick_button:SetPoint("left", icon_label, "right", 2, 0)
|
||||
icon_button_icon:SetPoint("left", icon_label, "right", 2, 0)
|
||||
|
||||
f.icon = icon_button_icon
|
||||
|
||||
--is cooldown
|
||||
local iscooldown_label = fw:CreateLabel (f, "Cooldown Animation: ", nil, nil, "GameFontNormal")
|
||||
local iscooldown_label = fw:CreateLabel(f, "Cooldown Animation: ", nil, nil, "GameFontNormal")
|
||||
local aura_iscooldown = fw:CreateSwitch (f, function(_, _, state) end, true, nil, nil, nil, nil, "IsCooldown")
|
||||
aura_iscooldown:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
|
||||
aura_iscooldown:SetAsCheckBox()
|
||||
aura_iscooldown:SetPoint ("left", iscooldown_label, "right", 2, 0)
|
||||
aura_iscooldown:SetPoint("left", iscooldown_label, "right", 2, 0)
|
||||
aura_iscooldown.tooltip = "Only active when in combat."
|
||||
|
||||
--stack
|
||||
local stack_slider = fw:NewSlider (f, f, "$parentStackSlider", "StackSlider", 150, 20, 0, 30, 1, 0, true)
|
||||
stack_slider.useDecimals = true
|
||||
stack_slider:SetTemplate (slider_template)
|
||||
local stack_label = fw:CreateLabel (f, "Trigger Stack Size: ", nil, nil, "GameFontNormal")
|
||||
stack_slider:SetPoint ("left", stack_label, "right", 2, 0)
|
||||
local stack_label = fw:CreateLabel(f, "Trigger Stack Size: ", nil, nil, "GameFontNormal")
|
||||
stack_slider:SetPoint("left", stack_label, "right", 2, 0)
|
||||
stack_slider.tooltip = "Minimum amount of stacks to trigger the aura."
|
||||
|
||||
--sound effect
|
||||
local play_sound = function(self, fixedParam, file)
|
||||
if (type (file) == "table") then
|
||||
if (type(file) == "table") then
|
||||
PlaySoundFile (file.sound_path, "Master")
|
||||
else
|
||||
PlaySoundFile (file, "Master")
|
||||
@@ -2385,10 +2385,10 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
|
||||
table.sort (sounds, sort)
|
||||
|
||||
for _, sound in ipairs (sounds) do
|
||||
if (sound.name:find ("D_")) then --> details sound
|
||||
for _, sound in ipairs(sounds) do
|
||||
if (sound.name:find ("D_")) then --details sound
|
||||
tinsert (t, {color = "orange", label = sound.name, value = sound.file, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize})
|
||||
elseif (sound.gamesound) then --> game sound
|
||||
elseif (sound.gamesound) then --game sound
|
||||
tinsert (t, {color = "yellow", label = sound.name, value = {sound_path = sound.file}, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize})
|
||||
else
|
||||
tinsert (t, {label = sound.name, value = sound.file, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize})
|
||||
@@ -2398,26 +2398,26 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
end
|
||||
local sound_effect = fw:CreateDropDown (f, sound_options, 1, 150, 20, "SoundEffectDropdown", "$parentSoundEffectDropdown")
|
||||
sound_effect:SetTemplate (slider_template)
|
||||
local sound_effect_label = fw:CreateLabel (f, "Play Sound: ", nil, nil, "GameFontNormal")
|
||||
sound_effect:SetPoint ("left", sound_effect_label, "right", 2, 0)
|
||||
local sound_effect_label = fw:CreateLabel(f, "Play Sound: ", nil, nil, "GameFontNormal")
|
||||
sound_effect:SetPoint("left", sound_effect_label, "right", 2, 0)
|
||||
sound_effect.tooltip = "Sound played when the aura triggers."
|
||||
|
||||
--say something
|
||||
local say_something_label = fw:CreateLabel (f, "/Say on Trigger: ", nil, nil, "GameFontNormal")
|
||||
local say_something_label = fw:CreateLabel(f, "/Say on Trigger: ", nil, nil, "GameFontNormal")
|
||||
local say_something = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "SaySomething", "$parentSaySomething")
|
||||
say_something:SetTemplate (slider_template)
|
||||
say_something:SetPoint ("left", say_something_label, "right", 2, 0)
|
||||
say_something:SetPoint("left", say_something_label, "right", 2, 0)
|
||||
say_something.tooltip = "Your character /say this phrase when the aura triggers."
|
||||
|
||||
--aura text
|
||||
local aura_text_label = fw:CreateLabel (f, "Aura Text: ", nil, nil, "GameFontNormal")
|
||||
local aura_text_label = fw:CreateLabel(f, "Aura Text: ", nil, nil, "GameFontNormal")
|
||||
local aura_text = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraText", "$parentAuraText")
|
||||
aura_text:SetTemplate (slider_template)
|
||||
aura_text:SetPoint ("left", aura_text_label, "right", 2, 0)
|
||||
aura_text:SetPoint("left", aura_text_label, "right", 2, 0)
|
||||
aura_text.tooltip = "Text shown at aura's icon right side."
|
||||
|
||||
--apply glow
|
||||
local useglow_label = fw:CreateLabel (f, "Glow Effect: ", nil, nil, "GameFontNormal")
|
||||
local useglow_label = fw:CreateLabel(f, "Glow Effect: ", nil, nil, "GameFontNormal")
|
||||
local useglow = fw:CreateSwitch (f, function(self, _, state)
|
||||
if (state and self.glow_test) then
|
||||
self.glow_test:Show()
|
||||
@@ -2432,26 +2432,26 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
useglow:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
|
||||
useglow:SetAsCheckBox()
|
||||
|
||||
useglow:SetPoint ("left", useglow_label, "right", 2, 0)
|
||||
useglow:SetPoint("left", useglow_label, "right", 2, 0)
|
||||
useglow.tooltip = "Do not rename the aura on WeakAuras options panel or the glow effect may not work."
|
||||
|
||||
useglow.glow_test = CreateFrame ("frame", "DetailsAuraTextGlowTest", useglow.widget, "ActionBarButtonSpellActivationAlert")
|
||||
useglow.glow_test:SetPoint ("topleft", useglow.widget, "topleft", -20, 2)
|
||||
useglow.glow_test:SetPoint ("bottomright", useglow.widget, "bottomright", 20, -2)
|
||||
useglow.glow_test = CreateFrame("frame", "DetailsAuraTextGlowTest", useglow.widget, "ActionBarButtonSpellActivationAlert")
|
||||
useglow.glow_test:SetPoint("topleft", useglow.widget, "topleft", -20, 2)
|
||||
useglow.glow_test:SetPoint("bottomright", useglow.widget, "bottomright", 20, -2)
|
||||
useglow.glow_test:Hide()
|
||||
|
||||
--encounter id
|
||||
local encounterid_label = fw:CreateLabel (f, "Encounter ID: ", nil, nil, "GameFontNormal")
|
||||
local encounterid_label = fw:CreateLabel(f, "Encounter ID: ", nil, nil, "GameFontNormal")
|
||||
local encounterid = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "EncounterIdText", "$parentEncounterIdText")
|
||||
encounterid:SetTemplate (slider_template)
|
||||
encounterid:SetPoint ("left", encounterid_label, "right", 2, 0)
|
||||
encounterid:SetPoint("left", encounterid_label, "right", 2, 0)
|
||||
encounterid.tooltip = "Only load this aura for this raid encounter."
|
||||
|
||||
--size
|
||||
local icon_size_slider = fw:NewSlider (f, f, "$parentIconSizeSlider", "IconSizeSlider", 150, 20, 8, 256, 1, 64)
|
||||
local icon_size_label = fw:CreateLabel (f, "Size: ", nil, nil, "GameFontNormal")
|
||||
local icon_size_label = fw:CreateLabel(f, "Size: ", nil, nil, "GameFontNormal")
|
||||
icon_size_slider:SetTemplate (slider_template)
|
||||
icon_size_slider:SetPoint ("left", icon_size_label, "right", 2, 0)
|
||||
icon_size_slider:SetPoint("left", icon_size_label, "right", 2, 0)
|
||||
icon_size_slider.tooltip = "Icon size, width and height."
|
||||
|
||||
--aura addon
|
||||
@@ -2464,8 +2464,8 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
end
|
||||
local aura_addon = fw:CreateDropDown (f, addon_options, 1, 150, 20, "AuraAddonDropdown", "$parentAuraAddonDropdown")
|
||||
aura_addon:SetTemplate (slider_template)
|
||||
local aura_addon_label = fw:CreateLabel (f, "Addon: ", nil, nil, "GameFontNormal")
|
||||
aura_addon:SetPoint ("left", aura_addon_label, "right", 2, 0)
|
||||
local aura_addon_label = fw:CreateLabel(f, "Addon: ", nil, nil, "GameFontNormal")
|
||||
aura_addon:SetPoint("left", aura_addon_label, "right", 2, 0)
|
||||
|
||||
--weakauras - group
|
||||
|
||||
@@ -2489,10 +2489,10 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
return t
|
||||
end
|
||||
|
||||
local weakauras_folder_label = fw:CreateLabel (f, "WeakAuras Group: ", nil, nil, "GameFontNormal")
|
||||
local weakauras_folder_label = fw:CreateLabel(f, "WeakAuras Group: ", nil, nil, "GameFontNormal")
|
||||
local weakauras_folder = fw:CreateDropDown (f, weakauras_folder_options, 1, 150, 20, "WeakaurasFolderDropdown", "$parentWeakaurasFolder")
|
||||
weakauras_folder:SetTemplate (slider_template)
|
||||
weakauras_folder:SetPoint ("left", weakauras_folder_label, "right", 2, 0)
|
||||
weakauras_folder:SetPoint("left", weakauras_folder_label, "right", 2, 0)
|
||||
|
||||
--make new group
|
||||
local create_wa_group = function()
|
||||
@@ -2536,18 +2536,18 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
weakauras_folder:Select (groupName)
|
||||
end
|
||||
|
||||
local weakauras_newgroup_label = fw:CreateLabel (f, "New WeakAuras Group: ", nil, nil, "GameFontNormal")
|
||||
local weakauras_newgroup_label = fw:CreateLabel(f, "New WeakAuras Group: ", nil, nil, "GameFontNormal")
|
||||
local weakauras_newgroup_textentry = fw:CreateTextEntry (f, create_wa_group, 150, 20, "NewWeakaurasGroupTextEntry", "$parentNewWeakaurasGroup")
|
||||
weakauras_newgroup_textentry:SetTemplate (slider_template)
|
||||
weakauras_newgroup_textentry:SetPoint ("left", weakauras_newgroup_label, "right", 2, 0)
|
||||
weakauras_newgroup_textentry:SetPoint("left", weakauras_newgroup_label, "right", 2, 0)
|
||||
f.weakauras_newgroup = weakauras_newgroup_textentry
|
||||
weakauras_newgroup_textentry.tooltip = "Enter the name of the new group"
|
||||
|
||||
local weakauras_newgroup_button = fw:CreateButton (f, create_wa_group, 106, 20, "Create Group")
|
||||
weakauras_newgroup_button:SetTemplate (slider_template)
|
||||
weakauras_newgroup_button:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
weakauras_newgroup_button:SetWidth (100)
|
||||
weakauras_newgroup_button:SetPoint ("left", weakauras_newgroup_textentry, "right", 2, 0)
|
||||
weakauras_newgroup_button:SetWidth(100)
|
||||
weakauras_newgroup_button:SetPoint("left", weakauras_newgroup_textentry, "right", 2, 0)
|
||||
|
||||
|
||||
--create
|
||||
@@ -2589,11 +2589,11 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
local create_button = fw:CreateButton (f, create_func, 106, 20, L["STRING_CREATEAURA"])
|
||||
create_button:SetTemplate (slider_template)
|
||||
create_button:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
create_button:SetWidth (160)
|
||||
create_button:SetWidth(160)
|
||||
|
||||
local cancel_button = fw:CreateButton (f, function() name_textentry:ClearFocus(); f:Hide() end, 106, 20, "Cancel")
|
||||
cancel_button:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
cancel_button:SetWidth (160)
|
||||
cancel_button:SetWidth(160)
|
||||
|
||||
|
||||
create_button:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]], nil, nil, nil, {0.125, 0.875, 0.125, 0.875}, nil, 4, 2)
|
||||
@@ -2604,36 +2604,36 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
local y_start = 21
|
||||
|
||||
--aura name and the type
|
||||
name_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*1) + (25)) * -1)
|
||||
aura_type_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*2) + (25)) * -1)
|
||||
name_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*1) + (25)) * -1)
|
||||
aura_type_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*2) + (25)) * -1)
|
||||
|
||||
--triggers
|
||||
aura_on_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*4) + (65)) * -1)
|
||||
stack_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*17) + (65)) * -1)
|
||||
encounterid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*18) + (65)) * -1)
|
||||
aura_on_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*4) + (65)) * -1)
|
||||
stack_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*17) + (65)) * -1)
|
||||
encounterid_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*18) + (65)) * -1)
|
||||
|
||||
--about the spell
|
||||
spellname_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*20) + (45)) * -1)
|
||||
usespellid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*21) + (45)) * -1)
|
||||
auraid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*22) + (45)) * -1)
|
||||
incombat_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*23) + (45)) * -1)
|
||||
spellname_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*20) + (45)) * -1)
|
||||
usespellid_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*21) + (45)) * -1)
|
||||
auraid_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*22) + (45)) * -1)
|
||||
incombat_label:SetPoint("topleft", f, "topleft", x_start, ((y_start*23) + (45)) * -1)
|
||||
|
||||
--configuration
|
||||
icon_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*6) + (47)) * -1)
|
||||
sound_effect_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*7) + (47)) * -1)
|
||||
say_something_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*8) + (47)) * -1)
|
||||
aura_text_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*9) + (47)) * -1)
|
||||
useglow_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*10) + (47)) * -1)
|
||||
iscooldown_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*11) + (47)) * -1)
|
||||
icon_size_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*12) + (47)) * -1)
|
||||
icon_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*6) + (47)) * -1)
|
||||
sound_effect_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*7) + (47)) * -1)
|
||||
say_something_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*8) + (47)) * -1)
|
||||
aura_text_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*9) + (47)) * -1)
|
||||
useglow_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*10) + (47)) * -1)
|
||||
iscooldown_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*11) + (47)) * -1)
|
||||
icon_size_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*12) + (47)) * -1)
|
||||
|
||||
aura_addon_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*17) + (60)) * -1)
|
||||
weakauras_folder_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*18) + (60)) * -1)
|
||||
weakauras_newgroup_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*19) + (60)) * -1)
|
||||
aura_addon_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*17) + (60)) * -1)
|
||||
weakauras_folder_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*18) + (60)) * -1)
|
||||
weakauras_newgroup_label:SetPoint("topleft", f, "topleft", x2_start, ((y_start*19) + (60)) * -1)
|
||||
|
||||
|
||||
create_button:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*21) + (60)) * -1)
|
||||
cancel_button:SetPoint ("left", create_button, "right", 20, 0)
|
||||
create_button:SetPoint("topleft", f, "topleft", x2_start, ((y_start*21) + (60)) * -1)
|
||||
cancel_button:SetPoint("left", create_button, "right", 20, 0)
|
||||
|
||||
function f:UpdateLabels()
|
||||
|
||||
@@ -2642,7 +2642,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
|
||||
f.StackSlider:Enable()
|
||||
f.StackSlider.tooltip = "Minimum amount of stacks to trigger the aura."
|
||||
f.StackSlider:SetValue (0)
|
||||
f.StackSlider:SetValue(0)
|
||||
f.SpellName:Enable()
|
||||
f.UseSpellId:Enable()
|
||||
f.AuraSpellId:Enable()
|
||||
@@ -2654,41 +2654,41 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
f.IconButton:Enable()
|
||||
f.AuraOnDropdown:Enable()
|
||||
f.AuraText:Enable()
|
||||
f.AuraText:SetText ("")
|
||||
f.AuraText:SetText("")
|
||||
aura_text_label.text = "Aura Text: "
|
||||
f.UseGlow:Enable()
|
||||
f.IsCooldown:Enable()
|
||||
|
||||
if (aura_type == "icon") then
|
||||
aura_text_label:SetText ("Icon Text: ")
|
||||
icon_size_label:SetText ("Width/Height: ")
|
||||
f.IconSizeSlider:SetValue (64)
|
||||
aura_text_label:SetText("Icon Text: ")
|
||||
icon_size_label:SetText("Width/Height: ")
|
||||
f.IconSizeSlider:SetValue(64)
|
||||
|
||||
elseif (aura_type == "text") then
|
||||
aura_text_label:SetText ("Text: ")
|
||||
icon_size_label:SetText ("Font Size: ")
|
||||
f.IconSizeSlider:SetValue (12)
|
||||
aura_text_label:SetText("Text: ")
|
||||
icon_size_label:SetText("Font Size: ")
|
||||
f.IconSizeSlider:SetValue(12)
|
||||
f.IsCooldown:Disable()
|
||||
|
||||
elseif (aura_type == "aurabar") then
|
||||
aura_text_label:SetText ("Left Text: ")
|
||||
icon_size_label:SetText ("Bar Width: ")
|
||||
f.IconSizeSlider:SetValue (250)
|
||||
aura_text_label:SetText("Left Text: ")
|
||||
icon_size_label:SetText("Bar Width: ")
|
||||
f.IconSizeSlider:SetValue(250)
|
||||
f.IsCooldown:Disable()
|
||||
end
|
||||
|
||||
if (trigger >= 1 and trigger <= 19) then --buff and debuff
|
||||
stack_label:SetText ("Trigger Stack Size: ")
|
||||
stack_label:SetText("Trigger Stack Size: ")
|
||||
|
||||
elseif (trigger >= 20 and trigger <= 29) then --cast end cast start
|
||||
stack_label:SetText ("Cast Duration: ")
|
||||
f.StackSlider:SetValue (2)
|
||||
stack_label:SetText("Cast Duration: ")
|
||||
f.StackSlider:SetValue(2)
|
||||
|
||||
elseif (trigger >= 30 and trigger <= 39) then --boss mods
|
||||
stack_label:SetText ("Trigger Remaining Time:")
|
||||
f.StackSlider:SetValue (4)
|
||||
stack_label:SetText("Trigger Remaining Time:")
|
||||
f.StackSlider:SetValue(4)
|
||||
f.StackSlider.tooltip = "Will trigger when the bar remaining time reach this value."
|
||||
f.IconSizeSlider:SetValue (64)
|
||||
f.IconSizeSlider:SetValue(64)
|
||||
f.SpellName:Disable()
|
||||
f.UseSpellId:Disable()
|
||||
|
||||
@@ -2704,19 +2704,19 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
f.SaySomething:Disable()
|
||||
f.IconButton:Disable()
|
||||
f.UseGlow:Disable()
|
||||
icon_size_label:SetText ("Text Size: ")
|
||||
f.IconSizeSlider:SetValue (11)
|
||||
icon_size_label:SetText("Text Size: ")
|
||||
f.IconSizeSlider:SetValue(11)
|
||||
if (trigger == 41) then
|
||||
f.AuraText:SetText ("=Not Interrupted!=")
|
||||
f.AuraText:SetText("=Not Interrupted!=")
|
||||
aura_text_label.text = "Not Interrupted: "
|
||||
elseif (trigger == 42) then
|
||||
f.AuraText:SetText (DetailsAuraPanel.name.text:gsub ("%(d!%)", "") .. "Dispells")
|
||||
f.AuraText:SetText(DetailsAuraPanel.name.text:gsub ("%(d!%)", "") .. "Dispells")
|
||||
aura_text_label.text = "Title Text: "
|
||||
end
|
||||
end
|
||||
|
||||
if (DetailsAuraPanel.other_values and DetailsAuraPanel.other_values.text) then
|
||||
DetailsAuraPanel.AuraText:SetText (DetailsAuraPanel.other_values.text)
|
||||
DetailsAuraPanel.AuraText:SetText(DetailsAuraPanel.other_values.text)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -2732,10 +2732,10 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
DetailsAuraPanel.WeakaurasFolderDropdown:Refresh()
|
||||
if (encounterid) then
|
||||
DetailsAuraPanel.WeakaurasFolderDropdown:Select ("Details! Aura Group")
|
||||
DetailsAuraPanel.IconSizeSlider:SetValue (128)
|
||||
DetailsAuraPanel.IconSizeSlider:SetValue(128)
|
||||
else
|
||||
DetailsAuraPanel.WeakaurasFolderDropdown:Select (1, true)
|
||||
DetailsAuraPanel.IconSizeSlider:SetValue (64)
|
||||
DetailsAuraPanel.IconSizeSlider:SetValue(64)
|
||||
end
|
||||
|
||||
if (DetailsAuraPanel.other_values.dbm_timer_id or DetailsAuraPanel.other_values.bw_timer_id) then
|
||||
@@ -2743,7 +2743,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
end
|
||||
|
||||
if (DetailsAuraPanel.other_values.text_size) then
|
||||
DetailsAuraPanel.IconSizeSlider:SetValue (DetailsAuraPanel.other_values.text_size)
|
||||
DetailsAuraPanel.IconSizeSlider:SetValue(DetailsAuraPanel.other_values.text_size)
|
||||
end
|
||||
|
||||
spellname = spellname or ""
|
||||
@@ -2755,12 +2755,12 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
|
||||
|
||||
DetailsAuraPanel.UseGlow.glow_test.animIn:Stop()
|
||||
DetailsAuraPanel.UseGlow.glow_test.animOut:Play()
|
||||
DetailsAuraPanel.UseGlow:SetValue (false)
|
||||
DetailsAuraPanel.UseGlow:SetValue(false)
|
||||
|
||||
DetailsAuraPanel.StackSlider:SetValue (0)
|
||||
DetailsAuraPanel.StackSlider:SetValue(0)
|
||||
DetailsAuraPanel.SoundEffectDropdown:Select (1, true)
|
||||
DetailsAuraPanel.AuraText:SetText (DetailsAuraPanel.other_values.text or "")
|
||||
DetailsAuraPanel.SaySomething:SetText ("")
|
||||
DetailsAuraPanel.AuraText:SetText(DetailsAuraPanel.other_values.text or "")
|
||||
DetailsAuraPanel.SaySomething:SetText("")
|
||||
|
||||
if (triggertype and type (triggertype) == "number") then
|
||||
DetailsAuraPanel.AuraOnDropdown:Select (triggertype, true)
|
||||
|
||||
+464
-464
File diff suppressed because it is too large
Load Diff
+15
-15
@@ -89,7 +89,7 @@ Details.API_Description = {
|
||||
}
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> ~segments
|
||||
--~segments
|
||||
|
||||
--[=[
|
||||
Details.SegmentInfo (segment)
|
||||
@@ -211,7 +211,7 @@ tinsert (Details.API_Description.namespaces[1].api, {
|
||||
|
||||
function Details.SegmentDamagingUnits (includePlayerUnits, includeEnemyUnits, includeFriendlyPetUnits, segment)
|
||||
segment = segment or 0
|
||||
if (type (includePlayerUnits) ~= "boolean") then
|
||||
if (type(includePlayerUnits) ~= "boolean") then
|
||||
includePlayerUnits = true
|
||||
end
|
||||
|
||||
@@ -290,7 +290,7 @@ tinsert (Details.API_Description.namespaces[1].api, {
|
||||
|
||||
function Details.SegmentHealingUnits (includePlayerUnits, includeEnemyUnits, includeFriendlyPetUnits, segment)
|
||||
segment = segment or 0
|
||||
if (type (includePlayerUnits) ~= "boolean") then
|
||||
if (type(includePlayerUnits) ~= "boolean") then
|
||||
includePlayerUnits = true
|
||||
end
|
||||
|
||||
@@ -434,7 +434,7 @@ function Details.SegmentPhases (segment)
|
||||
|
||||
local phaseData = combatObject.PhaseData
|
||||
|
||||
for phaseChangeId, phaseTable in ipairs (phaseData) do
|
||||
for phaseChangeId, phaseTable in ipairs(phaseData) do
|
||||
local phaseNumber = phaseTable [1]
|
||||
DetailsFramework.table.addunique (phases, phaseNumber)
|
||||
end
|
||||
@@ -443,7 +443,7 @@ function Details.SegmentPhases (segment)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> unit ~information
|
||||
--unit ~information
|
||||
--[=[
|
||||
Details.UnitInfo (unitId, segment)
|
||||
--=]=]
|
||||
@@ -607,7 +607,7 @@ function Details.UnitTexture (unitId, segment)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> ~damage
|
||||
--~damage
|
||||
|
||||
--[=[
|
||||
Details.UnitDamage (unitId, segment)
|
||||
@@ -827,7 +827,7 @@ tinsert (Details.API_Description.namespaces[1].api, {
|
||||
})
|
||||
|
||||
function Details.UnitDamageBySpell (unitId, spellId, isLiteral, segment)
|
||||
if (type (isLiteral) ~= "boolean") then
|
||||
if (type(isLiteral) ~= "boolean") then
|
||||
isLiteral = true
|
||||
end
|
||||
segment = segment or 0
|
||||
@@ -897,7 +897,7 @@ tinsert (Details.API_Description.namespaces[1].api, {
|
||||
})
|
||||
|
||||
function Details.UnitDamageSpellInfo (unitId, spellId, isLiteral, segment)
|
||||
if (type (isLiteral) ~= "boolean") then
|
||||
if (type(isLiteral) ~= "boolean") then
|
||||
isLiteral = true
|
||||
end
|
||||
segment = segment or 0
|
||||
@@ -1021,7 +1021,7 @@ tinsert (Details.API_Description.namespaces[1].api, {
|
||||
})
|
||||
|
||||
function Details.UnitDamageSpellOnUnit (unitId, spellId, targetUnitId, isLiteral, segment)
|
||||
if (type (isLiteral) ~= "boolean") then
|
||||
if (type(isLiteral) ~= "boolean") then
|
||||
isLiteral = true
|
||||
end
|
||||
segment = segment or 0
|
||||
@@ -1188,7 +1188,7 @@ tinsert (Details.API_Description.namespaces[1].api, {
|
||||
|
||||
function Details.UnitDamageTakenFromSpell (unitId, spellId, isLiteral, segment)
|
||||
segment = segment or 0
|
||||
if (type (isLiteral) ~= "boolean") then
|
||||
if (type(isLiteral) ~= "boolean") then
|
||||
isLiteral = true
|
||||
end
|
||||
|
||||
@@ -1389,7 +1389,7 @@ end
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> ~healing
|
||||
--~healing
|
||||
|
||||
|
||||
--[=[
|
||||
@@ -1556,7 +1556,7 @@ tinsert (Details.API_Description.namespaces[1].api, {
|
||||
})
|
||||
|
||||
function Details.UnitHealingBySpell (unitId, spellId, isLiteral, segment)
|
||||
if (type (isLiteral) ~= "boolean") then
|
||||
if (type(isLiteral) ~= "boolean") then
|
||||
isLiteral = true
|
||||
end
|
||||
segment = segment or 0
|
||||
@@ -1628,7 +1628,7 @@ tinsert (Details.API_Description.namespaces[1].api, {
|
||||
})
|
||||
|
||||
function Details.UnitHealingSpellInfo (unitId, spellId, isLiteral, segment)
|
||||
if (type (isLiteral) ~= "boolean") then
|
||||
if (type(isLiteral) ~= "boolean") then
|
||||
isLiteral = true
|
||||
end
|
||||
segment = segment or 0
|
||||
@@ -1753,7 +1753,7 @@ tinsert (Details.API_Description.namespaces[1].api, {
|
||||
})
|
||||
|
||||
function Details.UnitHealingSpellOnUnit (unitId, spellId, targetUnitId, isLiteral, segment)
|
||||
if (type (isLiteral) ~= "boolean") then
|
||||
if (type(isLiteral) ~= "boolean") then
|
||||
isLiteral = true
|
||||
end
|
||||
segment = segment or 0
|
||||
@@ -1927,7 +1927,7 @@ tinsert (Details.API_Description.namespaces[1].api, {
|
||||
|
||||
function Details.UnitHealingTakenFromSpell (unitId, spellId, isLiteral, segment)
|
||||
segment = segment or 0
|
||||
if (type (isLiteral) ~= "boolean") then
|
||||
if (type(isLiteral) ~= "boolean") then
|
||||
isLiteral = true
|
||||
end
|
||||
|
||||
|
||||
+22
-22
@@ -4,7 +4,7 @@ do
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
--> Globals
|
||||
--Globals
|
||||
--[[global]] DETAILS_ATTRIBUTE_DAMAGE = 1
|
||||
|
||||
--[[global]] DETAILS_SUBATTRIBUTE_DAMAGEDONE = 1
|
||||
@@ -81,27 +81,27 @@ do
|
||||
"aura", --debuff uptime
|
||||
}
|
||||
|
||||
--> Main Attributes
|
||||
--Main Attributes
|
||||
_detalhes.atributos = {
|
||||
|
||||
--> Attributes amount = 4: damage / heal / energy / misc
|
||||
--Attributes amount = 4: damage / heal / energy / misc
|
||||
[0] = 4,
|
||||
|
||||
--[[ DAMAGE ]]
|
||||
dano = 1, --> identifier
|
||||
[1] = 8, --> sub attributes
|
||||
dano = 1, --identifier
|
||||
[1] = 8, -- sub attributes
|
||||
|
||||
--[[ HEALING ]]
|
||||
cura = 2, --> identifier
|
||||
[2] = 7, --> sub attributes
|
||||
cura = 2, --identifier
|
||||
[2] = 7, -- sub attributes
|
||||
|
||||
--[[ ENERGY ]]
|
||||
e_energy = 3,--> identifier
|
||||
[3] = 6, --> sub attributes
|
||||
e_energy = 3,--identifier
|
||||
[3] = 6, -- sub attributes
|
||||
|
||||
--[[ MISC ]]
|
||||
misc = 4, --> identifier
|
||||
[4] = 8, --> sub attributes
|
||||
misc = 4, --identifier
|
||||
[4] = 8, -- sub attributes
|
||||
|
||||
--[[ CUSTOM ]]
|
||||
custom = 5,
|
||||
@@ -109,19 +109,19 @@ do
|
||||
|
||||
--[[ String Names ]]
|
||||
lista = {
|
||||
Loc ["STRING_ATTRIBUTE_DAMAGE"],--> Damage
|
||||
Loc ["STRING_ATTRIBUTE_HEAL"], --> Healing
|
||||
Loc ["STRING_ATTRIBUTE_ENERGY"], --> Energy
|
||||
Loc ["STRING_ATTRIBUTE_MISC"], --> Misc
|
||||
Loc ["STRING_SCRIPTS_TITLE"] --> Custom
|
||||
Loc ["STRING_ATTRIBUTE_DAMAGE"],--Damage
|
||||
Loc ["STRING_ATTRIBUTE_HEAL"], --Healing
|
||||
Loc ["STRING_ATTRIBUTE_ENERGY"], --Energy
|
||||
Loc ["STRING_ATTRIBUTE_MISC"], --Misc
|
||||
Loc ["STRING_SCRIPTS_TITLE"] --Custom
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
--> Sub Attributes
|
||||
--Sub Attributes
|
||||
_detalhes.sub_atributos = {
|
||||
{
|
||||
--> Damage sub classes information
|
||||
--Damage sub classes information
|
||||
damage_done = 1,
|
||||
dps = 2,
|
||||
damage_taken = 3,
|
||||
@@ -154,7 +154,7 @@ do
|
||||
},
|
||||
|
||||
{
|
||||
--> Healing sub classes information
|
||||
--Healing sub classes information
|
||||
healing_done = 1,
|
||||
hps = 2,
|
||||
overheal = 3,
|
||||
@@ -185,7 +185,7 @@ do
|
||||
},
|
||||
|
||||
{
|
||||
--> Energy sub classes information
|
||||
--Energy sub classes information
|
||||
mana_ganha = 1, -- id 0
|
||||
rage_ganha = 2, -- id 1
|
||||
energy_ganha = 3, --id 3
|
||||
@@ -212,7 +212,7 @@ do
|
||||
},
|
||||
|
||||
{
|
||||
--> Misc sub classes information
|
||||
--Misc sub classes information
|
||||
cc_break = 1,
|
||||
ress = 2,
|
||||
kick = 3,
|
||||
@@ -257,7 +257,7 @@ do
|
||||
return CustomObject.name
|
||||
|
||||
elseif (CustomObject and customName and CustomObject.name ~= customName) then
|
||||
for _, custom in ipairs (_detalhes.custom) do
|
||||
for _, custom in ipairs(_detalhes.custom) do
|
||||
if (custom.name == customName) then
|
||||
return custom.name
|
||||
end
|
||||
|
||||
@@ -45,23 +45,23 @@ if (not _G.DetailsFramework.IsTimewalkWoW()) then
|
||||
end
|
||||
|
||||
autoRunCodeEventFrame.OnEventFunc = function(self, event)
|
||||
--> ignore events triggered more than once in a small time window
|
||||
--ignore events triggered more than once in a small time window
|
||||
if (autoRunCodeEventFrame [event] and not autoRunCodeEventFrame [event]:IsCancelled()) then
|
||||
return
|
||||
end
|
||||
|
||||
if (event == "PLAYER_SPECIALIZATION_CHANGED") then
|
||||
--> create a trigger for the event, many times it is triggered more than once
|
||||
--> so if the event is triggered a second time, it will be ignored
|
||||
--create a trigger for the event, many times it is triggered more than once
|
||||
--so if the event is triggered a second time, it will be ignored
|
||||
local newTimer = C_Timer.NewTimer(1, function()
|
||||
Details:DispatchAutoRunCode("on_specchanged")
|
||||
|
||||
--> clear and invalidate the timer
|
||||
--clear and invalidate the timer
|
||||
autoRunCodeEventFrame[event]:Cancel()
|
||||
autoRunCodeEventFrame[event] = nil
|
||||
end)
|
||||
|
||||
--> store the trigger
|
||||
--store the trigger
|
||||
autoRunCodeEventFrame[event] = newTimer
|
||||
end
|
||||
end
|
||||
|
||||
+29
-29
@@ -3,12 +3,12 @@ do
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
_detalhes.EncounterInformation = {}
|
||||
local _ipairs = ipairs --> lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> details api functions
|
||||
--details api functions
|
||||
|
||||
--> return if the player is inside a raid supported by details
|
||||
--return if the player is inside a raid supported by details
|
||||
function _detalhes:IsInInstance()
|
||||
local _, _, _, _, _, _, _, zoneMapID = GetInstanceInfo()
|
||||
if (_detalhes.EncounterInformation [zoneMapID]) then
|
||||
@@ -18,7 +18,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--> return the full table with all data for the instance
|
||||
--return the full table with all data for the instance
|
||||
function _detalhes:GetRaidInfoFromEncounterID (encounterID, encounterEJID)
|
||||
for id, raidTable in pairs (_detalhes.EncounterInformation) do
|
||||
if (encounterID) then
|
||||
@@ -40,7 +40,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--> return the ids of trash mobs in the instance
|
||||
--return the ids of trash mobs in the instance
|
||||
function _detalhes:GetInstanceTrashInfo (mapid)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].trash_ids
|
||||
end
|
||||
@@ -64,7 +64,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--> return the boss table using a encounter id
|
||||
--return the boss table using a encounter id
|
||||
function _detalhes:GetBossEncounterDetailsFromEncounterId (mapid, encounterid)
|
||||
if (not mapid) then
|
||||
local bossIndex, instance
|
||||
@@ -100,12 +100,12 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--> return the EJ boss id
|
||||
--return the EJ boss id
|
||||
function _detalhes:GetEncounterIdFromBossIndex (mapid, index)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounter_ids and _detalhes.EncounterInformation [mapid].encounter_ids [index]
|
||||
end
|
||||
|
||||
--> return the table which contain information about the start of a encounter
|
||||
--return the table which contain information about the start of a encounter
|
||||
function _detalhes:GetEncounterStartInfo (mapid, encounterid)
|
||||
local bossindex = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounter_ids and _detalhes.EncounterInformation [mapid].encounter_ids [encounterid]
|
||||
if (bossindex) then
|
||||
@@ -113,7 +113,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--> return the table which contain information about the end of a encounter
|
||||
--return the table which contain information about the end of a encounter
|
||||
function _detalhes:GetEncounterEndInfo (mapid, encounterid)
|
||||
local bossindex = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounter_ids and _detalhes.EncounterInformation [mapid].encounter_ids [encounterid]
|
||||
if (bossindex) then
|
||||
@@ -121,7 +121,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--> return the function for the boss
|
||||
--return the function for the boss
|
||||
function _detalhes:GetEncounterEnd (mapid, bossindex)
|
||||
local t = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex]
|
||||
if (t) then
|
||||
@@ -133,17 +133,17 @@ do
|
||||
return
|
||||
end
|
||||
|
||||
--> generic boss find function
|
||||
--generic boss find function
|
||||
function _detalhes:GetRaidBossFindFunction (mapid)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].find_boss_encounter
|
||||
end
|
||||
|
||||
--> return if the boss need sync
|
||||
--return if the boss need sync
|
||||
function _detalhes:GetEncounterEqualize (mapid, bossindex)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex] and _detalhes.EncounterInformation [mapid].encounters [bossindex].equalize
|
||||
end
|
||||
|
||||
--> return the function for the boss
|
||||
--return the function for the boss
|
||||
function _detalhes:GetBossFunction (mapid, bossindex)
|
||||
local func = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex] and _detalhes.EncounterInformation [mapid].encounters [bossindex].func
|
||||
if (func) then
|
||||
@@ -152,30 +152,30 @@ do
|
||||
return
|
||||
end
|
||||
|
||||
--> return the boss table with information about name, adds, spells, etc
|
||||
--return the boss table with information about name, adds, spells, etc
|
||||
function _detalhes:GetBossDetails (mapid, bossindex)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex]
|
||||
end
|
||||
|
||||
--> return a table with all names of boss enemies
|
||||
--return a table with all names of boss enemies
|
||||
function _detalhes:GetEncounterActors (mapid, bossindex)
|
||||
|
||||
end
|
||||
|
||||
--> return a table with spells id of specified encounter
|
||||
--return a table with spells id of specified encounter
|
||||
function _detalhes:GetEncounterSpells (mapid, bossindex)
|
||||
local encounter = _detalhes:GetBossDetails (mapid, bossindex)
|
||||
local habilidades_poll = {}
|
||||
if (encounter.continuo) then
|
||||
for index, spellid in _ipairs (encounter.continuo) do
|
||||
for index, spellid in _ipairs(encounter.continuo) do
|
||||
habilidades_poll [spellid] = true
|
||||
end
|
||||
end
|
||||
local fases = encounter.phases
|
||||
if (fases) then
|
||||
for fase_id, fase in _ipairs (fases) do
|
||||
for fase_id, fase in _ipairs(fases) do
|
||||
if (fase.spells) then
|
||||
for index, spellid in _ipairs (fase.spells) do
|
||||
for index, spellid in _ipairs(fase.spells) do
|
||||
habilidades_poll [spellid] = true
|
||||
end
|
||||
end
|
||||
@@ -184,7 +184,7 @@ do
|
||||
return habilidades_poll
|
||||
end
|
||||
|
||||
--> return a table with all boss ids from a raid instance
|
||||
--return a table with all boss ids from a raid instance
|
||||
function _detalhes:GetBossIds (mapid)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].boss_ids
|
||||
end
|
||||
@@ -196,17 +196,17 @@ do
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].is_raid
|
||||
end
|
||||
|
||||
--> return a table with all encounter names present in raid instance
|
||||
--return a table with all encounter names present in raid instance
|
||||
function _detalhes:GetBossNames (mapid)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].boss_names
|
||||
end
|
||||
|
||||
--> return the encounter name
|
||||
--return the encounter name
|
||||
function _detalhes:GetBossName (mapid, bossindex)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].boss_names [bossindex]
|
||||
end
|
||||
|
||||
--> same thing as GetBossDetails, just a alias
|
||||
--same thing as GetBossDetails, just a alias
|
||||
function _detalhes:GetBossEncounterDetails (mapid, bossindex)
|
||||
return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex]
|
||||
end
|
||||
@@ -224,7 +224,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--> return the wallpaper for the raid instance
|
||||
--return the wallpaper for the raid instance
|
||||
function _detalhes:GetRaidBackground (mapid)
|
||||
local bosstables = _detalhes.EncounterInformation [mapid]
|
||||
if (bosstables) then
|
||||
@@ -234,7 +234,7 @@ do
|
||||
end
|
||||
end
|
||||
end
|
||||
--> return the icon for the raid instance
|
||||
--return the icon for the raid instance
|
||||
function _detalhes:GetRaidIcon (mapid, ejID, instanceType)
|
||||
local raidIcon = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].icon
|
||||
if (raidIcon) then
|
||||
@@ -271,7 +271,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--> return the boss icon
|
||||
--return the boss icon
|
||||
function _detalhes:GetBossIcon (mapid, bossindex)
|
||||
if (_detalhes.EncounterInformation [mapid]) then
|
||||
local line = math.ceil (bossindex / 4)
|
||||
@@ -280,7 +280,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
--> return the boss portrit
|
||||
--return the boss portrit
|
||||
function _detalhes:GetBossPortrait (mapid, bossindex, encounterName, ejID)
|
||||
if (mapid and bossindex) then
|
||||
local haveIcon = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex] and _detalhes.EncounterInformation [mapid].encounters [bossindex].portrait
|
||||
@@ -302,7 +302,7 @@ do
|
||||
return nil
|
||||
end
|
||||
|
||||
--> return a list with names of adds and bosses
|
||||
--return a list with names of adds and bosses
|
||||
function _detalhes:GetEncounterActorsName (EJ_EncounterID)
|
||||
--code snippet from wowpedia
|
||||
local actors = {}
|
||||
@@ -387,7 +387,7 @@ do
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> core
|
||||
--core
|
||||
|
||||
function _detalhes:InstallEncounter (InstanceTable)
|
||||
_detalhes.EncounterInformation [InstanceTable.id] = InstanceTable
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
local Details = _G.Details
|
||||
|
||||
|
||||
--> get the total of damage and healing of a phase of an encounter
|
||||
--get the total of damage and healing of a phase of an encounter
|
||||
function Details:OnCombatPhaseChanged()
|
||||
|
||||
local current_combat = Details:GetCurrentCombat()
|
||||
@@ -23,13 +23,13 @@ function Details:OnCombatPhaseChanged()
|
||||
current_combat.PhaseData.heal [current_phase] = phase_healing_container
|
||||
end
|
||||
|
||||
for index, damage_actor in ipairs (Details.cache_damage_group) do
|
||||
for index, damage_actor in ipairs(Details.cache_damage_group) do
|
||||
local phase_damage = damage_actor.total - (phase_damage_section [damage_actor.nome] or 0)
|
||||
phase_damage_section [damage_actor.nome] = damage_actor.total
|
||||
phase_damage_container [damage_actor.nome] = (phase_damage_container [damage_actor.nome] or 0) + phase_damage
|
||||
end
|
||||
|
||||
for index, healing_actor in ipairs (Details.cache_healing_group) do
|
||||
for index, healing_actor in ipairs(Details.cache_healing_group) do
|
||||
local phase_heal = healing_actor.total - (phase_healing_section [healing_actor.nome] or 0)
|
||||
phase_healing_section [healing_actor.nome] = healing_actor.total
|
||||
phase_healing_container [healing_actor.nome] = (phase_healing_container [healing_actor.nome] or 0) + phase_heal
|
||||
@@ -82,8 +82,8 @@ function Details:BossModsLink()
|
||||
tinsert (cur_combat.PhaseData, {phase, time})
|
||||
end
|
||||
|
||||
Details:SendEvent ("COMBAT_ENCOUNTER_PHASE_CHANGED", nil, phase)
|
||||
--Details:Msg ("Current phase is now:", phase)
|
||||
Details:SendEvent("COMBAT_ENCOUNTER_PHASE_CHANGED", nil, phase)
|
||||
--Details:Msg("Current phase is now:", phase)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -104,8 +104,8 @@ function Details:CreateCallbackListeners()
|
||||
local current_table_dbm = {}
|
||||
local current_table_bigwigs = {}
|
||||
|
||||
local event_frame = CreateFrame ("frame", nil, UIParent, "BackdropTemplate")
|
||||
event_frame:SetScript ("OnEvent", function(self, event, ...)
|
||||
local event_frame = CreateFrame("frame", nil, UIParent, "BackdropTemplate")
|
||||
event_frame:SetScript("OnEvent", function(self, event, ...)
|
||||
if (event == "ENCOUNTER_START") then
|
||||
local encounterID, encounterName, difficultyID, raidSize = select (1, ...)
|
||||
current_encounter = encounterID
|
||||
@@ -158,7 +158,7 @@ function Details:CreateCallbackListeners()
|
||||
function Details:BigWigs_StartBar (event, module, spellid, bar_text, time, icon, ...)
|
||||
spellid = tostring (spellid)
|
||||
if (not current_table_bigwigs [spellid]) then
|
||||
current_table_bigwigs [spellid] = {(type (module) == "string" and module) or (module and module.moduleName) or "", spellid or "", bar_text or "", time or 0, icon or ""}
|
||||
current_table_bigwigs [spellid] = {(type(module) == "string" and module) or (module and module.moduleName) or "", spellid or "", bar_text or "", time or 0, icon or ""}
|
||||
end
|
||||
end
|
||||
if (BigWigsLoader.RegisterMessage) then
|
||||
|
||||
+23
-23
@@ -8,34 +8,34 @@
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
--> initialize buffs name container
|
||||
--initialize buffs name container
|
||||
_detalhes.Buffs.BuffsTable = {} -- armazenara o [nome do buff] = { tabela do buff }
|
||||
_detalhes.Buffs.__index = _detalhes.Buffs
|
||||
|
||||
--> switch off recording buffs by default
|
||||
--switch off recording buffs by default
|
||||
_detalhes.RecordPlayerSelfBuffs = false
|
||||
_detalhes.RecordPlayerAbilityWithBuffs = false
|
||||
_detalhes.RecordPlayerSelfDebuffs = false
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
|
||||
local _pairs = pairs --> lua local
|
||||
local _ipairs = ipairs --> lua local
|
||||
local _pairs = pairs --lua local
|
||||
local _ipairs = ipairs --lua local
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> details api functions
|
||||
--details api functions
|
||||
|
||||
--> return if the buff is already registred or not
|
||||
--return if the buff is already registred or not
|
||||
function _detalhes.Buffs:IsRegistred (buff)
|
||||
if (type (buff) == "number") then
|
||||
if (type(buff) == "number") then
|
||||
for _, buffObject in _pairs (_detalhes.Buffs.BuffsTable) do
|
||||
if (buffObject.id == buff) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
elseif (type (buff) == "string") then
|
||||
elseif (type(buff) == "string") then
|
||||
for name, _ in _pairs (_detalhes.Buffs.BuffsTable) do
|
||||
if (name == buff) then
|
||||
return true
|
||||
@@ -45,7 +45,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> register a new buff name
|
||||
--register a new buff name
|
||||
function _detalhes.Buffs:NewBuff (BuffName, BuffId)
|
||||
if (not BuffName) then
|
||||
BuffName = GetSpellInfo(BuffId)
|
||||
@@ -57,7 +57,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> remove a registred buff
|
||||
--remove a registred buff
|
||||
function _detalhes.Buffs:RemoveBuff (BuffName)
|
||||
if (not _detalhes.Buffs.BuffsTable [BuffName]) then
|
||||
return false
|
||||
@@ -67,7 +67,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> return a list of registred buffs
|
||||
--return a list of registred buffs
|
||||
function _detalhes.Buffs:GetBuffList()
|
||||
local list = {}
|
||||
for name, _ in _pairs (_detalhes.Buffs.BuffsTable) do
|
||||
@@ -76,7 +76,7 @@
|
||||
return list
|
||||
end
|
||||
|
||||
--> return a list of registred buffs ids
|
||||
--return a list of registred buffs ids
|
||||
function _detalhes.Buffs:GetBuffListIds()
|
||||
local list = {}
|
||||
for name, buffObject in _pairs (_detalhes.Buffs.BuffsTable) do
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internal functions
|
||||
--internal functions
|
||||
|
||||
function _detalhes.Buffs:UpdateBuff (method)
|
||||
-- self = buff table
|
||||
@@ -97,7 +97,7 @@
|
||||
self.castedAmt = self.castedAmt + 1
|
||||
self.active = true
|
||||
self.appliedAt [#self.appliedAt+1] = _detalhes.tabela_vigente:GetCombatTime()
|
||||
_detalhes:SendEvent ("BUFF_UPDATE")
|
||||
_detalhes:SendEvent("BUFF_UPDATE")
|
||||
|
||||
elseif (method == "refresh") then
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
self.duration = self.duration + (_detalhes._tempo - self.start)
|
||||
self.start = _detalhes._tempo
|
||||
self.appliedAt [#self.appliedAt+1] = _detalhes.tabela_vigente:GetCombatTime()
|
||||
_detalhes:SendEvent ("BUFF_UPDATE")
|
||||
_detalhes:SendEvent("BUFF_UPDATE")
|
||||
|
||||
elseif (method == "remove") then
|
||||
|
||||
@@ -117,27 +117,27 @@
|
||||
self.droppedAmt = self.droppedAmt + 1
|
||||
self.start = nil
|
||||
self.active = false
|
||||
_detalhes:SendEvent ("BUFF_UPDATE")
|
||||
_detalhes:SendEvent("BUFF_UPDATE")
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
--> build buffs
|
||||
--build buffs
|
||||
function _detalhes.Buffs:BuildTables()
|
||||
_detalhes.Buffs.built = true
|
||||
if (_detalhes.savedbuffs) then
|
||||
for _, BuffId in _ipairs (_detalhes.savedbuffs) do
|
||||
for _, BuffId in _ipairs(_detalhes.savedbuffs) do
|
||||
_detalhes.Buffs:NewBuff (nil, BuffId)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> save buff list when addon exit
|
||||
--save buff list when addon exit
|
||||
function _detalhes.Buffs:SaveBuffs()
|
||||
_detalhes_database.savedbuffs = _detalhes.Buffs:GetBuffListIds()
|
||||
end
|
||||
|
||||
--> construct a buff table of the new buff registred
|
||||
--construct a buff table of the new buff registred
|
||||
function _detalhes.Buffs:BuildBuffTable (BuffName, BuffId)
|
||||
local bufftable = {name = BuffName, id = BuffId, duration = 0, start = nil, castedAmt = 0, refreshAmt = 0, droppedAmt = 0, active = false, appliedAt = {}}
|
||||
bufftable.IsBuff = true
|
||||
@@ -146,7 +146,7 @@
|
||||
end
|
||||
|
||||
|
||||
--> update player buffs
|
||||
--update player buffs
|
||||
function _detalhes.Buffs:CatchBuffs()
|
||||
|
||||
if (not _detalhes.Buffs.built) then
|
||||
@@ -168,7 +168,7 @@
|
||||
BuffTable.droppedAmt = 0
|
||||
end
|
||||
|
||||
--> catch buffs untracked yet
|
||||
--catch buffs untracked yet
|
||||
for buffIndex = 1, 41 do
|
||||
local name = UnitAura ("player", buffIndex)
|
||||
if (name) then
|
||||
|
||||
@@ -170,7 +170,7 @@ do
|
||||
return self.pets
|
||||
end
|
||||
|
||||
--> inherits to all actors without placing it on _detalhes namespace.
|
||||
--inherits to all actors without placing it on _detalhes namespace.
|
||||
_detalhes.container_combatentes.guid = _detalhes.GetGUID
|
||||
_detalhes.container_combatentes.name = _detalhes.GetName
|
||||
_detalhes.container_combatentes.class = _detalhes.GetActorClass
|
||||
|
||||
+2
-2
@@ -444,10 +444,10 @@ function Details.Coach.WelcomePanel()
|
||||
local welcomePanel = _G.DETAILSCOACHPANEL
|
||||
if (not welcomePanel) then
|
||||
welcomePanel = DetailsFramework:CreateSimplePanel(UIParent)
|
||||
welcomePanel:SetSize (400, 280)
|
||||
welcomePanel:SetSize(400, 280)
|
||||
welcomePanel:SetTitle ("Details! Coach")
|
||||
welcomePanel:ClearAllPoints()
|
||||
welcomePanel:SetPoint ("left", UIParent, "left", 10, 0)
|
||||
welcomePanel:SetPoint("left", UIParent, "left", 10, 0)
|
||||
welcomePanel:Hide()
|
||||
DetailsFramework:ApplyStandardBackdrop(welcomePanel)
|
||||
|
||||
|
||||
+40
-40
@@ -4,10 +4,10 @@ local Details = _G.Details
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> extra buttons at the death options (release, death recap)
|
||||
--extra buttons at the death options (release, death recap)
|
||||
|
||||
local detailsOnDeathMenu = CreateFrame ("frame", "DetailsOnDeathMenu", UIParent, "BackdropTemplate")
|
||||
detailsOnDeathMenu:SetHeight (30)
|
||||
local detailsOnDeathMenu = CreateFrame("frame", "DetailsOnDeathMenu", UIParent, "BackdropTemplate")
|
||||
detailsOnDeathMenu:SetHeight(30)
|
||||
detailsOnDeathMenu.Debug = false
|
||||
|
||||
detailsOnDeathMenu:RegisterEvent ("PLAYER_REGEN_ENABLED")
|
||||
@@ -16,14 +16,14 @@ DetailsFramework:ApplyStandardBackdrop (detailsOnDeathMenu)
|
||||
detailsOnDeathMenu:SetAlpha (0.75)
|
||||
|
||||
--disable text
|
||||
detailsOnDeathMenu.disableLabel = Details.gump:CreateLabel (detailsOnDeathMenu, "you can disable this at /details > Raid Tools", 9)
|
||||
detailsOnDeathMenu.disableLabel = Details.gump:CreateLabel(detailsOnDeathMenu, "you can disable this at /details > Raid Tools", 9)
|
||||
|
||||
detailsOnDeathMenu.warningLabel = Details.gump:CreateLabel (detailsOnDeathMenu, "", 11)
|
||||
detailsOnDeathMenu.warningLabel = Details.gump:CreateLabel(detailsOnDeathMenu, "", 11)
|
||||
detailsOnDeathMenu.warningLabel.textcolor = "red"
|
||||
detailsOnDeathMenu.warningLabel:SetPoint ("bottomleft", detailsOnDeathMenu, "bottomleft", 5, 2)
|
||||
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
|
||||
@@ -108,7 +108,7 @@ end
|
||||
--encounter breakdown button
|
||||
detailsOnDeathMenu.breakdownButton = Details.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenEncounterBreakdown, 120, 20, "Encounter Breakdown", "breakdownButton")
|
||||
detailsOnDeathMenu.breakdownButton:SetTemplate (Details.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
|
||||
detailsOnDeathMenu.breakdownButton:SetPoint ("topleft", detailsOnDeathMenu, "topleft", 5, -5)
|
||||
detailsOnDeathMenu.breakdownButton:SetPoint("topleft", detailsOnDeathMenu, "topleft", 5, -5)
|
||||
detailsOnDeathMenu.breakdownButton:Hide()
|
||||
|
||||
detailsOnDeathMenu.breakdownButton.CoolTip = {
|
||||
@@ -129,7 +129,7 @@ detailsOnDeathMenu.breakdownButton.CoolTip = {
|
||||
GameCooltip2:AddLine ("Encounter Breakdown plugin is disabled in the Addon Control Panel.", "", 1, "red")
|
||||
end
|
||||
|
||||
end, --> called when user mouse over the frame
|
||||
end, --called when user mouse over the frame
|
||||
OnEnterFunc = function(self)
|
||||
detailsOnDeathMenu.button_mouse_over = true
|
||||
end,
|
||||
@@ -139,12 +139,12 @@ detailsOnDeathMenu.breakdownButton.CoolTip = {
|
||||
FixedValue = "none",
|
||||
ShowSpeed = .5,
|
||||
Options = function()
|
||||
GameCooltip:SetOption ("MyAnchor", "top")
|
||||
GameCooltip:SetOption ("RelativeAnchor", "bottom")
|
||||
GameCooltip:SetOption ("WidthAnchorMod", 0)
|
||||
GameCooltip:SetOption ("HeightAnchorMod", -13)
|
||||
GameCooltip:SetOption ("TextSize", 10)
|
||||
GameCooltip:SetOption ("FixedWidth", 220)
|
||||
GameCooltip:SetOption("MyAnchor", "top")
|
||||
GameCooltip:SetOption("RelativeAnchor", "bottom")
|
||||
GameCooltip:SetOption("WidthAnchorMod", 0)
|
||||
GameCooltip:SetOption("HeightAnchorMod", -13)
|
||||
GameCooltip:SetOption("TextSize", 10)
|
||||
GameCooltip:SetOption("FixedWidth", 220)
|
||||
end
|
||||
}
|
||||
GameCooltip2:CoolTipInject (detailsOnDeathMenu.breakdownButton)
|
||||
@@ -152,7 +152,7 @@ GameCooltip2:CoolTipInject (detailsOnDeathMenu.breakdownButton)
|
||||
--player endurance button
|
||||
detailsOnDeathMenu.enduranceButton = Details.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerEndurance, 120, 20, "Player Endurance", "enduranceButton")
|
||||
detailsOnDeathMenu.enduranceButton:SetTemplate (Details.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
|
||||
detailsOnDeathMenu.enduranceButton:SetPoint ("topleft", detailsOnDeathMenu.breakdownButton, "topright", 2, 0)
|
||||
detailsOnDeathMenu.enduranceButton:SetPoint("topleft", detailsOnDeathMenu.breakdownButton, "topright", 2, 0)
|
||||
detailsOnDeathMenu.enduranceButton:Hide()
|
||||
|
||||
detailsOnDeathMenu.enduranceButton.CoolTip = {
|
||||
@@ -170,7 +170,7 @@ detailsOnDeathMenu.enduranceButton.CoolTip = {
|
||||
GameCooltip2:AddLine ("Advanced Death Logs plugin is disabled or not installed, check the Addon Control Panel or download it from the Curseforge APP.", "", 1, "red")
|
||||
end
|
||||
|
||||
end, --> called when user mouse over the frame
|
||||
end, --called when user mouse over the frame
|
||||
OnEnterFunc = function(self)
|
||||
detailsOnDeathMenu.button_mouse_over = true
|
||||
end,
|
||||
@@ -180,12 +180,12 @@ detailsOnDeathMenu.enduranceButton.CoolTip = {
|
||||
FixedValue = "none",
|
||||
ShowSpeed = .5,
|
||||
Options = function()
|
||||
GameCooltip:SetOption ("MyAnchor", "top")
|
||||
GameCooltip:SetOption ("RelativeAnchor", "bottom")
|
||||
GameCooltip:SetOption ("WidthAnchorMod", 0)
|
||||
GameCooltip:SetOption ("HeightAnchorMod", -13)
|
||||
GameCooltip:SetOption ("TextSize", 10)
|
||||
GameCooltip:SetOption ("FixedWidth", 220)
|
||||
GameCooltip:SetOption("MyAnchor", "top")
|
||||
GameCooltip:SetOption("RelativeAnchor", "bottom")
|
||||
GameCooltip:SetOption("WidthAnchorMod", 0)
|
||||
GameCooltip:SetOption("HeightAnchorMod", -13)
|
||||
GameCooltip:SetOption("TextSize", 10)
|
||||
GameCooltip:SetOption("FixedWidth", 220)
|
||||
end
|
||||
}
|
||||
GameCooltip2:CoolTipInject (detailsOnDeathMenu.enduranceButton)
|
||||
@@ -193,7 +193,7 @@ GameCooltip2:CoolTipInject (detailsOnDeathMenu.enduranceButton)
|
||||
--spells
|
||||
detailsOnDeathMenu.spellsButton = Details.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerSpells, 48, 20, "Spells", "SpellsButton")
|
||||
detailsOnDeathMenu.spellsButton:SetTemplate (Details.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
|
||||
detailsOnDeathMenu.spellsButton:SetPoint ("topleft", detailsOnDeathMenu.enduranceButton, "topright", 2, 0)
|
||||
detailsOnDeathMenu.spellsButton:SetPoint("topleft", detailsOnDeathMenu.enduranceButton, "topright", 2, 0)
|
||||
detailsOnDeathMenu.spellsButton:Hide()
|
||||
|
||||
detailsOnDeathMenu.spellsButton.CoolTip = {
|
||||
@@ -202,7 +202,7 @@ detailsOnDeathMenu.spellsButton.CoolTip = {
|
||||
GameCooltip2:Preset (2)
|
||||
GameCooltip2:AddLine ("Open your player Details! breakdown.")
|
||||
|
||||
end, --> called when user mouse over the frame
|
||||
end, --called when user mouse over the frame
|
||||
OnEnterFunc = function(self)
|
||||
detailsOnDeathMenu.button_mouse_over = true
|
||||
end,
|
||||
@@ -212,12 +212,12 @@ detailsOnDeathMenu.spellsButton.CoolTip = {
|
||||
FixedValue = "none",
|
||||
ShowSpeed = .5,
|
||||
Options = function()
|
||||
GameCooltip:SetOption ("MyAnchor", "top")
|
||||
GameCooltip:SetOption ("RelativeAnchor", "bottom")
|
||||
GameCooltip:SetOption ("WidthAnchorMod", 0)
|
||||
GameCooltip:SetOption ("HeightAnchorMod", -13)
|
||||
GameCooltip:SetOption ("TextSize", 10)
|
||||
GameCooltip:SetOption ("FixedWidth", 220)
|
||||
GameCooltip:SetOption("MyAnchor", "top")
|
||||
GameCooltip:SetOption("RelativeAnchor", "bottom")
|
||||
GameCooltip:SetOption("WidthAnchorMod", 0)
|
||||
GameCooltip:SetOption("HeightAnchorMod", -13)
|
||||
GameCooltip:SetOption("TextSize", 10)
|
||||
GameCooltip:SetOption("FixedWidth", 220)
|
||||
end
|
||||
}
|
||||
GameCooltip2:CoolTipInject (detailsOnDeathMenu.spellsButton)
|
||||
@@ -232,11 +232,11 @@ function detailsOnDeathMenu.CanShowPanel()
|
||||
return true
|
||||
end
|
||||
|
||||
--> check if the player just wiped in an encounter
|
||||
--check if the player just wiped in an encounter
|
||||
if (IsInRaid()) then
|
||||
local isInInstance = IsInInstance()
|
||||
if (isInInstance) then
|
||||
--> check if all players in the raid are out of combat
|
||||
--check if all players in the raid are out of combat
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
if (UnitAffectingCombat ("raid" .. i)) then
|
||||
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
|
||||
@@ -261,11 +261,11 @@ function detailsOnDeathMenu.ShowPanel()
|
||||
end
|
||||
|
||||
if (ElvUI) then
|
||||
detailsOnDeathMenu:SetPoint ("topleft", StaticPopup1, "bottomleft", 0, -1)
|
||||
detailsOnDeathMenu:SetPoint ("topright", StaticPopup1, "bottomright", 0, -1)
|
||||
detailsOnDeathMenu:SetPoint("topleft", StaticPopup1, "bottomleft", 0, -1)
|
||||
detailsOnDeathMenu:SetPoint("topright", StaticPopup1, "bottomright", 0, -1)
|
||||
else
|
||||
detailsOnDeathMenu:SetPoint ("topleft", StaticPopup1, "bottomleft", 4, 2)
|
||||
detailsOnDeathMenu:SetPoint ("topright", StaticPopup1, "bottomright", -4, 2)
|
||||
detailsOnDeathMenu:SetPoint("topleft", StaticPopup1, "bottomleft", 4, 2)
|
||||
detailsOnDeathMenu:SetPoint("topright", StaticPopup1, "bottomright", -4, 2)
|
||||
end
|
||||
|
||||
detailsOnDeathMenu.breakdownButton:Show()
|
||||
@@ -274,14 +274,14 @@ function detailsOnDeathMenu.ShowPanel()
|
||||
|
||||
detailsOnDeathMenu:Show()
|
||||
|
||||
detailsOnDeathMenu:SetHeight (30)
|
||||
detailsOnDeathMenu:SetHeight(30)
|
||||
|
||||
if (not Details:GetTutorialCVar ("DISABLE_ONDEATH_PANEL")) then
|
||||
detailsOnDeathMenu.disableLabel:Show()
|
||||
detailsOnDeathMenu.disableLabel:SetPoint ("bottomleft", detailsOnDeathMenu, "bottomleft", 5, 1)
|
||||
detailsOnDeathMenu.disableLabel:SetPoint("bottomleft", detailsOnDeathMenu, "bottomleft", 5, 1)
|
||||
detailsOnDeathMenu.disableLabel.color = "gray"
|
||||
detailsOnDeathMenu.disableLabel.alpha = 0.5
|
||||
detailsOnDeathMenu:SetHeight (detailsOnDeathMenu:GetHeight() + 10)
|
||||
detailsOnDeathMenu:SetHeight(detailsOnDeathMenu:GetHeight() + 10)
|
||||
|
||||
if (math.random (1, 3) == 3) then
|
||||
Details:SetTutorialCVar ("DISABLE_ONDEATH_PANEL", true)
|
||||
|
||||
+86
-86
@@ -9,7 +9,7 @@ local on_deathrecap_line_enter = function(self)
|
||||
if (self.spellid) then
|
||||
GameTooltip:SetOwner (self, "ANCHOR_RIGHT")
|
||||
Details:GameTooltipSetSpellByID (self.spellid)
|
||||
self:SetBackdropColor (.3, .3, .3, .2)
|
||||
self:SetBackdropColor(.3, .3, .3, .2)
|
||||
GameTooltip:Show()
|
||||
self.backgroundTextureOverlay:Show()
|
||||
self.timeAt:SetAlpha (1)
|
||||
@@ -21,7 +21,7 @@ end
|
||||
|
||||
local on_deathrecap_line_leave = function(self)
|
||||
GameTooltip:Hide()
|
||||
self:SetBackdropColor (.3, .3, .3, 0)
|
||||
self:SetBackdropColor(.3, .3, .3, 0)
|
||||
self.backgroundTextureOverlay:Hide()
|
||||
self.timeAt:SetAlpha (textAlpha)
|
||||
self.sourceName:SetAlpha (textAlpha)
|
||||
@@ -30,19 +30,19 @@ local on_deathrecap_line_leave = function(self)
|
||||
end
|
||||
|
||||
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)
|
||||
line:SetScript ("OnEnter", on_deathrecap_line_enter)
|
||||
line:SetScript ("OnLeave", on_deathrecap_line_leave)
|
||||
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)
|
||||
line:SetScript("OnEnter", on_deathrecap_line_enter)
|
||||
line:SetScript("OnLeave", on_deathrecap_line_leave)
|
||||
|
||||
line:SetSize (300, 21)
|
||||
line:SetSize(300, 21)
|
||||
|
||||
local timeAt = line:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
local backgroundTexture = line:CreateTexture (nil, "border")
|
||||
local backgroundTextureOverlay = line:CreateTexture (nil, "artwork")
|
||||
local spellIcon = line:CreateTexture (nil, "overlay")
|
||||
local spellIconBorder = line:CreateTexture (nil, "overlay")
|
||||
local backgroundTexture = line:CreateTexture(nil, "border")
|
||||
local backgroundTextureOverlay = line:CreateTexture(nil, "artwork")
|
||||
local spellIcon = line:CreateTexture(nil, "overlay")
|
||||
local spellIconBorder = line:CreateTexture(nil, "overlay")
|
||||
spellIcon:SetDrawLayer ("overlay", 1)
|
||||
spellIconBorder:SetDrawLayer ("overlay", 2)
|
||||
local sourceName = line:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
@@ -51,30 +51,30 @@ local create_deathrecap_line = function(parent, n)
|
||||
local lifeStatusBar = line:CreateTexture(nil, "border", nil, -3)
|
||||
|
||||
--grave icon
|
||||
local graveIcon = line:CreateTexture (nil, "overlay")
|
||||
graveIcon:SetTexture ([[Interface\MINIMAP\POIIcons]])
|
||||
local graveIcon = line:CreateTexture(nil, "overlay")
|
||||
graveIcon:SetTexture([[Interface\MINIMAP\POIIcons]])
|
||||
graveIcon:SetTexCoord (146/256, 160/256, 0/512, 18/512)
|
||||
graveIcon:SetPoint ("left", line, "left", 11, 0)
|
||||
graveIcon:SetSize (14, 18)
|
||||
graveIcon:SetPoint("left", line, "left", 11, 0)
|
||||
graveIcon:SetSize(14, 18)
|
||||
|
||||
--spell icon
|
||||
spellIcon:SetSize (19, 19)
|
||||
spellIconBorder:SetTexture ([[Interface\ENCOUNTERJOURNAL\LootTab]])
|
||||
spellIcon:SetSize(19, 19)
|
||||
spellIconBorder:SetTexture([[Interface\ENCOUNTERJOURNAL\LootTab]])
|
||||
spellIconBorder:SetTexCoord (6/256, 38/256, 49/128, 81/128)
|
||||
spellIconBorder:SetSize (20, 20)
|
||||
spellIconBorder:SetPoint ("topleft", spellIcon, "topleft", 0, 0)
|
||||
spellIconBorder:SetSize(20, 20)
|
||||
spellIconBorder:SetPoint("topleft", spellIcon, "topleft", 0, 0)
|
||||
|
||||
--locations
|
||||
timeAt:SetPoint ("left", line, "left", 2, 0)
|
||||
spellIcon:SetPoint ("left", line, "left", 50, 0)
|
||||
sourceName:SetPoint ("left", line, "left", 82, 0)
|
||||
amount:SetPoint ("left", line, "left", 240, 0)
|
||||
lifePercent:SetPoint ("left", line, "left", 320, 0)
|
||||
timeAt:SetPoint("left", line, "left", 2, 0)
|
||||
spellIcon:SetPoint("left", line, "left", 50, 0)
|
||||
sourceName:SetPoint("left", line, "left", 82, 0)
|
||||
amount:SetPoint("left", line, "left", 240, 0)
|
||||
lifePercent:SetPoint("left", line, "left", 320, 0)
|
||||
|
||||
--text colors
|
||||
Details.gump:SetFontColor (amount, "red")
|
||||
Details.gump:SetFontColor (timeAt, "gray")
|
||||
Details.gump:SetFontColor (sourceName, "yellow")
|
||||
Details.gump:SetFontColor(amount, "red")
|
||||
Details.gump:SetFontColor(timeAt, "gray")
|
||||
Details.gump:SetFontColor(sourceName, "yellow")
|
||||
|
||||
Details.gump:SetFontSize (sourceName, 10)
|
||||
|
||||
@@ -85,50 +85,50 @@ local create_deathrecap_line = function(parent, n)
|
||||
lifePercent:SetAlpha (textAlpha)
|
||||
|
||||
--text setup
|
||||
amount:SetWidth (85)
|
||||
amount:SetJustifyH ("right")
|
||||
lifePercent:SetWidth (42)
|
||||
lifePercent:SetJustifyH ("right")
|
||||
amount:SetWidth(85)
|
||||
amount:SetJustifyH("right")
|
||||
lifePercent:SetWidth(42)
|
||||
lifePercent:SetJustifyH("right")
|
||||
|
||||
--life statusbar
|
||||
lifeStatusBar:SetPoint("topleft", line, "topleft")
|
||||
lifeStatusBar:SetPoint("bottomleft", line, "bottomleft")
|
||||
lifeStatusBar:SetColorTexture(0.5, 0.5, 0.5, 0.4)
|
||||
|
||||
backgroundTexture:SetTexture ([[Interface\AddOns\Details\images\deathrecap_background]])
|
||||
backgroundTexture:SetTexture([[Interface\AddOns\Details\images\deathrecap_background]])
|
||||
backgroundTexture:SetTexCoord (0, 1, 0, 1)
|
||||
backgroundTexture:SetVertexColor (.1, .1, .1, .3)
|
||||
|
||||
--top border
|
||||
local TopFader = line:CreateTexture (nil, "border")
|
||||
TopFader:SetTexture ([[Interface\AddOns\Details\images\deathrecap_background_top]])
|
||||
local TopFader = line:CreateTexture(nil, "border")
|
||||
TopFader:SetTexture([[Interface\AddOns\Details\images\deathrecap_background_top]])
|
||||
TopFader:SetTexCoord (0, 1, 0, 1)
|
||||
TopFader:SetVertexColor (.1, .1, .1, .3)
|
||||
TopFader:SetPoint ("bottomleft", backgroundTexture, "topleft", 0, -0)
|
||||
TopFader:SetPoint ("bottomright", backgroundTexture, "topright", 0, -0)
|
||||
TopFader:SetHeight (32)
|
||||
TopFader:SetPoint("bottomleft", backgroundTexture, "topleft", 0, -0)
|
||||
TopFader:SetPoint("bottomright", backgroundTexture, "topright", 0, -0)
|
||||
TopFader:SetHeight(32)
|
||||
TopFader:Hide()
|
||||
line.TopFader = TopFader
|
||||
|
||||
if (n == 10) then
|
||||
--bottom fader
|
||||
local backgroundTexture2 = line:CreateTexture (nil, "border")
|
||||
backgroundTexture2:SetTexture ([[Interface\AddOns\Details\images\deathrecap_background_bottom]])
|
||||
local backgroundTexture2 = line:CreateTexture(nil, "border")
|
||||
backgroundTexture2:SetTexture([[Interface\AddOns\Details\images\deathrecap_background_bottom]])
|
||||
backgroundTexture2:SetTexCoord (0, 1, 0, 1)
|
||||
backgroundTexture2:SetVertexColor (.1, .1, .1, .3)
|
||||
backgroundTexture2:SetPoint ("topleft", backgroundTexture, "bottomleft", 0, 0)
|
||||
backgroundTexture2:SetPoint ("topright", backgroundTexture, "bottomright", 0, 0)
|
||||
backgroundTexture2:SetHeight (32)
|
||||
backgroundTexture2:SetPoint("topleft", backgroundTexture, "bottomleft", 0, 0)
|
||||
backgroundTexture2:SetPoint("topright", backgroundTexture, "bottomright", 0, 0)
|
||||
backgroundTexture2:SetHeight(32)
|
||||
|
||||
Details.gump:SetFontSize (amount, 14)
|
||||
Details.gump:SetFontSize (lifePercent, 14)
|
||||
backgroundTexture:SetVertexColor (.2, .1, .1, .3)
|
||||
end
|
||||
|
||||
backgroundTexture:SetPoint ("topleft", 0, 1)
|
||||
backgroundTexture:SetPoint ("bottomright", 0, -1)
|
||||
backgroundTexture:SetPoint("topleft", 0, 1)
|
||||
backgroundTexture:SetPoint("bottomright", 0, -1)
|
||||
backgroundTexture:SetDesaturated (true)
|
||||
backgroundTextureOverlay:SetTexture ([[Interface\AdventureMap\AdventureMap]])
|
||||
backgroundTextureOverlay:SetTexture([[Interface\AdventureMap\AdventureMap]])
|
||||
backgroundTextureOverlay:SetTexCoord (460/1024, 659/1024, 330/1024, 350/1024)
|
||||
backgroundTextureOverlay:SetAllPoints()
|
||||
backgroundTextureOverlay:SetDesaturated (true)
|
||||
@@ -238,7 +238,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
for i = 1, 10 do
|
||||
Details.DeathRecap.Lines [i]:Hide()
|
||||
end
|
||||
for i, button in ipairs (Details.DeathRecap.Segments) do
|
||||
for i, button in ipairs(Details.DeathRecap.Segments) do
|
||||
button:Hide()
|
||||
end
|
||||
end
|
||||
@@ -255,10 +255,10 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
|
||||
--create details death recap if not existant
|
||||
if (not Details.DeathRecap) then
|
||||
Details.DeathRecap = CreateFrame ("frame", "DetailsDeathRecap", DeathRecapFrame, "BackdropTemplate")
|
||||
Details.DeathRecap = CreateFrame("frame", "DetailsDeathRecap", DeathRecapFrame, "BackdropTemplate")
|
||||
Details.DeathRecap:SetAllPoints()
|
||||
|
||||
DeathRecapFrame.Title:SetText (DeathRecapFrame.Title:GetText() .. " (by Details!)")
|
||||
DeathRecapFrame.Title:SetText(DeathRecapFrame.Title:GetText() .. " (by Details!)")
|
||||
|
||||
--lines
|
||||
Details.DeathRecap.Lines = {}
|
||||
@@ -269,18 +269,18 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
--segments
|
||||
Details.DeathRecap.Segments = {}
|
||||
for i = 5, 1, -1 do
|
||||
local segmentButton = CreateFrame ("button", "DetailsDeathRecapSegmentButton" .. i, Details.DeathRecap, "BackdropTemplate")
|
||||
local segmentButton = CreateFrame("button", "DetailsDeathRecapSegmentButton" .. i, Details.DeathRecap, "BackdropTemplate")
|
||||
|
||||
segmentButton:SetSize (16, 20)
|
||||
segmentButton:SetPoint ("topright", DeathRecapFrame, "topright", (-abs (i-6) * 22) - 10, -5)
|
||||
segmentButton:SetSize(16, 20)
|
||||
segmentButton:SetPoint("topright", DeathRecapFrame, "topright", (-abs (i-6) * 22) - 10, -5)
|
||||
|
||||
local text = segmentButton:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
segmentButton.text = text
|
||||
text:SetText ("#" .. i)
|
||||
text:SetPoint ("center")
|
||||
Details.gump:SetFontColor (text, "silver")
|
||||
text:SetText("#" .. i)
|
||||
text:SetPoint("center")
|
||||
Details.gump:SetFontColor(text, "silver")
|
||||
|
||||
segmentButton:SetScript ("OnClick", function()
|
||||
segmentButton:SetScript("OnClick", function()
|
||||
OpenDetailsDeathRecapAtSegment (i)
|
||||
end)
|
||||
tinsert (Details.DeathRecap.Segments, i, segmentButton)
|
||||
@@ -320,11 +320,11 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
if (Details.death_recap.show_segments) then
|
||||
local last_index = 0
|
||||
local buttonsInUse = {}
|
||||
for i, button in ipairs (Details.DeathRecap.Segments) do
|
||||
for i, button in ipairs(Details.DeathRecap.Segments) do
|
||||
if (Details.tabela_historico.tabelas [i]) then
|
||||
button:Show()
|
||||
tinsert (buttonsInUse, button)
|
||||
Details.gump:SetFontColor (button.text, "silver")
|
||||
Details.gump:SetFontColor(button.text, "silver")
|
||||
last_index = i
|
||||
else
|
||||
button:Hide()
|
||||
@@ -338,18 +338,18 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
for i = 1, #buttonsInUse2 do
|
||||
local button = buttonsInUse2 [i]
|
||||
button:ClearAllPoints()
|
||||
button:SetPoint ("topright", DeathRecapFrame, "topright", (-i * 22) - 10, -5)
|
||||
button:SetPoint("topright", DeathRecapFrame, "topright", (-i * 22) - 10, -5)
|
||||
end
|
||||
|
||||
if (not segment) then
|
||||
Details.gump:SetFontColor (Details.DeathRecap.Segments [1].text, "orange")
|
||||
Details.gump:SetFontColor(Details.DeathRecap.Segments [1].text, "orange")
|
||||
else
|
||||
Details.gump:SetFontColor (Details.DeathRecap.Segments [segment].text, "orange")
|
||||
Details.gump:SetFontColor(Details.DeathRecap.Segments [segment].text, "orange")
|
||||
death = Details.tabela_historico.tabelas [segment] and Details.tabela_historico.tabelas [segment].last_events_tables
|
||||
end
|
||||
|
||||
else
|
||||
for i, button in ipairs (Details.DeathRecap.Segments) do
|
||||
for i, button in ipairs(Details.DeathRecap.Segments) do
|
||||
button:Hide()
|
||||
end
|
||||
end
|
||||
@@ -407,14 +407,14 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
for i = #events, 1, -1 do
|
||||
local event = events [i]
|
||||
local evType = event [1]
|
||||
if (type (evType) == "boolean" and evType) then
|
||||
if (type(evType) == "boolean" and evType) then
|
||||
hitKill = event
|
||||
break
|
||||
end
|
||||
end
|
||||
if (hitKill) then
|
||||
local haveHitKill = false
|
||||
for index, t in ipairs (BiggestDamageHits) do
|
||||
for index, t in ipairs(BiggestDamageHits) do
|
||||
if (t == hitKill) then
|
||||
haveHitKill = true
|
||||
break
|
||||
@@ -430,9 +430,9 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
for i = #events, 1, -1 do
|
||||
local event = events [i]
|
||||
local evType = event [1]
|
||||
if (type (evType) == "boolean" and evType) then
|
||||
if (type(evType) == "boolean" and evType) then
|
||||
local alreadyHave = false
|
||||
for index, t in ipairs (BiggestDamageHits) do
|
||||
for index, t in ipairs(BiggestDamageHits) do
|
||||
if (t == event) then
|
||||
alreadyHave = true
|
||||
break
|
||||
@@ -470,7 +470,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
local lineIndex = 10
|
||||
|
||||
--for i = #events, 1, -1 do
|
||||
for i, event in ipairs (events) do
|
||||
for i, event in ipairs(events) do
|
||||
local event = events [i]
|
||||
|
||||
local evType = event [1]
|
||||
@@ -483,15 +483,15 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
|
||||
local customSpellInfo = event [11]
|
||||
|
||||
if (type (evType) == "boolean" and evType) then
|
||||
if (type(evType) == "boolean" and evType) then
|
||||
|
||||
local line = Details.DeathRecap.Lines [lineIndex]
|
||||
if (line) then
|
||||
line.timeAt:SetText (format ("%.1f", eventTime - timeOfDeath) .. "s")
|
||||
line.spellIcon:SetTexture (spellIcon or customSpellInfo and customSpellInfo [3] or "")
|
||||
line.timeAt:SetText(format ("%.1f", eventTime - timeOfDeath) .. "s")
|
||||
line.spellIcon:SetTexture(spellIcon or customSpellInfo and customSpellInfo [3] or "")
|
||||
line.TopFader:Hide()
|
||||
--line.spellIcon:SetTexCoord (.1, .9, .1, .9)
|
||||
--line.sourceName:SetText ("|cFFC6B0D9" .. source .. "|r")
|
||||
--line.sourceName:SetText("|cFFC6B0D9" .. source .. "|r")
|
||||
|
||||
--parse source and cut the length of the string after setting the spellname and source
|
||||
local sourceClass = Details:GetClass (source)
|
||||
@@ -517,12 +517,12 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
end
|
||||
end
|
||||
|
||||
--> remove real name or owner name
|
||||
--remove real name or owner name
|
||||
source = Details:GetOnlyName (source)
|
||||
--> remove owner name
|
||||
--remove owner name
|
||||
source = source:gsub ((" <.*"), "")
|
||||
|
||||
--> if a player?
|
||||
--if a player?
|
||||
if (Details.player_class [sourceClass]) then
|
||||
source = Details:AddClassOrSpecIcon (source, sourceClass, sourceSpec, 16, true)
|
||||
|
||||
@@ -531,7 +531,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
|
||||
end
|
||||
|
||||
--> remove the dot signal from the spell name
|
||||
--remove the dot signal from the spell name
|
||||
if (not spellName) then
|
||||
spellName = customSpellInfo and customSpellInfo [2] or "*?*"
|
||||
if (spellName:find (STRING_ENVIRONMENTAL_DAMAGE_FALLING)) then
|
||||
@@ -541,7 +541,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
else
|
||||
source = "Gravity"
|
||||
end
|
||||
--/run for a,b in pairs (_G) do if (type (b)=="string" and b:find ("Falling")) then print (a,b) end end
|
||||
--/run for a,b in pairs (_G) do if (type(b)=="string" and b:find ("Falling")) then print (a,b) end end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -549,18 +549,18 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
spellName = spellName:gsub ("[*] ", "")
|
||||
source = source or ""
|
||||
|
||||
line.sourceName:SetText (spellName .. " (" .. "|cFFC6B0D9" .. source .. "|r" .. ")")
|
||||
line.sourceName:SetText(spellName .. " (" .. "|cFFC6B0D9" .. source .. "|r" .. ")")
|
||||
DetailsFramework:TruncateText (line.sourceName, 185)
|
||||
|
||||
if (amount > 1000) then
|
||||
--line.amount:SetText ("-" .. Details:ToK (amount))
|
||||
line.amount:SetText ("-" .. Details:comma_value(floor(amount)))
|
||||
--line.amount:SetText("-" .. Details:ToK (amount))
|
||||
line.amount:SetText("-" .. Details:comma_value(floor(amount)))
|
||||
else
|
||||
--line.amount:SetText ("-" .. floor (amount))
|
||||
line.amount:SetText ("-" .. floor (amount))
|
||||
--line.amount:SetText("-" .. floor (amount))
|
||||
line.amount:SetText("-" .. floor (amount))
|
||||
end
|
||||
|
||||
line.lifePercent:SetText (hp .. "%")
|
||||
line.lifePercent:SetText(hp .. "%")
|
||||
line.lifeStatusBar:SetWidth(line:GetWidth() * (hp/100))
|
||||
|
||||
line.spellid = event [2]
|
||||
@@ -569,12 +569,12 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
|
||||
if (Details.death_recap.show_life_percent) then
|
||||
line.lifePercent:Show()
|
||||
line.amount:SetPoint ("left", line, "left", 240, 0)
|
||||
line.lifePercent:SetPoint ("left", line, "left", 320, 0)
|
||||
line.amount:SetPoint("left", line, "left", 240, 0)
|
||||
line.lifePercent:SetPoint("left", line, "left", 320, 0)
|
||||
else
|
||||
line.lifePercent:Hide()
|
||||
line.amount:SetPoint ("left", line, "left", 280, 0)
|
||||
--line.lifePercent:SetPoint ("left", line, "left", 320, 0)
|
||||
line.amount:SetPoint("left", line, "left", 280, 0)
|
||||
--line.lifePercent:SetPoint("left", line, "left", 320, 0)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+136
-136
@@ -11,7 +11,7 @@ local Loc = _G.LibStub("AceLocale-3.0"):GetLocale( "Details" )
|
||||
--constants
|
||||
local CONST_USE_PLAYER_EDPS = false
|
||||
|
||||
--> Generate damage chart for mythic dungeon runs
|
||||
--Generate damage chart for mythic dungeon runs
|
||||
|
||||
--[=[
|
||||
The chart table needs to be stored saparated from the combat
|
||||
@@ -234,7 +234,7 @@ end
|
||||
function mythicDungeonCharts:OnEndMythicDungeon()
|
||||
if (mythicDungeonCharts.ChartTable and mythicDungeonCharts.ChartTable.Running) then
|
||||
|
||||
--> stop capturinfg
|
||||
--stop capturinfg
|
||||
mythicDungeonCharts.ChartTable.Running = false
|
||||
mythicDungeonCharts.ChartTable.ElapsedTime = time() - mythicDungeonCharts.ChartTable.StartTime
|
||||
mythicDungeonCharts.ChartTable.EndTime = time()
|
||||
@@ -243,8 +243,8 @@ function mythicDungeonCharts:OnEndMythicDungeon()
|
||||
local name, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
|
||||
mythicDungeonCharts.ChartTable.DungeonName = name
|
||||
|
||||
--> check if is inside the dungeon
|
||||
--> many players just leave the dungeon in order the re-enter and start the run again, the chart window is showing in these cases data to an imcomplete run.
|
||||
--check if is inside the dungeon
|
||||
--many players just leave the dungeon in order the re-enter and start the run again, the chart window is showing in these cases data to an imcomplete run.
|
||||
local isInsideDungeon = IsInInstance()
|
||||
if (not isInsideDungeon) then
|
||||
mythicDungeonCharts:Debug ("OnEndMythicDungeon() player wasn't inside the dungeon.")
|
||||
@@ -253,7 +253,7 @@ function mythicDungeonCharts:OnEndMythicDungeon()
|
||||
|
||||
mythicDungeonCharts:Debug ("Dungeon ended successfully, chart data capture stopped, scheduling to open the window.")
|
||||
|
||||
--> the run is valid, schedule to open the chart window
|
||||
--the run is valid, schedule to open the chart window
|
||||
_detalhes.mythic_plus.delay_to_show_graphic = 5
|
||||
C_Timer.After (_detalhes.mythic_plus.delay_to_show_graphic or 5, mythicDungeonCharts.ShowReadyPanel)
|
||||
|
||||
@@ -285,17 +285,17 @@ function mythicDungeonCharts.ShowReadyPanel()
|
||||
|
||||
--create the panel
|
||||
if (not mythicDungeonCharts.ReadyFrame) then
|
||||
mythicDungeonCharts.ReadyFrame = CreateFrame ("frame", "DetailsMythicDungeonReadyFrame", UIParent, "BackdropTemplate")
|
||||
mythicDungeonCharts.ReadyFrame = CreateFrame("frame", "DetailsMythicDungeonReadyFrame", UIParent, "BackdropTemplate")
|
||||
local f = mythicDungeonCharts.ReadyFrame
|
||||
|
||||
f:SetSize (255, 80)
|
||||
f:SetPoint ("center", UIParent, "center", 300, 0)
|
||||
f:SetSize(255, 80)
|
||||
f:SetPoint("center", UIParent, "center", 300, 0)
|
||||
f:SetFrameStrata ("LOW")
|
||||
f:EnableMouse (true)
|
||||
f:SetMovable (true)
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (0, 0, 0, 0.9)
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor(0, 0, 0, 0.9)
|
||||
f:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
DetailsFramework:ApplyStandardBackdrop (f)
|
||||
DetailsFramework:CreateTitleBar (f, "Details! Damage Graphic for M+")
|
||||
|
||||
@@ -311,12 +311,12 @@ function mythicDungeonCharts.ShowReadyPanel()
|
||||
--show button
|
||||
f.ShowButton = DetailsFramework:CreateButton (f, function() mythicDungeonCharts.ShowChart(); f:Hide() end, 80, 20, Loc ["STRING_SLASH_SHOW"])
|
||||
f.ShowButton:SetTemplate (DetailsFramework:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
f.ShowButton:SetPoint ("topright", f, "topright", -5, -30)
|
||||
f.ShowButton:SetPoint("topright", f, "topright", -5, -30)
|
||||
|
||||
--discart button
|
||||
f.DiscartButton = DetailsFramework:CreateButton (f, function() f:Hide() end, 80, 20, Loc ["STRING_DISCARD"])
|
||||
f.DiscartButton:SetTemplate (DetailsFramework:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
f.DiscartButton:SetPoint ("right", f.ShowButton, "left", -5, 0)
|
||||
f.DiscartButton:SetPoint("right", f.ShowButton, "left", -5, 0)
|
||||
|
||||
--disable feature check box (dont show this again)
|
||||
local on_switch_enable = function(self, _, value)
|
||||
@@ -324,8 +324,8 @@ function mythicDungeonCharts.ShowReadyPanel()
|
||||
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")
|
||||
notAgainSwitch:ClearAllPoints()
|
||||
notAgainLabel:SetPoint ("left", notAgainSwitch, "right", 2, 0)
|
||||
notAgainSwitch:SetPoint ("bottomleft", f, "bottomleft", 5, 5)
|
||||
notAgainLabel:SetPoint("left", notAgainSwitch, "right", 2, 0)
|
||||
notAgainSwitch:SetPoint("bottomleft", f, "bottomleft", 5, 5)
|
||||
notAgainSwitch:SetAsCheckBox()
|
||||
end
|
||||
|
||||
@@ -336,62 +336,62 @@ function mythicDungeonCharts.ShowChart()
|
||||
|
||||
if (not mythicDungeonCharts.Frame) then
|
||||
|
||||
mythicDungeonCharts.Frame = CreateFrame ("frame", "DetailsMythicDungeonChartFrame", UIParent, "BackdropTemplate")
|
||||
mythicDungeonCharts.Frame = CreateFrame("frame", "DetailsMythicDungeonChartFrame", UIParent, "BackdropTemplate")
|
||||
local f = mythicDungeonCharts.Frame
|
||||
|
||||
f:SetSize (1200, 620)
|
||||
f:SetPoint ("center", UIParent, "center", 0, 0)
|
||||
f:SetSize(1200, 620)
|
||||
f:SetPoint("center", UIParent, "center", 0, 0)
|
||||
f:SetFrameStrata ("LOW")
|
||||
f:EnableMouse (true)
|
||||
f:SetMovable (true)
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (0, 0, 0, 0.9)
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor(0, 0, 0, 0.9)
|
||||
f:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--minimized frame
|
||||
mythicDungeonCharts.FrameMinimized = CreateFrame ("frame", "DetailsMythicDungeonChartFrameminimized", UIParent, "BackdropTemplate")
|
||||
mythicDungeonCharts.FrameMinimized = CreateFrame("frame", "DetailsMythicDungeonChartFrameminimized", UIParent, "BackdropTemplate")
|
||||
local fMinimized = mythicDungeonCharts.FrameMinimized
|
||||
|
||||
fMinimized:SetSize (160, 24)
|
||||
fMinimized:SetPoint ("center", UIParent, "center", 0, 0)
|
||||
fMinimized:SetSize(160, 24)
|
||||
fMinimized:SetPoint("center", UIParent, "center", 0, 0)
|
||||
fMinimized:SetFrameStrata ("LOW")
|
||||
fMinimized:EnableMouse (true)
|
||||
fMinimized:SetMovable (true)
|
||||
fMinimized:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
fMinimized:SetBackdropColor (0, 0, 0, 0.9)
|
||||
fMinimized:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
fMinimized:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
fMinimized:SetBackdropColor(0, 0, 0, 0.9)
|
||||
fMinimized:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
fMinimized:Hide()
|
||||
|
||||
f.IsMinimized = false
|
||||
|
||||
--titlebar
|
||||
local titlebar = CreateFrame ("frame", nil, f, "BackdropTemplate")
|
||||
titlebar:SetPoint ("topleft", f, "topleft", 2, -3)
|
||||
titlebar:SetPoint ("topright", f, "topright", -2, -3)
|
||||
titlebar:SetHeight (20)
|
||||
titlebar:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
titlebar:SetBackdropColor (.5, .5, .5, 1)
|
||||
titlebar:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
local titlebar = CreateFrame("frame", nil, f, "BackdropTemplate")
|
||||
titlebar:SetPoint("topleft", f, "topleft", 2, -3)
|
||||
titlebar:SetPoint("topright", f, "topright", -2, -3)
|
||||
titlebar:SetHeight(20)
|
||||
titlebar:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
titlebar:SetBackdropColor(.5, .5, .5, 1)
|
||||
titlebar:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--> title
|
||||
local titleLabel = _detalhes.gump:NewLabel (titlebar, titlebar, nil, "titulo", "Plugins", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
|
||||
titleLabel:SetPoint ("center", titlebar , "center")
|
||||
titleLabel:SetPoint ("top", titlebar , "top", 0, -5)
|
||||
--title
|
||||
local titleLabel = _detalhes.gump:NewLabel(titlebar, titlebar, nil, "titulo", "Plugins", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
|
||||
titleLabel:SetPoint("center", titlebar , "center")
|
||||
titleLabel:SetPoint("top", titlebar , "top", 0, -5)
|
||||
f.TitleText = titleLabel
|
||||
|
||||
--titlebar when minimized
|
||||
local titlebarMinimized = CreateFrame ("frame", nil, fMinimized, "BackdropTemplate")
|
||||
titlebarMinimized:SetPoint ("topleft", fMinimized, "topleft", 2, -3)
|
||||
titlebarMinimized:SetPoint ("topright", fMinimized, "topright", -2, -3)
|
||||
titlebarMinimized:SetHeight (20)
|
||||
titlebarMinimized:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
titlebarMinimized:SetBackdropColor (.5, .5, .5, 1)
|
||||
titlebarMinimized:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
local titlebarMinimized = CreateFrame("frame", nil, fMinimized, "BackdropTemplate")
|
||||
titlebarMinimized:SetPoint("topleft", fMinimized, "topleft", 2, -3)
|
||||
titlebarMinimized:SetPoint("topright", fMinimized, "topright", -2, -3)
|
||||
titlebarMinimized:SetHeight(20)
|
||||
titlebarMinimized:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
titlebarMinimized:SetBackdropColor(.5, .5, .5, 1)
|
||||
titlebarMinimized:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--> title
|
||||
local titleLabelMinimized = _detalhes.gump:NewLabel (titlebarMinimized, titlebarMinimized, nil, "titulo", "Dungeon Run Chart", "GameFontHighlightLeft", 10, {227/255, 186/255, 4/255})
|
||||
titleLabelMinimized:SetPoint ("left", titlebarMinimized , "left", 4, 0)
|
||||
--titleLabelMinimized:SetPoint ("top", titlebarMinimized , "top", 0, -5)
|
||||
--title
|
||||
local titleLabelMinimized = _detalhes.gump:NewLabel(titlebarMinimized, titlebarMinimized, nil, "titulo", "Dungeon Run Chart", "GameFontHighlightLeft", 10, {227/255, 186/255, 4/255})
|
||||
titleLabelMinimized:SetPoint("left", titlebarMinimized , "left", 4, 0)
|
||||
--titleLabelMinimized:SetPoint("top", titlebarMinimized , "top", 0, -5)
|
||||
f.TitleTextMinimized = titleLabelMinimized
|
||||
|
||||
_detalhes:FormatBackground (f)
|
||||
@@ -412,7 +412,7 @@ function mythicDungeonCharts.ShowChart()
|
||||
LibWindow.SavePosition (fMinimized)
|
||||
|
||||
f.ChartFrame = Details:GetFramework():CreateChartPanel (f, 1200, 600, "DetailsMythicDungeonChartGraphicFrame")
|
||||
f.ChartFrame:SetPoint ("topleft", f, "topleft", 5, -20)
|
||||
f.ChartFrame:SetPoint("topleft", f, "topleft", 5, -20)
|
||||
|
||||
f.ChartFrame.FrameInUse = {}
|
||||
f.ChartFrame.FrameFree = {}
|
||||
@@ -424,29 +424,29 @@ function mythicDungeonCharts.ShowChart()
|
||||
|
||||
f.ChartFrame.Graphic.DrawLine = mythicDungeonCharts.CustomDrawLine
|
||||
|
||||
f.ChartFrame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f.ChartFrame:SetBackdropColor (0, 0, 0, 0.0)
|
||||
f.ChartFrame:SetBackdropBorderColor (0, 0, 0, 0)
|
||||
f.ChartFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f.ChartFrame:SetBackdropColor(0, 0, 0, 0.0)
|
||||
f.ChartFrame:SetBackdropBorderColor(0, 0, 0, 0)
|
||||
|
||||
f.ChartFrame:EnableMouse (false)
|
||||
|
||||
f.ChartFrame.CloseButton:Hide()
|
||||
|
||||
f.BossWidgetsFrame = CreateFrame ("frame", "$parentBossFrames", f, "BackdropTemplate")
|
||||
f.BossWidgetsFrame = CreateFrame("frame", "$parentBossFrames", f, "BackdropTemplate")
|
||||
f.BossWidgetsFrame:SetFrameLevel (f:GetFrameLevel()+10)
|
||||
f.BossWidgetsFrame.Widgets = {}
|
||||
|
||||
f.BossWidgetsFrame.GraphPin = f.BossWidgetsFrame:CreateTexture (nil, "overlay")
|
||||
f.BossWidgetsFrame.GraphPin:SetTexture ([[Interface\BUTTONS\UI-RadioButton]])
|
||||
f.BossWidgetsFrame.GraphPin = f.BossWidgetsFrame:CreateTexture(nil, "overlay")
|
||||
f.BossWidgetsFrame.GraphPin:SetTexture([[Interface\BUTTONS\UI-RadioButton]])
|
||||
f.BossWidgetsFrame.GraphPin:SetTexCoord (17/64, 32/64, 0, 1)
|
||||
f.BossWidgetsFrame.GraphPin:SetSize (16, 16)
|
||||
f.BossWidgetsFrame.GraphPin:SetSize(16, 16)
|
||||
|
||||
f.BossWidgetsFrame.GraphPinGlow = f.BossWidgetsFrame:CreateTexture (nil, "artwork")
|
||||
f.BossWidgetsFrame.GraphPinGlow:SetTexture ([[Interface\Calendar\EventNotificationGlow]])
|
||||
f.BossWidgetsFrame.GraphPinGlow = f.BossWidgetsFrame:CreateTexture(nil, "artwork")
|
||||
f.BossWidgetsFrame.GraphPinGlow:SetTexture([[Interface\Calendar\EventNotificationGlow]])
|
||||
f.BossWidgetsFrame.GraphPinGlow:SetTexCoord (0, 1, 0, 1)
|
||||
f.BossWidgetsFrame.GraphPinGlow:SetSize (14, 14)
|
||||
f.BossWidgetsFrame.GraphPinGlow:SetBlendMode ("ADD")
|
||||
f.BossWidgetsFrame.GraphPinGlow:SetPoint ("center", f.BossWidgetsFrame.GraphPin, "center", 0, 0)
|
||||
f.BossWidgetsFrame.GraphPinGlow:SetSize(14, 14)
|
||||
f.BossWidgetsFrame.GraphPinGlow:SetBlendMode("ADD")
|
||||
f.BossWidgetsFrame.GraphPinGlow:SetPoint("center", f.BossWidgetsFrame.GraphPin, "center", 0, 0)
|
||||
|
||||
f:Hide()
|
||||
|
||||
@@ -460,66 +460,66 @@ function mythicDungeonCharts.ShowChart()
|
||||
end
|
||||
end
|
||||
|
||||
local closeButton = CreateFrame ("button", "$parentCloseButton", f, "UIPanelCloseButton")
|
||||
local closeButton = CreateFrame("button", "$parentCloseButton", f, "UIPanelCloseButton")
|
||||
closeButton:GetNormalTexture():SetDesaturated (true)
|
||||
closeButton:SetWidth (24)
|
||||
closeButton:SetHeight (24)
|
||||
closeButton:SetPoint ("topright", f, "topright", 0, -1)
|
||||
closeButton:SetWidth(24)
|
||||
closeButton:SetHeight(24)
|
||||
closeButton:SetPoint("topright", f, "topright", 0, -1)
|
||||
closeButton:SetFrameLevel (f:GetFrameLevel()+16)
|
||||
|
||||
local minimizeButton = CreateFrame ("button", "$parentCloseButton", f, "UIPanelCloseButton")
|
||||
local minimizeButton = CreateFrame("button", "$parentCloseButton", f, "UIPanelCloseButton")
|
||||
minimizeButton:GetNormalTexture():SetDesaturated (true)
|
||||
minimizeButton:SetWidth (24)
|
||||
minimizeButton:SetHeight (24)
|
||||
minimizeButton:SetPoint ("right", closeButton, "left", 2, 0)
|
||||
minimizeButton:SetWidth(24)
|
||||
minimizeButton:SetHeight(24)
|
||||
minimizeButton:SetPoint("right", closeButton, "left", 2, 0)
|
||||
minimizeButton:SetFrameLevel (f:GetFrameLevel()+16)
|
||||
minimizeButton:SetNormalTexture ([[Interface\BUTTONS\UI-Panel-HideButton-Up]])
|
||||
minimizeButton:SetPushedTexture ([[Interface\BUTTONS\UI-Panel-HideButton-Down]])
|
||||
minimizeButton:SetHighlightTexture ([[Interface\BUTTONS\UI-Panel-MinimizeButton-Highlight]])
|
||||
minimizeButton:SetNormalTexture([[Interface\BUTTONS\UI-Panel-HideButton-Up]])
|
||||
minimizeButton:SetPushedTexture([[Interface\BUTTONS\UI-Panel-HideButton-Down]])
|
||||
minimizeButton:SetHighlightTexture([[Interface\BUTTONS\UI-Panel-MinimizeButton-Highlight]])
|
||||
|
||||
local closeButtonWhenMinimized = CreateFrame ("button", "$parentCloseButton", fMinimized, "UIPanelCloseButton")
|
||||
local closeButtonWhenMinimized = CreateFrame("button", "$parentCloseButton", fMinimized, "UIPanelCloseButton")
|
||||
closeButtonWhenMinimized:GetNormalTexture():SetDesaturated (true)
|
||||
closeButtonWhenMinimized:SetWidth (24)
|
||||
closeButtonWhenMinimized:SetHeight (24)
|
||||
closeButtonWhenMinimized:SetPoint ("topright", fMinimized, "topright", 0, -1)
|
||||
closeButtonWhenMinimized:SetWidth(24)
|
||||
closeButtonWhenMinimized:SetHeight(24)
|
||||
closeButtonWhenMinimized:SetPoint("topright", fMinimized, "topright", 0, -1)
|
||||
closeButtonWhenMinimized:SetFrameLevel (fMinimized:GetFrameLevel()+16)
|
||||
|
||||
local minimizeButtonWhenMinimized = CreateFrame ("button", "$parentCloseButton", fMinimized, "UIPanelCloseButton")
|
||||
local minimizeButtonWhenMinimized = CreateFrame("button", "$parentCloseButton", fMinimized, "UIPanelCloseButton")
|
||||
minimizeButtonWhenMinimized:GetNormalTexture():SetDesaturated (true)
|
||||
minimizeButtonWhenMinimized:SetWidth (24)
|
||||
minimizeButtonWhenMinimized:SetHeight (24)
|
||||
minimizeButtonWhenMinimized:SetPoint ("right", closeButtonWhenMinimized, "left", 2, 0)
|
||||
minimizeButtonWhenMinimized:SetWidth(24)
|
||||
minimizeButtonWhenMinimized:SetHeight(24)
|
||||
minimizeButtonWhenMinimized:SetPoint("right", closeButtonWhenMinimized, "left", 2, 0)
|
||||
minimizeButtonWhenMinimized:SetFrameLevel (fMinimized:GetFrameLevel()+16)
|
||||
minimizeButtonWhenMinimized:SetNormalTexture ([[Interface\BUTTONS\UI-Panel-HideButton-Up]])
|
||||
minimizeButtonWhenMinimized:SetPushedTexture ([[Interface\BUTTONS\UI-Panel-HideButton-Down]])
|
||||
minimizeButtonWhenMinimized:SetHighlightTexture ([[Interface\BUTTONS\UI-Panel-MinimizeButton-Highlight]])
|
||||
minimizeButtonWhenMinimized:SetNormalTexture([[Interface\BUTTONS\UI-Panel-HideButton-Up]])
|
||||
minimizeButtonWhenMinimized:SetPushedTexture([[Interface\BUTTONS\UI-Panel-HideButton-Down]])
|
||||
minimizeButtonWhenMinimized:SetHighlightTexture([[Interface\BUTTONS\UI-Panel-MinimizeButton-Highlight]])
|
||||
|
||||
closeButtonWhenMinimized:SetScript ("OnClick", function()
|
||||
closeButtonWhenMinimized:SetScript("OnClick", function()
|
||||
f.IsMinimized = false
|
||||
fMinimized:Hide()
|
||||
minimizeButtonWhenMinimized:SetNormalTexture ([[Interface\BUTTONS\UI-Panel-HideButton-Up]])
|
||||
minimizeButtonWhenMinimized:SetPushedTexture ([[Interface\BUTTONS\UI-Panel-HideButton-Down]])
|
||||
minimizeButtonWhenMinimized:SetNormalTexture([[Interface\BUTTONS\UI-Panel-HideButton-Up]])
|
||||
minimizeButtonWhenMinimized:SetPushedTexture([[Interface\BUTTONS\UI-Panel-HideButton-Down]])
|
||||
end)
|
||||
|
||||
--> replace the default click function
|
||||
--replace the default click function
|
||||
local minimize_func = function(self)
|
||||
if (f.IsMinimized) then
|
||||
f.IsMinimized = false
|
||||
fMinimized:Hide()
|
||||
f:Show()
|
||||
minimizeButtonWhenMinimized:SetNormalTexture ([[Interface\BUTTONS\UI-Panel-HideButton-Up]])
|
||||
minimizeButtonWhenMinimized:SetPushedTexture ([[Interface\BUTTONS\UI-Panel-HideButton-Down]])
|
||||
minimizeButtonWhenMinimized:SetNormalTexture([[Interface\BUTTONS\UI-Panel-HideButton-Up]])
|
||||
minimizeButtonWhenMinimized:SetPushedTexture([[Interface\BUTTONS\UI-Panel-HideButton-Down]])
|
||||
else
|
||||
f.IsMinimized = true
|
||||
f:Hide()
|
||||
fMinimized:Show()
|
||||
minimizeButtonWhenMinimized:SetNormalTexture ([[Interface\BUTTONS\UI-Panel-CollapseButton-Up]])
|
||||
minimizeButtonWhenMinimized:SetPushedTexture ([[Interface\BUTTONS\UI-Panel-CollapseButton-Up]])
|
||||
minimizeButtonWhenMinimized:SetNormalTexture([[Interface\BUTTONS\UI-Panel-CollapseButton-Up]])
|
||||
minimizeButtonWhenMinimized:SetPushedTexture([[Interface\BUTTONS\UI-Panel-CollapseButton-Up]])
|
||||
end
|
||||
end
|
||||
|
||||
minimizeButton:SetScript ("OnClick", minimize_func)
|
||||
minimizeButtonWhenMinimized:SetScript ("OnClick", minimize_func)
|
||||
minimizeButton:SetScript("OnClick", minimize_func)
|
||||
minimizeButtonWhenMinimized:SetScript("OnClick", minimize_func)
|
||||
|
||||
--enabled box
|
||||
-- /run _G.DetailsMythicDungeonChartHandler.ShowChart(); DetailsMythicDungeonChartFrame.ShowChartFrame()
|
||||
@@ -529,53 +529,53 @@ function mythicDungeonCharts.ShowChart()
|
||||
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")
|
||||
enabledSwitch:SetAsCheckBox()
|
||||
enabledSwitch.tooltip = "Show this chart at the end of a mythic dungeon run.\n\nIf disabled, you can reactivate it again at the options panel > streamer settings."
|
||||
enabledLabel:SetPoint ("right", minimizeButton, "left", -22, 0)
|
||||
enabledSwitch:SetSize (16, 16)
|
||||
Details.gump:SetFontColor (enabledLabel, "gray")
|
||||
enabledLabel:SetPoint("right", minimizeButton, "left", -22, 0)
|
||||
enabledSwitch:SetSize(16, 16)
|
||||
Details.gump:SetFontColor(enabledLabel, "gray")
|
||||
enabledSwitch.checked_texture:SetVertexColor (.75, .75, .75)
|
||||
|
||||
local leftDivisorLine = f.BossWidgetsFrame:CreateTexture (nil, "overlay")
|
||||
leftDivisorLine:SetSize (2, f.ChartFrame.Graphic:GetHeight())
|
||||
local leftDivisorLine = f.BossWidgetsFrame:CreateTexture(nil, "overlay")
|
||||
leftDivisorLine:SetSize(2, f.ChartFrame.Graphic:GetHeight())
|
||||
leftDivisorLine:SetColorTexture (1, 1, 1, 1)
|
||||
leftDivisorLine:SetPoint ("bottomleft", f.ChartFrame.Graphic.TextFrame, "bottomleft", -2, 0)
|
||||
leftDivisorLine:SetPoint("bottomleft", f.ChartFrame.Graphic.TextFrame, "bottomleft", -2, 0)
|
||||
|
||||
local bottomDivisorLine = f.BossWidgetsFrame:CreateTexture (nil, "overlay")
|
||||
bottomDivisorLine:SetSize (f.ChartFrame.Graphic:GetWidth(), 2)
|
||||
local bottomDivisorLine = f.BossWidgetsFrame:CreateTexture(nil, "overlay")
|
||||
bottomDivisorLine:SetSize(f.ChartFrame.Graphic:GetWidth(), 2)
|
||||
bottomDivisorLine:SetColorTexture (1, 1, 1, 1)
|
||||
bottomDivisorLine:SetPoint ("bottomleft", f.ChartFrame.Graphic.TextFrame, "bottomleft", 0, 0)
|
||||
bottomDivisorLine:SetPoint("bottomleft", f.ChartFrame.Graphic.TextFrame, "bottomleft", 0, 0)
|
||||
|
||||
f.ChartFrame.Graphic:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f.ChartFrame.Graphic:SetBackdropColor (.5, .50, .50, 0.8)
|
||||
f.ChartFrame.Graphic:SetBackdropBorderColor (0, 0, 0, 0.5)
|
||||
f.ChartFrame.Graphic:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f.ChartFrame.Graphic:SetBackdropColor(.5, .50, .50, 0.8)
|
||||
f.ChartFrame.Graphic:SetBackdropBorderColor(0, 0, 0, 0.5)
|
||||
|
||||
function f.ChartFrame.RefreshBossTimeline (self, bossTable, elapsedTime)
|
||||
|
||||
for i, bossTable in ipairs (mythicDungeonCharts.ChartTable.BossDefeated) do
|
||||
for i, bossTable in ipairs(mythicDungeonCharts.ChartTable.BossDefeated) do
|
||||
|
||||
local bossWidget = f.BossWidgetsFrame.Widgets [i]
|
||||
if (not bossWidget) then
|
||||
local newBossWidget = CreateFrame ("frame", "$parentBossWidget" .. i, f.BossWidgetsFrame, "BackdropTemplate")
|
||||
newBossWidget:SetSize (64, 32)
|
||||
newBossWidget:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
newBossWidget:SetBackdropColor (0, 0, 0, 0.1)
|
||||
newBossWidget:SetBackdropBorderColor (0, 0, 0, 0)
|
||||
local newBossWidget = CreateFrame("frame", "$parentBossWidget" .. i, f.BossWidgetsFrame, "BackdropTemplate")
|
||||
newBossWidget:SetSize(64, 32)
|
||||
newBossWidget:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
newBossWidget:SetBackdropColor(0, 0, 0, 0.1)
|
||||
newBossWidget:SetBackdropBorderColor(0, 0, 0, 0)
|
||||
|
||||
local bossAvatar = Details:GetFramework():CreateImage (newBossWidget, "", 64, 32, "border")
|
||||
bossAvatar:SetPoint ("bottomleft", newBossWidget, "bottomleft", 0, 0)
|
||||
bossAvatar:SetPoint("bottomleft", newBossWidget, "bottomleft", 0, 0)
|
||||
newBossWidget.AvatarTexture = bossAvatar
|
||||
|
||||
local verticalLine = Details:GetFramework():CreateImage (newBossWidget, "", 1, f.ChartFrame.Graphic:GetHeight(), "overlay")
|
||||
verticalLine:SetColorTexture (1, 1, 1, 0.3)
|
||||
verticalLine:SetPoint ("bottomleft", newBossWidget, "bottomright", 0, 0)
|
||||
verticalLine:SetPoint("bottomleft", newBossWidget, "bottomright", 0, 0)
|
||||
|
||||
local timeText = Details:GetFramework():CreateLabel (newBossWidget)
|
||||
timeText:SetPoint ("bottomright", newBossWidget, "bottomright", 0, 0)
|
||||
local timeText = Details:GetFramework():CreateLabel(newBossWidget)
|
||||
timeText:SetPoint("bottomright", newBossWidget, "bottomright", 0, 0)
|
||||
newBossWidget.TimeText = timeText
|
||||
|
||||
local timeBackground = Details:GetFramework():CreateImage (newBossWidget, "", 30, 12, "artwork")
|
||||
timeBackground:SetColorTexture (0, 0, 0, 0.5)
|
||||
timeBackground:SetPoint ("topleft", timeText, "topleft", -2, 2)
|
||||
timeBackground:SetPoint ("bottomright", timeText, "bottomright", 2, 0)
|
||||
timeBackground:SetPoint("topleft", timeText, "topleft", -2, 2)
|
||||
timeBackground:SetPoint("bottomright", timeText, "bottomright", 2, 0)
|
||||
|
||||
f.BossWidgetsFrame.Widgets [i] = newBossWidget
|
||||
bossWidget = newBossWidget
|
||||
@@ -585,15 +585,15 @@ function mythicDungeonCharts.ShowChart()
|
||||
local secondsPerPixel = chartLength / elapsedTime
|
||||
local xPosition = bossTable[1] * secondsPerPixel
|
||||
|
||||
bossWidget:SetPoint ("bottomright", f.ChartFrame.Graphic, "bottomleft", xPosition, 0)
|
||||
bossWidget:SetPoint("bottomright", f.ChartFrame.Graphic, "bottomleft", xPosition, 0)
|
||||
|
||||
bossWidget.TimeText:SetText (Details:GetFramework():IntegerToTimer (bossTable[1]))
|
||||
bossWidget.TimeText:SetText(Details:GetFramework():IntegerToTimer (bossTable[1]))
|
||||
|
||||
if (bossTable[2].bossimage) then
|
||||
bossWidget.AvatarTexture:SetTexture (bossTable[2].bossimage)
|
||||
bossWidget.AvatarTexture:SetTexture(bossTable[2].bossimage)
|
||||
else
|
||||
local bossAvatar = Details:GetBossPortrait (nil, nil, bossTable[2].name, bossTable[2].ej_instance_id)
|
||||
bossWidget.AvatarTexture:SetTexture (bossAvatar)
|
||||
bossWidget.AvatarTexture:SetTexture(bossAvatar)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -673,7 +673,7 @@ function mythicDungeonCharts.ShowChart()
|
||||
|
||||
--generate boss time table
|
||||
local bossTimeTable = {}
|
||||
for i, bossTable in ipairs (mythicDungeonCharts.ChartTable.BossDefeated) do
|
||||
for i, bossTable in ipairs(mythicDungeonCharts.ChartTable.BossDefeated) do
|
||||
local combatTime = bossTable [3] or math.random (10, 30)
|
||||
|
||||
tinsert (bossTimeTable, bossTable[1])
|
||||
@@ -688,7 +688,7 @@ function mythicDungeonCharts.ShowChart()
|
||||
mythicDungeonCharts.Frame.ChartFrame:SetTitle ("")
|
||||
Details:GetFramework():SetFontSize (mythicDungeonCharts.Frame.ChartFrame.chart_title, 14)
|
||||
|
||||
mythicDungeonCharts.Frame.TitleText:SetText (mythicDungeonCharts.ChartTable.DungeonName and phrase .. mythicDungeonCharts.ChartTable.DungeonName or phrase)
|
||||
mythicDungeonCharts.Frame.TitleText:SetText(mythicDungeonCharts.ChartTable.DungeonName and phrase .. mythicDungeonCharts.ChartTable.DungeonName or phrase)
|
||||
|
||||
mythicDungeonCharts.Frame.ShowChartFrame()
|
||||
|
||||
@@ -712,13 +712,13 @@ local PixelFrameOnEnter = function(self)
|
||||
--multiply the max dps with the percent
|
||||
dps = mythicDungeonCharts.Frame.ChartFrame.Graphic.max_value * dps
|
||||
|
||||
mythicDungeonCharts.Frame.BossWidgetsFrame.GraphPin:SetPoint ("center", self, "center", 0, 0)
|
||||
mythicDungeonCharts.Frame.BossWidgetsFrame.GraphPin:SetPoint("center", self, "center", 0, 0)
|
||||
mythicDungeonCharts.Frame.BossWidgetsFrame.GraphPin:Show()
|
||||
mythicDungeonCharts.Frame.BossWidgetsFrame.GraphPinGlow:Show()
|
||||
|
||||
GameCooltip2:Preset (2)
|
||||
GameCooltip2:SetOption ("FixedWidth", 100)
|
||||
GameCooltip2:SetOption ("TextSize", 10)
|
||||
GameCooltip2:SetOption("FixedWidth", 100)
|
||||
GameCooltip2:SetOption("TextSize", 10)
|
||||
local onlyName = _detalhes:GetOnlyName (playerName)
|
||||
GameCooltip2:AddLine (onlyName)
|
||||
|
||||
@@ -758,11 +758,11 @@ function mythicDungeonCharts:CustomDrawLine (C, sx, sy, ex, ey, w, color, layer,
|
||||
|
||||
local T = tremove(C.GraphLib_Lines) or C:CreateTexture(nil, "ARTWORK")
|
||||
|
||||
if linetexture then --> this data series texture
|
||||
if linetexture then --this data series texture
|
||||
T:SetTexture(linetexture)
|
||||
elseif C.CustomLine then --> overall chart texture
|
||||
elseif C.CustomLine then --overall chart texture
|
||||
T:SetTexture(C.CustomLine)
|
||||
else --> no texture assigned, use default
|
||||
else --no texture assigned, use default
|
||||
T:SetTexture(TextureDirectory.."line")
|
||||
end
|
||||
|
||||
@@ -829,13 +829,13 @@ function mythicDungeonCharts:CustomDrawLine (C, sx, sy, ex, ey, w, color, layer,
|
||||
|
||||
local pixelFrame = tremove (mythicDungeonCharts.Frame.ChartFrame.FrameFree)
|
||||
if (not pixelFrame) then
|
||||
local newFrame = CreateFrame ("frame", nil, mythicDungeonCharts.Frame.ChartFrame, "BackdropTemplate")
|
||||
newFrame:SetSize (1, 1)
|
||||
local newFrame = CreateFrame("frame", nil, mythicDungeonCharts.Frame.ChartFrame, "BackdropTemplate")
|
||||
newFrame:SetSize(1, 1)
|
||||
|
||||
--newFrame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 2, tile = true})
|
||||
--newFrame:SetBackdropColor (0, 0, 0, 1)
|
||||
newFrame:SetScript ("OnEnter", PixelFrameOnEnter)
|
||||
newFrame:SetScript ("OnLeave", PixelFrameOnLeave)
|
||||
--newFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 2, tile = true})
|
||||
--newFrame:SetBackdropColor(0, 0, 0, 1)
|
||||
newFrame:SetScript("OnEnter", PixelFrameOnEnter)
|
||||
newFrame:SetScript("OnLeave", PixelFrameOnLeave)
|
||||
|
||||
pixelFrame = newFrame
|
||||
end
|
||||
|
||||
+43
-43
@@ -5,9 +5,9 @@
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
|
||||
--> Event types:
|
||||
--Event types:
|
||||
_detalhes.RegistredEvents = {
|
||||
--> instances
|
||||
--instances
|
||||
["DETAILS_INSTANCE_OPEN"] = {},
|
||||
["DETAILS_INSTANCE_CLOSE"] = {},
|
||||
["DETAILS_INSTANCE_SIZECHANGED"] = {},
|
||||
@@ -20,16 +20,16 @@
|
||||
["DETAILS_INSTANCE_CHANGEMODE"] = {},
|
||||
["DETAILS_INSTANCE_NEWROW"] = {},
|
||||
|
||||
--> misc
|
||||
--misc
|
||||
["DETAILS_OPTIONS_MODIFIED"] = {},
|
||||
["UNIT_SPEC"] = {},
|
||||
["UNIT_TALENTS"] = {},
|
||||
|
||||
--> data
|
||||
--data
|
||||
["DETAILS_DATA_RESET"] = {},
|
||||
["DETAILS_DATA_SEGMENTREMOVED"] = {},
|
||||
|
||||
--> combat
|
||||
--combat
|
||||
["COMBAT_ENCOUNTER_START"] = {},
|
||||
["COMBAT_ENCOUNTER_END"] = {},
|
||||
["COMBAT_PLAYER_ENTER"] = {},
|
||||
@@ -48,18 +48,18 @@
|
||||
["COMBAT_MYTHICDUNGEON_START"] = {},
|
||||
["COMBAT_MYTHICDUNGEON_END"] = {},
|
||||
|
||||
--> area
|
||||
--area
|
||||
["ZONE_TYPE_CHANGED"] = {},
|
||||
|
||||
--> roster
|
||||
--roster
|
||||
["GROUP_ONENTER"] = {},
|
||||
["GROUP_ONLEAVE"] = {},
|
||||
|
||||
--> buffs
|
||||
--buffs
|
||||
["BUFF_UPDATE"] = {},
|
||||
["BUFF_UPDATE_DEBUFFPOWER"] = {},
|
||||
|
||||
--> network
|
||||
--network
|
||||
["REALM_CHANNEL_ENTER"] = {}, --deprecated (realm channels are disabled)
|
||||
["REALM_CHANNEL_LEAVE"] = {}, --deprecated
|
||||
["COMM_EVENT_RECEIVED"] = {}, --added on core 129
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
|
||||
local function AlreadyRegistred (_tables, _object)
|
||||
for index, _this_object in ipairs (_tables) do
|
||||
for index, _this_object in ipairs(_tables) do
|
||||
if (_this_object.__eventtable) then
|
||||
if (_this_object [1] == _object) then
|
||||
return index
|
||||
@@ -124,7 +124,7 @@ local common_events = {
|
||||
}
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> register a event
|
||||
--register a event
|
||||
|
||||
function _detalhes:RegisterEvent (object, event, func)
|
||||
|
||||
@@ -183,7 +183,7 @@ local common_events = {
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> Unregister a Event
|
||||
--Unregister a Event
|
||||
|
||||
function _detalhes:UnregisterEvent (object, event)
|
||||
|
||||
@@ -236,24 +236,24 @@ local common_events = {
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internal functions
|
||||
--internal functions
|
||||
|
||||
local dispatch_error = function(name, errortext)
|
||||
_detalhes:Msg ((name or "<no context>"), " |cFFFF9900error|r: ", errortext)
|
||||
end
|
||||
|
||||
--> safe call an external func with payload and without telling who is calling
|
||||
--safe call an external func with payload and without telling who is calling
|
||||
function _detalhes:QuickDispatchEvent (func, event, ...)
|
||||
if (type (func) ~= "function") then
|
||||
if (type(func) ~= "function") then
|
||||
return
|
||||
elseif (type (event) ~= "string") then
|
||||
elseif (type(event) ~= "string") then
|
||||
return
|
||||
end
|
||||
|
||||
local okay, errortext = pcall (func, event, ...)
|
||||
|
||||
if (not okay) then
|
||||
--> trigger an error msg
|
||||
--trigger an error msg
|
||||
dispatch_error (_, errortext)
|
||||
|
||||
return
|
||||
@@ -262,22 +262,22 @@ local common_events = {
|
||||
return true
|
||||
end
|
||||
|
||||
--> quick dispatch with context, send the caller object within the payload
|
||||
--quick dispatch with context, send the caller object within the payload
|
||||
function _detalhes:QuickDispatchEventWithContext (context, func, event, ...)
|
||||
if (type (context) ~= "table") then
|
||||
if (type(context) ~= "table") then
|
||||
return
|
||||
elseif (type (func) ~= "function") then
|
||||
elseif (type(func) ~= "function") then
|
||||
return
|
||||
elseif (type (event) ~= "string") then
|
||||
elseif (type(event) ~= "string") then
|
||||
return
|
||||
end
|
||||
|
||||
local okay, errortext = pcall (func, context, event, ...)
|
||||
|
||||
if (not okay) then
|
||||
--> attempt to get the context name
|
||||
--attempt to get the context name
|
||||
local objectName = context.__name or context._name or context.name or context.Name
|
||||
--> trigger an error msg
|
||||
--trigger an error msg
|
||||
dispatch_error (objectName, errortext)
|
||||
|
||||
return
|
||||
@@ -286,34 +286,34 @@ local common_events = {
|
||||
return true
|
||||
end
|
||||
|
||||
--> Send Event
|
||||
function _detalhes:SendEvent (event, object, ...)
|
||||
--Send Event
|
||||
function _detalhes:SendEvent(event, object, ...)
|
||||
|
||||
--> send event to all registred plugins
|
||||
--send event to all registred plugins
|
||||
|
||||
if (event == "PLUGIN_DISABLED" or event == "PLUGIN_ENABLED") then
|
||||
return object:OnDetailsEvent (event, ...)
|
||||
|
||||
elseif (not object) then
|
||||
--> iterate among all plugins which registered a function for this event
|
||||
for _, PluginObject in ipairs (_detalhes.RegistredEvents[event]) do
|
||||
--iterate among all plugins which registered a function for this event
|
||||
for _, PluginObject in ipairs(_detalhes.RegistredEvents[event]) do
|
||||
|
||||
--> when __eventtable is true, the plugin registered a function or method name to callback
|
||||
--> if is false, we call OnDetailsEvent method on the plugin
|
||||
--when __eventtable is true, the plugin registered a function or method name to callback
|
||||
--if is false, we call OnDetailsEvent method on the plugin
|
||||
if (PluginObject.__eventtable) then
|
||||
|
||||
local pluginTable = PluginObject [1]
|
||||
|
||||
--> check if the plugin is enabled
|
||||
--check if the plugin is enabled
|
||||
if (pluginTable.Enabled and pluginTable.__enabled) then
|
||||
|
||||
--> check if fegistered a function
|
||||
if (type (PluginObject [2]) == "function") then
|
||||
--check if fegistered a function
|
||||
if (type(PluginObject [2]) == "function") then
|
||||
local func = PluginObject [2]
|
||||
_detalhes:QuickDispatchEvent (func, event, ...)
|
||||
--PluginObject [2] (event, ...)
|
||||
|
||||
--> if not it must be a method name
|
||||
--if not it must be a method name
|
||||
else
|
||||
local methodName = PluginObject [2]
|
||||
local func = pluginTable [methodName]
|
||||
@@ -332,31 +332,31 @@ local common_events = {
|
||||
end
|
||||
end
|
||||
|
||||
--> plugin notifications (does not send to listeners)
|
||||
elseif (type (object) == "string" and object == "SEND_TO_ALL") then
|
||||
--plugin notifications (does not send to listeners)
|
||||
elseif (type(object) == "string" and object == "SEND_TO_ALL") then
|
||||
|
||||
for _, PluginObject in ipairs (_detalhes.RaidTables.Plugins) do
|
||||
for _, PluginObject in ipairs(_detalhes.RaidTables.Plugins) do
|
||||
if (PluginObject.__enabled) then
|
||||
_detalhes:QuickDispatchEventWithContext (PluginObject, PluginObject.OnDetailsEvent, event)
|
||||
--PluginObject:OnDetailsEvent (event)
|
||||
end
|
||||
end
|
||||
|
||||
for _, PluginObject in ipairs (_detalhes.SoloTables.Plugins) do
|
||||
for _, PluginObject in ipairs(_detalhes.SoloTables.Plugins) do
|
||||
if (PluginObject.__enabled) then
|
||||
_detalhes:QuickDispatchEventWithContext (PluginObject, PluginObject.OnDetailsEvent, event)
|
||||
--PluginObject:OnDetailsEvent (event)
|
||||
end
|
||||
end
|
||||
|
||||
for _, PluginObject in ipairs (_detalhes.ToolBar.Plugins) do
|
||||
for _, PluginObject in ipairs(_detalhes.ToolBar.Plugins) do
|
||||
if (PluginObject.__enabled) then
|
||||
_detalhes:QuickDispatchEventWithContext (PluginObject, PluginObject.OnDetailsEvent, event)
|
||||
--PluginObject:OnDetailsEvent (event)
|
||||
end
|
||||
end
|
||||
else
|
||||
--> send the event only for requested plugin
|
||||
--send the event only for requested plugin
|
||||
if (object.Enabled and object.__enabled) then
|
||||
return _detalhes:QuickDispatchEventWithContext (object, object.OnDetailsEvent, event, ...)
|
||||
--return object:OnDetailsEvent (event, ...)
|
||||
@@ -365,13 +365,13 @@ local common_events = {
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> special cases
|
||||
--special cases
|
||||
function _detalhes:SendOptionsModifiedEvent (instance)
|
||||
|
||||
_detalhes.last_options_modified = _detalhes.last_options_modified or (GetTime() - 5)
|
||||
|
||||
if (_detalhes.last_options_modified + 0.3 < GetTime()) then
|
||||
_detalhes:SendEvent ("DETAILS_OPTIONS_MODIFIED", nil, instance)
|
||||
_detalhes:SendEvent("DETAILS_OPTIONS_MODIFIED", nil, instance)
|
||||
_detalhes.last_options_modified = GetTime()
|
||||
if (_detalhes.last_options_modified_schedule) then
|
||||
_detalhes:CancelTimer (_detalhes.last_options_modified_schedule)
|
||||
@@ -386,7 +386,7 @@ local common_events = {
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> listeners
|
||||
--listeners
|
||||
|
||||
local listener_meta = setmetatable ({}, _detalhes)
|
||||
listener_meta.__index = listener_meta
|
||||
|
||||
+3
-3
@@ -29,9 +29,9 @@
|
||||
return false, "Invalid hook type."
|
||||
end
|
||||
|
||||
for _, this_func in ipairs (_detalhes.hooks [hook_type]) do
|
||||
for _, this_func in ipairs(_detalhes.hooks [hook_type]) do
|
||||
if (this_func == func) then
|
||||
--> already installed
|
||||
--already installed
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -50,7 +50,7 @@
|
||||
return false, "Invalid hook type."
|
||||
end
|
||||
|
||||
for index, this_func in ipairs (_detalhes.hooks [hook_type]) do
|
||||
for index, this_func in ipairs(_detalhes.hooks [hook_type]) do
|
||||
|
||||
if (this_func == func) then
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user