- testing the mercurial repo packpager.
This commit is contained in:
+340
-86
@@ -683,7 +683,7 @@
|
||||
["custom"] = "aura_env.reimaningTime = 5",
|
||||
},
|
||||
},
|
||||
["cooldown"] = true,
|
||||
["cooldown"] = false,
|
||||
["stacksContainment"] = "OUTSIDE",
|
||||
["zoom"] = 0.3,
|
||||
["auto"] = true,
|
||||
@@ -1252,7 +1252,7 @@
|
||||
},
|
||||
}
|
||||
|
||||
function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, name, icon_texture, target, stacksize, sound, chat, icon_text, icon_glow, encounter_id, group, icon_size, other_values)
|
||||
function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, name, icon_texture, target, stacksize, sound, chat, icon_text, icon_glow, encounter_id, group, icon_size, other_values, in_combat, cooldown_animation)
|
||||
|
||||
--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)
|
||||
|
||||
@@ -1314,6 +1314,13 @@
|
||||
--> size
|
||||
new_aura.fontSize = min (icon_size, 24)
|
||||
|
||||
--> combat only
|
||||
if (in_combat) then
|
||||
new_aura.load.use_combat = true
|
||||
else
|
||||
new_aura.load.use_combat = nil
|
||||
end
|
||||
|
||||
elseif (target == 42) then -- dispell
|
||||
|
||||
chat = nil
|
||||
@@ -1353,7 +1360,14 @@
|
||||
--> size
|
||||
new_aura.fontSize = min (icon_size, 24)
|
||||
|
||||
elseif (other_values.dbm_timer_id or other_values.bw_timer_id) then
|
||||
--> combat only
|
||||
if (in_combat) then
|
||||
new_aura.load.use_combat = true
|
||||
else
|
||||
new_aura.load.use_combat = nil
|
||||
end
|
||||
|
||||
elseif (other_values.dbm_timer_id or other_values.bw_timer_id) then --boss mods
|
||||
|
||||
--> create the default aura table
|
||||
if (aura_type == "icon") then
|
||||
@@ -1529,6 +1543,13 @@
|
||||
end
|
||||
_detalhes.table.overwrite (new_aura, add)
|
||||
end
|
||||
|
||||
--> combat only
|
||||
if (in_combat) then
|
||||
new_aura.load.use_combat = true
|
||||
else
|
||||
new_aura.load.use_combat = nil
|
||||
end
|
||||
else
|
||||
new_aura.trigger.spellId = tostring (spellid)
|
||||
new_aura.trigger.name = spellname
|
||||
@@ -1620,9 +1641,37 @@
|
||||
_detalhes.table.overwrite (new_aura, add)
|
||||
end
|
||||
|
||||
if (cooldown_animation) then
|
||||
new_aura.cooldown = true
|
||||
new_aura.cooldownTextEnabled = true
|
||||
end
|
||||
|
||||
--> 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
|
||||
local normalWidth, normalHeight, amount = 0, 0, 0
|
||||
local allAurasInTheGroup = WeakAurasSaved.displays [group].controlledChildren
|
||||
|
||||
for index, auraname in ipairs (allAurasInTheGroup) do
|
||||
local auraObject = WeakAurasSaved.displays [auraname]
|
||||
if (auraObject and auraObject.regionType == "icon") then
|
||||
amount = amount + 1
|
||||
normalWidth = normalWidth + auraObject.width
|
||||
normalHeight = normalHeight + auraObject.height
|
||||
end
|
||||
end
|
||||
|
||||
if (normalWidth > 0) then
|
||||
normalWidth = normalWidth / amount
|
||||
normalHeight = normalHeight / amount
|
||||
new_aura.width = normalWidth
|
||||
new_aura.height = normalHeight
|
||||
end
|
||||
end
|
||||
|
||||
tinsert (WeakAurasSaved.displays [group].controlledChildren, new_aura.id)
|
||||
else
|
||||
new_aura.parent = nil
|
||||
@@ -1679,41 +1728,64 @@
|
||||
end
|
||||
end
|
||||
|
||||
local f = CreateFrame ("frame", "DetailsAuraPanel", UIParent, "ButtonFrameTemplate")
|
||||
f:SetSize (600, 488)
|
||||
local f = CreateFrame ("frame", "DetailsAuraPanel", UIParent)
|
||||
f:SetSize (800, 600)
|
||||
f:SetPoint ("center", UIParent, "center", 0, 150)
|
||||
f:SetFrameStrata ("HIGH")
|
||||
f:SetToplevel (true)
|
||||
f:EnableMouse (true)
|
||||
f:SetMovable (true)
|
||||
f:SetToplevel (true)
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (24/255, 24/255, 24/255, .8)
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
|
||||
tinsert (UISpecialFrames, "DetailsAuraPanel")
|
||||
--register to libwindow
|
||||
local LibWindow = LibStub ("LibWindow-1.1")
|
||||
LibWindow.RegisterConfig (f, _detalhes.createauraframe)
|
||||
LibWindow.RestorePosition (f)
|
||||
LibWindow.MakeDraggable (f)
|
||||
LibWindow.SavePosition (f)
|
||||
|
||||
f:SetScript ("OnMouseDown", function(self, button)
|
||||
if (self.isMoving) then
|
||||
return
|
||||
end
|
||||
if (button == "RightButton") then
|
||||
self:Hide()
|
||||
else
|
||||
self:StartMoving()
|
||||
self.isMoving = true
|
||||
end
|
||||
end)
|
||||
f:SetScript ("OnMouseUp", function(self, button)
|
||||
if (self.isMoving and button == "LeftButton") then
|
||||
self:StopMovingOrSizing()
|
||||
self.isMoving = nil
|
||||
end
|
||||
end)
|
||||
--titlebar
|
||||
f.TitleBar = CreateFrame ("frame", "$parentTitleBar", f)
|
||||
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.TitleText:SetText ("Create Aura")
|
||||
f.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]])
|
||||
--close button
|
||||
f.Close = CreateFrame ("button", "$parentCloseButton", f)
|
||||
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)
|
||||
|
||||
--title
|
||||
f.Title = f.TitleBar:CreateFontString ("$parentTitle", "overlay", "GameFontNormal")
|
||||
f.Title:SetPoint ("center", f.TitleBar, "center")
|
||||
f.Title:SetTextColor (.8, .8, .8, 1)
|
||||
f.Title:SetText ("Details! Create Aura")
|
||||
|
||||
local fw = _detalhes:GetFramework()
|
||||
|
||||
local text_template = fw:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
|
||||
local dropdown_template = fw:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
|
||||
local switch_template = fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
|
||||
local slider_template = fw:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
|
||||
local button_template = fw:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
|
||||
--aura name
|
||||
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)
|
||||
f.name = name_textentry
|
||||
|
||||
@@ -1734,40 +1806,86 @@
|
||||
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)
|
||||
aura_type:Hide()
|
||||
|
||||
--spellname
|
||||
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:SetPoint ("left", spellname_label, "right", 2, 0)
|
||||
f.spellname = spellname_textentry
|
||||
spellname_textentry.tooltip = "Spell/Debuff/Buff to be tracked."
|
||||
local Icon_IconAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 32, 32, "overlay", {119/512, 151/512, 176/512, 208/512}, nil, nil)
|
||||
Icon_IconAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 10, -16)
|
||||
|
||||
--spellid
|
||||
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:Disable()
|
||||
auraid_textentry:SetPoint ("left", auraid_label, "right", 2, 0)
|
||||
local Icon_StatusbarAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 92, 12, "overlay", {154/512, 246/512, 176/512, 188/512}, nil, nil)
|
||||
Icon_StatusbarAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 60, -26)
|
||||
|
||||
local Icon_TextOnlyAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 57, 8, "overlay", {169/512, 225/512, 200/512, 207/512}, nil, nil)
|
||||
Icon_TextOnlyAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 170, -28)
|
||||
|
||||
--use spellid
|
||||
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:SetPoint ("left", usespellid_label, "right", 2, 0)
|
||||
aura_use_spellid.tooltip = "Use the spell id instead of the spell name, for advanced users."
|
||||
local AuraTypeSelectedColor = {1, 1, 1, 0.3}
|
||||
local AuraTypeBorderColor = {.3, .3, .3, 0.5}
|
||||
local AuraTypeBorderSelectedColor = {1, 1, 1, 0.4}
|
||||
|
||||
--aura icon
|
||||
local icon_label = fw:CreateLabel (f, "Icon: ", nil, nil, "GameFontNormal")
|
||||
local icon_button_func = function (texture)
|
||||
f.IconButton.icon.texture = texture
|
||||
local OnSelectAuraType = function (self, fixedParam, auraType, noUpdate)
|
||||
|
||||
if (type (auraType) == "number") then
|
||||
if (auraType == 1) then
|
||||
auraType = "icon"
|
||||
elseif (auraType == 2) then
|
||||
auraType = "text"
|
||||
elseif (auraType == 3) then
|
||||
auraType = "aurabar"
|
||||
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: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))
|
||||
elseif (auraType == "aurabar") then
|
||||
f.StatusbarAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
|
||||
f.StatusbarAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderSelectedColor))
|
||||
elseif (auraType == "text") then
|
||||
f.TextOnlyAuraTypeButton:SetBackdropColor (unpack (AuraTypeSelectedColor))
|
||||
f.TextOnlyAuraTypeButton:SetBackdropBorderColor (unpack (AuraTypeBorderSelectedColor))
|
||||
end
|
||||
|
||||
aura_type:SetValue (auraType)
|
||||
if (f.UpdateLabels and not noUpdate) then
|
||||
f:UpdateLabels()
|
||||
end
|
||||
end
|
||||
local icon_pick_button = fw:NewButton (f, nil, "$parentIconButton", "IconButton", 20, 20, function() fw:IconPick (icon_button_func, true) end)
|
||||
local icon_button_icon = fw:NewImage (icon_pick_button, [[Interface\ICONS\TEMP]], 19, 19, "background", nil, "icon", "$parentIcon")
|
||||
icon_pick_button:InstallCustomTexture()
|
||||
f.OnSelectAuraType = OnSelectAuraType
|
||||
|
||||
icon_pick_button:SetPoint ("left", icon_label, "right", 2, 0)
|
||||
icon_button_icon:SetPoint ("left", icon_label, "right", 2, 0)
|
||||
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)
|
||||
|
||||
f.icon = icon_button_icon
|
||||
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: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_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
|
||||
local on_select_aura_trigger = function (_, _, aura_trigger)
|
||||
if (f.UpdateLabels) then
|
||||
@@ -1798,13 +1916,122 @@
|
||||
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: ", nil, nil, "GameFontNormal")
|
||||
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 = {
|
||||
{name = "Debuff on You", value = 1},
|
||||
{name = "Debuff on Target", value = 2}, --2
|
||||
{name = "Debuff on Focus", value = 3},
|
||||
{name = "Buff on You", value = 11}, --4
|
||||
{name = "Buff on Target", value = 12},
|
||||
{name = "Buff on Focus", value = 13},
|
||||
{name = "Spell Cast Started", value = 21},
|
||||
{name = "Spell Cast Successful", value = 22},
|
||||
{name = "DBM Time Bar", value = 31},
|
||||
{name = "BigWigs Time Bar", value = 32},
|
||||
{name = "Spell Interrupt", value = 41},
|
||||
{name = "Spell Dispell", value = 42},
|
||||
}
|
||||
|
||||
local SetTriggerState = function (triggerID)
|
||||
for i = 1, #triggerList do
|
||||
triggerList[i].checkBox:SetValue (false)
|
||||
if (triggerList[i].value == triggerID) then
|
||||
triggerList[i].checkBox:SetValue (true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
f.SetTriggerState = SetTriggerState
|
||||
f.TriggerList = triggerList
|
||||
|
||||
local OnChangeTriggerState = function (self, triggerID, state)
|
||||
SetTriggerState (triggerID)
|
||||
aura_on:SetValue (triggerID)
|
||||
|
||||
if (f.UpdateLabels) then
|
||||
f:UpdateLabels()
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, #triggerList do
|
||||
local checkBox = fw:CreateSwitch (f, OnChangeTriggerState, i == 1)
|
||||
checkBox:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
|
||||
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)
|
||||
|
||||
triggerList [i].checkBox = checkBox
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--spellname
|
||||
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)
|
||||
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_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)
|
||||
|
||||
--use spellid
|
||||
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.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 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.tooltip = "Only active when in combat."
|
||||
|
||||
--aura icon
|
||||
local icon_label = fw:CreateLabel (f, "Icon: ", nil, nil, "GameFontNormal")
|
||||
local icon_button_func = function (texture)
|
||||
f.IconButton.icon.texture = texture
|
||||
end
|
||||
local icon_pick_button = fw:NewButton (f, nil, "$parentIconButton", "IconButton", 20, 20, function() fw:IconPick (icon_button_func, true) end)
|
||||
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)
|
||||
|
||||
f.icon = icon_button_icon
|
||||
|
||||
--is cooldown
|
||||
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.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
|
||||
local stack_label = fw:CreateLabel (f, "Stack Size: ", nil, nil, "GameFontNormal")
|
||||
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)
|
||||
stack_slider.tooltip = "Minimum amount of stacks to trigger the aura."
|
||||
|
||||
@@ -1898,19 +2125,22 @@
|
||||
return t
|
||||
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)
|
||||
sound_effect.tooltip = "Sound played when the aura triggers."
|
||||
|
||||
--say something
|
||||
local say_something_label = fw:CreateLabel (f, "/Say: ", 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.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 = 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.tooltip = "Text shown at aura's icon right side."
|
||||
|
||||
@@ -1926,6 +2156,10 @@
|
||||
self.glow_test.animOut:Play()
|
||||
end
|
||||
end, false, nil, nil, nil, nil, "UseGlow")
|
||||
|
||||
useglow:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
|
||||
useglow:SetAsCheckBox()
|
||||
|
||||
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."
|
||||
|
||||
@@ -1937,12 +2171,14 @@
|
||||
--encounter id
|
||||
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.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")
|
||||
icon_size_slider:SetTemplate (slider_template)
|
||||
icon_size_slider:SetPoint ("left", icon_size_label, "right", 2, 0)
|
||||
icon_size_slider.tooltip = "Icon size, width and height."
|
||||
|
||||
@@ -1955,6 +2191,7 @@
|
||||
return t
|
||||
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)
|
||||
|
||||
@@ -1982,6 +2219,7 @@
|
||||
|
||||
local weakauras_folder_label = fw:CreateLabel (f, "Weak Auras 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)
|
||||
|
||||
--create
|
||||
@@ -2000,6 +2238,8 @@
|
||||
local addon = f.AuraAddonDropdown.value
|
||||
local folder = f.WeakaurasFolderDropdown.value
|
||||
local iconsize = f.IconSizeSlider.value
|
||||
local incombat = f.UseInCombat.value
|
||||
local iscooldown = f.IsCooldown.value
|
||||
|
||||
local icon_text = f.AuraText.text
|
||||
local icon_glow = f.UseGlow.value
|
||||
@@ -2010,7 +2250,7 @@
|
||||
end
|
||||
|
||||
if (addon == "WA") then
|
||||
_detalhes:CreateWeakAura (aura_type_value, spellid, use_spellId, spellname, name, icon, target, stacksize, sound, chat, icon_text, icon_glow, eid, folder, iconsize, f.other_values)
|
||||
_detalhes:CreateWeakAura (aura_type_value, spellid, use_spellId, spellname, name, icon, target, stacksize, sound, chat, icon_text, icon_glow, eid, folder, iconsize, f.other_values, incombat, iscooldown)
|
||||
else
|
||||
_detalhes:Msg ("No Aura Addon selected. Addons currently supported: WeakAuras 2.")
|
||||
end
|
||||
@@ -2018,46 +2258,48 @@
|
||||
f:Hide()
|
||||
end
|
||||
|
||||
local create_button = fw:CreateButton (f, create_func, 106, 16, "Create Aura")
|
||||
create_button:InstallCustomTexture()
|
||||
local create_button = fw:CreateButton (f, create_func, 106, 20, "Create Aura")
|
||||
create_button:SetTemplate (slider_template)
|
||||
|
||||
local cancel_button = fw:CreateButton (f, function() name_textentry:ClearFocus(); f:Hide() end, 106, 16, "Cancel")
|
||||
cancel_button:InstallCustomTexture()
|
||||
local cancel_button = fw:CreateButton (f, function() name_textentry:ClearFocus(); f:Hide() end, 106, 20, "Cancel")
|
||||
cancel_button:SetTemplate (slider_template)
|
||||
|
||||
create_button:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]], nil, nil, nil, {0.125, 0.875, 0.125, 0.875}, nil, 4, 2)
|
||||
cancel_button:SetIcon ([[Interface\Buttons\UI-GroupLoot-Pass-Down]], nil, nil, nil, {0.125, 0.875, 0.125, 0.875}, nil, 4, 2)
|
||||
|
||||
local x_start = 20
|
||||
local x2_start = 320
|
||||
local x2_start = 420
|
||||
local y_start = 21
|
||||
|
||||
|
||||
--aura name and the type
|
||||
name_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*1) + (50)) * -1)
|
||||
aura_type_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*2) + (50)) * -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) + (45)) * -1)
|
||||
stack_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*5) + (45)) * -1)
|
||||
encounterid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*6) + (45)) * -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*8) + (45)) * -1)
|
||||
auraid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*9) + (45)) * -1)
|
||||
usespellid_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*10) + (45)) * -1)
|
||||
|
||||
--configuration
|
||||
icon_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*1) + (50)) * -1)
|
||||
sound_effect_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*2) + (50)) * -1)
|
||||
say_something_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*3) + (50)) * -1)
|
||||
aura_text_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*4) + (50)) * -1)
|
||||
useglow_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*5) + (50)) * -1)
|
||||
icon_size_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*6) + (50)) * -1)
|
||||
|
||||
aura_addon_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*15) + (60)) * -1)
|
||||
weakauras_folder_label:SetPoint ("topleft", f, "topleft", x_start, ((y_start*16) + (60)) * -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)
|
||||
|
||||
create_button:SetPoint ("topleft", f, "topleft", x_start, ((y_start*18) + (60)) * -1)
|
||||
cancel_button:SetPoint ("topright", f, "topright", x_start*-1, ((y_start*18) + (60)) * -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)
|
||||
|
||||
aura_addon_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*20) + (60)) * -1)
|
||||
weakauras_folder_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*21) + (60)) * -1)
|
||||
|
||||
create_button:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*23) + (60)) * -1)
|
||||
cancel_button:SetPoint ("left", create_button, "right", 20, 0)
|
||||
|
||||
function f:UpdateLabels()
|
||||
|
||||
@@ -2081,6 +2323,7 @@
|
||||
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: ")
|
||||
@@ -2091,22 +2334,24 @@
|
||||
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)
|
||||
f.IsCooldown:Disable()
|
||||
end
|
||||
|
||||
if (trigger >= 1 and trigger <= 19) then --buff and debuff
|
||||
stack_label:SetText ("Stack Size: ")
|
||||
stack_label:SetText ("Trigger Stack Size: ")
|
||||
|
||||
elseif (trigger >= 20 and trigger <= 29) then --cast end cast start
|
||||
stack_label:SetText ("Duration: ")
|
||||
stack_label:SetText ("Cast Duration: ")
|
||||
f.StackSlider:SetValue (2)
|
||||
|
||||
elseif (trigger >= 30 and trigger <= 39) then --boss mods
|
||||
stack_label:SetText ("Remaining Time:")
|
||||
stack_label:SetText ("Trigger Remaining Time:")
|
||||
f.StackSlider:SetValue (4)
|
||||
f.StackSlider.tooltip = "Will trigger when the bar remaining time reach this value."
|
||||
f.SpellName:Disable()
|
||||
@@ -2117,6 +2362,9 @@
|
||||
f.SpellName:Disable()
|
||||
f.UseSpellId:Disable()
|
||||
DetailsAuraPanel.AuraTypeDropdown:Select (2, true)
|
||||
DetailsAuraPanel.OnSelectAuraType (nil, nil, 2, true)
|
||||
f.IsCooldown:Disable()
|
||||
|
||||
f.SoundEffectDropdown:Disable()
|
||||
f.SaySomething:Disable()
|
||||
f.IconButton:Disable()
|
||||
@@ -2179,14 +2427,18 @@
|
||||
|
||||
if (triggertype and type (triggertype) == "number") then
|
||||
DetailsAuraPanel.AuraOnDropdown:Select (triggertype, true)
|
||||
DetailsAuraPanel.SetTriggerState (DetailsAuraPanel.TriggerList [triggertype].value) --passed by index not by the trigger ID
|
||||
else
|
||||
DetailsAuraPanel.AuraOnDropdown:Select (1, true)
|
||||
DetailsAuraPanel.SetTriggerState (1)
|
||||
end
|
||||
|
||||
if (auratype and type (auratype) == "number") then
|
||||
DetailsAuraPanel.AuraTypeDropdown:Select (auratype, true)
|
||||
DetailsAuraPanel.OnSelectAuraType (nil, nil, auratype)
|
||||
else
|
||||
DetailsAuraPanel.AuraTypeDropdown:Select (1, true)
|
||||
DetailsAuraPanel.OnSelectAuraType (nil, nil, "icon")
|
||||
end
|
||||
|
||||
DetailsAuraPanel:UpdateLabels()
|
||||
@@ -2591,6 +2843,8 @@
|
||||
f:SetToplevel (true)
|
||||
f:SetMovable (true)
|
||||
f.Title:SetTextColor (1, .8, .2)
|
||||
|
||||
f:SetBackdropColor (unpack (_detalhes.default_backdropcolor))
|
||||
|
||||
local have_plugins_enabled
|
||||
|
||||
|
||||
Reference in New Issue
Block a user