Update general layout of WeakAurasOptions (#8)
* from retail * (fix) improve pixel snapping by reapplying borders * update spinbox texture * add icons, loaded, standby, unloaded behavior from retail * further use of ported inputbox and cleanup to ported frames * move templates into WeakAuras and upversion
This commit is contained in:
@@ -44,7 +44,7 @@ local function GetCustomTriggerOptions(data, triggernum)
|
||||
check = {
|
||||
type = "select",
|
||||
name = L["Check On..."],
|
||||
width = WeakAuras.doubleWidth / 3,
|
||||
width = WeakAuras.doubleWidth,
|
||||
order = 8,
|
||||
values = OptionsPrivate.Private.check_types,
|
||||
hidden = function() return not (trigger.type == "custom"
|
||||
@@ -75,7 +75,9 @@ local function GetCustomTriggerOptions(data, triggernum)
|
||||
},
|
||||
events = {
|
||||
type = "input",
|
||||
width = WeakAuras.doubleWidth * 2 / 3,
|
||||
multiline = true,
|
||||
control = "WeakAuras-MultiLineEditBoxWithEnter",
|
||||
width = WeakAuras.doubleWidth,
|
||||
name = L["Event(s)"],
|
||||
desc = L["Custom trigger status tooltip"],
|
||||
order = 8.1,
|
||||
@@ -90,6 +92,8 @@ local function GetCustomTriggerOptions(data, triggernum)
|
||||
},
|
||||
events2 = {
|
||||
type = "input",
|
||||
multiline = true,
|
||||
control = "WeakAuras-MultiLineEditBoxWithEnter",
|
||||
name = L["Event(s)"],
|
||||
desc = L["Custom trigger event tooltip"],
|
||||
width = WeakAuras.doubleWidth,
|
||||
@@ -105,6 +109,7 @@ local function GetCustomTriggerOptions(data, triggernum)
|
||||
type = "description",
|
||||
name = function()
|
||||
local events = trigger.custom_type == "event" and trigger.events2 or trigger.events
|
||||
-- Check for errors
|
||||
for index, event in pairs(WeakAuras.split(events)) do
|
||||
local trueEvent
|
||||
for i in event:gmatch("[^:]+") do
|
||||
@@ -132,6 +137,13 @@ local function GetCustomTriggerOptions(data, triggernum)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Check for warnings
|
||||
for _, event in pairs(WeakAuras.split(events)) do
|
||||
if event == "CLEU" or event == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
return "|cFFFF0000"..L["COMBAT_LOG_EVENT_UNFILTERED with no filter can trigger frame drops in raid environment."]
|
||||
end
|
||||
end
|
||||
return ""
|
||||
end,
|
||||
width = WeakAuras.doubleWidth,
|
||||
@@ -146,6 +158,7 @@ local function GetCustomTriggerOptions(data, triggernum)
|
||||
return true
|
||||
end
|
||||
local events = trigger.custom_type == "event" and trigger.events2 or trigger.events
|
||||
-- Check for errors
|
||||
for index, event in pairs(WeakAuras.split(events)) do
|
||||
local trueEvent
|
||||
for i in event:gmatch("[^:]+") do
|
||||
@@ -172,6 +185,12 @@ local function GetCustomTriggerOptions(data, triggernum)
|
||||
end
|
||||
end
|
||||
end
|
||||
-- Check for warnings
|
||||
for _, event in pairs(WeakAuras.split(events)) do
|
||||
if event == "CLEU" or event == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
return false
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user