@@ -683,7 +683,7 @@ local function GetBuffTriggerOptions(data, triggernum)
|
||||
|
||||
useUnitName = {
|
||||
type = "toggle",
|
||||
width = "WeakAuras.normalWidth",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["UnitName Filter"],
|
||||
order = 69.1,
|
||||
hidden = function() return
|
||||
|
||||
@@ -1322,7 +1322,7 @@ local function AddCodeOption(args, data, name, prefix, url, order, hiddenFunc, p
|
||||
end
|
||||
|
||||
local function AddCommonTriggerOptions(options, data, triggernum)
|
||||
local trigger= data.triggers[triggernum].trigger
|
||||
local trigger = data.triggers[triggernum].trigger
|
||||
|
||||
local trigger_types = {};
|
||||
for type, triggerSystem in pairs(WeakAuras.triggerTypes) do
|
||||
@@ -1349,15 +1349,11 @@ local function AddCommonTriggerOptions(options, data, triggernum)
|
||||
end,
|
||||
set = function(info, v)
|
||||
trigger.type = v;
|
||||
if(trigger.event) then
|
||||
local prototype = WeakAuras.event_prototypes[trigger.event];
|
||||
if(prototype) then
|
||||
if(v == "status" and prototype.type == "event") then
|
||||
trigger.event = "Cooldown Progress (Spell)"
|
||||
elseif(v == "event" and prototype.type == "status") then
|
||||
trigger.event = "Combat Log"
|
||||
end
|
||||
end
|
||||
local prototype = trigger.event and WeakAuras.event_prototypes[trigger.event];
|
||||
if v == "status" and (not prototype or prototype.type == "event") then
|
||||
trigger.event = "Cooldown Progress (Spell)"
|
||||
elseif v == "event" and (not prototype or prototype.type == "status") then
|
||||
trigger.event = "Combat Log"
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
|
||||
@@ -408,7 +408,11 @@ local function GetGenericTriggerOptions(data, triggernum)
|
||||
control = "WeakAurasSortedDropdown",
|
||||
hidden = function() return not (trigger.type == "event" and trigger.event == "Combat Log" and subevent_actual_prefix_types[trigger.subeventPrefix]); end,
|
||||
get = function(info)
|
||||
return trigger.subevent
|
||||
return trigger.subeventSuffix
|
||||
end,
|
||||
set = function(info, v)
|
||||
trigger.subeventSuffix = v
|
||||
WeakAuras.Add(data)
|
||||
end
|
||||
},
|
||||
spacer_suffix = {
|
||||
|
||||
@@ -767,6 +767,9 @@ function WeakAuras.CreateFrame()
|
||||
end
|
||||
|
||||
frame.UpdateOptions = function(self)
|
||||
if not self.pickedDisplay then
|
||||
return
|
||||
end
|
||||
self.selectedTab = self.selectedTab or "region"
|
||||
local data
|
||||
if type(self.pickedDisplay) == "string" then
|
||||
@@ -820,6 +823,10 @@ function WeakAuras.CreateFrame()
|
||||
-- Any changes to the options that go around that, e.g. drag/drop, group,
|
||||
-- texture pick, etc should call this
|
||||
frame.FillOptions = function(self)
|
||||
if not self.pickedDisplay then
|
||||
return
|
||||
end
|
||||
|
||||
frame:UpdateOptions()
|
||||
|
||||
local data
|
||||
|
||||
Reference in New Issue
Block a user