Small bug fixes and improvements
This commit is contained in:
+66
-66
@@ -54,12 +54,12 @@ function DF:LoadAllSpells (hashMap, indexTable, allSpellsSameName)
|
||||
DF.LoadingAuraAlertFrame:SetSize(340, 75)
|
||||
DF.LoadingAuraAlertFrame:SetPoint("center")
|
||||
DF.LoadingAuraAlertFrame:SetFrameStrata("TOOLTIP")
|
||||
DF:ApplyStandardBackdrop (DF.LoadingAuraAlertFrame)
|
||||
DF:ApplyStandardBackdrop(DF.LoadingAuraAlertFrame)
|
||||
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.IsLoadingImage1 = DF:CreateImage (DF.LoadingAuraAlertFrame, [[Interface\DialogFrame\UI-Dialog-Icon-AlertOther]], 32, 32)
|
||||
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"
|
||||
|
||||
@@ -70,7 +70,7 @@ function DF:LoadAllSpells (hashMap, indexTable, allSpellsSameName)
|
||||
|
||||
DF.LoadingAuraAlertFrame:Show()
|
||||
|
||||
C_Timer.After (0, function()
|
||||
C_Timer.After(0, function()
|
||||
if (hashMap and not indexTable) then
|
||||
for i = 1, CONST_MAX_SPELLS do
|
||||
local spellName = GetSpellInfo(i)
|
||||
@@ -204,11 +204,11 @@ local aura_panel_defaultoptions = {
|
||||
|
||||
function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, texts)
|
||||
|
||||
local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
|
||||
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
|
||||
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
|
||||
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
|
||||
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
local options_text_template = DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
|
||||
local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
|
||||
local options_switch_template = DF:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
|
||||
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")
|
||||
f.db = db
|
||||
@@ -260,7 +260,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
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)
|
||||
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)
|
||||
@@ -269,7 +269,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
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"))
|
||||
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)
|
||||
@@ -278,7 +278,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
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"))
|
||||
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)
|
||||
@@ -344,18 +344,18 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
--create the background
|
||||
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)
|
||||
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)
|
||||
DF:ApplyStandardBackdrop (background_add_tracklist)
|
||||
background_add_tracklist.__background:SetVertexColor (0.27, 0.27, 0.47)
|
||||
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)
|
||||
@@ -411,7 +411,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
return spellID
|
||||
end
|
||||
|
||||
local add_blacklist_buff_button = self:CreateButton (background_add_blacklist, function()
|
||||
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:ClearFocus()
|
||||
@@ -436,9 +436,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
same_name_spells_add (spellId)
|
||||
end
|
||||
|
||||
end, textEntryWidth/2 -3, 20, "By Name", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
|
||||
end, textEntryWidth/2 -3, 20, "By Name", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", options.button_text_template))
|
||||
|
||||
local add_blacklist_buff_button_id = self:CreateButton (background_add_blacklist, function()
|
||||
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:ClearFocus()
|
||||
@@ -467,9 +467,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
same_name_spells_add (spellId)
|
||||
end
|
||||
|
||||
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))
|
||||
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))
|
||||
|
||||
local add_blacklist_debuff_button = self:CreateButton (background_add_blacklist, function()
|
||||
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:ClearFocus()
|
||||
@@ -493,9 +493,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
--add to spells with the same name cache
|
||||
same_name_spells_add (spellId)
|
||||
end
|
||||
end, textEntryWidth/2 -3, 20, "By Name", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
|
||||
end, textEntryWidth/2 -3, 20, "By Name", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", options.button_text_template))
|
||||
|
||||
local add_blacklist_debuff_button_id = self:CreateButton (background_add_blacklist, function()
|
||||
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:ClearFocus()
|
||||
@@ -523,12 +523,12 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
--add to spells with the same name cache
|
||||
same_name_spells_add (spellId)
|
||||
end
|
||||
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))
|
||||
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))
|
||||
|
||||
|
||||
--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)
|
||||
@@ -542,7 +542,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
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 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:ClearFocus()
|
||||
@@ -566,9 +566,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
--add to spells with the same name cache
|
||||
same_name_spells_add (spellId)
|
||||
end
|
||||
end, textEntryWidth/2 -3, 20, "By Name", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
|
||||
end, textEntryWidth/2 -3, 20, "By Name", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", options.button_text_template))
|
||||
|
||||
local add_tracklist_debuff_button_id = self:CreateButton (background_add_tracklist, function()
|
||||
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:ClearFocus()
|
||||
@@ -595,9 +595,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
--add to spells with the same name cache
|
||||
same_name_spells_add (spellId)
|
||||
end
|
||||
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))
|
||||
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))
|
||||
|
||||
local add_tracklist_buff_button = self:CreateButton (background_add_tracklist, function()
|
||||
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:ClearFocus()
|
||||
@@ -623,9 +623,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
same_name_spells_add (spellId)
|
||||
end
|
||||
|
||||
end, textEntryWidth/2 -3, 20, "By Name", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
|
||||
end, textEntryWidth/2 -3, 20, "By Name", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", options.button_text_template))
|
||||
|
||||
local add_tracklist_buff_button_id = self:CreateButton (background_add_tracklist, function()
|
||||
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:ClearFocus()
|
||||
@@ -654,7 +654,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
--add to spells with the same name cache
|
||||
same_name_spells_add (spellId)
|
||||
end
|
||||
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))
|
||||
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)
|
||||
@@ -697,13 +697,13 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
value = value or self.SpellID
|
||||
|
||||
if not flag then
|
||||
GameCooltip2:Preset (2)
|
||||
GameCooltip2:Preset(2)
|
||||
GameCooltip2:SetOwner(self, "left", "right", 2, 0)
|
||||
GameCooltip2:SetOption("TextSize", 10)
|
||||
|
||||
local spellName, _, spellIcon = GetSpellInfo(value)
|
||||
if (spellName) then
|
||||
GameCooltip2:AddLine (spellName .. " (" .. value .. ")")
|
||||
GameCooltip2:AddLine(spellName .. " (" .. value .. ")")
|
||||
GameCooltip2:AddIcon (spellIcon, 1, 1, 14, 14, .1, .9, .1, .9)
|
||||
end
|
||||
GameCooltip2:Show()
|
||||
@@ -719,14 +719,14 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
end
|
||||
|
||||
if (spellsWithSameName) then
|
||||
GameCooltip2:Preset (2)
|
||||
GameCooltip2:Preset(2)
|
||||
GameCooltip2:SetOwner(self, "left", "right", 2, 0)
|
||||
GameCooltip2:SetOption("TextSize", 10)
|
||||
|
||||
for i, spellID in ipairs(spellsWithSameName) do
|
||||
local spellName, _, spellIcon = GetSpellInfo(spellID)
|
||||
if (spellName) then
|
||||
GameCooltip2:AddLine (spellName .. " (" .. spellID .. ")")
|
||||
GameCooltip2:AddLine(spellName .. " (" .. spellID .. ")")
|
||||
GameCooltip2:AddIcon (spellIcon, 1, 1, 14, 14, .1, .9, .1, .9)
|
||||
end
|
||||
end
|
||||
@@ -757,7 +757,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
local auraTable = data [index]
|
||||
if (auraTable) then
|
||||
local line = self:GetLine (i)
|
||||
local spellID, spellName, spellIcon, lowerSpellName, flag = unpack (auraTable)
|
||||
local spellID, spellName, spellIcon, lowerSpellName, flag = unpack(auraTable)
|
||||
|
||||
line.SpellID = spellID
|
||||
line.SpellName = spellName
|
||||
@@ -777,16 +777,16 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
end
|
||||
|
||||
local lineOnEnter = function(self)
|
||||
self:SetBackdropColor(unpack (backdropColor_OnEnter))
|
||||
self:SetBackdropColor(unpack(backdropColor_OnEnter))
|
||||
|
||||
--GameTooltip:SetOwner(self, "ANCHOR_CURSOR")
|
||||
--GameTooltip:SetSpellByID(self.SpellID)
|
||||
--GameTooltip:AddLine (" ")
|
||||
--GameTooltip:AddLine(" ")
|
||||
--GameTooltip:Show()
|
||||
end
|
||||
|
||||
local lineOnLeave = function(self)
|
||||
self:SetBackdropColor(unpack (backdropColor))
|
||||
self:SetBackdropColor(unpack(backdropColor))
|
||||
--GameTooltip:Hide()
|
||||
end
|
||||
|
||||
@@ -810,7 +810,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
line:HookScript ("OnLeave", lineOnLeave)
|
||||
|
||||
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
line:SetBackdropColor(unpack (backdropColor))
|
||||
line:SetBackdropColor(unpack(backdropColor))
|
||||
|
||||
local icon = line:CreateTexture("$parentIcon", "overlay")
|
||||
icon:SetSize(lineHeight - 2, lineHeight - 2)
|
||||
@@ -822,7 +822,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
remove_button:SetSize(16, 16)
|
||||
remove_button:SetScript("OnClick", onRemoveClick)
|
||||
remove_button:SetPoint("topright", line, "topright")
|
||||
remove_button:GetNormalTexture():SetDesaturated (true)
|
||||
remove_button:GetNormalTexture():SetDesaturated(true)
|
||||
|
||||
icon:SetPoint("left", line, "left", 2, 0)
|
||||
name:SetPoint("left", icon, "right", 3, 0)
|
||||
@@ -953,18 +953,18 @@ 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))
|
||||
local spellid = select (7, GetSpellInfo(self.value))
|
||||
self:SetBackdropColor(unpack(backdrop_color_on_enter))
|
||||
local spellid = select(7, GetSpellInfo(self.value))
|
||||
if (spellid) then
|
||||
GameTooltip:SetOwner(self, "ANCHOR_CURSOR")
|
||||
GameTooltip:SetSpellByID(spellid)
|
||||
GameTooltip:AddLine (" ")
|
||||
GameTooltip:AddLine(" ")
|
||||
GameTooltip:Show()
|
||||
end
|
||||
end
|
||||
|
||||
local line_onleave = function(self)
|
||||
self:SetBackdropColor(unpack (backdrop_color))
|
||||
self:SetBackdropColor(unpack(backdrop_color))
|
||||
GameTooltip:Hide()
|
||||
end
|
||||
|
||||
@@ -974,7 +974,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
for i = 1, #data do
|
||||
if (data[i] == spell) then
|
||||
tremove (data, i)
|
||||
tremove(data, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -990,7 +990,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
line:SetScript("OnLeave", line_onleave)
|
||||
|
||||
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
line:SetBackdropColor(unpack (backdrop_color))
|
||||
line:SetBackdropColor(unpack(backdrop_color))
|
||||
|
||||
local icon = line:CreateTexture("$parentIcon", "overlay")
|
||||
icon:SetSize(scroll_line_height - 2, scroll_line_height - 2)
|
||||
@@ -1001,7 +1001,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
remove_button:SetSize(16, 16)
|
||||
remove_button:SetScript("OnClick", onclick_remove_button)
|
||||
remove_button:SetPoint("topright", line, "topright")
|
||||
remove_button:GetNormalTexture():SetDesaturated (true)
|
||||
remove_button:GetNormalTexture():SetDesaturated(true)
|
||||
|
||||
icon:SetPoint("left", line, "left", 2, 0)
|
||||
name:SetPoint("left", icon, "right", 2, 0)
|
||||
@@ -1053,12 +1053,12 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
f.debuffs_added = debuffs_added
|
||||
|
||||
local buffs_added_name = DF:CreateLabel(buffs_added, "Buffs", 12, "silver")
|
||||
buffs_added_name:SetTemplate (DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
buffs_added_name:SetTemplate(DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
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")
|
||||
debuffs_added_name:SetTemplate (DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
debuffs_added_name:SetTemplate(DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
|
||||
debuffs_added_name:SetPoint("bottomleft", debuffs_added, "topleft", 0, 2)
|
||||
debuffs_added.Title = debuffs_added_name
|
||||
|
||||
@@ -1076,7 +1076,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
new_buff_entry:SetJustifyH("left")
|
||||
new_debuff_entry:SetJustifyH("left")
|
||||
|
||||
local add_buff_button = self:CreateButton (f_manual, function()
|
||||
local add_buff_button = self:CreateButton(f_manual, function()
|
||||
|
||||
local text = new_buff_entry.text
|
||||
new_buff_entry:SetText("")
|
||||
@@ -1099,14 +1099,14 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
end
|
||||
]]--
|
||||
else
|
||||
print ("spellId not found for spell:", spellName)
|
||||
print("spellId not found for spell:", spellName)
|
||||
end
|
||||
end
|
||||
else
|
||||
--get the spellId
|
||||
local spellID = get_spellID_from_string (text)
|
||||
if (not spellID) then
|
||||
print ("spellIs for spell ", text, "not found")
|
||||
print("spellIs for spell ", text, "not found")
|
||||
return
|
||||
end
|
||||
|
||||
@@ -1123,9 +1123,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
buffs_added:Refresh()
|
||||
end
|
||||
|
||||
end, 100, 20, "Add Buff", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
end, 100, 20, "Add Buff", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
|
||||
local add_debuff_button = self:CreateButton (f_manual, function()
|
||||
local add_debuff_button = self:CreateButton(f_manual, function()
|
||||
local text = new_debuff_entry.text
|
||||
new_debuff_entry:SetText("")
|
||||
new_debuff_entry:ClearFocus()
|
||||
@@ -1146,14 +1146,14 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
end
|
||||
]]--
|
||||
else
|
||||
print ("spellId not found for spell:", spellName)
|
||||
print("spellId not found for spell:", spellName)
|
||||
end
|
||||
end
|
||||
else
|
||||
--get the spellId
|
||||
local spellID = get_spellID_from_string (text)
|
||||
if (not spellID) then
|
||||
print ("spellIs for spell ", text, "not found")
|
||||
print("spellIs for spell ", text, "not found")
|
||||
return
|
||||
end
|
||||
|
||||
@@ -1171,7 +1171,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
debuffs_added:Refresh()
|
||||
end
|
||||
end, 100, 20, "Add Debuff", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
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)
|
||||
@@ -1179,7 +1179,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
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 export_buff_button = self:CreateButton(f_manual, function()
|
||||
local str = ""
|
||||
for _, spellId in ipairs(f.db.aura_tracker.buff) do
|
||||
local spellName = GetSpellInfo(spellId)
|
||||
@@ -1191,9 +1191,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
export_box:SetFocus (true)
|
||||
export_box:HighlightText()
|
||||
|
||||
end, 120, 20, "Export Buffs", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
end, 120, 20, "Export Buffs", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
|
||||
local export_debuff_button = self:CreateButton (f_manual, function()
|
||||
local export_debuff_button = self:CreateButton(f_manual, function()
|
||||
local str = ""
|
||||
for _, spellId in ipairs(f.db.aura_tracker.debuff) do
|
||||
local spellName = GetSpellInfo(spellId)
|
||||
@@ -1206,7 +1206,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
export_box:SetFocus (true)
|
||||
export_box:HighlightText()
|
||||
|
||||
end, 120, 20, "Export Debuffs", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user