This commit is contained in:
Bunny67
2020-06-02 23:40:06 +03:00
commit f2e1a0928d
516 changed files with 185320 additions and 0 deletions
@@ -0,0 +1,722 @@
--[[-----------------------------------------------------------------------------
WeakAurasTreeGroup Container
Container that uses a tree control to switch between groups.
This file was forked from AceGUIContainer-TreeGroup.lua version 41
-------------------------------------------------------------------------------]]
if not WeakAuras.IsCorrectVersion() then return end
local Type, Version = "WeakAurasTreeGroup", 1
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
local WoW80 = select(4, GetBuildInfo()) >= 80000
-- Lua APIs
local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
local math_min, math_max, floor = math.min, math.max, floor
local select, tremove, unpack, tconcat = select, table.remove, unpack, table.concat
-- WoW APIs
local CreateFrame, UIParent = CreateFrame, UIParent
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
-- List them here for Mikk's FindGlobals script
-- GLOBALS: GameTooltip, FONT_COLOR_CODE_CLOSE
-- Recycling functions
local new, del
do
local pool = setmetatable({},{__mode='k'})
function new()
local t = next(pool)
if t then
pool[t] = nil
return t
else
return {}
end
end
function del(t)
for k in pairs(t) do
t[k] = nil
end
pool[t] = true
end
end
local DEFAULT_TREE_WIDTH = 175
local DEFAULT_TREE_SIZABLE = true
--[[-----------------------------------------------------------------------------
Support functions
-------------------------------------------------------------------------------]]
local function GetButtonUniqueValue(line)
local parent = line.parent
if parent and parent.value then
return GetButtonUniqueValue(parent).."\001"..line.value
else
return line.value
end
end
local function UpdateButton(button, treeline, selected, canExpand, isExpanded)
local self = button.obj
local toggle = button.toggle
local text = treeline.text or ""
local icon = treeline.icon
local iconCoords = treeline.iconCoords
local level = treeline.level
local value = treeline.value
local fileId = treeline.fileId
local uniquevalue = treeline.uniquevalue
local disabled = treeline.disabled
button.treeline = treeline
button.value = value
button.fileId = fileId
button.uniquevalue = uniquevalue
if selected then
button:LockHighlight()
button.selected = true
else
button:UnlockHighlight()
button.selected = false
end
button.level = level
if level == 1 then
button:SetNormalFontObject("GameFontNormal")
button:SetHighlightFontObject("GameFontHighlight")
button.text:SetPoint("LEFT", (icon and 16 or 0) + 8, 2)
else
button:SetNormalFontObject("GameFontHighlightSmall")
button:SetHighlightFontObject("GameFontHighlightSmall")
button.text:SetPoint("LEFT", (icon and 16 or 0) + 8 * level, 2)
end
if disabled then
button:EnableMouse(false)
button.text:SetText("|cff808080"..text..FONT_COLOR_CODE_CLOSE)
else
button.text:SetText(text)
button:EnableMouse(true)
end
if icon then
button.icon:SetTexture(icon)
button.icon:SetPoint("LEFT", 8 * level, (level == 1) and 0 or 1)
else
button.icon:SetTexture(nil)
end
if iconCoords then
button.icon:SetTexCoord(unpack(iconCoords))
else
button.icon:SetTexCoord(0, 1, 0, 1)
end
if canExpand then
if not isExpanded then
toggle:SetNormalTexture(130838) -- Interface\\Buttons\\UI-PlusButton-UP
toggle:SetPushedTexture(130836) -- Interface\\Buttons\\UI-PlusButton-DOWN
else
toggle:SetNormalTexture(130821) -- Interface\\Buttons\\UI-MinusButton-UP
toggle:SetPushedTexture(130820) -- Interface\\Buttons\\UI-MinusButton-DOWN
end
toggle:Show()
else
toggle:Hide()
end
end
local function ShouldDisplayLevel(tree)
local result = false
for k, v in ipairs(tree) do
if v.children == nil and v.visible ~= false then
result = true
elseif v.children then
result = result or ShouldDisplayLevel(v.children)
end
if result then return result end
end
return false
end
local function addLine(self, v, tree, level, parent)
local line = new()
line.value = v.value
line.text = v.text
line.icon = v.icon
line.iconCoords = v.iconCoords
line.disabled = v.disabled
line.tree = tree
line.level = level
line.parent = parent
line.visible = v.visible
line.uniquevalue = GetButtonUniqueValue(line)
line.fileId = v.fileId
if v.children then
line.hasChildren = true
else
line.hasChildren = nil
end
self.lines[#self.lines+1] = line
return line
end
--fire an update after one frame to catch the treeframes height
local function FirstFrameUpdate(frame)
local self = frame.obj
frame:SetScript("OnUpdate", nil)
self:RefreshTree(nil, true)
end
local function BuildUniqueValue(...)
local n = select('#', ...)
if n == 1 then
return ...
else
return (...).."\001"..BuildUniqueValue(select(2,...))
end
end
--[[-----------------------------------------------------------------------------
Scripts
-------------------------------------------------------------------------------]]
local function Expand_OnClick(frame)
local button = frame.button
local self = button.obj
local status = (self.status or self.localstatus).groups
status[button.uniquevalue] = not status[button.uniquevalue]
self:RefreshTree()
end
local function Button_OnClick(frame)
local self = frame.obj
self:Fire("OnClick", frame.uniquevalue, frame.selected)
if not frame.selected then
self:SetSelected(frame.uniquevalue, frame.fileId)
frame.selected = true
frame:LockHighlight()
self:RefreshTree()
end
AceGUI:ClearFocus()
end
local function Button_OnDoubleClick(button)
local self = button.obj
local status = (self.status or self.localstatus).groups
status[button.uniquevalue] = not status[button.uniquevalue]
self:RefreshTree()
end
local function Button_OnEnter(frame)
local self = frame.obj
self:Fire("OnButtonEnter", frame.uniquevalue, frame)
if self.enabletooltips then
GameTooltip:SetOwner(frame, "ANCHOR_NONE")
GameTooltip:SetPoint("LEFT",frame,"RIGHT")
GameTooltip:SetText(frame.text:GetText() or "", 1, .82, 0, true)
GameTooltip:Show()
end
end
local function Button_OnLeave(frame)
local self = frame.obj
self:Fire("OnButtonLeave", frame.uniquevalue, frame)
if self.enabletooltips then
GameTooltip:Hide()
end
end
local function OnScrollValueChanged(frame, value)
if frame.obj.noupdate then return end
local self = frame.obj
local status = self.status or self.localstatus
status.scrollvalue = floor(value + 0.5)
self:RefreshTree()
AceGUI:ClearFocus()
end
local function Tree_OnSizeChanged(frame)
frame.obj:RefreshTree()
end
local function Tree_OnMouseWheel(frame, delta)
local self = frame.obj
if self.showscroll then
local scrollbar = self.scrollbar
local min, max = scrollbar:GetMinMaxValues()
local value = scrollbar:GetValue()
local newvalue = math_min(max,math_max(min,value - delta))
if value ~= newvalue then
scrollbar:SetValue(newvalue)
end
end
end
local function Dragger_OnLeave(frame)
frame:SetBackdropColor(1, 1, 1, 0)
end
local function Dragger_OnEnter(frame)
frame:SetBackdropColor(1, 1, 1, 0.8)
end
local function Dragger_OnMouseDown(frame)
local treeframe = frame:GetParent()
treeframe:StartSizing("RIGHT")
end
local function Dragger_OnMouseUp(frame)
local treeframe = frame:GetParent()
local self = treeframe.obj
local parentFrame = treeframe:GetParent()
treeframe:StopMovingOrSizing()
--treeframe:SetScript("OnUpdate", nil)
treeframe:SetUserPlaced(false)
--Without this :GetHeight will get stuck on the current height, causing the tree contents to not resize
treeframe:SetHeight(0)
treeframe:SetPoint("TOPLEFT", parentFrame, "TOPLEFT",0,0)
treeframe:SetPoint("BOTTOMLEFT", parentFrame, "BOTTOMLEFT",0,0)
local status = self.status or self.localstatus
status.treewidth = treeframe:GetWidth()
treeframe.obj:Fire("OnTreeResize",treeframe:GetWidth())
-- recalculate the content width
treeframe.obj:OnWidthSet(status.fullwidth)
-- update the layout of the content
treeframe.obj:DoLayout()
end
--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
local methods = {
["OnAcquire"] = function(self)
self:SetTreeWidth(DEFAULT_TREE_WIDTH, DEFAULT_TREE_SIZABLE)
self:EnableButtonTooltips(true)
self.frame:SetScript("OnUpdate", FirstFrameUpdate)
end,
["OnRelease"] = function(self)
self.status = nil
self.tree = nil
self.frame:SetScript("OnUpdate", nil)
for k, v in pairs(self.localstatus) do
if k == "groups" then
for k2 in pairs(v) do
v[k2] = nil
end
else
self.localstatus[k] = nil
end
end
self.localstatus.scrollvalue = 0
self.localstatus.treewidth = DEFAULT_TREE_WIDTH
self.localstatus.treesizable = DEFAULT_TREE_SIZABLE
end,
["EnableButtonTooltips"] = function(self, enable)
self.enabletooltips = enable
end,
["CreateButton"] = function(self)
local num = AceGUI:GetNextWidgetNum("TreeGroupButton")
local button = CreateFrame("Button", ("AceGUI30TreeButton%d"):format(num), self.treeframe, "OptionsListButtonTemplate")
button.obj = self
local icon = button:CreateTexture(nil, "OVERLAY")
icon:SetWidth(14)
icon:SetHeight(14)
button.icon = icon
button:SetScript("OnClick",Button_OnClick)
button:SetScript("OnDoubleClick", Button_OnDoubleClick)
button:SetScript("OnEnter",Button_OnEnter)
button:SetScript("OnLeave",Button_OnLeave)
button.toggle.button = button
button.toggle:SetScript("OnClick",Expand_OnClick)
button.text:SetHeight(14) -- Prevents text wrapping
return button
end,
["SetStatusTable"] = function(self, status)
assert(type(status) == "table")
self.status = status
if not status.groups then
status.groups = {}
end
if not status.scrollvalue then
status.scrollvalue = 0
end
if not status.treewidth then
status.treewidth = DEFAULT_TREE_WIDTH
end
if status.treesizable == nil then
status.treesizable = DEFAULT_TREE_SIZABLE
end
self:SetTreeWidth(status.treewidth,status.treesizable)
self:RefreshTree()
end,
--sets the tree to be displayed
["SetTree"] = function(self, tree, filter)
self.filter = filter
if tree then
assert(type(tree) == "table")
end
self.tree = tree
self:RefreshTree()
end,
["BuildLevel"] = function(self, tree, level, parent)
local groups = (self.status or self.localstatus).groups
for i, v in ipairs(tree) do
if v.children then
if not self.filter or ShouldDisplayLevel(v.children) then
local line = addLine(self, v, tree, level, parent)
if groups[line.uniquevalue] then
self:BuildLevel(v.children, level+1, line)
end
end
elseif v.visible ~= false or not self.filter then
addLine(self, v, tree, level, parent)
end
end
end,
["RefreshTree"] = function(self,scrollToSelection,fromOnUpdate)
local buttons = self.buttons
local lines = self.lines
for i, v in ipairs(buttons) do
v:Hide()
end
while lines[1] do
local t = tremove(lines)
for k in pairs(t) do
t[k] = nil
end
del(t)
end
if not self.tree then return end
--Build the list of visible entries from the tree and status tables
local status = self.status or self.localstatus
local groupstatus = status.groups
local tree = self.tree
local treeframe = self.treeframe
status.scrollToSelection = status.scrollToSelection or scrollToSelection -- needs to be cached in case the control hasn't been drawn yet (code bails out below)
self:BuildLevel(tree, 1)
local numlines = #lines
local maxlines = (floor(((self.treeframe:GetHeight()or 0) - 20 ) / 18))
if maxlines <= 0 then return end
-- WORKAROUND for lag spikes on WoW 8.0
if WoW80 and self.frame:GetParent() == UIParent and not fromOnUpdate then
self.frame:SetScript("OnUpdate", FirstFrameUpdate)
return
end
local first, last
scrollToSelection = status.scrollToSelection
status.scrollToSelection = nil
if numlines <= maxlines then
--the whole tree fits in the frame
status.scrollvalue = 0
self:ShowScroll(false)
first, last = 1, numlines
else
self:ShowScroll(true)
--scrolling will be needed
self.noupdate = true
self.scrollbar:SetMinMaxValues(0, numlines - maxlines)
--check if we are scrolled down too far
if numlines - status.scrollvalue < maxlines then
status.scrollvalue = numlines - maxlines
end
self.noupdate = nil
first, last = status.scrollvalue+1, status.scrollvalue + maxlines
--show selection?
if scrollToSelection and status.selected then
local show
for i,line in ipairs(lines) do -- find the line number
if line.uniquevalue==status.selected then
show=i
end
end
if not show then
-- selection was deleted or something?
elseif show >= first and show <= last then
-- all good
else
-- scrolling needed!
if show < first then
status.scrollvalue = show - 1
else
status.scrollvalue = show-maxlines
end
first, last = status.scrollvalue + 1, status.scrollvalue + maxlines
end
end
if self.scrollbar:GetValue() ~= status.scrollvalue then
self.scrollbar:SetValue(status.scrollvalue)
end
end
local buttonnum = 1
for i = first, last do
local line = lines[i]
local button = buttons[buttonnum]
if not button then
button = self:CreateButton()
buttons[buttonnum] = button
button:SetParent(treeframe)
button:SetFrameLevel(treeframe:GetFrameLevel() + 1)
button:ClearAllPoints()
if buttonnum == 1 then
if self.showscroll then
button:SetPoint("TOPRIGHT", -22, -10)
button:SetPoint("TOPLEFT", 0, -10)
else
button:SetPoint("TOPRIGHT", 0, -10)
button:SetPoint("TOPLEFT", 0, -10)
end
else
button:SetPoint("TOPRIGHT", buttons[buttonnum - 1], "BOTTOMRIGHT", 0, 0)
button:SetPoint("TOPLEFT", buttons[buttonnum - 1], "BOTTOMLEFT", 0, 0)
end
end
UpdateButton(button, line, status.selected == line.uniquevalue, line.hasChildren, groupstatus[line.uniquevalue])
button:Show()
buttonnum = buttonnum + 1
end
end,
["SetSelected"] = function(self, value, fileId)
local status = self.status or self.localstatus
if status.selected ~= value then
status.selected = value
self:Fire("OnGroupSelected", value, fileId)
end
end,
["Select"] = function(self, uniquevalue, ...)
self.filter = false
local status = self.status or self.localstatus
local groups = status.groups
local path = {...}
for i = 1, #path do
groups[tconcat(path, "\001", 1, i)] = true
end
status.selected = uniquevalue
self:RefreshTree(true)
self:Fire("OnGroupSelected", uniquevalue)
end,
["SelectByPath"] = function(self, ...)
self:Select(BuildUniqueValue(...), ...)
end,
["SelectByValue"] = function(self, uniquevalue)
self:Select(uniquevalue, ("\001"):split(uniquevalue))
end,
["ShowScroll"] = function(self, show)
self.showscroll = show
if show then
self.scrollbar:Show()
if self.buttons[1] then
self.buttons[1]:SetPoint("TOPRIGHT", self.treeframe, "TOPRIGHT", -22, -10)
end
else
self.scrollbar:Hide()
if self.buttons[1] then
self.buttons[1]:SetPoint("TOPRIGHT", self.treeframe, "TOPRIGHT", 0, -10)
end
end
end,
["OnWidthSet"] = function(self, width)
local content = self.content
local treeframe = self.treeframe
local status = self.status or self.localstatus
status.fullwidth = width
local contentwidth = width - status.treewidth - 20
if contentwidth < 0 then
contentwidth = 0
end
content:SetWidth(contentwidth)
content.width = contentwidth
local maxtreewidth = math_min(400, width - 50)
if maxtreewidth > 100 and status.treewidth > maxtreewidth then
self:SetTreeWidth(maxtreewidth, status.treesizable)
end
treeframe:SetMaxResize(maxtreewidth, 1600)
end,
["OnHeightSet"] = function(self, height)
local content = self.content
local contentheight = height - 20
if contentheight < 0 then
contentheight = 0
end
content:SetHeight(contentheight)
content.height = contentheight
end,
["SetTreeWidth"] = function(self, treewidth, resizable)
if not resizable then
if type(treewidth) == 'number' then
resizable = false
elseif type(treewidth) == 'boolean' then
resizable = treewidth
treewidth = DEFAULT_TREE_WIDTH
else
resizable = false
treewidth = DEFAULT_TREE_WIDTH
end
end
self.treeframe:SetWidth(treewidth)
self.dragger:EnableMouse(resizable)
local status = self.status or self.localstatus
status.treewidth = treewidth
status.treesizable = resizable
-- recalculate the content width
if status.fullwidth then
self:OnWidthSet(status.fullwidth)
end
end,
["GetTreeWidth"] = function(self)
local status = self.status or self.localstatus
return status.treewidth or DEFAULT_TREE_WIDTH
end,
["LayoutFinished"] = function(self, width, height)
if self.noAutoHeight then return end
self:SetHeight((height or 0) + 20)
end
}
--[[-----------------------------------------------------------------------------
Constructor
-------------------------------------------------------------------------------]]
local PaneBackdrop = {
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true, tileSize = 16, edgeSize = 16,
insets = { left = 3, right = 3, top = 5, bottom = 3 }
}
local DraggerBackdrop = {
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = nil,
tile = true, tileSize = 16, edgeSize = 0,
insets = { left = 3, right = 3, top = 7, bottom = 7 }
}
local function Constructor()
local num = AceGUI:GetNextWidgetNum(Type)
local frame = CreateFrame("Frame", nil, UIParent)
local treeframe = CreateFrame("Frame", nil, frame)
treeframe:SetPoint("TOPLEFT")
treeframe:SetPoint("BOTTOMLEFT")
treeframe:SetWidth(DEFAULT_TREE_WIDTH)
treeframe:EnableMouseWheel(true)
treeframe:SetBackdrop(PaneBackdrop)
treeframe:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
treeframe:SetBackdropBorderColor(0.4, 0.4, 0.4)
treeframe:SetResizable(true)
treeframe:SetMinResize(100, 1)
treeframe:SetMaxResize(400, 1600)
treeframe:SetScript("OnUpdate", FirstFrameUpdate)
treeframe:SetScript("OnSizeChanged", Tree_OnSizeChanged)
treeframe:SetScript("OnMouseWheel", Tree_OnMouseWheel)
local dragger = CreateFrame("Button", nil, treeframe)
dragger:SetWidth(8)
dragger:SetPoint("TOP", treeframe, "TOPRIGHT")
dragger:SetPoint("BOTTOM", treeframe, "BOTTOMRIGHT")
dragger:SetBackdrop(DraggerBackdrop)
dragger:SetBackdropColor(1, 1, 1, 0)
dragger:SetScript("OnEnter", Dragger_OnEnter)
dragger:SetScript("OnLeave", Dragger_OnLeave)
dragger:SetScript("OnMouseDown", Dragger_OnMouseDown)
dragger:SetScript("OnMouseUp", Dragger_OnMouseUp)
local scrollbar = CreateFrame("Slider", ("AceConfigDialogTreeGroup%dScrollBar"):format(num), treeframe, "UIPanelScrollBarTemplate")
scrollbar:SetScript("OnValueChanged", nil)
scrollbar:SetPoint("TOPRIGHT", -10, -26)
scrollbar:SetPoint("BOTTOMRIGHT", -10, 26)
scrollbar:SetMinMaxValues(0, 0)
scrollbar:SetValueStep(1)
scrollbar:SetValue(0)
scrollbar:SetWidth(16)
scrollbar:SetScript("OnValueChanged", OnScrollValueChanged)
local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
scrollbg:SetAllPoints(scrollbar)
scrollbg:SetTexture(0, 0, 0, 0.4)
local border = CreateFrame("Frame", nil, frame)
border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT")
border:SetPoint("BOTTOMRIGHT")
border:SetBackdrop(PaneBackdrop)
border:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
border:SetBackdropBorderColor(0.4, 0.4, 0.4)
--Container Support
local content = CreateFrame("Frame", nil, border)
content:SetPoint("TOPLEFT", 10, -10)
content:SetPoint("BOTTOMRIGHT", -10, 10)
local widget = {
frame = frame,
lines = {},
levels = {},
buttons = {},
hasChildren = {},
localstatus = { groups = {}, scrollvalue = 0 },
filter = false,
treeframe = treeframe,
dragger = dragger,
scrollbar = scrollbar,
border = border,
content = content,
type = Type
}
for method, func in pairs(methods) do
widget[method] = func
end
treeframe.obj, dragger.obj, scrollbar.obj = widget, widget, widget
return AceGUI:RegisterAsContainer(widget)
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,142 @@
--[[-----------------------------------------------------------------------------
Button Widget for our Expand button
-------------------------------------------------------------------------------]]
if not WeakAuras.IsCorrectVersion() then return end
local Type, Version = "WeakAurasExpand", 1
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-- Lua APIs
local select, pairs, print = select, pairs, print
-- WoW APIs
local CreateFrame, UIParent = CreateFrame, UIParent
--[[-----------------------------------------------------------------------------
Scripts
-------------------------------------------------------------------------------]]
local function Control_OnEnter(frame)
frame.obj:Fire("OnEnter")
end
local function Control_OnLeave(frame)
frame.obj:Fire("OnLeave")
end
local function Button_OnClick(frame, button)
frame.obj:Fire("OnClick", button)
AceGUI:ClearFocus()
end
--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
local methods = {
["OnAcquire"] = function(self)
self:SetHeight(110)
self:SetWidth(110)
self:SetLabel()
self:SetImage(nil)
self:SetImageSize(64, 64)
self:SetDisabled(false)
end,
-- ["OnRelease"] = nil,
["SetLabel"] = function(self, text)
if text and text ~= "" then
self.label:Show()
self.label:SetText(text)
self:SetHeight(max(self.label:GetStringHeight(), self.image:GetHeight()))
else
self.label:Hide()
self:SetHeight(self.image:GetHeight())
end
end,
["SetImage"] = function(self, path, ...)
local image = self.image
image:SetTexture(path)
if image:GetTexture() then
local n = select("#", ...)
if n == 4 or n == 8 then
image:SetTexCoord(...)
else
image:SetTexCoord(0, 1, 0, 1)
end
end
end,
["SetImageSize"] = function(self, width, height)
self.image:SetWidth(width)
self.image:SetHeight(height)
--self.frame:SetWidth(width + 30)
if self.label:IsShown() then
self:SetHeight(max(self.label:GetStringHeight(), self.image:GetHeight()))
else
self:SetHeight(self.image:GetHeight())
end
end,
["SetDisabled"] = function(self, disabled)
self.disabled = disabled
if disabled then
self.frame:Disable()
self.label:SetTextColor(0.5, 0.5, 0.5)
self.image:SetVertexColor(0.5, 0.5, 0.5, 0.5)
else
self.frame:Enable()
self.label:SetTextColor(1, 1, 1)
self.image:SetVertexColor(1, 1, 1, 1)
end
end
}
--[[-----------------------------------------------------------------------------
Constructor
-------------------------------------------------------------------------------]]
local function Constructor()
local frame = CreateFrame("Button", nil, UIParent)
frame:Hide()
frame:EnableMouse(true)
frame:SetScript("OnEnter", Control_OnEnter)
frame:SetScript("OnLeave", Control_OnLeave)
frame:SetScript("OnClick", Button_OnClick)
local image = frame:CreateTexture(nil, "BACKGROUND")
image:SetWidth(64)
image:SetHeight(64)
image:SetPoint("LEFT", 0, 0)
local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontHighlightLarge")
label:SetJustifyH("LEFT")
label:SetJustifyV("TOP")
label:SetPoint("LEFT", image, "RIGHT", 5, 0)
label:SetPoint("TOP")
label:SetPoint("BOTTOM")
label:SetPoint("RIGHT")
local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
highlight:SetAllPoints(frame)
highlight:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_White")
highlight:SetVertexColor(0.2, 0.4, 0.8, 0.2)
highlight:SetBlendMode("ADD")
local widget = {
label = label,
image = image,
frame = frame,
type = Type
}
for method, func in pairs(methods) do
widget[method] = func
end
return AceGUI:RegisterAsWidget(widget)
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)
@@ -0,0 +1,156 @@
--[[-----------------------------------------------------------------------------
Button Widget for our Expand button
-------------------------------------------------------------------------------]]
if not WeakAuras.IsCorrectVersion() then return end
local Type, Version = "WeakAurasExpandSmall", 1
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-- Lua APIs
local select, pairs, print = select, pairs, print
-- WoW APIs
local CreateFrame, UIParent = CreateFrame, UIParent
--[[-----------------------------------------------------------------------------
Scripts
-------------------------------------------------------------------------------]]
local function Control_OnEnter(frame)
frame.obj:Fire("OnEnter")
end
local function Control_OnLeave(frame)
frame.obj:Fire("OnLeave")
end
local function Button_OnClick(frame, button)
frame.obj:Fire("OnClick", button)
AceGUI:ClearFocus()
end
--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
local methods = {
["OnAcquire"] = function(self)
self:SetHeight(20)
self:SetWidth(110)
self:SetLabel()
self:SetImage(nil)
self:SetImageSize(24, 24)
self:SetDisabled(false)
end,
-- ["OnRelease"] = nil,
["SetLabel"] = function(self, text)
if text and text ~= "" then
self.label:Show()
self.label:SetText(text)
self:SetHeight(max(self.label:GetStringHeight(), self.image:GetHeight()))
else
self.label:Hide()
self:SetHeight(self.image:GetHeight())
end
end,
["SetImage"] = function(self, path, ...)
local image = self.image
image:SetTexture(path)
if image:GetTexture() then
local n = select("#", ...)
if n == 4 or n == 8 then
image:SetTexCoord(...)
else
image:SetTexCoord(0, 1, 0, 1)
end
end
end,
["SetImageSize"] = function(self, width, height)
self.image:SetWidth(width)
self.image:SetHeight(height)
--self.frame:SetWidth(width + 30)
self:UpdateWidth()
if self.label:IsShown() then
self:SetHeight(max(self.label:GetStringHeight(), self.image:GetHeight()))
else
self:SetHeight(self.image:GetHeight())
end
end,
["SetDisabled"] = function(self, disabled)
self.disabled = disabled
if disabled then
self.frame:Disable()
self.label:SetTextColor(0.5, 0.5, 0.5)
self.image:SetVertexColor(0.5, 0.5, 0.5, 0.5)
else
self.frame:Enable()
self.label:SetTextColor(1, 1, 1)
self.image:SetVertexColor(1, 1, 1, 1)
end
end,
["OnWidthSet"] = function(self, width)
self:UpdateWidth()
end,
["UpdateWidth"] = function(self)
self.label:SetWidth(self.frame:GetWidth() - self.image:GetWidth())
if self.label:IsShown() then
self:SetHeight(max(self.label:GetStringHeight(), self.image:GetHeight()))
else
self:SetHeight(self.image:GetHeight())
end
end
}
--[[-----------------------------------------------------------------------------
Constructor
-------------------------------------------------------------------------------]]
local function Constructor()
local frame = CreateFrame("Button", nil, UIParent)
frame:Hide()
frame:EnableMouse(true)
frame:SetScript("OnEnter", Control_OnEnter)
frame:SetScript("OnLeave", Control_OnLeave)
frame:SetScript("OnClick", Button_OnClick)
local image = frame:CreateTexture(nil, "BACKGROUND")
image:SetWidth(64)
image:SetHeight(64)
image:SetPoint("RIGHT", 0, 0)
local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontHighlight")
label:SetJustifyH("LEFT")
label:SetJustifyV("CENTER")
label:SetPoint("RIGHT", image, "LEFT", -5, 0)
label:SetPoint("TOP")
label:SetPoint("BOTTOM")
label:SetPoint("LEFT")
local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
highlight:SetAllPoints(frame)
highlight:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_White")
highlight:SetVertexColor(0.2, 0.4, 0.8, 0.2)
highlight:SetBlendMode("ADD")
local widget = {
label = label,
image = image,
frame = frame,
type = Type
}
for method, func in pairs(methods) do
widget[method] = func
end
return AceGUI:RegisterAsWidget(widget)
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)
@@ -0,0 +1,19 @@
--[[-----------------------------------------------------------------------------
Icon Widget that allows for a tooltip, by preventing SetLabel from actually
setting a label
Graphical Button.
-------------------------------------------------------------------------------]]
if not WeakAuras.IsCorrectVersion() then return end
local Type, Version = "WeakAurasIcon", 1
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
local function Constructor()
local button = AceGUI:Create("Icon")
button.type = Type
button.SetLabel = function() end
return button
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)
@@ -0,0 +1,97 @@
if not WeakAuras.IsCorrectVersion() then return end
local Type, Version = "WeakAurasIconButton", 21
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
local function Hide_Tooltip()
GameTooltip:Hide();
end
local function Show_Tooltip(owner, line1, line2)
GameTooltip:SetOwner(owner, "ANCHOR_NONE");
GameTooltip:SetPoint("BOTTOM", owner, "TOP");
GameTooltip:ClearLines();
GameTooltip:AddLine(line1);
GameTooltip:AddLine(line2, 1, 1, 1, 1);
GameTooltip:Show();
end
--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
local methods = {
["OnAcquire"] = function(self)
self:SetWidth(52);
self:SetHeight(52);
end,
["OnRelease"] = function(self)
self:ClearPick();
self.texture:SetTexture();
end,
["SetName"] = function(self, name)
self.texture.name = name;
end,
["GetName"] = function(self)
return self.texture.name;
end,
["SetTexture"] = function(self, texturePath)
self.texture.path = texturePath;
local success = self.texture:SetTexture(texturePath);
if not(success) then
self.texture:SetTexture("Interface\\BUTTONS\\UI-Quickslot-Depress.blp");
end
return success;
end,
["GetTexturePath"] = function(self)
return self.texture.path;
end,
["SetClick"] = function(self, func)
self.frame:SetScript("OnClick", func);
end,
["Pick"] = function(self)
self.frame:LockHighlight();
end,
["ClearPick"] = function(self)
self.frame:UnlockHighlight();
end
}
--[[-----------------------------------------------------------------------------
Constructor
-------------------------------------------------------------------------------]]
local function Constructor()
local button = CreateFrame("BUTTON", nil, UIParent);
button:SetHeight(52);
button:SetWidth(52);
local highlighttexture = button:CreateTexture(nil, "OVERLAY");
--highlighttexture:SetTexture("Interface\\BUTTONS\\ButtonHilight-SquareQuickslot.blp");
--highlighttexture:SetTexCoord(0.175, 0.875, 0.125, 0.825);
highlighttexture:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight.blp");
highlighttexture:SetVertexColor(0.25, 0.5, 1);
highlighttexture:SetPoint("BOTTOMLEFT", button, 4, 4);
highlighttexture:SetPoint("TOPRIGHT", button, -4, -4);
button:SetHighlightTexture(highlighttexture);
local texture = button:CreateTexture(nil, "OVERLAY");
texture:SetAllPoints(button);
texture.name = "Undefined";
button:SetScript("OnEnter", function() Show_Tooltip(button, texture.name, texture.path) end);
button:SetScript("OnLeave", Hide_Tooltip);
local widget = {
frame = button,
texture = texture,
type = Type
}
for method, func in pairs(methods) do
widget[method] = func
end
return AceGUI:RegisterAsWidget(widget)
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)
@@ -0,0 +1,192 @@
if not WeakAuras.IsCorrectVersion() then return end
local Type, Version = "WeakAurasImportButton", 20
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
local L = WeakAuras.L;
local function Hide_Tooltip()
GameTooltip:Hide();
end
local function Show_Tooltip(owner, line1, line2)
GameTooltip:SetOwner(owner, "ANCHOR_NONE");
GameTooltip:SetPoint("LEFT", owner, "RIGHT");
GameTooltip:ClearLines();
GameTooltip:AddLine(line1);
GameTooltip:AddLine(line2, 1, 1, 1, 1);
GameTooltip:Show();
end
--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
local methods = {
["OnAcquire"] = function(self)
self:SetWidth(380);
self:SetHeight(18);
end,
["SetTitle"] = function(self, title)
self.title:SetText(title);
end,
["GetTitle"] = function(self)
return self.title:GetText();
end,
["SetDescription"] = function(self, desc)
self.frame.description = desc;
end,
["SetIcon"] = function(self, iconPath)
if(iconPath) then
local icon = self.frame:CreateTexture();
icon:SetTexture(iconPath);
icon:SetPoint("RIGHT", self.frame, "RIGHT");
icon:SetPoint("BOTTOM", self.frame, "BOTTOM");
icon:SetWidth(16);
icon:SetHeight(16);
self.title:SetPoint("RIGHT", icon, "LEFT");
end
end,
-- ["SetChecked"] = function(self, value)
-- print("SetChecked", self.title:GetText(), value);
-- self.checkbox:SetChecked(value);
-- print("After SetChecked", self.checkbox:GetChecked(), self:GetChecked());
-- end,
-- ["GetChecked"] = function(self)
-- local checked = self.checkbox:GetChecked();
-- print("GetChecked", self.title:GetText(), checked);
-- return checked;
-- end,
["SetClick"] = function(self, func)
self.checkbox:SetScript("OnClick", func);
end,
["Expand"] = function(self, reloadTooltip)
self.expand:Enable();
self.expand.expanded = true;
self.expand:SetNormalTexture("Interface\\BUTTONS\\UI-MinusButton-Up.blp");
self.expand:SetPushedTexture("Interface\\BUTTONS\\UI-MinusButton-Down.blp");
self.expand.title = L["Collapse"];
self.expand:SetScript("OnClick", function() self:Collapse(true) end);
self.expand.func();
if(reloadTooltip) then
Hide_Tooltip();
Show_Tooltip(self.frame, self.expand.title, nil);
end
end,
["Collapse"] = function(self, reloadTooltip)
self.expand:Enable();
self.expand.expanded = nil;
self.expand:SetNormalTexture("Interface\\BUTTONS\\UI-PlusButton-Up.blp");
self.expand:SetPushedTexture("Interface\\BUTTONS\\UI-PlusButton-Down.blp");
self.expand.title = L["Expand"];
self.expand:SetScript("OnClick", function() self:Expand(true) end);
self.expand.func();
if(reloadTooltip) then
Hide_Tooltip();
Show_Tooltip(self.frame, self.expand.title, nil);
end
end,
["SetOnExpandCollapse"] = function(self, func)
self.expand.func = func;
end,
["GetExpanded"] = function(self)
return self.expand.expanded;
end,
["DisableExpand"] = function(self)
self.expand:Disable();
self.expand.disabled = true;
self.expand.expanded = false;
self.expand:SetNormalTexture("Interface\\BUTTONS\\UI-PlusButton-Disabled.blp");
end,
["EnableExpand"] = function(self)
self.expand.disabled = false;
if(self:GetExpanded()) then
self:Expand();
else
self:Collapse();
end
end,
["SetExpandVisible"] = function(self, value)
if(value) then
self.expand:Show();
else
self.expand:Hide();
end
end,
["SetLevel"] = function(self, level)
self.checkbox:SetPoint("left", self.frame, "left", level * 16, 0);
end
}
--[[-----------------------------------------------------------------------------
Constructor
-------------------------------------------------------------------------------]]
local function Constructor()
local name = "WeakAurasImportButton"..AceGUI:GetNextWidgetNum(Type);
local button = CreateFrame("BUTTON", name, UIParent, "OptionsListButtonTemplate");
button:SetHeight(18);
button:SetWidth(380);
button.dgroup = nil;
local background = button:CreateTexture(nil, "BACKGROUND");
button.background = background;
background:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight2.blp");
background:SetBlendMode("ADD");
background:SetVertexColor(0.5, 0.5, 0.5, 0.25);
background:SetAllPoints(button);
local expand = CreateFrame("BUTTON", nil, button);
button.expand = expand;
expand.expanded = true;
expand.disabled = true;
expand.func = function() end;
expand:SetNormalTexture("Interface\\BUTTONS\\UI-PlusButton-Disabled.blp");
expand:Disable();
expand:SetWidth(16);
expand:SetHeight(16);
expand:SetPoint("BOTTOM", button, "BOTTOM");
expand:SetPoint("LEFT", button, "LEFT");
expand:SetHighlightTexture("Interface\\BUTTONS\\UI-Panel-MinimizeButton-Highlight.blp");
expand.title = L["Disabled"];
expand:SetScript("OnEnter", function() Show_Tooltip(button, expand.title, nil) end);
expand:SetScript("OnLeave", Hide_Tooltip);
local checkbox = CreateFrame("CheckButton", nil, button, "ChatConfigCheckButtonTemplate");
button.checkbox = checkbox;
checkbox:EnableMouse(false);
checkbox:SetWidth(18);
checkbox:SetHeight(18);
checkbox:SetPoint("BOTTOM", button, "BOTTOM");
checkbox:SetPoint("LEFT", button, "LEFT", 16);
local title = button:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge");
button.title = title;
title:SetHeight(14);
title:SetJustifyH("LEFT");
title:SetPoint("LEFT", checkbox, "RIGHT", 2, 0);
title:SetPoint("RIGHT", button, "RIGHT");
button.description = "";
button:SetScript("OnEnter", function() Show_Tooltip(button, title:GetText(), button.description) end);
button:SetScript("OnLeave", Hide_Tooltip);
button:SetScript("OnClick", function() checkbox:Click() end);
local widget = {
frame = button,
title = title,
checkbox = checkbox,
expand = expand,
background = background,
type = Type
}
for method, func in pairs(methods) do
widget[method] = func
end
return AceGUI:RegisterAsWidget(widget)
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)
@@ -0,0 +1,190 @@
if not WeakAuras.IsCorrectVersion() then return end
local Type, Version = "WeakAurasLoadedHeaderButton", 20
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
local L = WeakAuras.L
local function Hide_Tooltip()
GameTooltip:Hide();
end
local function Show_Tooltip(owner, line1, line2)
GameTooltip:SetOwner(owner, "ANCHOR_NONE");
GameTooltip:SetPoint("LEFT", owner, "RIGHT");
GameTooltip:ClearLines();
GameTooltip:AddLine(line1);
GameTooltip:AddLine(line2, 1, 1, 1, 1);
GameTooltip:Show();
end
--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
local methods = {
["OnAcquire"] = function(self)
self:SetWidth(1000);
self:SetHeight(20);
end,
["SetText"] = function(self, text)
self.frame:SetText(" "..text);
end,
["SetClick"] = function(self, func)
self.frame:SetScript("OnClick", func);
end,
["Disable"] = function(self)
self.frame:Disable();
end,
["Enable"] = function(self)
self.frame:Enable();
end,
["Pick"] = function(self)
self.frame:LockHighlight();
end,
["ClearPick"] = function(self)
self.frame:UnlockHighlight();
end,
["Expand"] = function(self, reloadTooltip)
self.expand:Enable();
self.expanded = true;
self.expand:SetNormalTexture("Interface\\BUTTONS\\UI-MinusButton-Up.blp");
self.expand:SetPushedTexture("Interface\\BUTTONS\\UI-MinusButton-Down.blp");
self.expand.title = L["Collapse"];
self.expand.desc = self.expand.collapsedesc;
self.expand:SetScript("OnClick", function() self:Collapse(true) end);
self.expand.func();
if(reloadTooltip) then
Hide_Tooltip();
Show_Tooltip(self.frame, self.expand.title, self.expand.desc);
end
end,
["Collapse"] = function(self, reloadTooltip)
self.expand:Enable();
self.expanded = false;
self.expand:SetNormalTexture("Interface\\BUTTONS\\UI-PlusButton-Up.blp");
self.expand:SetPushedTexture("Interface\\BUTTONS\\UI-PlusButton-Down.blp");
self.expand.title = L["Expand"];
self.expand.desc = self.expand.expanddesc;
self.expand:SetScript("OnClick", function() self:Expand(true) end);
self.expand.func();
if(reloadTooltip) then
Hide_Tooltip();
Show_Tooltip(self.frame, self.expand.title, self.expand.desc);
end
end,
["SetOnExpandCollapse"] = function(self, func)
self.expand.func = func;
end,
["GetExpanded"] = function(self)
return self.expanded;
end,
["DisableExpand"] = function(self)
self.expand:Disable();
self.expand.disabled = true;
self.expand.expanded = false;
self.expand:SetNormalTexture("Interface\\BUTTONS\\UI-PlusButton-Disabled.blp");
end,
["EnableExpand"] = function(self)
self.expand.disabled = false;
if(self:GetExpanded()) then
self:Expand();
else
self:Collapse();
end
end,
["SetViewClick"] = function(self, func)
self.view:SetScript("OnClick", func);
end,
["SetViewTest"] = function(self, func)
self.view.func = func;
end,
["SetViewDescription"] = function(self, desc)
self.view.desc = desc;
end,
["SetExpandDescription"] = function(self, desc)
self.expand.expanddesc = desc;
end,
["SetCollapseDescription"] = function(self, desc)
self.expand.collapsedesc = desc;
self.expand.desc = desc;
end,
}
--[[-----------------------------------------------------------------------------
Constructor
-------------------------------------------------------------------------------]]
local function Constructor()
local name = Type..AceGUI:GetNextWidgetNum(Type)
local button = CreateFrame("BUTTON", name, UIParent, "OptionsListButtonTemplate");
button:SetHeight(20);
button:SetWidth(1000);
button:SetDisabledFontObject("GameFontNormal");
local background = button:CreateTexture(nil, "BACKGROUND");
button.background = background;
background:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight2.blp");
background:SetBlendMode("ADD");
background:SetVertexColor(0.5, 0.5, 0.5, 0.25);
background:SetAllPoints(button);
local expand = CreateFrame("BUTTON", nil, button);
button.expand = expand;
expand.expanded = true;
expand.disabled = true;
expand.func = function() end;
expand:SetNormalTexture("Interface\\BUTTONS\\UI-PlusButton-Disabled.blp");
expand:Disable();
expand:SetWidth(16);
expand:SetHeight(16);
expand:SetPoint("RIGHT", button, "RIGHT");
expand:SetHighlightTexture("Interface\\BUTTONS\\UI-Panel-MinimizeButton-Highlight.blp");
expand.title = L["Disabled"];
expand.desc = L["Expansion is disabled because this group has no children"];
expand.expanddesc = "";
expand.collapsedesc = "";
expand:SetScript("OnEnter", function() Show_Tooltip(button, expand.title, expand.desc) end);
expand:SetScript("OnLeave", Hide_Tooltip);
local view = CreateFrame("BUTTON", nil, button);
button.view = view;
view:SetWidth(16);
view:SetHeight(16);
view:SetPoint("RIGHT", button, "RIGHT", -16, 0);
local viewTexture = view:CreateTexture()
view.texture = viewTexture;
viewTexture:SetTexture("Interface\\LFGFrame\\BattlenetWorking1.blp");
viewTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9);
viewTexture:SetAllPoints(view);
view:SetNormalTexture(viewTexture);
view:SetHighlightTexture("Interface\\BUTTONS\\UI-Panel-MinimizeButton-Highlight.blp");
view.desc = "";
view:SetScript("OnEnter", function() Show_Tooltip(button, L["View"], view.desc) end);
view:SetScript("OnLeave", Hide_Tooltip);
view.visibility = 0;
view.func = function() return view.visibility end;
view:SetScript("OnUpdate", function()
if(view.func() == 2) then
view.texture:SetTexture("Interface\\LFGFrame\\BattlenetWorking0.blp");
elseif(view.func() == 1) then
view.texture:SetTexture("Interface\\LFGFrame\\BattlenetWorking2.blp");
else
view.texture:SetTexture("Interface\\LFGFrame\\BattlenetWorking4.blp");
end
end);
local widget = {
frame = button,
expand = expand,
view = view,
type = Type
}
for method, func in pairs(methods) do
widget[method] = func
end
return AceGUI:RegisterAsWidget(widget)
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)
@@ -0,0 +1,390 @@
if not WeakAuras.IsCorrectVersion() then return end
local Type, Version = "WeakAurasMultiLineEditBox", 34
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-- Lua APIs
local pairs = pairs
-- WoW APIs
local GetCursorInfo, GetSpellInfo, ClearCursor = GetCursorInfo, GetSpellInfo, ClearCursor
local CreateFrame, UIParent = CreateFrame, UIParent
local _G = _G
--[[-----------------------------------------------------------------------------
Support functions
-------------------------------------------------------------------------------]]
if not AceGUIWeakAurasMultiLineEditBoxInsertLink then
-- upgradeable hook
hooksecurefunc("ChatEdit_InsertLink", function(...) return _G.AceGUIWeakAurasMultiLineEditBoxInsertLink(...) end)
end
function _G.AceGUIWeakAurasMultiLineEditBoxInsertLink(text)
for i = 1, AceGUI:GetWidgetCount(Type) do
local editbox = _G[("WeakAurasMultiLineEditBox%uEdit"):format(i)]
if editbox and editbox:IsVisible() and editbox:HasFocus() then
editbox:Insert(text)
return true
end
end
end
local function Layout(self)
self:SetHeight(self.numlines * 14 + (self.disablebutton and 19 or 41) + self.labelHeight)
if self.labelHeight == 0 then
self.scrollBar:SetPoint("TOP", self.frame, "TOP", 0, -23)
else
self.scrollBar:SetPoint("TOP", self.label, "BOTTOM", 0, -19)
end
if self.disablebutton then
self.scrollBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, 21)
self.scrollBG:SetPoint("BOTTOMLEFT", 0, 4)
else
self.scrollBar:SetPoint("BOTTOM", self.button, "TOP", 0, 18)
self.scrollBG:SetPoint("BOTTOMLEFT", self.button, "TOPLEFT")
end
end
--[[-----------------------------------------------------------------------------
Scripts
-------------------------------------------------------------------------------]]
local function OnClick(self) -- Button
self = self.obj
self.editBox:ClearFocus()
if not self:Fire("OnEnterPressed", IndentationLib.decode(self.editBox:GetText())) then
self.button:Disable()
end
end
local function OnCursorChanged(self, _, y, _, cursorHeight) -- EditBox
self, y = self.obj.scrollFrame, -y
local offset = self:GetVerticalScroll()
if y < offset then
self:SetVerticalScroll(y)
else
y = y + cursorHeight - self:GetHeight()
if y > offset then
self:SetVerticalScroll(y)
end
end
end
local function OnEditFocusLost(self) -- EditBox
self:HighlightText(0, 0)
self.obj:Fire("OnEditFocusLost")
self.obj.scrollFrame:EnableMouseWheel(false);
end
local function OnEnter(self) -- EditBox / ScrollFrame
self = self.obj
if not self.entered then
self.entered = true
self:Fire("OnEnter")
end
end
local function OnLeave(self) -- EditBox / ScrollFrame
self = self.obj
if self.entered then
self.entered = nil
self:Fire("OnLeave")
end
end
local function OnMouseUp(self) -- ScrollFrame
self = self.obj.editBox
self:SetFocus()
self:SetCursorPosition(self:GetNumLetters())
end
local function OnReceiveDrag(self) -- EditBox / ScrollFrame
local type, id, info = GetCursorInfo()
if type == "spell" then
info = GetSpellInfo(id, info)
elseif type ~= "item" then
return
end
ClearCursor()
self = self.obj
local editBox = self.editBox
if not editBox:HasFocus() then
editBox:SetFocus()
editBox:SetCursorPosition(editBox:GetNumLetters())
end
editBox:Insert(info)
self.button:Enable()
end
local function OnSizeChanged(self, width, height) -- ScrollFrame
self.obj.editBox:SetWidth(width)
end
local function OnTextChanged(self, userInput) -- EditBox
if userInput then
self = self.obj
self:Fire("OnTextChanged", IndentationLib.decode(self.editBox:GetText()))
self.button:Enable()
end
end
local function OnTextSet(self) -- EditBox
self:HighlightText(0, 0)
self:SetCursorPosition(self:GetNumLetters())
self:SetCursorPosition(0)
self.obj.button:Disable()
end
local function OnVerticalScroll(self, offset) -- ScrollFrame
local editBox = self.obj.editBox
editBox:SetHitRectInsets(0, 0, offset, editBox:GetHeight() - offset - self:GetHeight())
end
local function OnFrameShow(frame)
if (frame.focusOnShow) then
frame.obj.editBox:SetFocus()
frame.focusOnShow = nil;
end
local self = frame.obj;
local option = self.userdata.option;
local numExtraButtons = 0;
if (option and option.arg and option.arg.extraFunctions) then
numExtraButtons = #option.arg.extraFunctions;
for index, data in ipairs(option.arg.extraFunctions) do
if (not self.extraButtons[index]) then
local extraButton = CreateFrame("Button", ("%s%dExpandButton%d"):format(Type, self.widgetNum, index), frame, "UIPanelButtonTemplate")
extraButton:SetPoint("LEFT", self.extraButtons[index - 1], "RIGHT");
extraButton:SetHeight(22)
extraButton:SetWidth(100);
self.extraButtons[index] = extraButton;
end
local extraButton = self.extraButtons[index];
extraButton:SetText(data.buttonLabel);
extraButton:SetScript("OnClick", data.func);
extraButton:Show();
end
end
for i = numExtraButtons + 1, #self.extraButtons do
self.extraButtons[i]:Hide();
end
end
local function OnEditFocusGained(frame)
AceGUI:SetFocus(frame.obj)
frame.obj:Fire("OnEditFocusGained")
frame.obj.scrollFrame:EnableMouseWheel(true);
end
--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
local methods = {
["OnAcquire"] = function(self)
self.editBox:SetText("")
self:SetDisabled(false)
self:SetWidth(200)
self:DisableButton(false)
self:SetNumLines()
self.entered = nil
self:SetMaxLetters(0)
end,
["OnRelease"] = function(self)
self:ClearFocus()
end,
["SetDisabled"] = function(self, disabled)
local editBox = self.editBox
if disabled then
editBox:ClearFocus()
editBox:EnableMouse(false)
editBox:SetTextColor(0.5, 0.5, 0.5)
self.label:SetTextColor(0.5, 0.5, 0.5)
self.scrollFrame:EnableMouse(false)
self.button:Disable()
else
editBox:EnableMouse(true)
editBox:SetTextColor(1, 1, 1)
self.label:SetTextColor(1, 0.82, 0)
self.scrollFrame:EnableMouse(true)
end
end,
["SetLabel"] = function(self, text)
if text and text ~= "" then
self.label:SetText(text)
if self.labelHeight ~= 10 then
self.labelHeight = 10
self.label:Show()
end
elseif self.labelHeight ~= 0 then
self.labelHeight = 0
self.label:Hide()
end
Layout(self)
end,
["SetNumLines"] = function(self, value)
if not value or value < 4 then
value = 4
end
self.numlines = value
Layout(self)
end,
["SetText"] = function(self, text)
self.editBox:SetText(IndentationLib.encode(text))
end,
["GetText"] = function(self)
return IndentationLib.decode(self.editBox:GetText())
end,
["SetMaxLetters"] = function (self, num)
self.editBox:SetMaxLetters(num or 0)
end,
["DisableButton"] = function(self, disabled)
self.disablebutton = disabled
if disabled then
self.button:Hide()
else
self.button:Show()
end
Layout(self)
end,
["ClearFocus"] = function(self)
self.editBox:ClearFocus()
self.frame.focusOnShow = nil;
end,
["SetFocus"] = function(self)
self.editBox:SetFocus()
if not self.frame:IsShown() then
self.frame.focusOnShow = true;
end
end,
["HighlightText"] = function(self, from, to)
self.editBox:HighlightText(from, to)
end,
["GetCursorPosition"] = function(self)
return self.editBox:GetCursorPosition()
end,
["SetCursorPosition"] = function(self, ...)
return self.editBox:SetCursorPosition(...)
end,
}
--[[-----------------------------------------------------------------------------
Constructor
-------------------------------------------------------------------------------]]
local backdrop = {
bgFile = [[Interface\Tooltips\UI-Tooltip-Background]],
edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], edgeSize = 16,
insets = { left = 4, right = 3, top = 4, bottom = 3 }
}
local function Constructor()
local frame = CreateFrame("Frame", nil, UIParent)
frame:Hide()
frame:SetScript("OnShow", OnFrameShow);
local widgetNum = AceGUI:GetNextWidgetNum(Type)
local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
label:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, -4)
label:SetPoint("TOPRIGHT", frame, "TOPRIGHT", 0, -4)
label:SetJustifyH("LEFT")
label:SetText(ACCEPT)
label:SetHeight(10)
local button = CreateFrame("Button", ("%s%dButton"):format(Type, widgetNum), frame, "UIPanelButtonTemplate")
button:SetPoint("BOTTOMLEFT", 0, 4)
button:SetHeight(22)
button:SetWidth(100)
button:SetText(ACCEPT)
button:SetScript("OnClick", OnClick)
button:Disable()
local extraButtons = {};
extraButtons[0] = button;
local scrollBG = CreateFrame("Frame", nil, frame)
scrollBG:SetBackdrop(backdrop)
scrollBG:SetBackdropColor(0, 0, 0)
scrollBG:SetBackdropBorderColor(0.4, 0.4, 0.4)
local scrollFrame = CreateFrame("ScrollFrame", ("%s%dScrollFrame"):format(Type, widgetNum), frame, "UIPanelScrollFrameTemplate")
scrollFrame:EnableMouseWheel(false);
local scrollBar = _G[scrollFrame:GetName() .. "ScrollBar"]
scrollBar:ClearAllPoints()
scrollBar:SetPoint("TOP", label, "BOTTOM", 0, -19)
scrollBar:SetPoint("BOTTOM", button, "TOP", 0, 18)
scrollBar:SetPoint("RIGHT", frame, "RIGHT")
scrollBG:SetPoint("TOPRIGHT", scrollBar, "TOPLEFT", 0, 19)
scrollBG:SetPoint("BOTTOMLEFT", button, "TOPLEFT")
scrollFrame:SetPoint("TOPLEFT", scrollBG, "TOPLEFT", 5, -6)
scrollFrame:SetPoint("BOTTOMRIGHT", scrollBG, "BOTTOMRIGHT", -4, 4)
scrollFrame:SetScript("OnEnter", OnEnter)
scrollFrame:SetScript("OnLeave", OnLeave)
scrollFrame:SetScript("OnMouseUp", OnMouseUp)
scrollFrame:SetScript("OnReceiveDrag", OnReceiveDrag)
scrollFrame:SetScript("OnSizeChanged", OnSizeChanged)
scrollFrame:HookScript("OnVerticalScroll", OnVerticalScroll)
local editBox = CreateFrame("EditBox", ("%s%dEdit"):format(Type, widgetNum), scrollFrame)
editBox:SetAllPoints()
editBox:SetFontObject(ChatFontNormal)
editBox:SetMultiLine(true)
editBox:EnableMouse(true)
editBox:SetAutoFocus(false)
editBox:SetCountInvisibleLetters(false)
editBox:SetScript("OnCursorChanged", OnCursorChanged)
editBox:SetScript("OnEditFocusLost", OnEditFocusLost)
editBox:SetScript("OnEnter", OnEnter)
editBox:SetScript("OnEscapePressed", editBox.ClearFocus)
editBox:SetScript("OnLeave", OnLeave)
editBox:SetScript("OnMouseDown", OnReceiveDrag)
editBox:SetScript("OnReceiveDrag", OnReceiveDrag)
editBox:SetScript("OnTextChanged", OnTextChanged)
editBox:SetScript("OnTextSet", OnTextSet)
editBox:SetScript("OnEditFocusGained", OnEditFocusGained)
scrollFrame:SetScrollChild(editBox)
local widget = {
button = button,
extraButtons = extraButtons,
editBox = editBox,
frame = frame,
label = label,
labelHeight = 10,
numlines = 4,
scrollBar = scrollBar,
scrollBG = scrollBG,
scrollFrame = scrollFrame,
type = Type,
widgetNum = widgetNum,
}
for method, func in pairs(methods) do
widget[method] = func
end
button.obj, editBox.obj, scrollFrame.obj = widget, widget, widget
return AceGUI:RegisterAsWidget(widget)
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)
@@ -0,0 +1,148 @@
if not WeakAuras.IsCorrectVersion() then return end
local Type, Version = "WeakAurasNewButton", 23
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
local function Hide_Tooltip()
GameTooltip:Hide();
end
local function Show_Tooltip(owner, line1, line2)
GameTooltip:SetOwner(owner, "ANCHOR_NONE");
GameTooltip:SetPoint("LEFT", owner, "RIGHT");
GameTooltip:ClearLines();
GameTooltip:AddLine(line1);
GameTooltip:AddLine(line2, 1, 1, 1, 1);
GameTooltip:Show();
end
--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
local methods = {
["OnAcquire"] = function(self)
self:SetWidth(570);
self:SetHeight(40);
end,
["SetTitle"] = function(self, title)
self.title:SetText(title);
end,
["GetTitle"] = function(self)
return self.title:GetText();
end,
["SetDescription"] = function(self, desc)
self.frame.description = desc;
self.description:SetText(desc);
end,
["SetClick"] = function(self, func)
self.frame:SetScript("OnClick", func);
end,
["SetIcon"] = function(self, icon)
self:ReleaseThumnail()
if(type(icon) == "string" or type(icon) == "number") then
self.icon:SetTexture(icon);
self.icon:Show();
if(self.iconRegion and self.iconRegion.Hide) then
self.iconRegion:Hide();
end
else
self.iconRegion = icon;
icon:SetAllPoints(self.icon);
icon:SetParent(self.frame);
icon:Show()
self.icon:Hide();
end
end,
["SetThumbnail"] = function(self, regionType, data)
local regionData = WeakAuras.regionOptions[regionType]
if regionData and regionData.acquireThumbnail then
local thumbnail = regionData.acquireThumbnail(self.frame, data)
self:SetIcon(thumbnail)
self.thumbnail = thumbnail
self.thumbnailType = regionType
end
end,
["ReleaseThumnail"] = function(self)
if self.thumbnail then
local regionData = WeakAuras.regionOptions[self.thumbnailType]
if regionData and regionData.releaseThumbnail then
regionData.releaseThumbnail(self.thumbnail)
end
end
self.thumbnail = nil
self.thumbnailType = nil
end,
["OnRelease"] = function(self)
self:ReleaseThumnail()
if(self.iconRegion and self.iconRegion.Hide) then
self.iconRegion:Hide();
end
self.icon:Hide();
self.frame:UnlockHighlight();
end
}
--[[-----------------------------------------------------------------------------
Constructor
-------------------------------------------------------------------------------]]
local function Constructor()
local name = "WeakAurasDisplayButton"..AceGUI:GetNextWidgetNum(Type);
local button = CreateFrame("BUTTON", name, UIParent, "OptionsListButtonTemplate");
button:SetHeight(40);
button:SetWidth(380);
button.dgroup = nil;
local background = button:CreateTexture(nil, "BACKGROUND");
button.background = background;
background:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight2.blp");
background:SetBlendMode("ADD");
background:SetVertexColor(0.5, 0.5, 0.5, 0.25);
background:SetAllPoints(button);
local icon = button:CreateTexture(nil, "OVERLAY");
button.icon = icon;
icon:SetWidth(40);
icon:SetHeight(40);
icon:SetPoint("LEFT", button, "LEFT");
local title = button:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge");
button.title = title;
title:SetHeight(14);
title:SetJustifyH("LEFT");
title:SetPoint("TOP", button, "TOP", 0, -5);
title:SetPoint("LEFT", icon, "RIGHT", 2, 0);
title:SetPoint("RIGHT", button, "RIGHT");
local description = button:CreateFontString(nil, "OVERLAY", "GameFontHighlight");
button.description = description;
description:SetHeight(14);
description:SetJustifyH("LEFT");
description:SetPoint("BOTTOM", button, "BOTTOM", 0, 2);
description:SetPoint("LEFT", icon, "RIGHT", 2, 0);
description:SetPoint("RIGHT", button, "RIGHT");
button.description = "";
button:SetScript("OnEnter", function() Show_Tooltip(button, title:GetText(), button.description) end);
button:SetScript("OnLeave", Hide_Tooltip);
local widget = {
frame = button,
title = title,
icon = icon,
description = description,
background = background,
type = Type
}
for method, func in pairs(methods) do
widget[method] = func
end
return AceGUI:RegisterAsWidget(widget)
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)
@@ -0,0 +1,85 @@
if not WeakAuras.IsCorrectVersion() then return end
local Type, Version = "WeakAurasNewHeaderButton", 20
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
local L = WeakAuras.L;
local function Hide_Tooltip()
GameTooltip:Hide();
end
local function Show_Tooltip(owner, line1, line2)
GameTooltip:SetOwner(owner, "ANCHOR_NONE");
GameTooltip:SetPoint("LEFT", owner, "RIGHT");
GameTooltip:ClearLines();
GameTooltip:AddLine(line1);
GameTooltip:AddLine(line2, 1, 1, 1, 1);
GameTooltip:Show();
end
--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
local methods = {
["OnAcquire"] = function(self)
self:SetWidth(1000);
self:SetHeight(20);
end,
["SetText"] = function(self, text)
self.frame:SetText(" "..text);
end,
["SetDescription"] = function(self, description)
self.frame.description = description;
end,
["SetClick"] = function(self, func)
self.frame:SetScript("OnClick", func);
end,
["Disable"] = function(self)
self.frame:Disable();
end,
["Enable"] = function(self)
self.frame:Enable();
end,
["Pick"] = function(self)
self.frame:LockHighlight();
end,
["ClearPick"] = function(self)
self.frame:UnlockHighlight();
end
}
--[[-----------------------------------------------------------------------------
Constructor
-------------------------------------------------------------------------------]]
local function Constructor()
local name = Type..AceGUI:GetNextWidgetNum(Type)
local button = CreateFrame("BUTTON", name, UIParent, "OptionsListButtonTemplate");
button:SetHeight(20);
button:SetWidth(1000);
button:SetDisabledFontObject("GameFontNormal");
local background = button:CreateTexture(nil, "BACKGROUND");
button.background = background;
background:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight2.blp");
background:SetBlendMode("ADD");
background:SetVertexColor(0.5, 0.5, 0.5, 0.25);
background:SetAllPoints(button);
button:SetScript("OnEnter", function() Show_Tooltip(button, button:GetText():sub(2), button.description or L["Add a new display"]) end);
button:SetScript("OnLeave", Hide_Tooltip);
local widget = {
frame = button,
type = Type
}
for method, func in pairs(methods) do
widget[method] = func
end
return AceGUI:RegisterAsWidget(widget)
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)
@@ -0,0 +1,237 @@
--[[-----------------------------------------------------------------------------
SnippetButton Widget, based on AceGUI Button (and WA ToolbarButton)
Graphical Button.
-------------------------------------------------------------------------------]]
local Type, Version = "WeakAurasSnippetButton", 1
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then
return
end
-- Lua APIs
local pairs = pairs
-- WoW APIs
local _G = _G
local PlaySound, CreateFrame, UIParent = PlaySound, CreateFrame, UIParent
local L = WeakAuras.L
--[[-----------------------------------------------------------------------------
Scripts
-------------------------------------------------------------------------------]]
local function Button_OnClick(frame, ...)
if ... == "RightButton" and frame.editable then
AceGUI:ClearFocus()
PlaySound(852) -- SOUNDKIT.IG_MAINMENU_OPTION
frame.title:Hide()
frame.renameEditBox:Show()
frame.renameEditBox:Enable()
frame.renameEditBox:SetText(frame.title:GetText())
frame.renameEditBox:HighlightText()
frame.renameEditBox:SetFocus()
elseif ... == "LeftButton" then
AceGUI:ClearFocus()
PlaySound(852) -- SOUNDKIT.IG_MAINMENU_OPTION
frame.obj:Fire("OnClick", ...)
end
end
local function Control_OnEnter(frame)
local tooltip = GameTooltip
tooltip:SetOwner(frame, "ANCHOR_RIGHT")
tooltip:ClearLines()
if frame.editable then
tooltip:AddDoubleLine(frame.titleText, L["(Right click to rename)"], nil, nil, nil, 0.6, 0.6, 0.6)
else
tooltip:AddLine(frame.titleText)
end
tooltip:AddLine(" ")
tooltip:AddLine(frame.descriptionText, 0.8, 0.8, 0.8)
tooltip:Show()
frame.obj:Fire("OnEnter")
end
local function Control_OnLeave(frame)
GameTooltip:Hide()
frame.obj:Fire("OnLeave")
end
local function rename_complete(self, ...)
self:ClearFocus()
AceGUI:ClearFocus()
self:EnableMouse(false)
self:Hide()
self:GetParent().obj:Fire("OnEnterPressed", ...)
end
--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
local methods = {
["OnAcquire"] = function(self)
-- restore default values
self:SetDisabled(false)
self:SetTitle()
self:SetEditable(false)
end,
-- ["OnRelease"] = nil,
["SetTitle"] = function(self, text)
self.frame.titleText = text
self.title:SetText(text)
end,
["SetDescription"] = function(self, text)
self.frame.descriptionText = text
end,
["SetDisabled"] = function(self, disabled)
self.disabled = disabled
if disabled then
self.frame:Disable()
else
self.frame:Enable()
end
end,
["LockHighlight"] = function(self)
self.frame:LockHighlight()
end,
["UnlockHighlight"] = function(self)
self.frame:UnlockHighlight()
end,
["SetEditable"] = function(self, editable)
if editable then
self.frame.editable = true
self.deleteButton:Show()
self.title:SetPoint("RIGHT", self.deleteButton, "LEFT")
else
self.frame.editable = false
self.deleteButton:Hide()
self.title:SetPoint("RIGHT", self.deleteButton, "RIGHT", 4, 0)
end
end,
["SetNew"] = function(self, new)
if new then
AceGUI:ClearFocus()
self.title:Hide()
self.renameEditBox:Show()
self.renameEditBox:EnableMouse(true)
self.renameEditBox:SetText(self.title:GetText())
self.renameEditBox:HighlightText()
self.renameEditBox:SetFocus()
end
end
}
--[[-----------------------------------------------------------------------------
Constructor
-------------------------------------------------------------------------------]]
local function Constructor()
local name = "WeakAurasSnippetButton" .. AceGUI:GetNextWidgetNum(Type)
local button = CreateFrame("Button", name, UIParent, "OptionsListButtonTemplate")
button:Hide()
button:EnableMouse(true)
button:SetScript("OnClick", Button_OnClick)
button:SetScript("OnEnter", Control_OnEnter)
button:SetScript("OnLeave", Control_OnLeave)
button:SetHeight(24)
button:SetWidth(170)
local deleteButton = CreateFrame("BUTTON", nil, button)
deleteButton:SetPoint("RIGHT", button, "RIGHT", -3, 0)
deleteButton:SetSize(20, 20)
local deleteTex = deleteButton:CreateTexture()
deleteTex:SetAllPoints()
deleteTex:SetTexture([[Interface\Buttons\CancelButton-Up]])
deleteTex:SetTexCoord(0.1, 0.9, 0.1, 0.9)
deleteButton:SetNormalTexture(deleteTex)
deleteButton:Hide()
button.deleteButton = deleteButton
local title = button:CreateFontString(nil, "OVERLAY", "GameFontHighlightLarge")
title:SetHeight(14)
title:SetJustifyH("LEFT")
title:SetPoint("LEFT", button, "LEFT", 3, 0)
title:SetPoint("RIGHT", deleteButton, "LEFT")
title:SetTextColor(1, 1, 1, 1)
button.title = title
local ntex = button:CreateTexture()
ntex:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight2.blp")
ntex:SetVertexColor(0.8, 0.8, 0.8, 0.25)
ntex:SetPoint("TOPLEFT", 0, -1)
ntex:SetPoint("BOTTOMRIGHT", 0, 1)
button:SetNormalTexture(ntex)
local htex = button:CreateTexture()
htex:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight2.blp")
htex:SetVertexColor(0.3, 0.5, 1, 0.5)
htex:SetBlendMode("ADD")
htex:SetAllPoints(ntex)
button:SetHighlightTexture(htex)
button.htex = htex
local ptex = button:CreateTexture()
ptex:SetTexture(1, 1, 1, 0.2)
htex:SetAllPoints(ntex)
button:SetPushedTexture(ptex)
button.ptext = ptex
local delHighlight = deleteButton:CreateTexture()
delHighlight:SetTexture([[Interface\Buttons\CancelButton-Highlight]])
delHighlight:SetTexCoord(0.1, 0.9, 0.1, 0.9)
delHighlight:SetAllPoints()
deleteButton:SetHighlightTexture(delHighlight)
local delPushed = deleteButton:CreateTexture()
delPushed:SetTexture([[Interface\Buttons\CancelButton-Down]])
delPushed:SetTexCoord(0.1, 0.9, 0.1, 0.9)
delPushed:SetAllPoints()
deleteButton:SetPushedTexture(delPushed)
button.deleteHighlight = delHighlight
local renameEditBox = CreateFrame("EditBox", nil, button, "InputBoxTemplate")
renameEditBox:SetHeight(14)
renameEditBox:SetPoint("TOPLEFT", title, "TOPLEFT")
renameEditBox:SetPoint("BOTTOMRIGHT", title, "BOTTOMRIGHT")
renameEditBox:EnableMouse(false)
renameEditBox:Hide()
renameEditBox:SetScript(
"OnEscapePressed",
function(self)
self:ClearFocus()
AceGUI:ClearFocus()
self:EnableMouse(false)
self:Hide()
title:Show()
end
)
renameEditBox:SetScript(
"OnEditFocusLost",
function(self)
self:ClearFocus()
AceGUI:ClearFocus()
self:EnableMouse(false)
self:Hide()
title:Show()
end
)
renameEditBox:SetScript("OnEnterPressed", rename_complete)
button.renameEditBox = renameEditBox
local widget = {
title = title,
frame = button,
type = Type,
htex = htex,
ptex = ptex,
deleteButton = deleteButton,
renameEditBox = renameEditBox
}
for method, func in pairs(methods) do
widget[method] = func
end
return AceGUI:RegisterAsWidget(widget)
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)
@@ -0,0 +1,42 @@
if not WeakAuras.IsCorrectVersion() then return end
local Type, Version = "WeakAurasSortedDropdown", 1
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
local function Constructor()
local DropDownConstructor = AceGUI.WidgetRegistry["Dropdown"];
if (not DropDownConstructor) then
return nil;
end
local widget = DropDownConstructor();
if (not widget) then
return nil;
end
local oldSetList = widget.SetList
widget.SetList = function(self, list, _, itemType)
local orderTable = {};
for k, v in pairs(list) do
tinsert(orderTable, { key = k, value = v });
end
local order = {};
table.sort(orderTable, function(a, b)
return a.value < b.value;
end);
for i, item in ipairs(orderTable) do
order[i] = item.key;
end
oldSetList(self, list, order, itemType)
end
widget.type = Type;
return widget;
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)
@@ -0,0 +1,128 @@
if not WeakAuras.IsCorrectVersion() then return end
local Type, Version = "WeakAurasTextureButton", 23
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
local function Hide_Tooltip()
GameTooltip:Hide();
end
local function Show_Tooltip(owner, line1, line2)
GameTooltip:SetOwner(owner, "ANCHOR_NONE");
GameTooltip:SetPoint("BOTTOM", owner, "TOP");
GameTooltip:ClearLines();
GameTooltip:AddLine(line1);
GameTooltip:AddLine(line2, 1, 1, 1, 1);
GameTooltip:Show();
end
--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
local methods = {
["OnAcquire"] = function(self)
self:SetWidth(128);
self:SetHeight(128);
end,
["OnRelease"] = function(self)
self:ClearPick();
self.texture:SetTexture();
end,
["SetTexture"] = function(self, texturePath, name)
self.texture:SetTexture(texturePath);
self.texture.path = texturePath;
self.texture.name = name;
end,
["ChangeTexture"] = function(self, r, g, b, a, rotate, discrete_rotation, rotation, mirror, blendMode)
local ulx,uly , llx,lly , urx,ury , lrx,lry;
if(rotate) then
local angle = rad(135 - rotation);
local vx = math.cos(angle);
local vy = math.sin(angle);
ulx,uly , llx,lly , urx,ury , lrx,lry = 0.5+vx,0.5-vy , 0.5-vy,0.5-vx , 0.5+vy,0.5+vx , 0.5-vx,0.5+vy;
else
if(discrete_rotation == 0 or discrete_rotation == 360) then
ulx,uly , llx,lly , urx,ury , lrx,lry = 0,0 , 0,1 , 1,0 , 1,1;
elseif(discrete_rotation == 90) then
ulx,uly , llx,lly , urx,ury , lrx,lry = 1,0 , 0,0 , 1,1 , 0,1;
elseif(discrete_rotation == 180) then
ulx,uly , llx,lly , urx,ury , lrx,lry = 1,1 , 1,0 , 0,1 , 0,0;
elseif(discrete_rotation == 270) then
ulx,uly , llx,lly , urx,ury , lrx,lry = 0,1 , 1,1 , 0,0 , 1,0;
end
end
if(mirror) then
self.texture:SetTexCoord(urx,ury , lrx,lry , ulx,uly , llx,lly);
else
self.texture:SetTexCoord(ulx,uly , llx,lly , urx,ury , lrx,lry);
end
self.texture:SetVertexColor(r, g, b, a);
self.texture:SetBlendMode(blendMode);
end,
["SetTexCoord"] = function(self, left, right, top, bottom)
self.texture:SetTexCoord(left, right, top, bottom);
end,
["SetOnUpdate"] = function(self, func)
self.frame:SetScript("OnUpdate", func);
end,
["GetTexturePath"] = function(self)
return self.texture.path;
end,
["SetClick"] = function(self, func)
self.frame:SetScript("OnClick", func);
end,
["Pick"] = function(self)
self.frame:LockHighlight();
end,
["ClearPick"] = function(self)
self.frame:UnlockHighlight();
end
}
--[[-----------------------------------------------------------------------------
Constructor
-------------------------------------------------------------------------------]]
local function Constructor()
local name = "WeakAurasTextureButton"..AceGUI:GetNextWidgetNum(Type);
local button = CreateFrame("BUTTON", name, UIParent, "OptionsListButtonTemplate");
button:SetHeight(128);
button:SetWidth(128);
button:SetBackdrop({
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true, tileSize = 16, edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 }
});
button:SetBackdropColor(0.1,0.1,0.1);
button:SetBackdropBorderColor(0.4,0.4,0.4);
local highlighttexture = button:CreateTexture(nil, "OVERLAY");
highlighttexture:SetTexture("Interface\\BUTTONS\\ButtonHilight-SquareQuickslot.blp");
highlighttexture:SetTexCoord(0.175, 0.875, 0.125, 0.825);
highlighttexture:SetPoint("BOTTOMLEFT", button, 4, 4);
highlighttexture:SetPoint("TOPRIGHT", button, -4, -4);
button:SetHighlightTexture(highlighttexture);
local texture = button:CreateTexture(nil, "OVERLAY");
texture:SetPoint("BOTTOMLEFT", button, 4, 4);
texture:SetPoint("TOPRIGHT", button, -4, -4);
button:SetScript("OnEnter", function() Show_Tooltip(button, texture.name, texture.path:gsub("\\", "\n")) end);
button:SetScript("OnLeave", Hide_Tooltip);
local widget = {
frame = button,
texture = texture,
type = Type
}
for method, func in pairs(methods) do
widget[method] = func
end
return AceGUI:RegisterAsWidget(widget)
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)
@@ -0,0 +1,142 @@
--[[-----------------------------------------------------------------------------
ToolbarButton Widget, based on AceGUI Button
Graphical Button.
-------------------------------------------------------------------------------]]
local Type, Version = "WeakAurasToolbarButton", 3
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-- Lua APIs
local pairs = pairs
-- WoW APIs
local _G = _G
local PlaySound, CreateFrame, UIParent = PlaySound, CreateFrame, UIParent
--[[-----------------------------------------------------------------------------
Scripts
-------------------------------------------------------------------------------]]
local function Button_OnClick(frame, ...)
AceGUI:ClearFocus()
PlaySound(852) -- SOUNDKIT.IG_MAINMENU_OPTION
frame.obj:Fire("OnClick", ...)
end
local function Control_OnEnter(frame)
frame.obj:Fire("OnEnter")
end
local function Control_OnLeave(frame)
frame.obj:Fire("OnLeave")
end
--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
local methods = {
["OnAcquire"] = function(self)
-- restore default values
self:SetHeight(16)
self:SetWidth(32)
self:SetDisabled(false)
self:SetText()
self.htex:SetVertexColor(1, 1, 1, 0.1)
end,
-- ["OnRelease"] = nil,
["SetText"] = function(self, text)
self.text:SetText(text)
self:SetWidth(self.text:GetStringWidth() + 24)
end,
["SetDisabled"] = function(self, disabled)
self.disabled = disabled
if disabled then
self.frame:Disable()
else
self.frame:Enable()
end
end,
["SetTexture"] = function(self, path)
self.icon:SetTexture(path)
end,
["LockHighlight"] = function(self)
self.frame:LockHighlight()
end,
["UnlockHighlight"] = function(self)
self.frame:UnlockHighlight()
end,
["SetStrongHighlight"] = function(self, enable)
if enable then
self.htex:SetVertexColor(1, 1, 1, 0.3)
else
self.htex:SetVertexColor(1, 1, 1, 0.1)
end
end
}
--[[-----------------------------------------------------------------------------
Constructor
-------------------------------------------------------------------------------]]
local function Constructor()
local name = "AceGUI30Button" .. AceGUI:GetNextWidgetNum(Type)
local frame = CreateFrame("Button", name, UIParent)
frame:Hide()
frame:EnableMouse(true)
frame:SetScript("OnClick", Button_OnClick)
frame:SetScript("OnEnter", Control_OnEnter)
frame:SetScript("OnLeave", Control_OnLeave)
local icon = frame:CreateTexture()
icon:SetTexture("aaa")
icon:SetPoint("TOPLEFT", frame, "TOPLEFT")
icon:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT")
icon:SetWidth(16)
local text = frame:CreateFontString()
text:SetFontObject("GameFontNormal")
text:ClearAllPoints()
text:SetPoint("TOPLEFT", 20, -1)
text:SetPoint("BOTTOMRIGHT", -4, 1)
text:SetJustifyV("MIDDLE")
--local ntex = frame:CreateTexture()
--ntex:SetTexture("Interface/Buttons/UI-Panel-Button-Up")
--ntex:SetTexCoord(0, 0.625, 0, 0.6875)
--ntex:SetAllPoints()
--frame:SetNormalTexture(ntex)
local htex = frame:CreateTexture()
htex:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite")
htex:SetVertexColor(1, 1, 1, 0.1)
htex:SetAllPoints()
frame:SetHighlightTexture(htex)
local ptex = frame:CreateTexture()
ptex:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite")
ptex:SetVertexColor(1, 1, 1, 0.2)
ptex:SetAllPoints()
frame:SetPushedTexture(ptex)
local widget = {
text = text,
icon = icon,
frame = frame,
type = Type,
htex = htex
}
for method, func in pairs(methods) do
widget[method] = func
end
return AceGUI:RegisterAsWidget(widget)
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)
@@ -0,0 +1,270 @@
if not WeakAuras.IsCorrectVersion() then return end
local Type, Version = "WeakAurasTwoColumnDropdown", 3
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
local tconcat = table.concat
local select = select
local assert, loadstring = assert, loadstring
local setmetatable, rawset = setmetatable, rawset
local xpcall = xpcall
local function errorhandler(err)
return geterrorhandler()(err)
end
local function CreateDispatcher(argCount)
local code = [[
local xpcall, eh = ...
local method, ARGS
local function call() return method(ARGS) end
local function dispatch(func, ...)
method = func
if not method then return end
ARGS = ...
return xpcall(call, eh)
end
return dispatch
]]
local ARGS = {}
for i = 1, argCount do ARGS[i] = "arg"..i end
code = code:gsub("ARGS", tconcat(ARGS, ", "))
return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler)
end
local Dispatchers = setmetatable({}, {__index=function(self, argCount)
local dispatcher = CreateDispatcher(argCount)
rawset(self, argCount, dispatcher)
return dispatcher
end})
Dispatchers[0] = function(func)
return xpcall(func, errorhandler)
end
local function safecall(func, ...)
return Dispatchers[select("#", ...)](func, ...)
end
AceGUI:RegisterLayout("TwoColumn",
function(content, children)
local height = 0
local width = content.width or content:GetWidth() or 0
for i = 1, #children do
local child = children[i]
local frame = child.frame
frame:ClearAllPoints()
if child.userdata.hideMe then
frame:Hide()
else
frame:Show()
end
if i == 1 then
frame:SetPoint("TOPLEFT", content)
else
frame:SetPoint("TOPLEFT", children[i-1].frame, "TOPRIGHT")
end
if child.width == "relative" then
child:SetWidth(width * child.relWidth)
if child.DoLayout then
child:DoLayout()
end
end
height = max(height, frame.height or frame:GetHeight() or 0)
end
safecall(content.obj.LayoutFinished, content.obj, nil, height)
end)
local methods = {
["OnAcquire"] = function(widget)
local firstDropdown = AceGUI:Create("Dropdown")
local secondDropDown = AceGUI:Create("Dropdown")
firstDropdown:SetRelativeWidth(0.5)
firstDropdown:SetPulloutWidth(200)
secondDropDown:SetRelativeWidth(0.5)
secondDropDown:SetLabel(" ")
secondDropDown:SetPulloutWidth(200)
secondDropDown.userdata.defaultSelection = {}
widget.firstDropdown = firstDropdown
widget.secondDropDown = secondDropDown
widget:SetLayout("TwoColumn")
widget.SetLayout = function()
-- AceGui wants to set a default layout, but we don't want that
end
widget:AddChild(firstDropdown)
widget:AddChild(secondDropDown)
local OnFirstDropdownValueChanged = function(self, event, value)
local displayName = widget.userdata.firstList[value]
local treeValue = widget.userdata.tree[displayName]
if type(treeValue) == "table" then
local oldValue
if widget.userdata.secondList then
local v = widget.secondDropDown:GetValue()
if v then
oldValue = widget.userdata.secondList[v]
end
end
local secondList = {}
for displayName, _ in pairs(treeValue) do
tinsert(secondList, displayName)
end
table.sort(secondList)
local oldValueIndex = tIndexOf(secondList, oldValue)
widget.userdata.secondList = secondList
widget.secondDropDown:SetList(secondList)
widget.firstDropdown:SetRelativeWidth(0.5)
widget.secondDropDown:SetRelativeWidth(0.5)
widget.secondDropDown.userdata.hideMe = false
widget:DoLayout()
if (oldValueIndex) then
widget.secondDropDown:SetValue(oldValueIndex)
local v = widget:GetValue()
if (v) then
widget:Fire("OnValueChanged", v)
end
else
local default = widget.secondDropDown.userdata.defaultSelection[displayName]
if default then
local index = tIndexOf(secondList, default)
widget.secondDropDown:SetValue(index)
local v = widget:GetValue()
if (v) then
widget:Fire("OnValueChanged", v)
end
else
widget.secondDropDown:SetValue()
end
end
else
widget.firstDropdown:SetRelativeWidth(1)
widget.secondDropDown.userdata.hideMe = true
widget.userdata.secondList = nil
widget:DoLayout()
widget:Fire("OnValueChanged", treeValue)
end
end
firstDropdown.OnFirstDropdownValueChanged = OnFirstDropdownValueChanged
local OnSecondDropdownValueChanged = function(self, event, value)
widget:Fire("OnValueChanged", widget:GetValue())
end
firstDropdown:SetCallback("OnValueChanged", OnFirstDropdownValueChanged)
secondDropDown:SetCallback("OnValueChanged", OnSecondDropdownValueChanged)
end,
["OnRelease"] = function(self)
end,
["SetLabel"] = function(self, ...)
self.firstDropdown:SetLabel(...)
end,
["SetValue"] = function(self, value)
for displayName, treeValue in pairs(self.userdata.tree) do
if treeValue == value then
self.firstDropdown:SetRelativeWidth(1)
self.secondDropDown.userdata.hideMe = true
self:DoLayout()
self.firstDropdown:SetValue(tIndexOf(self.userdata.firstList, displayName))
return
elseif type(treeValue) == "table" then
for displayName2, key in pairs(treeValue) do
if (key == value) then
self.firstDropdown:SetRelativeWidth(0.5)
self.secondDropDown:SetRelativeWidth(0.5)
self.secondDropDown.userdata.hideMe = false
self:DoLayout()
local index = tIndexOf(self.userdata.firstList, displayName);
self.firstDropdown:SetValue(index)
self.firstDropdown:OnFirstDropdownValueChanged("", index)
self.secondDropDown:SetValue(tIndexOf(self.userdata.secondList, displayName2))
return
end
end
end
end
self.firstDropdown:SetRelativeWidth(1)
self.secondDropDown.userdata.hideMe = true
self:DoLayout()
self.firstDropdown:SetValue(nil)
end,
["GetValue"] = function(self)
local displayName1 = self.userdata.firstList[self.firstDropdown:GetValue()]
local treeValue = self.userdata.tree[displayName1]
if not treeValue then
return nil
end
if type(treeValue) ~= "table" then
return treeValue
end
local displayName2 = self.userdata.secondList[self.secondDropDown:GetValue()]
treeValue = treeValue[displayName2]
if not treeValue then
return nil
end
return treeValue
end,
["SetList"] = function(self, list, order, itemType)
local tree = {}
for key, displayName in pairs(list) do
if type(displayName) == "table" then
local base = displayName[1]
local suffix = displayName[2]
tree[base] = tree[base] or {}
tree[base][suffix] = key
if displayName[3] == true then
self.secondDropDown.userdata.defaultSelection[base] = suffix
end
else
tree[displayName] = key
end
end
self.userdata.tree = tree
local firstList = {}
for displayName, _ in pairs(tree) do
tinsert(firstList, displayName)
end
table.sort(firstList)
self.userdata.firstList = firstList
self.firstDropdown:SetList(firstList, order, itemType)
end
}
local function Constructor()
local frame = CreateFrame("Frame", nil, UIParent)
frame:SetHeight(50)
frame:SetWidth(50)
local content = CreateFrame("Frame", nil, frame)
content:SetPoint("TOPLEFT", 0, 0)
content:SetPoint("BOTTOMRIGHT", 0, 0)
local widget = {
frame = frame,
content = content,
type = Type
}
for method, func in pairs(methods) do
widget[method] = func
end
return AceGUI:RegisterAsContainer(widget)
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)
+855
View File
@@ -0,0 +1,855 @@
if not WeakAuras.IsCorrectVersion() then return end
local L = WeakAuras.L
local send_chat_message_types = WeakAuras.send_chat_message_types;
local sound_types = WeakAuras.sound_types;
local RestrictedChannelCheck = function(data)
return data.message_type == "SAY" or data.message_type == "YELL" or data.message_type == "SMARTRAID"
end
function WeakAuras.AddActionOption(id, data)
local action = {
type = "group",
name = L["Actions"],
order = 50,
get = function(info)
local split = info[#info]:find("_");
if(split) then
local field, value = info[#info]:sub(1, split-1), info[#info]:sub(split+1);
if(data.actions and data.actions[field]) then
if (info.type == "color") then
if type(data.actions[field][value]) == "table" then
local c = data.actions[field][value]
return c[1], c[2], c[3], c[4];
else
return 1, 1, 1, 1
end
else
return data.actions[field][value];
end
else
return nil;
end
end
end,
set = function(info, v, g, b, a)
local split = info[#info]:find("_");
local field, value = info[#info]:sub(1, split-1), info[#info]:sub(split+1);
data.actions = data.actions or {};
data.actions[field] = data.actions[field] or {};
if (info.type == "color") then
if not data.actions[field][value] or type(data.actions[field][value]) ~= "table" then
data.actions[field][value] = {}
end
local c = data.actions[field][value]
c[1], c[2], c[3], c[4] = v, g, b, a;
else
data.actions[field][value] = v;
end
if(value == "sound" or value == "sound_path") then
pcall(PlaySoundFile, v, "Master");
elseif(value == "sound_kit_id") then
pcall(PlaySound, v, "Master");
end
WeakAuras.Add(data);
end,
args = {
init_header = {
type = "header",
name = L["On Init"],
order = 0.005
},
init_do_custom = {
type = "toggle",
name = L["Custom"],
order = 0.011,
width = WeakAuras.doubleWidth
},
-- texteditor added here by AddCodeOption
start_header = {
type = "header",
name = L["On Show"],
order = 0.5
},
start_do_message = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Chat Message"],
order = 1
},
start_message_type = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Message Type"],
order = 2,
values = send_chat_message_types,
disabled = function() return not data.actions.start.do_message end,
control = "WeakAurasSortedDropdown"
},
start_message_warning = {
type = "description",
width = WeakAuras.doubleWidth,
name = L["Note: Automated Messages to SAY and YELL are blocked outside of Instances."],
order = 2.5,
hidden = function() return not RestrictedChannelCheck(data.actions.start) end
},
start_message_space = {
type = "execute",
width = WeakAuras.normalWidth,
name = "",
order = 3,
image = function() return "", 0, 0 end,
hidden = function() return not(data.actions.start.message_type == "WHISPER" or data.actions.start.message_type == "CHANNEL" or data.actions.start.message_type == "COMBAT" or data.actions.start.message_type == "PRINT") end
},
start_message_color = {
type = "color",
width = WeakAuras.normalWidth,
name = L["Color"],
order = 3,
hasAlpha = false,
hidden = function() return not(data.actions.start.message_type == "COMBAT" or data.actions.start.message_type == "PRINT") end,
get = function() return data.actions.start.r or 1, data.actions.start.g or 1, data.actions.start.b or 1 end,
set = function(info, r, g, b)
data.actions.start.r = r;
data.actions.start.g = g;
data.actions.start.b = b;
WeakAuras.Add(data);
end
},
start_message_dest = {
type = "input",
width = WeakAuras.normalWidth,
name = L["Send To"],
order = 4,
disabled = function() return not data.actions.start.do_message end,
hidden = function() return data.actions.start.message_type ~= "WHISPER" end
},
start_message_channel = {
type = "input",
width = WeakAuras.normalWidth,
name = L["Channel Number"],
order = 4,
disabled = function() return not data.actions.start.do_message end,
hidden = function() return data.actions.start.message_type ~= "CHANNEL" end
},
start_message = {
type = "input",
width = WeakAuras.doubleWidth,
name = L["Message"],
order = 5,
disabled = function() return not data.actions.start.do_message end,
desc = function()
return L["Dynamic text tooltip"] .. WeakAuras.GetAdditionalProperties(data)
end,
},
-- texteditor added later
start_do_sound = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Play Sound"],
order = 7
},
start_do_loop = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Loop"],
order = 7.1,
disabled = function() return not data.actions.start.do_sound end,
},
start_sound_repeat = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Repeat After"],
order = 7.2,
hidden = function() return not data.actions.start.do_loop end,
disabled = function() return not data.actions.start.do_sound end,
},
start_sound_repeat_space = {
type = "description",
width = WeakAuras.normalWidth,
order = 7.3,
name = "",
hidden = function() return not data.actions.start.do_loop end,
},
start_sound = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Sound"],
order = 8,
values = sound_types,
disabled = function() return not data.actions.start.do_sound end,
control = "WeakAurasSortedDropdown"
},
start_sound_channel = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Sound Channel"],
order = 8.5,
values = WeakAuras.sound_channel_types,
disabled = function() return not data.actions.start.do_sound end,
get = function() return data.actions.start.sound_channel or "Master" end
},
start_sound_path = {
type = "input",
width = WeakAuras.doubleWidth,
name = L["Sound File Path"],
order = 9,
hidden = function() return data.actions.start.sound ~= " custom" end,
disabled = function() return not data.actions.start.do_sound end
},
start_sound_kit_id = {
type = "input",
width = WeakAuras.doubleWidth,
name = L["Sound Kit ID"],
order = 9,
hidden = function() return data.actions.start.sound ~= " KitID" end,
disabled = function() return not data.actions.start.do_sound end
},
start_do_glow = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Glow External Element"],
order = 10.1
},
start_glow_action = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Glow Action"],
order = 10.2,
values = WeakAuras.glow_action_types,
disabled = function() return not data.actions.start.do_glow end
},
start_glow_frame_type = {
type = "select",
width = WeakAuras.normalWidth,
desc = function()
return data.actions.start.glow_frame_type == "UNITFRAME"
and L["Require unit from trigger"] or nil
end,
name = L["Glow Frame Type"],
order = 10.3,
values = {
UNITFRAME = L["Unit Frame"],
FRAMESELECTOR = L["Frame Selector"]
},
hidden = function()
return not data.actions.start.do_glow
or data.actions.start.glow_action == nil
end
},
start_glow_type_spacer = {
type = "description",
width = WeakAuras.normalWidth,
name = "",
order = 10.35,
hidden = function()
return not data.actions.start.do_glow
or not (data.actions.start.glow_action == "hide" and data.actions.start.glow_frame_type == "FRAMESELECTOR")
end,
},
start_glow_type = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Glow Type"],
order = 10.4,
values = WeakAuras.glow_types,
hidden = function()
return not data.actions.start.do_glow
or data.actions.start.glow_action ~= "show"
or data.actions.start.glow_frame_type == nil
end,
},
start_glow_frame = {
type = "input",
width = WeakAuras.normalWidth,
name = L["Frame"],
order = 10.5,
hidden = function()
return not data.actions.start.do_glow
or data.actions.start.glow_frame_type ~= "FRAMESELECTOR"
end
},
start_choose_glow_frame = {
type = "execute",
width = WeakAuras.normalWidth,
name = L["Choose"],
order = 10.55,
hidden = function() return not data.actions.start.do_glow or data.actions.start.glow_frame_type ~= "FRAMESELECTOR" end,
func = function()
if(data.controlledChildren and data.controlledChildren[1]) then
WeakAuras.PickDisplay(data.controlledChildren[1]);
WeakAuras.StartFrameChooser(WeakAuras.GetData(data.controlledChildren[1]), {"actions", "start", "glow_frame"});
else
WeakAuras.StartFrameChooser(data, {"actions", "start", "glow_frame"});
end
end
},
start_use_glow_color = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Glow Color"],
order = 10.7,
hidden = function()
return not data.actions.start.do_glow
or data.actions.start.glow_action ~= "show"
or data.actions.start.glow_frame_type == nil
or data.actions.start.glow_type == nil
end,
},
start_glow_color = {
type = "color",
width = WeakAuras.normalWidth,
name = L["Glow Color"],
order = 10.8,
hidden = function()
return not data.actions.start.do_glow
or data.actions.start.glow_action ~= "show"
or data.actions.start.glow_frame_type == nil
or data.actions.start.glow_type == nil
end,
disabled = function() return not data.actions.start.use_glow_color end,
},
start_glow_lines = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Lines & Particles"],
order = 10.81,
min = 1,
softMax = 30,
step = 1,
get = function()
return data.actions.start.glow_lines or 8
end,
hidden = function()
return not data.actions.start.do_glow
or data.actions.start.glow_action ~= "show"
or not data.actions.start.glow_type
or data.actions.start.glow_type == "buttonOverlay"
or data.actions.start.glow_frame_type == nil
end,
},
start_glow_frequency = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Frequency"],
order = 10.82,
softMin = -2,
softMax = 2,
step = 0.05,
get = function()
return data.actions.start.glow_frequency or 0.25
end,
hidden = function()
return not data.actions.start.do_glow
or data.actions.start.glow_action ~= "show"
or not data.actions.start.glow_type
or data.actions.start.glow_type == "buttonOverlay"
or data.actions.start.glow_frame_type == nil
end,
},
start_glow_length = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Length"],
order = 10.83,
min = 0.05,
softMax = 20,
step = 0.05,
get = function()
return data.actions.start.glow_length or 10
end,
hidden = function()
return not data.actions.start.do_glow
or data.actions.start.glow_action ~= "show"
or data.actions.start.glow_type ~= "Pixel"
or data.actions.start.glow_frame_type == nil
end,
},
start_glow_thickness = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Thickness"],
order = 10.84,
min = 0.05,
softMax = 20,
step = 0.05,
get = function()
return data.actions.start.glow_thickness or 1
end,
hidden = function()
return not data.actions.start.do_glow
or data.actions.start.glow_action ~= "show"
or data.actions.start.glow_type ~= "Pixel"
or data.actions.start.glow_frame_type == nil
end,
},
start_glow_XOffset = {
type = "range",
width = WeakAuras.normalWidth,
name = L["X-Offset"],
order = 10.85,
softMin = -100,
softMax = 100,
step = 0.5,
hidden = function()
return not data.actions.start.do_glow
or data.actions.start.glow_action ~= "show"
or not data.actions.start.glow_type
or data.actions.start.glow_type == "buttonOverlay"
or data.actions.start.glow_frame_type == nil
end,
},
start_glow_YOffset = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Y-Offset"],
order = 10.86,
softMin = -100,
softMax = 100,
step = 0.5,
hidden = function()
return not data.actions.start.do_glow
or data.actions.start.glow_action ~= "show"
or not data.actions.start.glow_type
or data.actions.start.glow_type == "buttonOverlay"
or data.actions.start.glow_frame_type == nil
end,
},
start_glow_scale = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Scale"],
order = 10.87,
min = 0.05,
softMax = 10,
step = 0.05,
isPercent = true,
get = function()
return data.actions.start.glow_scale or 1
end,
hidden = function()
return not data.actions.start.do_glow
or data.actions.start.glow_action ~= "show"
or data.actions.start.glow_type ~= "ACShine"
or data.actions.start.glow_frame_type == nil
end,
},
start_glow_border = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Border"],
order = 10.88,
hidden = function()
return not data.actions.start.do_glow
or data.actions.start.glow_action ~= "show"
or data.actions.start.glow_type ~= "Pixel"
or data.actions.start.glow_frame_type == nil
end,
},
start_do_custom = {
type = "toggle",
width = WeakAuras.doubleWidth,
name = L["Custom"],
order = 11,
},
-- texteditor added laters
finish_header = {
type = "header",
name = L["On Hide"],
order = 20.5
},
finish_do_message = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Chat Message"],
order = 21
},
finish_message_type = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Message Type"],
order = 22,
values = send_chat_message_types,
disabled = function() return not data.actions.finish.do_message end,
control = "WeakAurasSortedDropdown"
},
finish_message_warning = {
type = "description",
width = WeakAuras.doubleWidth,
name = L["Note: Automated Messages to SAY and YELL are blocked outside of Instances."],
order = 22.5,
hidden = function() return not RestrictedChannelCheck(data.actions.finish) end
},
finish_message_space = {
type = "execute",
width = WeakAuras.normalWidth,
name = "",
order = 23,
image = function() return "", 0, 0 end,
hidden = function() return not(data.actions.finish.message_type == "WHISPER" or data.actions.finish.message_type == "CHANNEL") end
},
finish_message_color = {
type = "color",
width = WeakAuras.normalWidth,
name = L["Color"],
order = 23,
hasAlpha = false,
hidden = function() return not(data.actions.finish.message_type == "COMBAT" or data.actions.finish.message_type == "PRINT") end,
get = function() return data.actions.finish.r or 1, data.actions.finish.g or 1, data.actions.finish.b or 1 end,
set = function(info, r, g, b)
data.actions.finish.r = r;
data.actions.finish.g = g;
data.actions.finish.b = b;
WeakAuras.Add(data);
end
},
finish_message_dest = {
type = "input",
width = WeakAuras.normalWidth,
name = L["Send To"],
order = 24,
disabled = function() return not data.actions.finish.do_message end,
hidden = function() return data.actions.finish.message_type ~= "WHISPER" end
},
finish_message_channel = {
type = "input",
width = WeakAuras.normalWidth,
name = L["Channel Number"],
order = 24,
disabled = function() return not data.actions.finish.do_message end,
hidden = function() return data.actions.finish.message_type ~= "CHANNEL" end
},
finish_message = {
type = "input",
width = WeakAuras.doubleWidth,
name = L["Message"],
order = 25,
disabled = function() return not data.actions.finish.do_message end,
desc = function()
return L["Dynamic text tooltip"] .. WeakAuras.GetAdditionalProperties(data)
end,
},
-- texteditor added below
finish_do_sound = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Play Sound"],
order = 27
},
finish_sound = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Sound"],
order = 28,
values = sound_types,
disabled = function() return not data.actions.finish.do_sound end,
control = "WeakAurasSortedDropdown"
},
finish_sound_channel = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Sound Channel"],
order = 28.5,
values = WeakAuras.sound_channel_types,
disabled = function() return not data.actions.finish.do_sound end,
get = function() return data.actions.finish.sound_channel or "Master" end
},
finish_sound_path = {
type = "input",
width = WeakAuras.doubleWidth,
name = L["Sound File Path"],
order = 29,
hidden = function() return data.actions.finish.sound ~= " custom" end,
disabled = function() return not data.actions.finish.do_sound end
},
finish_sound_kit_id = {
type = "input",
width = WeakAuras.doubleWidth,
name = L["Sound Kit ID"],
order = 29,
hidden = function() return data.actions.finish.sound ~= " KitID" end,
disabled = function() return not data.actions.finish.do_sound end
},
finish_stop_sound = {
type = "toggle",
width = WeakAuras.doubleWidth,
name = L["Stop Sound"],
order = 29.1,
},
finish_do_glow = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Glow External Element"],
order = 30.1
},
finish_glow_action = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Glow Action"],
order = 30.2,
values = WeakAuras.glow_action_types,
disabled = function() return not data.actions.finish.do_glow end
},
finish_glow_frame_type = {
type = "select",
width = WeakAuras.normalWidth,
desc = function()
return data.actions.finish.glow_frame_type == "UNITFRAME"
and L["Require unit from trigger"] or nil
end,
name = L["Glow Frame Type"],
order = 30.3,
values = {
UNITFRAME = L["Unit Frame"],
FRAMESELECTOR = L["Frame Selector"]
},
hidden = function()
return not data.actions.finish.do_glow
or data.actions.finish.glow_action == nil
end
},
finish_glow_type_spacer = {
type = "description",
width = WeakAuras.normalWidth,
name = "",
order = 30.35,
hidden = function()
return not data.actions.finish.do_glow
or not (data.actions.finish.glow_action == "hide" and data.actions.finish.glow_frame_type == "FRAMESELECTOR")
end,
},
finish_glow_type = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Glow Type"],
order = 30.4,
values = WeakAuras.glow_types,
hidden = function()
return not data.actions.finish.do_glow
or data.actions.finish.glow_action ~= "show"
or data.actions.finish.glow_frame_type == nil
end,
},
finish_glow_frame = {
type = "input",
width = WeakAuras.normalWidth,
name = L["Frame"],
order = 30.5,
hidden = function()
return not data.actions.finish.do_glow
or data.actions.finish.glow_frame_type ~= "FRAMESELECTOR"
end
},
finish_choose_glow_frame = {
type = "execute",
width = WeakAuras.normalWidth,
name = L["Choose"],
order = 30.55,
hidden = function() return not data.actions.finish.do_glow or data.actions.finish.glow_frame_type ~= "FRAMESELECTOR" end,
func = function()
if(data.controlledChildren and data.controlledChildren[1]) then
WeakAuras.PickDisplay(data.controlledChildren[1]);
WeakAuras.StartFrameChooser(WeakAuras.GetData(data.controlledChildren[1]), {"actions", "finish", "glow_frame"});
else
WeakAuras.StartFrameChooser(data, {"actions", "finish", "glow_frame"});
end
end
},
finish_use_glow_color = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Glow Color"],
order = 30.7,
hidden = function()
return not data.actions.finish.do_glow
or data.actions.finish.glow_action ~= "show"
or data.actions.finish.glow_frame_type == nil
or data.actions.finish.glow_type == nil
end,
},
finish_glow_color = {
type = "color",
width = WeakAuras.normalWidth,
name = L["Glow Color"],
order = 30.8,
hidden = function()
return not data.actions.finish.do_glow
or data.actions.finish.glow_action ~= "show"
or data.actions.finish.glow_frame_type == nil
or data.actions.finish.glow_type == nil
end,
disabled = function() return not data.actions.finish.use_glow_color end,
},
finish_glow_lines = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Lines & Particles"],
order = 30.81,
min = 1,
softMax = 30,
step = 1,
get = function()
return data.actions.finish.glow_lines or 8
end,
hidden = function()
return not data.actions.finish.do_glow
or data.actions.finish.glow_action ~= "show"
or not data.actions.finish.glow_type
or data.actions.finish.glow_type == "buttonOverlay"
or data.actions.finish.glow_frame_type == nil
end,
},
finish_glow_frequency = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Frequency"],
order = 30.82,
softMin = -2,
softMax = 2,
step = 0.05,
get = function()
return data.actions.finish.glow_frequency or 0.25
end,
hidden = function()
return not data.actions.finish.do_glow
or data.actions.finish.glow_action ~= "show"
or not data.actions.finish.glow_type
or data.actions.finish.glow_type == "buttonOverlay"
or data.actions.finish.glow_frame_type == nil
end,
},
finish_glow_length = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Length"],
order = 30.83,
min = 0.05,
softMax = 20,
step = 0.05,
get = function()
return data.actions.finish.glow_length or 10
end,
hidden = function()
return not data.actions.finish.do_glow
or data.actions.finish.glow_action ~= "show"
or data.actions.finish.glow_type ~= "Pixel"
or data.actions.finish.glow_frame_type == nil
end,
},
finish_glow_thickness = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Thickness"],
order = 30.84,
min = 0.05,
softMax = 20,
step = 0.05,
get = function()
return data.actions.finish.glow_thickness or 1
end,
hidden = function()
return not data.actions.finish.do_glow
or data.actions.finish.glow_action ~= "show"
or data.actions.finish.glow_type ~= "Pixel"
or data.actions.finish.glow_frame_type == nil
end,
},
finish_glow_XOffset = {
type = "range",
width = WeakAuras.normalWidth,
name = L["X-Offset"],
order = 30.85,
softMin = -100,
softMax = 100,
step = 0.5,
hidden = function()
return not data.actions.finish.do_glow
or data.actions.finish.glow_action ~= "show"
or not data.actions.finish.glow_type
or data.actions.finish.glow_type == "buttonOverlay"
or data.actions.finish.glow_frame_type == nil
end,
},
finish_glow_YOffset = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Y-Offset"],
order = 30.86,
softMin = -100,
softMax = 100,
step = 0.5,
hidden = function()
return not data.actions.finish.do_glow
or data.actions.finish.glow_action ~= "show"
or not data.actions.finish.glow_type
or data.actions.finish.glow_type == "buttonOverlay"
or data.actions.finish.glow_frame_type == nil
end,
},
finish_glow_scale = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Scale"],
order = 30.87,
min = 0.05,
softMax = 10,
step = 0.05,
isPercent = true,
get = function()
return data.actions.finish.glow_scale or 1
end,
hidden = function()
return not data.actions.finish.do_glow
or data.actions.finish.glow_action ~= "show"
or data.actions.finish.glow_type ~= "ACShine"
or data.actions.finish.glow_frame_type == nil
end,
},
finish_glow_border = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Border"],
order = 30.88,
hidden = function()
return not data.actions.finish.do_glow
or data.actions.finish.glow_action ~= "show"
or data.actions.finish.glow_type ~= "Pixel"
or data.actions.finish.glow_frame_type == nil
end,
},
finish_hide_all_glows = {
type = "toggle",
width = WeakAuras.doubleWidth,
name = L["Hide Glows applied by this aura"],
order = 31,
},
finish_do_custom = {
type = "toggle",
width = WeakAuras.doubleWidth,
name = L["Custom"],
order = 32,
},
-- Text editor added below
},
}
WeakAuras.AddCodeOption(action.args, data, L["Custom Code"], "init", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Actions",
0.011, function() return not data.actions.init.do_custom end, {"actions", "init", "custom"}, true);
WeakAuras.AddCodeOption(action.args, data, L["Custom Code"], "start_message", "https://github.com/WeakAuras/WeakAuras2/wiki/Text-Replacements",
5.1, function() return not (data.actions.start.do_message and WeakAuras.ContainsCustomPlaceHolder(data.actions.start.message)) end, {"actions", "start", "message_custom"}, false);
WeakAuras.AddCodeOption(action.args, data, L["Custom Code"], "start", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Actions",
13, function() return not data.actions.start.do_custom end, {"actions", "start", "custom"}, true);
WeakAuras.AddCodeOption(action.args, data, L["Custom Code"], "finish_message", "https://github.com/WeakAuras/WeakAuras2/wiki/Text-Replacements",
26, function() return not (data.actions.finish.do_message and WeakAuras.ContainsCustomPlaceHolder(data.actions.finish.message)) end, {"actions", "finish", "message_custom"}, false);
WeakAuras.AddCodeOption(action.args, data, L["Custom Code"], "finish", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Actions",
32, function() return not data.actions.finish.do_custom end, {"actions", "finish", "custom"}, true);
return action;
end
+939
View File
@@ -0,0 +1,939 @@
if not WeakAuras.IsCorrectVersion() then return end
local L = WeakAuras.L
local anim_types = WeakAuras.anim_types;
local anim_translate_types = WeakAuras.anim_translate_types;
local anim_scale_types = WeakAuras.anim_scale_types;
local anim_alpha_types = WeakAuras.anim_alpha_types;
local anim_rotate_types = WeakAuras.anim_rotate_types;
local anim_color_types = WeakAuras.anim_color_types;
local anim_start_preset_types = WeakAuras.anim_start_preset_types;
local anim_main_preset_types = WeakAuras.anim_main_preset_types;
local anim_finish_preset_types = WeakAuras.anim_finish_preset_types;
local duration_types = WeakAuras.duration_types;
local duration_types_no_choice = WeakAuras.duration_types_no_choice;
local anim_ease_types = WeakAuras.anim_ease_types;
local function filterAnimPresetTypes(intable, id)
local ret = {};
local region = WeakAuras.regions[id] and WeakAuras.regions[id].region;
local regionType = WeakAuras.regions[id] and WeakAuras.regions[id].regionType;
local data = WeakAuras.GetData(id);
if(region and regionType and data) then
for key, value in pairs(intable) do
local preset = WeakAuras.anim_presets[key];
if(preset) then
if(regionType == "group" or regionType == "dynamicgroup") then
local valid = true;
for index, childId in pairs(data.controlledChildren) do
local childRegion = WeakAuras.regions[childId] and WeakAuras.regions[childId].region
if(childRegion and ((preset.use_scale and not childRegion.Scale) or (preset.use_rotate and not childRegion.Rotate))) then
valid = false;
end
end
if(valid) then
ret[key] = value;
end
else
if not((preset.use_scale and not region.Scale) or (preset.use_rotate and not region.Rotate)) then
ret[key] = value;
end
end
end
end
end
return ret;
end
function WeakAuras.AddAnimationOption(id, data)
local animation = {
type = "group",
name = L["Animations"],
order = 60,
get = function(info)
local split = info[#info]:find("_");
if(split) then
local field, value = info[#info]:sub(1, split-1), info[#info]:sub(split+1);
if(data.animation and data.animation[field]) then
return data.animation[field][value];
else
if(value == "scalex" or value == "scaley") then
return 1;
else
return nil;
end
end
end
end,
set = function(info, v)
local split = info[#info]:find("_");
local field, value = info[#info]:sub(1, split-1), info[#info]:sub(split+1);
data.animation = data.animation or {};
data.animation[field] = data.animation[field] or {};
data.animation[field][value] = v;
if(field == "main" and not WeakAuras.IsAnimating("display", id)) then
WeakAuras.Animate("display", data, "main", data.animation.main, WeakAuras.regions[id].region, false, nil, true);
if(WeakAuras.clones[id]) then
for cloneId, cloneRegion in pairs(WeakAuras.clones[id]) do
WeakAuras.Animate("display", data, "main", data.animation.main, cloneRegion, false, nil, true, cloneId);
end
end
end
WeakAuras.Add(data);
end,
disabled = function(info, v)
local split = info[#info]:find("_");
local valueToType = {
alphaType = "use_alpha",
alpha = "use_alpha",
translateType = "use_translate",
x = "use_translate",
y = "use_translate",
scaleType = "use_scale",
scalex = "use_scale",
scaley = "use_scale",
rotateType = "use_rotate",
rotate = "use_rotate",
colorType = "use_color",
color = "use_color"
}
if(split) then
local field, value = info[#info]:sub(1, split-1), info[#info]:sub(split+1);
if(data.animation and data.animation[field]) then
if(valueToType[value]) then
return not data.animation[field][valueToType[value]];
else
return false;
end
else
return true;
end
else
return false;
end
end,
args = {
start_header = {
type = "header",
name = L["Start"],
order = 30
},
start_type = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 32,
values = anim_types,
disabled = false
},
start_preset = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Preset"],
order = 33,
values = function() return filterAnimPresetTypes(anim_start_preset_types, id) end,
hidden = function() return data.animation.start.type ~= "preset" end
},
start_duration_type_no_choice = {
type = "select",
width = WeakAuras.halfWidth,
name = L["Time in"],
order = 33,
values = duration_types_no_choice,
disabled = true,
hidden = function() return data.animation.start.type ~= "custom" or WeakAuras.CanHaveDuration(data) end,
get = function() return "seconds" end
},
start_duration_type = {
type = "select",
width = WeakAuras.halfWidth,
name = L["Time in"],
order = 33,
values = duration_types,
hidden = function() return data.animation.start.type ~= "custom" or not WeakAuras.CanHaveDuration(data) end
},
start_duration = {
type = "input",
width = WeakAuras.halfWidth,
name = function()
if(data.animation.start.duration_type == "relative") then
return L["% of Progress"];
else
return L["Duration (s)"];
end
end,
desc = function()
if(data.animation.start.duration_type == "relative") then
return L["Animation relative duration description"];
else
return L["The duration of the animation in seconds."];
end
end,
order = 33.5,
hidden = function() return data.animation.start.type ~= "custom" end
},
start_easeType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Ease type"],
values = anim_ease_types,
order = 33.7,
hidden = function() return data.animation.start.type ~= "custom" end
},
start_easeStrength = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Ease Strength"],
order = 33.8,
min = 1,
max = 5,
bigStep = 1,
hidden = function() return data.animation.start.type ~= "custom" end,
disabled = function() return data.animation.start.easeType == "none" end
},
start_use_alpha = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Fade In"],
order = 34,
hidden = function() return data.animation.start.type ~= "custom" end
},
start_alphaType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 35,
values = anim_alpha_types,
hidden = function() return data.animation.start.type ~= "custom" end
},
-- text editor added below
start_alpha = {
type = "range",
width = WeakAuras.doubleWidth,
name = L["Alpha"],
order = 36,
min = 0,
max = 1,
bigStep = 0.01,
isPercent = true,
hidden = function() return data.animation.start.type ~= "custom" end
},
start_use_translate = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Slide In"],
order = 38,
hidden = function() return data.animation.start.type ~= "custom" end
},
start_translateType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 39,
values = anim_translate_types,
hidden = function() return data.animation.start.type ~= "custom" end
},
-- texteditor added below
start_x = {
type = "range",
width = WeakAuras.normalWidth,
name = L["X Offset"],
order = 40,
softMin = -200,
softMax = 200,
step = 1,
bigStep = 5,
hidden = function() return data.animation.start.type ~= "custom" end
},
start_y = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Y Offset"],
order = 41,
softMin = -200,
softMax = 200,
step = 1,
bigStep = 5,
hidden = function() return data.animation.start.type ~= "custom" end
},
start_use_scale = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Zoom In"],
order = 42,
hidden = function()
return (
data.animation.start.type ~= "custom"
or not WeakAuras.regions[id].region.Scale
) end
},
start_scaleType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 43,
values = anim_scale_types,
hidden = function() return (data.animation.start.type ~= "custom" or not WeakAuras.regions[id].region.Scale) end
},
-- texteditor added below
start_scalex = {
type = "range",
width = WeakAuras.normalWidth,
name = L["X Scale"],
order = 44,
softMin = 0,
softMax = 5,
step = 0.01,
bigStep = 0.1,
hidden = function() return (data.animation.start.type ~= "custom" or not WeakAuras.regions[id].region.Scale) end
},
start_scaley = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Y Scale"],
order = 45,
softMin = 0,
softMax = 5,
step = 0.01,
bigStep = 0.1,
hidden = function() return (data.animation.start.type ~= "custom" or not WeakAuras.regions[id].region.Scale) end
},
start_use_rotate = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Rotate In"],
order = 46,
hidden = function() return (data.animation.start.type ~= "custom" or not WeakAuras.regions[id].region.Rotate) end
},
start_rotateType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 47,
values = anim_rotate_types,
hidden = function() return (data.animation.start.type ~= "custom" or not WeakAuras.regions[id].region.Rotate) end
},
-- texteditor added below
start_rotate = {
type = "range",
width = WeakAuras.doubleWidth,
name = L["Angle"],
order = 48,
softMin = 0,
softMax = 360,
bigStep = 3,
hidden = function() return (data.animation.start.type ~= "custom" or not WeakAuras.regions[id].region.Rotate) end
},
start_use_color = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Color"],
order = 48.2,
hidden = function() return (data.animation.start.type ~= "custom" or not WeakAuras.regions[id].region.Color) end
},
start_colorType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 48.5,
values = anim_color_types,
hidden = function() return (data.animation.start.type ~= "custom" or not WeakAuras.regions[id].region.Color) end
},
-- texteditor added below
start_color = {
type = "color",
width = WeakAuras.doubleWidth,
name = L["Color"],
order = 49.5,
hidden = function() return (data.animation.start.type ~= "custom" or not WeakAuras.regions[id].region.Color) end,
get = function()
return data.animation.start.colorR,
data.animation.start.colorG,
data.animation.start.colorB,
data.animation.start.colorA;
end,
set = function(info, r, g, b, a)
data.animation.start.colorR = r;
data.animation.start.colorG = g;
data.animation.start.colorB = b;
data.animation.start.colorA = a;
end
},
main_header = {
type = "header",
name = L["Main"],
order = 50
},
main_type = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 52,
values = anim_types,
disabled = false
},
main_preset = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Preset"],
order = 53,
values = function() return filterAnimPresetTypes(anim_main_preset_types, id) end,
hidden = function() return data.animation.main.type ~= "preset" end
},
main_duration_type_no_choice = {
type = "select",
width = WeakAuras.halfWidth,
name = L["Time in"],
order = 53,
values = duration_types_no_choice,
disabled = true,
hidden = function() return data.animation.main.type ~= "custom" or WeakAuras.CanHaveDuration(data) end,
get = function() return "seconds" end
},
main_duration_type = {
type = "select",
width = WeakAuras.halfWidth,
name = L["Time in"],
order = 53,
values = duration_types,
hidden = function() return data.animation.main.type ~= "custom" or not WeakAuras.CanHaveDuration(data) end
},
main_duration = {
type = "input",
width = WeakAuras.halfWidth,
name = function()
if(data.animation.main.duration_type == "relative") then
return L["% of Progress"];
else
return L["Duration (s)"];
end
end,
desc = function()
if(data.animation.main.duration_type == "relative") then
return L["Animation relative duration description"];
else
local ret = "";
ret = ret..L["The duration of the animation in seconds."].."\n";
ret = ret..L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."]
return ret;
end
end,
order = 53.5,
hidden = function() return data.animation.main.type ~= "custom" end
},
main_easeType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Ease type"],
values = anim_ease_types,
order = 53.7,
hidden = function() return data.animation.main.type ~= "custom" end
},
main_easeStrength = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Ease Strength"],
order = 53.8,
min = 1,
max = 5,
bigStep = 1,
hidden = function() return data.animation.main.type ~= "custom" end,
disabled = function() return data.animation.main.easeType == "none" end
},
main_use_alpha = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Fade"],
order = 54,
hidden = function() return data.animation.main.type ~= "custom" end
},
main_alphaType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 55,
values = anim_alpha_types,
hidden = function() return data.animation.main.type ~= "custom" end
},
-- texteditor added below
main_alpha = {
type = "range",
width = WeakAuras.doubleWidth,
name = L["Alpha"],
order = 56,
min = 0,
max = 1,
bigStep = 0.01,
isPercent = true,
hidden = function() return data.animation.main.type ~= "custom" end
},
main_use_translate = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Slide"],
order = 58,
hidden = function() return data.animation.main.type ~= "custom" end
},
main_translateType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 59,
values = anim_translate_types,
hidden = function() return data.animation.main.type ~= "custom" end
},
-- texteditor added below
main_x = {
type = "range",
width = WeakAuras.normalWidth,
name = L["X Offset"],
order = 60,
softMin = -200,
softMax = 200,
step = 1,
bigStep = 5,
hidden = function() return data.animation.main.type ~= "custom" end
},
main_y = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Y Offset"],
order = 61,
softMin = -200,
softMax = 200,
step = 1,
bigStep = 5,
hidden = function() return data.animation.main.type ~= "custom" end
},
main_use_scale = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Zoom"],
order = 62,
hidden = function() return (data.animation.main.type ~= "custom" or not WeakAuras.regions[id].region.Scale) end
},
main_scaleType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 63,
values = anim_scale_types,
hidden = function() return (data.animation.main.type ~= "custom" or not WeakAuras.regions[id].region.Scale) end
},
-- texteditor added below
main_scalex = {
type = "range",
width = WeakAuras.normalWidth,
name = L["X Scale"],
order = 64,
softMin = 0,
softMax = 5,
step = 0.01,
bigStep = 0.1,
hidden = function() return (data.animation.main.type ~= "custom" or not WeakAuras.regions[id].region.Scale) end
},
main_scaley = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Y Scale"],
order = 65,
softMin = 0,
softMax = 5,
step = 0.01,
bigStep = 0.1,
hidden = function() return (data.animation.main.type ~= "custom" or not WeakAuras.regions[id].region.Scale) end
},
main_use_rotate = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Rotate"],
order = 66,
hidden = function() return (data.animation.main.type ~= "custom" or not WeakAuras.regions[id].region.Rotate) end
},
main_rotateType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 67,
values = anim_rotate_types,
hidden = function() return (data.animation.main.type ~= "custom" or not WeakAuras.regions[id].region.Rotate) end
},
-- text editor added below
main_rotate = {
type = "range",
width = WeakAuras.doubleWidth,
name = L["Angle"],
order = 68,
softMin = 0,
softMax = 360,
bigStep = 3,
hidden = function() return (data.animation.main.type ~= "custom" or not WeakAuras.regions[id].region.Rotate) end
},
main_use_color = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Color"],
order = 68.2,
hidden = function() return (data.animation.main.type ~= "custom" or not WeakAuras.regions[id].region.Color) end
},
main_colorType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 68.5,
values = anim_color_types,
hidden = function() return (data.animation.main.type ~= "custom" or not WeakAuras.regions[id].region.Color) end
},
-- texteditor added below
main_color = {
type = "color",
width = WeakAuras.doubleWidth,
name = L["Color"],
order = 69.5,
hidden = function() return (data.animation.main.type ~= "custom" or not WeakAuras.regions[id].region.Color) end,
get = function()
return data.animation.main.colorR,
data.animation.main.colorG,
data.animation.main.colorB,
data.animation.main.colorA;
end,
set = function(info, r, g, b, a)
data.animation.main.colorR = r;
data.animation.main.colorG = g;
data.animation.main.colorB = b;
data.animation.main.colorA = a;
end
},
finish_header = {
type = "header",
name = L["Finish"],
order = 70
},
finish_type = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 72,
values = anim_types,
disabled = false
},
finish_preset = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Preset"],
order = 73,
values = function() return filterAnimPresetTypes(anim_finish_preset_types, id) end,
hidden = function() return data.animation.finish.type ~= "preset" end
},
finish_duration_type_no_choice = {
type = "select",
width = WeakAuras.halfWidth,
name = L["Time in"],
order = 73,
values = duration_types_no_choice,
disabled = true,
hidden = function() return data.animation.finish.type ~= "custom" end,
get = function() return "seconds" end
},
finish_duration = {
type = "input",
width = WeakAuras.halfWidth,
name = L["Duration (s)"],
desc = L["The duration of the animation in seconds. The finish animation does not start playing until after the display would normally be hidden."],
order = 73.5,
hidden = function() return data.animation.finish.type ~= "custom" end
},
finish_easeType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Ease type"],
values = anim_ease_types,
order = 73.7,
hidden = function() return data.animation.finish.type ~= "custom" end
},
finish_easeStrength = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Ease Strength"],
order = 73.8,
min = 1,
max = 5,
bigStep = 1,
hidden = function() return data.animation.finish.type ~= "custom" end,
disabled = function() return data.animation.finish.easeType == "none" end
},
finish_use_alpha = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Fade Out"],
order = 74,
hidden = function() return data.animation.finish.type ~= "custom" end
},
finish_alphaType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 75,
values = anim_alpha_types,
hidden = function() return data.animation.finish.type ~= "custom" end
},
-- texteditor added below
finish_alpha = {
type = "range",
width = WeakAuras.doubleWidth,
name = L["Alpha"],
order = 76,
min = 0,
max = 1,
bigStep = 0.01,
isPercent = true,
hidden = function() return data.animation.finish.type ~= "custom" end
},
finish_use_translate = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Slide Out"],
order = 78,
hidden = function() return data.animation.finish.type ~= "custom" end
},
finish_translateType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 79,
values = anim_translate_types,
hidden = function() return data.animation.finish.type ~= "custom" end
},
-- texteditor added below
finish_x = {
type = "range",
width = WeakAuras.normalWidth,
name = L["X Offset"],
order = 80,
softMin = -200,
softMax = 200,
step = 1,
bigStep = 5,
hidden = function() return data.animation.finish.type ~= "custom" end
},
finish_y = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Y Offset"],
order = 81,
softMin = -200,
softMax = 200,
step = 1,
bigStep = 5,
hidden = function() return data.animation.finish.type ~= "custom" end
},
finish_use_scale = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Zoom Out"],
order = 82,
hidden = function() return (data.animation.finish.type ~= "custom" or not WeakAuras.regions[id].region.Scale) end
},
finish_scaleType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 83,
values = anim_scale_types,
hidden = function() return (data.animation.finish.type ~= "custom" or not WeakAuras.regions[id].region.Scale) end
},
-- texteditor added below
finish_scalex = {
type = "range",
width = WeakAuras.normalWidth,
name = L["X Scale"],
order = 84,
softMin = 0,
softMax = 5,
step = 0.01,
bigStep = 0.1,
hidden = function() return (data.animation.finish.type ~= "custom" or not WeakAuras.regions[id].region.Scale) end
},
finish_scaley = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Y Scale"],
order = 85,
softMin = 0,
softMax = 5,
step = 0.01,
bigStep = 0.1,
hidden = function() return (data.animation.finish.type ~= "custom" or not WeakAuras.regions[id].region.Scale) end
},
finish_use_rotate = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Rotate Out"],
order = 86,
hidden = function() return (data.animation.finish.type ~= "custom" or not WeakAuras.regions[id].region.Rotate) end
},
finish_rotateType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 87,
values = anim_rotate_types,
hidden = function() return (data.animation.finish.type ~= "custom" or not WeakAuras.regions[id].region.Rotate) end
},
-- texteditor added below
finish_rotate = {
type = "range",
width = WeakAuras.doubleWidth,
name = L["Angle"],
order = 88,
softMin = 0,
softMax = 360,
bigStep = 3,
hidden = function() return (data.animation.finish.type ~= "custom" or not WeakAuras.regions[id].region.Rotate) end
},
finish_use_color = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Color"],
order = 88.2,
hidden = function() return (data.animation.finish.type ~= "custom" or not WeakAuras.regions[id].region.Color) end
},
finish_colorType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 88.5,
values = anim_color_types,
hidden = function() return (data.animation.finish.type ~= "custom" or not WeakAuras.regions[id].region.Color) end
},
-- texteditor added below
finish_color = {
type = "color",
width = WeakAuras.doubleWidth,
name = L["Color"],
order = 89.5,
hidden = function() return (data.animation.finish.type ~= "custom" or not WeakAuras.regions[id].region.Color) end,
get = function()
return data.animation.finish.colorR,
data.animation.finish.colorG,
data.animation.finish.colorB,
data.animation.finish.colorA;
end,
set = function(info, r, g, b, a)
data.animation.finish.colorR = r;
data.animation.finish.colorG = g;
data.animation.finish.colorB = b;
data.animation.finish.colorA = a;
end
}
}
}
local function extraSetFunction()
if(not WeakAuras.IsAnimating("display", id)) then
WeakAuras.Animate("display", data, "main", data.animation.main, WeakAuras.regions[id].region, false, nil, true);
if(WeakAuras.clones[id]) then
for cloneId, cloneRegion in pairs(WeakAuras.clones[id]) do
WeakAuras.Animate("display", data, "main", data.animation.main, cloneRegion, false, nil, true, cloneId);
end
end
end
end
-- Text Editors for "start"
local function hideStartAlphaFunc()
return data.animation.start.type ~= "custom" or data.animation.start.alphaType ~= "custom" or not data.animation.start.use_alpha
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "start_alphaFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
35.3, hideStartAlphaFunc, {"animation", "start", "alphaFunc"}, false);
local function hideStartTranslate()
return data.animation.start.type ~= "custom" or data.animation.start.translateType ~= "custom" or not data.animation.start.use_translate
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "start_translateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
39.3, hideStartTranslate, {"animation", "start", "translateFunc"}, false);
local function hideStartScale()
return data.animation.start.type ~= "custom" or data.animation.start.scaleType ~= "custom" or not (data.animation.start.use_scale and WeakAuras.regions[id].region.Scale)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "start_scaleFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
43.3, hideStartScale, {"animation", "start", "scaleFunc"}, false);
local function hideStartRotateFunc()
return data.animation.start.type ~= "custom" or data.animation.start.rotateType ~= "custom" or not (data.animation.start.use_rotate and WeakAuras.regions[id].region.Rotate)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "start_rotateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
47.3, hideStartRotateFunc, {"animation", "start", "rotateFunc"}, false);
local function hideStartColorFunc()
return data.animation.start.type ~= "custom" or data.animation.start.colorType ~= "custom" or not (data.animation.start.use_color and WeakAuras.regions[id].region.Color)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "start_colorFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
48.7, hideStartColorFunc, {"animation", "start", "colorFunc"}, false);
-- Text Editors for "main"
local function hideMainAlphaFunc()
return data.animation.main.type ~= "custom" or data.animation.main.alphaType ~= "custom" or not data.animation.main.use_alpha
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "main_alphaFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
55.3, hideMainAlphaFunc, {"animation", "main", "alphaFunc"}, false, nil, extraSetFunction);
local function hideMainTranslate()
return data.animation.main.type ~= "custom" or data.animation.main.translateType ~= "custom" or not data.animation.main.use_translate
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "main_translateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
59.3, hideMainTranslate, {"animation", "main", "translateFunc"}, false, nil, extraSetFunction);
local function hideMainScale()
return data.animation.main.type ~= "custom" or data.animation.main.scaleType ~= "custom" or not (data.animation.main.use_scale and WeakAuras.regions[id].region.Scale)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "main_scaleFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
63.3, hideMainScale, {"animation", "main", "scaleFunc"}, false, nil, extraSetFunction);
local function hideMainRotateFunc()
return data.animation.main.type ~= "custom" or data.animation.main.rotateType ~= "custom" or not (data.animation.main.use_rotate and WeakAuras.regions[id].region.Rotate)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "main_rotateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
67.3, hideMainRotateFunc, {"animation", "main", "rotateFunc"}, false, nil, extraSetFunction);
local function hideMainColorFunc()
return data.animation.main.type ~= "custom" or data.animation.main.colorType ~= "custom" or not (data.animation.main.use_color and WeakAuras.regions[id].region.Color)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "main_colorFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
68.7, hideMainColorFunc, {"animation", "main", "colorFunc"}, false, nil, extraSetFunction);
-- Text Editors for "finish"
local function hideFinishAlphaFunc()
return data.animation.finish.type ~= "custom" or data.animation.finish.alphaType ~= "custom" or not data.animation.finish.use_alpha
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "finish_alphaFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
75.3, hideFinishAlphaFunc, {"animation", "finish", "alphaFunc"}, false);
local function hideFinishTranslate()
return data.animation.finish.type ~= "custom" or data.animation.finish.translateType ~= "custom" or not data.animation.finish.use_translate
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "finish_translateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
79.3, hideFinishTranslate, {"animation", "finish", "translateFunc"}, false);
local function hideFinishScale()
return data.animation.finish.type ~= "custom" or data.animation.finish.scaleType ~= "custom" or not (data.animation.finish.use_scale and WeakAuras.regions[id].region.Scale)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "finish_scaleFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
83.3, hideFinishScale, {"animation", "finish", "scaleFunc"}, false);
local function hideFinishRotateFunc()
return data.animation.finish.type ~= "custom" or data.animation.finish.rotateType ~= "custom" or not (data.animation.finish.use_rotate and WeakAuras.regions[id].region.Rotate)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "finish_rotateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
87.3, hideFinishRotateFunc, {"animation", "finish", "rotateFunc"}, false);
local function hideFinishColorFunc()
return data.animation.finish.type ~= "custom" or data.animation.finish.colorType ~= "custom" or not (data.animation.finish.use_color and WeakAuras.regions[id].region.Color)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "finish_colorFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
88.7, hideFinishColorFunc, {"animation", "finish", "colorFunc"}, false);
return animation;
end
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+946
View File
@@ -0,0 +1,946 @@
if not WeakAuras.IsCorrectVersion() then return end
local L = WeakAuras.L
local operator_types = WeakAuras.operator_types
local debuff_types = WeakAuras.debuff_types
local function getAuraMatchesLabel(name)
local iconCache = WeakAuras.spellCache.Get()
local ids = iconCache[name]
if ids then
local descText = ""
local numMatches = 0
for id, _ in pairs(ids) do
numMatches = numMatches + 1
end
return tostring(numMatches)
else
return ""
end
end
local function getAuraMatchesList(name)
local iconCache = WeakAuras.spellCache.Get()
local ids = iconCache[name]
if ids then
local descText = ""
for id, _ in pairs(ids) do
local name, _, icon = GetSpellInfo(id)
if icon then
if descText == "" then
descText = "|T"..icon..":0|t: "..id
else
descText = descText.."\n|T"..icon..":0|t: "..id
end
end
end
return descText
else
return ""
end
end
local function shiftTable(tbl, pos)
local size = #tbl
for i = pos, size, 1 do
tbl[i] = tbl[i + 1]
end
end
-- Counts the Names or SpellIds in a aura, recursively.
local function CountNames(data, optionTriggerChoices, name)
local result = 0
if data.controlledChildren then
for index, childId in ipairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId)
local trigger = optionTriggerChoices[childId] and childData.triggers[optionTriggerChoices[childId]].trigger
if trigger and trigger[name] then
result = max(result, #trigger[name])
end
end
else
local trigger = optionTriggerChoices[data.id] and data.triggers[optionTriggerChoices[data.id]].trigger
if trigger[name] then
result = #trigger[name]
end
end
return result
end
local function IsGroupTrigger(trigger)
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"
or trigger.unit == "boss" or trigger.unit == "arena" or trigger.unit == "multi"
end
local function IsSingleMissing(trigger)
return not IsGroupTrigger(trigger) and trigger.matchesShowOn == "showOnMissing"
end
local function CreateNameOptions(aura_options, data, trigger, size, isExactSpellId, blacklist, prefix, baseOrder, useKey, optionKey, name, desc)
local spellCache = WeakAuras.spellCache
for i = 1, size do
local hiddenFunction
if blacklist then
hiddenFunction = function()
return not (trigger.type == "aura2" and trigger[useKey] and (i == 1 or trigger[optionKey] and trigger[optionKey][i - 1]) and trigger.unit ~= "multi" and not IsSingleMissing(trigger))
end
else
hiddenFunction = function()
return not (trigger.type == "aura2" and trigger[useKey] and (i == 1 or trigger[optionKey] and trigger[optionKey][i - 1]))
end
end
if i ~= 1 then
aura_options[prefix .. "space" .. i] = {
type = "execute",
name = L["or"],
width = WeakAuras.normalWidth - 0.2,
image = function() return "", 0, 0 end,
order = baseOrder + i / 100 + 0.0001,
hidden = hiddenFunction
}
end
local iconOption = prefix .. "icon" .. i
aura_options[iconOption] = {
type = "execute",
width = 0.2,
order = baseOrder + i / 100 + 0.0002,
hidden = hiddenFunction
}
if isExactSpellId then
aura_options[iconOption].name = ""
aura_options[iconOption].desc = function()
local name = GetSpellInfo(trigger[optionKey] and trigger[optionKey][i] or 0)
return name
end
aura_options[iconOption].image = function()
local icon
if trigger.auraspellids and trigger.auraspellids[i] then
icon = select(3, GetSpellInfo(trigger.auraspellids[i]))
end
return icon and tostring(icon) or "", 18, 18
end
aura_options[iconOption].disabled = function()
return not trigger[optionKey] or not trigger[optionKey][i] or not select(3, GetSpellInfo(trigger[optionKey] and trigger[optionKey][i] or 0))
end
else
aura_options[iconOption].name = function()
local spellId = trigger[optionKey] and trigger[optionKey][i] and WeakAuras.SafeToNumber(trigger[optionKey][i])
if spellId then
return getAuraMatchesLabel(GetSpellInfo(spellId))
else
return getAuraMatchesLabel(trigger[optionKey] and trigger[optionKey][i])
end
end
aura_options[iconOption].desc = function()
local spellId = trigger[optionKey] and trigger[optionKey][i] and WeakAuras.SafeToNumber(trigger[optionKey][i])
if spellId then
local name = GetSpellInfo(spellId)
if name then
local auraDesc = getAuraMatchesList(name)
if auraDesc then
auraDesc = name .. "\n" .. auraDesc
end
return auraDesc
end
else
return getAuraMatchesList(trigger[optionKey] and trigger[optionKey][i])
end
end
aura_options[iconOption].image = function()
local icon
local spellId = trigger[optionKey] and trigger[optionKey][i] and WeakAuras.SafeToNumber(trigger[optionKey][i])
if spellId then
icon = select(3, GetSpellInfo(spellId))
else
icon = spellCache.GetIcon(trigger[optionKey] and trigger[optionKey][i])
end
return icon and tostring(icon) or "", 18, 18
end
end
aura_options[prefix .. i] = {
type = "input",
width = WeakAuras.normalWidth,
name = name,
desc = desc,
order = baseOrder + i / 100 + 0.0003,
hidden = hiddenFunction,
get = function(info) return trigger[optionKey] and trigger[optionKey][i] end,
set = function(info, v)
trigger[optionKey] = trigger[optionKey] or {}
if v == "" then
shiftTable(trigger[optionKey], i)
else
if isExactSpellId then
trigger[optionKey][i] = v
else
local spellId = tonumber(v)
if spellId then
WeakAuras.spellCache.CorrectAuraName(v)
trigger[optionKey][i] = v
else
trigger[optionKey][i] = spellCache.BestKeyMatch(v)
end
end
end
WeakAuras.Add(data)
WeakAuras.UpdateThumbnail(data)
WeakAuras.SetIconNames(data)
WeakAuras.UpdateDisplayButton(data)
WeakAuras.ReloadTriggerOptions(data)
end,
validate = isExactSpellId and WeakAuras.ValidateNumeric or nil
}
end
-- VALIDATE ?
end
local function GetBuffTriggerOptions(data, optionTriggerChoices)
local trigger
if not data.controlledChildren then
local triggernum = optionTriggerChoices[data.id]
if triggernum then
trigger = data.triggers[triggernum].trigger
end
end
local function HasMatchCount(trigger)
if IsGroupTrigger(trigger) then
return trigger.useMatch_count
else
return trigger.matchesShowOn == "showOnMatches"
end
end
local ValidateNumeric = WeakAuras.ValidateNumeric
local aura_options = {
useUnit = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Unit"],
order = 10,
disabled = true,
hidden = function() return not trigger.type == "aura2" end,
get = function() return true end
},
unit = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Unit"],
order = 10.1,
values = function()
return WeakAuras.unit_types_bufftrigger_2
end,
hidden = function() return not trigger.type == "aura2" end
},
useSpecificUnit = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Specific Unit"],
order = 10.2,
disabled = true,
hidden = function() return not (trigger.type == "aura2" and trigger.unit == "member") end,
get = function() return true end
},
specificUnit = {
type = "input",
width = WeakAuras.normalWidth,
name = L["Specific Unit"],
order = 10.3,
desc = L["A Unit ID (e.g., party1)."],
hidden = function() return not (trigger.type == "aura2" and trigger.unit == "member") end
},
warnSpecifcUnit = {
type = "description",
width = WeakAuras.doubleWidth,
name = function()
return L["|cFFFF0000Note:|r The unit '%s' is not a trackable unit."]:format(trigger.specificUnit or "")
end,
order = 10.4,
hidden = function() return not (trigger.type == "aura2" and trigger.unit == "member" and WeakAuras.UntrackableUnit(trigger.specificUnit)) end
},
useDebuffType = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Aura Type"],
order = 11,
disabled = true,
hidden = function() return not trigger.type == "aura2" end,
get = function() return true end
},
debuffType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Aura Type"],
order = 11.1,
values = debuff_types,
hidden = function() return not trigger.type == "aura2" end
},
use_debuffClass = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Debuff Type"],
order = 11.2,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger)) end
},
debuffClass = {
type = "multiselect",
width = WeakAuras.normalWidth,
name = L["Debuff Type"],
order = 11.3,
hidden = function()
return not (trigger.type == "aura2" and trigger.unit ~= "multi"
and not IsSingleMissing(trigger)
and trigger.use_debuffClass)
end,
values = WeakAuras.debuff_class_types,
},
debuffClassSpace = {
type = "description",
width = WeakAuras.normalWidth,
name = "",
order = 11.4,
hidden = function()
return not (trigger.type == "aura2" and trigger.unit ~= "multi"
and not IsSingleMissing(trigger)
and not trigger.use_debuffClass)
end
},
useName = {
type = "toggle",
name = L["Name(s)"],
order = 12,
width = WeakAuras.normalWidth - 0.2,
hidden = function() return not trigger.type == "aura2" end
},
useNameSpace = {
type = "description",
name = "",
order = 12.1,
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and not trigger.useName) end
},
useExactSpellId = {
type = "toggle",
name = L["Exact Spell ID(s)"],
width = WeakAuras.normalWidth - 0.2,
order = 22,
hidden = function() return not trigger.type == "aura2" end
},
useExactSpellIdSpace = {
type = "description",
name = "",
order = 22.1,
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and not trigger.useExactSpellId) end
},
useBlackName = {
type = "toggle",
name = L["Blacklisted Name(s)"],
order = 32,
width = WeakAuras.normalWidth - 0.2,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger)) end
},
useBlackNameSpace = {
type = "description",
name = "",
order = 32.1,
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and not trigger.useBlackName and trigger.unit ~= "multi" and not IsSingleMissing(trigger)) end
},
useBlackExactSpellId = {
type = "toggle",
name = L["Blacklisted Exact Spell ID(s)"],
width = WeakAuras.normalWidth - 0.2,
order = 42,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger)) end
},
useBlackExactSpellIdSpace = {
type = "description",
name = "",
order = 42.1,
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and not trigger.useBlackExactSpellId and trigger.unit ~= "multi" and not IsSingleMissing(trigger)) end
},
useNamePattern = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Name Pattern Match"],
order = 55,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi") end
},
useNamePatternSpace = {
type = "description",
name = "",
order = 55.2,
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not trigger.useNamePattern) end
},
namePattern_operator = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Operator"],
order = 55.1,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and trigger.useNamePattern) end,
values = WeakAuras.string_operator_types
},
namePattern_name = {
type = "input",
name = L["Aura Name Pattern"],
width = WeakAuras.doubleWidth,
order = 55.2,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and trigger.useNamePattern) end
},
useStacks = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Stack Count"],
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger)) end,
order = 60
},
stacksOperator = {
type = "select",
name = L["Operator"],
order = 60.1,
width = WeakAuras.halfWidth,
values = operator_types,
disabled = function() return not trigger.useStacks end,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and trigger.useStacks) end,
get = function() return trigger.useStacks and trigger.stacksOperator or nil end
},
stacks = {
type = "input",
name = L["Stack Count"],
validate = ValidateNumeric,
order = 60.2,
width = WeakAuras.halfWidth,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and trigger.useStacks) end,
get = function() return trigger.useStacks and trigger.stacks or nil end
},
useStacksSpace = {
type = "description",
width = WeakAuras.normalWidth,
name = "",
order = 60.3,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and not trigger.useStacks) end
},
useRem = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Remaining Time"],
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger)) end,
order = 61
},
remOperator = {
type = "select",
name = L["Operator"],
order = 61.1,
width = WeakAuras.halfWidth,
values = operator_types,
disabled = function() return not trigger.useRem end,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and trigger.useRem) end,
get = function() return trigger.useRem and trigger.remOperator or nil end
},
rem = {
type = "input",
name = L["Remaining Time"],
validate = ValidateNumeric,
order = 61.2,
width = WeakAuras.halfWidth,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and trigger.useRem) end,
get = function() return trigger.useRem and trigger.rem or nil end
},
useRemSpace = {
type = "description",
width = WeakAuras.normalWidth,
name = "",
order = 61.3,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and not trigger.useRem) end
},
useTotal = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Total Time"],
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger)) end,
order = 61.4
},
totalOperator = {
type = "select",
name = L["Operator"],
order = 61.5,
width = WeakAuras.halfWidth,
values = operator_types,
disabled = function() return not trigger.useTotal end,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and trigger.useTotal) end,
get = function() return trigger.useTotal and trigger.totalOperator or nil end
},
total = {
type = "input",
name = L["Total Time"],
validate = ValidateNumeric,
order = 61.6,
width = WeakAuras.halfWidth,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and trigger.useTotal) end,
get = function() return trigger.useTotal and trigger.total or nil end
},
useTotalSpace = {
type = "description",
width = WeakAuras.normalWidth,
name = "",
order = 61.7,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and not trigger.useTotal) end
},
fetchTooltip = {
type = "toggle",
name = L["Use Tooltip Information"],
desc = L["This adds %tooltip, %tooltip1, %tooltip2, %tooltip3 as text replacements."],
order = 62,
width = WeakAuras.doubleWidth,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger)) end
},
use_tooltip = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Tooltip Pattern Match"],
order = 62.1,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and trigger.fetchTooltip) end
},
use_tooltipSpace = {
type = "description",
name = "",
order = 62.2,
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and not trigger.use_tooltip and trigger.fetchTooltip) end
},
tooltip_operator = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Operator"],
order = 62.3,
disabled = function() return not trigger.use_tooltip end,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and trigger.use_tooltip and trigger.fetchTooltip) end,
values = WeakAuras.string_operator_types
},
tooltip = {
type = "input",
name = L["Tooltip Content"],
width = WeakAuras.doubleWidth,
order = 62.4,
disabled = function() return not trigger.use_tooltip end,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and trigger.use_tooltip and trigger.fetchTooltip) end
},
use_tooltipValue = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Tooltip Value"],
order = 63.1,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and trigger.fetchTooltip) end
},
tooltipValueNumber = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Tooltip Value #"],
order = 63.2,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and trigger.use_tooltipValue and trigger.fetchTooltip) end,
values = WeakAuras.tooltip_count
},
use_tooltipValueSpace = {
type = "description",
name = "",
order = 63.2,
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and not trigger.use_tooltipValue and trigger.fetchTooltip) end
},
tooltipValue_operator = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Operator"],
order = 63.3,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and trigger.use_tooltipValue and trigger.fetchTooltip) end,
values = WeakAuras.operator_types
},
tooltipValue = {
type = "input",
name = L["Tooltip"],
width = WeakAuras.normalWidth,
validate = ValidateNumeric,
order = 63.4,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger) and trigger.use_tooltipValue and trigger.fetchTooltip) end
},
use_stealable = {
type = "toggle",
name = function(input)
local value = trigger.use_stealable
if value == nil then return L["Is Stealable"]
elseif value == false then return "|cFFFF0000 "..L["Negator"].." "..L["Is Stealable"]
else return "|cFF00FF00"..L["Is Stealable"] end
end,
width = WeakAuras.doubleWidth,
order = 64,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger)) end,
get = function()
local value = trigger.use_stealable
if value == nil then return false
elseif value == false then return "false"
else return "true" end
end,
set = function(info, v)
if v then
trigger.use_stealable = true
else
local value = trigger.use_stealable
if value == false then trigger.use_stealable = nil
else trigger.use_stealable = false end
end
WeakAuras.Add(data)
WeakAuras.SetIconNames(data)
end
},
useAffected = {
type = "toggle",
name = L["Fetch Affected/Unaffected Names"],
width = WeakAuras.doubleWidth,
order = 65,
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party")) end
},
ownOnly = {
type = "toggle",
width = WeakAuras.doubleWidth,
name = function()
local value = trigger.ownOnly
if value == nil then return L["Own Only"]
elseif value == false then return "|cFFFF0000 "..L["Negator"].." "..L["Own Only"]
else return "|cFF00FF00"..L["Own Only"] end
end,
desc = function()
local value = trigger.ownOnly
if value == nil then return L["Only match auras cast by the player or his pet"]
elseif value == false then return L["Only match auras cast by people other than the player or his pet"]
else return L["Only match auras cast by the player or his pet"] end
end,
get = function()
local value = trigger.ownOnly
if value == nil then return false
elseif value == false then return "false"
else return "true" end
end,
set = function(info, v)
if v then
trigger.ownOnly = true
else
local value = trigger.ownOnly
if value == false then trigger.ownOnly = nil
else trigger.ownOnly = false end
end
WeakAuras.Add(data)
end,
order = 66,
hidden = function() return not trigger.type == "aura2" end
},
useGroupRole = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Filter by Group Role"],
order = 67.1,
hidden = function() return
not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"))
or WeakAuras.IsClassic()
end
},
group_role = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Group Role"],
values = WeakAuras.role_types,
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party") and trigger.useGroupRole) end,
order = 67.2
},
group_roleSpace = {
type = "description",
name = "",
order = 67.2,
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party") and not trigger.useGroupRole) end
},
ignoreSelf = {
type = "toggle",
name = L["Ignore Self"],
order = 67.3,
width = WeakAuras.doubleWidth,
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party")) end
},
useClass = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Filter by Class"],
order = 68.1,
hidden = function() return
not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"))
end
},
class = {
type = "multiselect",
width = WeakAuras.normalWidth,
name = L["Class"],
values = WeakAuras.class_types,
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party") and trigger.useClass) end,
order = 68.2
},
classSpace = {
type = "description",
name = "",
order = 68.3,
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party") and not trigger.useClass) end
},
useGroup_count = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Unit Count"],
hidden = function() return not (trigger.type == "aura2" and IsGroupTrigger(trigger)) end,
order = 69
},
useGroup_countSpace = {
type = "description",
name = "",
order = 69.1,
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and IsGroupTrigger(trigger) and not trigger.useGroup_count) end
},
group_countOperator = {
type = "select",
name = L["Operator"],
desc = function()
if (trigger.unit == "multi") then
return L["Compare against the number of units affected."]
else
local groupType = WeakAuras.unit_types_bufftrigger_2[trigger.unit or "group"] or "|cFFFF0000Error|r"
return L["Group aura count description"]:format(groupType, groupType, groupType, groupType, groupType, groupType, groupType)
end
end,
order = 69.2,
width = WeakAuras.halfWidth,
values = operator_types,
hidden = function() return not (trigger.type == "aura2" and IsGroupTrigger(trigger) and trigger.useGroup_count) end,
get = function() return trigger.group_countOperator end
},
group_count = {
type = "input",
name = L["Count"],
desc = function()
if (trigger.unit == "multi") then
return L["Compare against the number of units affected."]
else
local groupType = WeakAuras.unit_types_bufftrigger_2[trigger.unit or "group"] or "|cFFFF0000Error|r"
return L["Group aura count description"]:format(groupType, groupType, groupType, groupType, groupType, groupType, groupType)
end
end,
order = 69.3,
width = WeakAuras.halfWidth,
hidden = function() return not (trigger.type == "aura2" and IsGroupTrigger(trigger) and trigger.useGroup_count) end,
},
use_matchesShowOn = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Show On"],
order = 71,
hidden = function() return not (trigger.type == "aura2" and not IsGroupTrigger(trigger)) end,
get = function() return true end,
disabled = true
},
matchesShowOn = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Show On"],
values = WeakAuras.bufftrigger_2_progress_behavior_types,
order = 71.1,
hidden = function() return not (trigger.type == "aura2" and not IsGroupTrigger(trigger)) end,
get = function()
return trigger.matchesShowOn or "showOnActive"
end
},
useMatch_count = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Match Count"],
hidden = function() return not (trigger.type == "aura2" and IsGroupTrigger(trigger)) end,
order = 71.2
},
useMatch_countSpace = {
type = "description",
name = "",
order = 71.3,
width = WeakAuras.normalWidth,
hidden = function()
if trigger.type ~= "aura2" then
return true
end
if IsGroupTrigger(trigger) then
return trigger.useMatch_count
else
return trigger.matchesShowOn ~= "showOnMatches"
end
end
},
match_countOperator = {
type = "select",
name = L["Operator"],
order = 71.4,
width = WeakAuras.halfWidth,
values = operator_types,
hidden = function() return not (trigger.type == "aura2" and HasMatchCount(trigger)) end,
desc = L["Counts the number of matches over all units."]
},
match_count = {
type = "input",
name = L["Count"],
order = 71.5,
width = WeakAuras.halfWidth,
hidden = function() return not (trigger.type == "aura2" and HasMatchCount(trigger)) end,
validate = ValidateNumeric,
desc = L["Counts the number of matches over all units."]
},
showClones = {
type = "toggle",
name = L["Auto-Clone (Show All Matches)"],
order = 72,
hidden = function() return not (trigger.type == "aura2" and not IsSingleMissing(trigger)) end,
width = WeakAuras.doubleWidth,
set = function(info, v)
trigger.showClones = v
WeakAuras.Add(data)
end
},
combinePerUnit = {
type = "toggle",
name = L["Combine Matches Per Unit"],
width = WeakAuras.doubleWidth,
order = 72.2,
hidden = function()
return not (trigger.type == "aura2" and IsGroupTrigger(trigger) and trigger.showClones)
end
},
use_perUnitMode = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Show Matches for Units"],
order = 72.3,
hidden = function()
return not (trigger.type == "aura2" and IsGroupTrigger(trigger) and trigger.showClones and trigger.unit ~= "multi" and trigger.combinePerUnit)
end,
get = function() return true end,
disabled = true
},
perUnitMode = {
type = "select",
name = L["Show Matches for"],
values = WeakAuras.bufftrigger_2_per_unit_mode,
order = 72.4,
width = WeakAuras.normalWidth,
hidden = function()
return not (trigger.type == "aura2" and IsGroupTrigger(trigger) and trigger.showClones and trigger.unit ~= "multi" and trigger.combinePerUnit)
end,
get = function()
return trigger.perUnitMode or "affected"
end
},
use_combineMode = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Preferred Match"],
order = 72.5,
hidden = function()
if (trigger.type == "aura2") then
if (IsGroupTrigger(trigger)) then
if trigger.showClones then
return not (trigger.combinePerUnit and trigger.perUnitMode ~= "unaffected")
else
return false
end
else
return not (not IsSingleMissing(trigger) and not trigger.showClones)
end
end
return true
end,
get = function() return true end,
disabled = true
},
combineMode = {
type = "select",
name = L["Preferred Match"],
values = WeakAuras.bufftrigger_2_preferred_match_types,
order = 72.6,
width = WeakAuras.normalWidth,
hidden = function()
if (trigger.type == "aura2") then
if (IsGroupTrigger(trigger)) then
if trigger.showClones then
return not (trigger.combinePerUnit and trigger.perUnitMode ~= "unaffected")
else
return false
end
else
return not (not IsSingleMissing(trigger) and not trigger.showClones)
end
end
return true
end,
get = function()
return trigger.combineMode or "showLowest"
end
},
unitExists = {
type = "toggle",
name = L["Show If Unit Does Not Exist"],
width = WeakAuras.doubleWidth,
order = 73,
hidden = function()
return not (trigger.type == "aura2" and trigger.unit ~= "player" and not IsGroupTrigger(trigger))
end,
},
}
-- Names
local nameOptionSize = CountNames(data, optionTriggerChoices, "auranames") + 1
local spellOptionsSize = CountNames(data, optionTriggerChoices, "auraspellids") + 1
local blackNameOptionSize = CountNames(data, optionTriggerChoices, "blackauranames") + 1
local blackSpellOptionsSize = CountNames(data, optionTriggerChoices, "blackauraspellids") + 1
CreateNameOptions(aura_options, data, trigger, nameOptionSize,
false, false, "name", 12, "useName", "auranames",
L["Aura Name"],
L["Enter an Aura Name, partial Aura Name, or Spell ID. A Spell ID will match any spells with the same name."])
CreateNameOptions(aura_options, data, trigger, spellOptionsSize,
true, false, "spellid", 22, "useExactSpellId", "auraspellids",
L["Spell ID"], L["Enter a Spell ID"])
CreateNameOptions(aura_options, data, trigger, blackNameOptionSize,
false, true, "blackname", 32, "useBlackName", "blackauranames",
L["Blacklisted Aura Name"],
L["Enter an Aura Name, partial Aura Name, or Spell ID. A Spell ID will match any spells with the same name."])
CreateNameOptions(aura_options, data, trigger, blackSpellOptionsSize,
true, true, "blackspellid", 42, "useBlackExactSpellId", "blackauraspellids",
L["Blacklisted Spell ID"], L["Enter a Spell ID"])
return aura_options
end
WeakAuras.RegisterTriggerSystemOptions({"aura2"}, GetBuffTriggerOptions)
+178
View File
@@ -0,0 +1,178 @@
if not WeakAuras.IsCorrectVersion() then return end
-- Lua APIs
local pairs, error, coroutine = pairs, error, coroutine
-- WoW APIs
local GetSpellInfo, IsSpellKnown = GetSpellInfo, IsSpellKnown
local WeakAuras = WeakAuras
local spellCache = {}
WeakAuras.spellCache = spellCache
local cache
local bestIcon = {}
local dynFrame = WeakAuras.dynFrame
-- Builds a cache of name/icon pairs from existing spell data
-- This is a rather slow operation, so it's only done once, and the result is subsequently saved
function spellCache.Build(callback)
if cache then
local co = coroutine.create(function()
local id = 0
local misses = 0
while misses < 400 do
id = id + 1
local name, _, icon = GetSpellInfo(id)
if(icon == 136243) then -- 136243 is the a gear icon, we can ignore those spells
misses = 0;
elseif name and name ~= "" then
cache[name] = cache[name] or {}
cache[name][id] = icon
misses = 0
else
misses = misses + 1
end
coroutine.yield()
end
if callback then
callback()
end
end)
dynFrame:AddAction(callback, co)
else
error("spellCache has not been loaded. Call WeakAuras.spellCache.Load(...) first.")
end
end
function spellCache.GetIcon(name)
if (name == nil) then
return nil;
end
if cache then
if (bestIcon[name]) then
return bestIcon[name]
end
local icons = cache[name]
local bestMatch = nil
if (icons) then
for spellId, icon in pairs(icons) do
if (not bestMatch) then
bestMatch = spellId
elseif(type(spellId) == "number" and IsSpellKnown(spellId)) then
bestMatch = spellId
end
end
end
bestIcon[name] = bestMatch and icons[bestMatch];
return bestIcon[name];
else
error("spellCache has not been loaded. Call WeakAuras.spellCache.Load(...) first.")
end
end
function spellCache.AddIcon(name, id, icon)
if cache then
if name then
cache[name] = cache[name] or {}
if id and icon then
cache[name][id] = icon
end
end
else
error("spellCache has not been loaded. Call WeakAuras.spellCache.Load(...) first.")
end
end
function spellCache.Get()
if cache then
return cache
else
error("spellCache has not been loaded. Call WeakAuras.spellCache.Load(...) first.")
end
end
function spellCache.Load(data)
cache = cache or data
end
-- This function computes the Levenshtein distance between two strings
-- It is used in this program to match spell icon textures with "good" spell names; i.e.,
-- spell names that are very similar to the name of the texture
local function Lev(str1, str2)
local matrix = {};
for i=0, str1:len() do
matrix[i] = {[0] = i};
end
for j=0, str2:len() do
matrix[0][j] = j;
end
for j=1, str2:len() do
for i =1, str1:len() do
if(str1:sub(i, i) == str2:sub(j, j)) then
matrix[i][j] = matrix[i-1][j-1];
else
matrix[i][j] = math.min(matrix[i-1][j], matrix[i][j-1], matrix[i-1][j-1]) + 1;
end
end
end
return matrix[str1:len()][str2:len()];
end
function spellCache.BestKeyMatch(nearkey)
local bestKey = "";
local bestDistance = math.huge;
local partialMatches = {};
if cache[nearkey] then
return nearkey
end
for key, value in pairs(cache) do
if key:lower() == nearkey:lower() then
return key
end
if(key:lower():find(nearkey:lower(), 1, true)) then
partialMatches[key] = value;
end
end
for key, value in pairs(partialMatches) do
local distance = Lev(nearkey, key);
if(distance < bestDistance) then
bestKey = key;
bestDistance = distance;
end
end
return bestKey;
end
function spellCache.CorrectAuraName(input)
if (not cache) then
error("spellCache has not been loaded. Call WeakAuras.spellCache.Load(...) first.")
end
local spellId = WeakAuras.SafeToNumber(input);
if(spellId) then
local name, _, icon = GetSpellInfo(spellId);
if(name) then
spellCache.AddIcon(name, spellId, icon)
return name, spellId;
else
return "Invalid Spell ID";
end
else
local ret = spellCache.BestKeyMatch(input);
if(ret == "") then
return "No Match Found", nil;
else
return ret, nil;
end
end
end
File diff suppressed because it is too large Load Diff
+338
View File
@@ -0,0 +1,338 @@
if not WeakAuras.IsCorrectVersion() then return end
-- Lua APIs
local tinsert, wipe = table.insert, wipe
local pairs = pairs
local AceGUI = LibStub("AceGUI-3.0")
local collisions = WeakAuras.collisions
local displayButtons = WeakAuras.displayButtons
local savedVars = WeakAuras.savedVars
local importAddonButtons = {}
local importDisplayButtons = {}
WeakAuras.importDisplayButtons = importDisplayButtons
function WeakAuras.CreateImportButtons()
wipe(importAddonButtons);
wipe(importDisplayButtons);
for addonName, addonData in pairs(WeakAuras.addons) do
local addonButton = AceGUI:Create("WeakAurasImportButton");
importAddonButtons[addonName] = addonButton;
addonButton:SetTitle(addonData.displayName);
addonButton:SetIcon(addonData.icon);
addonButton:SetDescription(addonData.description);
addonButton:SetClick(function()
if(addonButton.checkbox:GetChecked()) then
for id, data in pairs(addonData.displays) do
if not(data.parent) then
local childButton = importDisplayButtons[id];
childButton.checkbox:SetChecked(true);
WeakAuras.EnableAddonDisplay(id);
end
end
for id, data in pairs(addonData.displays) do
if(data.parent) then
local childButton = importDisplayButtons[id];
childButton.checkbox:SetChecked(true);
WeakAuras.EnableAddonDisplay(id);
end
end
else
for id, data in pairs(addonData.displays) do
if not(data.parent) then
local childButton = importDisplayButtons[id];
childButton.checkbox:SetChecked(false);
WeakAuras.DisableAddonDisplay(id);
end
end
for id, data in pairs(addonData.displays) do
if(data.parent) then
local childButton = importDisplayButtons[id];
childButton.checkbox:SetChecked(false);
WeakAuras.DisableAddonDisplay(id);
end
end
end
WeakAuras.ResolveCollisions(function()
for groupId, dataFromAddon in pairs(addonData.displays) do
if(dataFromAddon.controlledChildren) then
local data = WeakAuras.GetData(groupId);
if(data) then
for index, childId in pairs(data.controlledChildren) do
local childButton = WeakAuras.GetDisplayButton(childId);
childButton:SetGroup(groupId, data.regionType == "dynamicgroup");
childButton:SetGroupOrder(index, #data.controlledChildren);
end
local button = WeakAuras.GetDisplayButton(groupId);
button.callbacks.UpdateExpandButton();
WeakAuras.UpdateDisplayButton(data);
WeakAuras.ReloadGroupRegionOptions(data);
end
end
end
WeakAuras.ScanForLoads();
WeakAuras.SortDisplayButtons();
end);
end);
local function UpdateAddonChecked()
local shouldBeChecked = true;
for id, data in pairs(addonData.displays) do
if not(WeakAuras.IsDefinedByAddon(id)) then
shouldBeChecked = false;
break;
end
end
addonButton.checkbox:SetChecked(shouldBeChecked);
end
local numAddonDisplays = 0;
for id, data in pairs(addonData.displays) do
if(data.controlledChildren) then
numAddonDisplays = numAddonDisplays + 1;
local groupButton = AceGUI:Create("WeakAurasImportButton");
importDisplayButtons[id] = groupButton;
groupButton:SetTitle(id);
groupButton:SetDescription(data.desc);
local numGroupDisplays = 0;
local function UpdateGroupChecked()
local shouldBeChecked = true;
for index, childId in pairs(data.controlledChildren) do
if not(WeakAuras.IsDefinedByAddon(childId)) then
shouldBeChecked = false;
break;
end
end
groupButton.checkbox:SetChecked(shouldBeChecked);
UpdateAddonChecked();
end
for index, childId in pairs(data.controlledChildren) do
numGroupDisplays = numGroupDisplays + 1;
numAddonDisplays = numAddonDisplays + 1;
local childButton = AceGUI:Create("WeakAurasImportButton");
importDisplayButtons[childId] = childButton;
local data = WeakAuras.addons[addonName].displays[childId];
childButton:SetTitle(childId);
childButton:SetDescription(data.desc);
childButton:SetExpandVisible(false);
childButton:SetLevel(3);
childButton:SetClick(function()
if(childButton.checkbox:GetChecked()) then
WeakAuras.EnableAddonDisplay(childId);
else
WeakAuras.DisableAddonDisplay(childId);
end
WeakAuras.ResolveCollisions(function()
WeakAuras.ScanForLoads();
WeakAuras.SortDisplayButtons();
UpdateGroupChecked();
end);
end);
childButton.updateChecked = UpdateGroupChecked;
childButton.checkbox:SetChecked(WeakAuras.IsDefinedByAddon(childId));
end
groupButton:SetClick(function()
if(groupButton.checkbox:GetChecked()) then
WeakAuras.EnableAddonDisplay(id);
for index, childId in pairs(data.controlledChildren) do
local childButton = importDisplayButtons[childId];
childButton.checkbox:SetChecked(true);
WeakAuras.EnableAddonDisplay(childId);
end
else
WeakAuras.DisableAddonDisplay(id);
for index, childId in pairs(data.controlledChildren) do
local childButton = importDisplayButtons[childId];
childButton.checkbox:SetChecked(false);
WeakAuras.DisableAddonDisplay(childId);
end
end
WeakAuras.ResolveCollisions(function()
local data = WeakAuras.GetData(id);
if(data) then
for index, childId in pairs(data.controlledChildren) do
local childButton = WeakAuras.GetDisplayButton(childId);
childButton:SetGroup(id, data.regionType == "dynamicgroup");
childButton:SetGroupOrder(index, #data.controlledChildren);
end
local button = WeakAuras.GetDisplayButton(id);
button.callbacks.UpdateExpandButton();
WeakAuras.UpdateDisplayButton(data);
WeakAuras.ReloadGroupRegionOptions(data);
end
WeakAuras.ScanForLoads();
WeakAuras.SortDisplayButtons();
UpdateAddonChecked();
end);
end);
groupButton.updateChecked = UpdateAddonChecked;
groupButton:SetExpandVisible(true);
if(numGroupDisplays > 0) then
groupButton:EnableExpand();
groupButton:SetOnExpandCollapse(WeakAuras.SortImportButtons);
end
groupButton:SetLevel(2);
UpdateGroupChecked();
elseif not(importDisplayButtons[id]) then
numAddonDisplays = numAddonDisplays + 1;
local displayButton = AceGUI:Create("WeakAurasImportButton");
importDisplayButtons[id] = displayButton;
displayButton:SetTitle(id);
displayButton:SetDescription(data.desc);
displayButton:SetExpandVisible(false);
displayButton:SetLevel(2);
displayButton:SetClick(function()
if(displayButton.checkbox:GetChecked()) then
WeakAuras.EnableAddonDisplay(id);
else
WeakAuras.DisableAddonDisplay(id);
end
WeakAuras.ResolveCollisions(function()
WeakAuras.SortDisplayButtons()
UpdateAddonChecked();
end);
end);
displayButton.updateChecked = UpdateAddonChecked;
displayButton.checkbox:SetChecked(WeakAuras.IsDefinedByAddon(id));
end
end
addonButton:SetExpandVisible(true);
if(numAddonDisplays > 0) then
addonButton:EnableExpand();
addonButton:SetOnExpandCollapse(WeakAuras.SortImportButtons);
end
addonButton:SetLevel(1);
UpdateAddonChecked();
end
end
local container = nil;
function WeakAuras.SortImportButtons(newContainer)
container = newContainer or container;
wipe(container.children);
local toSort = {};
for addon, addonData in pairs(WeakAuras.addons) do
container:AddChild(importAddonButtons[addon]);
wipe(toSort);
for id, data in pairs(addonData.displays) do
if not(data.parent) then
tinsert(toSort, id);
end
end
table.sort(toSort, function(a, b) return a < b end);
for index, id in ipairs(toSort) do
if(importAddonButtons[addon]:GetExpanded()) then
importDisplayButtons[id].frame:Show();
container:AddChild(importDisplayButtons[id]);
else
importDisplayButtons[id].frame:Hide();
end
if(addonData.displays[id].controlledChildren) then
for childIndex, childId in pairs(addonData.displays[id].controlledChildren) do
if(importAddonButtons[addon]:GetExpanded() and importDisplayButtons[id]:GetExpanded()) then
importDisplayButtons[childId].frame:Show();
container:AddChild(importDisplayButtons[childId]);
else
importDisplayButtons[childId].frame:Hide();
end
end
end
end
end
container:DoLayout();
end
function WeakAuras.EnableAddonDisplay(id)
local db = savedVars.db
if not(db.registered[id]) then
local addon, data;
for addonName, addonData in pairs(WeakAuras.addons) do
if(addonData.displays[id]) then
addon = addonName;
data = {}
WeakAuras.DeepCopy(addonData.displays[id], data);
break;
end
end
if(db.displays[id]) then
-- ID collision
collisions[id] = {addon, data};
else
db.registered[id] = addon;
if(data.controlledChildren) then
wipe(data.controlledChildren);
end
WeakAuras.Add(data);
WeakAuras.SyncParentChildRelationships(true);
WeakAuras.AddDisplayButton(data);
end
end
end
-- This function overrides the WeakAuras.CollisionResolved that is defined in WeakAuras.lua,
-- ensuring that sidebar buttons are created properly after collision resolution
function WeakAuras.CollisionResolved(addon, data, force)
WeakAuras.EnableAddonDisplay(data.id);
end
function WeakAuras.DisableAddonDisplay(id)
local frame = WeakAuras.OptionsFrame()
local db = savedVars.db
db.registered[id] = false;
local data = WeakAuras.GetData(id);
if(data) then
local parentData;
if(data.parent) then
parentData = db.displays[data.parent];
end
if(data.controlledChildren) then
for index, childId in pairs(data.controlledChildren) do
local childButton = displayButtons[childId];
if(childButton) then
childButton:SetGroup();
end
local childData = db.displays[childId];
if(childData) then
childData.parent = nil;
end
end
end
WeakAuras.Delete(data);
WeakAuras.SyncParentChildRelationships(true);
frame.buttonsScroll:DeleteChild(displayButtons[id]);
displayButtons[id] = nil;
if(parentData and parentData.controlledChildren) then
for index, childId in pairs(parentData.controlledChildren) do
local childButton = displayButtons[childId];
if(childButton) then
childButton:SetGroupOrder(index, #parentData.controlledChildren);
end
end
WeakAuras.Add(parentData);
WeakAuras.ReloadGroupRegionOptions(parentData);
WeakAuras.UpdateDisplayButton(parentData);
end
end
end
File diff suppressed because it is too large Load Diff
+502
View File
@@ -0,0 +1,502 @@
if not WeakAuras.IsCorrectVersion() then return end
local L = WeakAuras.L;
local event_types = WeakAuras.event_types;
local status_types = WeakAuras.status_types;
local check_types = WeakAuras.check_types;
local subevent_prefix_types = WeakAuras.subevent_prefix_types;
local subevent_actual_prefix_types = WeakAuras.subevent_actual_prefix_types;
local subevent_suffix_types = WeakAuras.subevent_suffix_types;
local custom_trigger_types = WeakAuras.custom_trigger_types;
local eventend_types = WeakAuras.eventend_types;
local function GetCustomTriggerOptions(data, optionTriggerChoices, trigger)
local id = data.id;
local appendToTriggerPath, appendToUntriggerPath;
if (data.controlledChildren) then
function appendToTriggerPath(...)
local baseRet = {...};
local result = {};
for index, childId in pairs(data.controlledChildren) do
local ret = {};
WeakAuras.DeepCopy(baseRet, ret);
local optionTriggerChoice = optionTriggerChoices[childId];
tinsert(ret, 1, "trigger");
tinsert(ret, 1, optionTriggerChoice)
tinsert(ret, 1, "triggers")
result[childId] = ret;
end
return result;
end
function appendToUntriggerPath(...)
local baseRet = {...};
local result = {};
for index, childId in pairs(data.controlledChildren) do
local ret = {};
WeakAuras.DeepCopy(baseRet, ret);
local optionTriggerChoice = optionTriggerChoices[childId];
tinsert(ret, 1, "untrigger");
tinsert(ret, 1, optionTriggerChoice);
tinsert(ret, 1, "triggers");
result[childId] = ret;
end
return result;
end
else
function appendToTriggerPath(...)
local ret = {...};
tinsert(ret, 1, "trigger");
tinsert(ret, 1, optionTriggerChoices[id]);
tinsert(ret, 1, "triggers");
return ret;
end
function appendToUntriggerPath(...)
local ret = {...};
tinsert(ret, 1, "untrigger");
tinsert(ret, 1, optionTriggerChoices[id]);
tinsert(ret, 1, "triggers");
return ret;
end
end
local customOptions =
{
custom_type = {
type = "select",
name = L["Event Type"],
order = 7,
width = WeakAuras.doubleWidth,
values = custom_trigger_types,
hidden = function() return not (trigger.type == "custom") end,
set = function(info, v)
trigger.custom_type = v;
WeakAuras.Add(data);
WeakAuras.SetIconNames(data);
WeakAuras.UpdateDisplayButton(data);
WeakAuras.ReloadOptions(data.id);
end
},
check = {
type = "select",
name = L["Check On..."],
width = WeakAuras.doubleWidth / 3,
order = 8,
values = check_types,
hidden = function() return not (trigger.type == "custom"
and (trigger.custom_type == "status" or trigger.custom_type == "stateupdate")
and trigger.check ~= "update")
end,
get = function() return trigger.check end,
set = function(info, v)
trigger.check = v;
WeakAuras.Add(data);
WeakAuras.SetIconNames(data);
WeakAuras.UpdateDisplayButton(data);
end
},
check2 = {
type = "select",
name = L["Check On..."],
order = 9,
width = WeakAuras.doubleWidth,
values = check_types,
hidden = function() return not (trigger.type == "custom"
and (trigger.custom_type == "status" or trigger.custom_type == "stateupdate")
and trigger.check == "update")
end,
get = function() return trigger.check end,
set = function(info, v)
trigger.check = v;
WeakAuras.Add(data);
WeakAuras.SetIconNames(data);
WeakAuras.UpdateDisplayButton(data);
end
},
events = {
type = "input",
width = WeakAuras.doubleWidth * 2 / 3,
name = L["Event(s)"],
desc = L["Custom trigger status tooltip"],
order = 8.1,
hidden = function() return not (trigger.type == "custom"
and (trigger.custom_type == "status" or trigger.custom_type == "stateupdate")
and trigger.check ~= "update") end,
get = function() return trigger.events end,
set = function(info, v)
trigger.events = v;
WeakAuras.Add(data);
WeakAuras.SetIconNames(data);
WeakAuras.UpdateDisplayButton(data);
end
},
events2 = {
type = "input",
name = L["Event(s)"],
desc = L["Custom trigger event tooltip"],
width = WeakAuras.doubleWidth,
order = 9.1,
hidden = function() return not (trigger.type == "custom" and trigger.custom_type == "event") end,
get = function() return trigger.events end,
set = function(info, v)
trigger.events = v;
WeakAuras.Add(data);
WeakAuras.SetIconNames(data);
WeakAuras.UpdateDisplayButton(data);
end
},
event_customError = {
type = "description",
name = function()
local events = trigger.custom_type == "event" and trigger.events2 or trigger.events
for index, event in pairs(WeakAuras.split(events)) do
local trueEvent
for i in event:gmatch("[^:]+") do
if not trueEvent then
trueEvent = string.upper(i)
elseif trueEvent == "CLEU" or trueEvent == "COMBAT_LOG_EVENT_UNFILTERED" then
local subevent = string.upper(i)
if not WeakAuras.IsCLEUSubevent(subevent) then
return "|cFFFF0000"..L["%s is not a valid SubEvent for COMBAT_LOG_EVENT_UNFILTERED"]:format(subevent)
end
elseif trueEvent:match("^UNIT_") then
local unit = string.lower(i)
if not WeakAuras.baseUnitId[unit] and not WeakAuras.multiUnitId[unit] then
return "|cFFFF0000"..L["Unit %s is not a valid unit for RegisterUnitEvent"]:format(unit)
end
end
end
end
return ""
end,
width = WeakAuras.doubleWidth,
order = 9.201,
hidden = function()
if not (
trigger.type == "custom"
and (trigger.custom_type == "status" or trigger.custom_type == "stateupdate" or trigger.custom_type == "event")
and trigger.check ~= "update"
)
then
return true
end
local events = trigger.custom_type == "event" and trigger.events2 or trigger.events
for index, event in pairs(WeakAuras.split(events)) do
local trueEvent
for i in event:gmatch("[^:]+") do
if not trueEvent then
trueEvent = string.upper(i)
elseif trueEvent == "CLEU" or trueEvent == "COMBAT_LOG_EVENT_UNFILTERED" then
if not WeakAuras.IsCLEUSubevent(string.upper(i)) then
return false
end
elseif trueEvent:match("^UNIT_") then
local unit = string.lower(i)
if not WeakAuras.baseUnitId[unit] then
return false
end
end
end
end
return true
end
},
-- texteditor below
custom_hide = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Hide"],
order = 12,
hidden = function() return not (trigger.type == "custom" and trigger.custom_type == "event" and trigger.custom_hide ~= "custom") end,
values = eventend_types,
get = function() trigger.custom_hide = trigger.custom_hide or "timed"; return trigger.custom_hide end,
set = function(info, v)
trigger.custom_hide = v;
WeakAuras.Add(data);
WeakAuras.SetIconNames(data);
WeakAuras.UpdateDisplayButton(data);
end
},
custom_hide2 = {
type = "select",
name = L["Hide"],
order = 12,
width = WeakAuras.doubleWidth,
hidden = function() return not (trigger.type == "custom" and trigger.custom_type == "event" and trigger.custom_hide == "custom") end,
values = eventend_types,
get = function() return trigger.custom_hide end,
set = function(info, v)
trigger.custom_hide = v;
WeakAuras.Add(data);
WeakAuras.SetIconNames(data);
WeakAuras.UpdateDisplayButton(data);
end
},
dynamicDuration = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Dynamic Duration"],
order = 12.5,
hidden = function() return not (trigger.type == "custom" and trigger.custom_type == "event" and trigger.custom_hide ~= "custom") end,
set = function(info, v)
trigger.dynamicDuration = v;
WeakAuras.Add(data);
WeakAuras.SetIconNames(data);
WeakAuras.UpdateDisplayButton(data);
WeakAuras.ReloadOptions(data.id);
end
},
duration = {
type = "input",
width = WeakAuras.normalWidth,
name = L["Duration (s)"],
order = 13,
hidden = function() return not (trigger.type == "custom" and trigger.custom_type == "event" and trigger.custom_hide ~= "custom" and not trigger.dynamicDuration) end,
},
addOverlayFunction = {
type = "execute",
name = L["Add Overlay"],
order = 17.9,
width = WeakAuras.doubleWidth,
hidden = function()
if (trigger.type ~= "custom") then
return true;
end
if (trigger.custom_type == "stateupdate") then
return true;
end
for i = 1, 7 do
if (trigger["customOverlay" .. i] == nil) then
return false;
end
end
return true;
end,
func = function()
if (data.controlledChildren) then
for index, childId in ipairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
for i = 1, 7 do
if (childData.trigger["customOverlay" .. i] == nil) then
childData.trigger["customOverlay" .. i] = "";
break;
end
end
end
else
for i = 1, 7 do
if (trigger["customOverlay" .. i] == nil) then
trigger["customOverlay" .. i] = "";
break;
end
end
end
WeakAuras.Add(data);
end
}
};
local function extraSetFunction()
WeakAuras.SetIconNames(data);
WeakAuras.UpdateDisplayButton(data);
end
local function extraSetFunctionReload()
extraSetFunction();
WeakAuras.ReloadOptions(data.id);
end
local function hideCustomTrigger()
return not (trigger.type == "custom")
end
WeakAuras.AddCodeOption(customOptions, data, L["Custom Trigger"], "custom_trigger", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers",
10, hideCustomTrigger, appendToTriggerPath("custom"), false, true, extraSetFunction, nil, true);
local function hideCustomVariables()
return not (trigger.type == "custom" and trigger.custom_type == "stateupdate");
end
WeakAuras.AddCodeOption(customOptions, data, L["Custom Variables"], "custom_variables", "https://github.com/WeakAuras/WeakAuras2/wiki/Trigger-State-Updater-(TSU)#custom-variables",
11, hideCustomVariables, appendToTriggerPath("customVariables"), false, true, extraSetFunctionReload, nil, true);
local function hideCustomUntrigger()
return not (trigger.type == "custom"
and (trigger.custom_type == "status" or (trigger.custom_type == "event" and trigger.custom_hide == "custom")))
end
WeakAuras.AddCodeOption(customOptions, data, L["Custom Untrigger"], "custom_untrigger", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers",
14, hideCustomUntrigger, appendToUntriggerPath("custom"), false, true, extraSetFunction);
local function hideCustomDuration()
return not (trigger.type == "custom"
and (trigger.custom_type == "status"
or (trigger.custom_type == "event" and (trigger.custom_hide ~= "timed" or trigger.dynamicDuration))))
end
WeakAuras.AddCodeOption(customOptions, data, L["Duration Info"], "custom_duration", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers",
16, hideCustomDuration, appendToTriggerPath("customDuration"), false, true, extraSetFunctionReload);
local function hideIfTriggerStateUpdate()
return not (trigger.type == "custom" and trigger.custom_type ~= "stateupdate")
end
for i = 1, 7 do
local function hideOverlay()
if (trigger["customOverlay" .. i] == nil) then
return true;
end
return hideIfTriggerStateUpdate();
end
local function removeOverlay()
if (data.controlledChildren) then
for index, childId in ipairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
for j = i, 7 do
childData.trigger["customOverlay" .. j] = childData.trigger["customOverlay" .. (j +1)];
end
WeakAuras.ScheduleReloadOptions(childData);
end
WeakAuras.Add(data);
WeakAuras.ScheduleReloadOptions(data);
else
for j = i, 7 do
trigger["customOverlay" .. j] = trigger["customOverlay" .. (j +1)];
end
WeakAuras.Add(data);
WeakAuras.ScheduleReloadOptions(data);
end
end
local extraFunctions = {
{
buttonLabel = L["Remove"],
func = removeOverlay
}
}
WeakAuras.AddCodeOption(customOptions, data, string.format(L["Overlay %s Info"], i), "custom_overlay" .. i, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers",
17 + i / 10, hideOverlay, appendToTriggerPath("customOverlay" .. i), false, true, extraSetFunctionReload, extraFunctions);
end
WeakAuras.AddCodeOption(customOptions, data, L["Name Info"], "custom_name", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers",
18, hideIfTriggerStateUpdate, appendToTriggerPath("customName"), false, true, extraSetFunctionReload);
WeakAuras.AddCodeOption(customOptions, data, L["Icon Info"], "custom_icon", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers",
20, hideIfTriggerStateUpdate, appendToTriggerPath("customIcon"), false, true, extraSetFunction);
WeakAuras.AddCodeOption(customOptions, data, L["Texture Info"], "custom_texture", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers",
22, hideIfTriggerStateUpdate, appendToTriggerPath("customTexture"), false, true, extraSetFunction);
WeakAuras.AddCodeOption(customOptions, data, L["Stack Info"], "custom_stacks", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers",
23, hideIfTriggerStateUpdate, appendToTriggerPath("customStacks"), false, true, extraSetFunctionReload);
return customOptions;
end
local function GetGenericTriggerOptions(data, optionTriggerChoices)
local id = data.id;
local trigger;
local triggerType;
if (data.controlledChildren) then
triggerType = WeakAuras.getAll(data, {"trigger", "type"});
else
local triggernum = optionTriggerChoices[id];
trigger = data.triggers[triggernum].trigger;
triggerType = trigger.type;
end
local options = {
event = {
type = "select",
name = function()
if(trigger.type == "event") then
return L["Event"];
elseif(trigger.type == "status") then
return L["Status"];
end
end,
order = 7,
width = WeakAuras.doubleWidth,
values = function()
local type;
if (data.controlledChildren) then
type = WeakAuras.getAll(data, {"trigger", "type"});
else
type = trigger.type;
end
if(type == "event") then
return event_types;
elseif(type == "status") then
return status_types;
end
end,
control = "WeakAurasSortedDropdown",
hidden = function() return not (trigger.type == "event" or trigger.type == "status"); end
},
}
local combatLogOptions =
{
subeventPrefix = {
type = "select",
name = L["Message Prefix"],
width = WeakAuras.normalWidth,
order = 8,
values = subevent_prefix_types,
control = "WeakAurasSortedDropdown",
hidden = function() return not (trigger.type == "event" and trigger.event == "Combat Log"); end
},
subeventSuffix = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Message Suffix"],
order = 9,
values = subevent_suffix_types,
control = "WeakAurasSortedDropdown",
hidden = function() return not (trigger.type == "event" and trigger.event == "Combat Log" and subevent_actual_prefix_types[trigger.subeventPrefix]); end
},
spacer_suffix = {
type = "description",
name = "",
order = 9.1,
hidden = function() return not (trigger.type == "event" and trigger.event == "Combat Log"); end
},
}
if (triggerType == "custom") then
WeakAuras:Mixin(options, GetCustomTriggerOptions(data, optionTriggerChoices, trigger));
elseif (triggerType == "status" or triggerType == "event") then
local prototypeOptions;
if (data.controlledChildren) then
local event = WeakAuras.getAll(data, {"trigger", "event"});
local unevent = WeakAuras.getAll(data, {"trigger", "unevent"});
if(event and WeakAuras.event_prototypes[event]) then
prototypeOptions = WeakAuras.ConstructOptions(WeakAuras.event_prototypes[event], data, 10, optionTriggerChoices[id], nil, unevent);
if (event == "Combat Log") then
WeakAuras:Mixin(prototypeOptions, combatLogOptions);
end
end
else
local triggerNum = optionTriggerChoices[id];
local trigger, untrigger = data.triggers[triggerNum].trigger, data.triggers[triggerNum].untrigger;
if(WeakAuras.event_prototypes[trigger.event]) then
prototypeOptions = WeakAuras.ConstructOptions(WeakAuras.event_prototypes[trigger.event], data, 10, optionTriggerChoices[id]);
if (trigger.event == "Combat Log") then
WeakAuras:Mixin(prototypeOptions, combatLogOptions);
end
else
print("|cFF8800FFWeakAuras|r: No prototype for", trigger.event);
end
end
if (prototypeOptions) then
WeakAuras:Mixin(options, prototypeOptions);
end
end
return options;
end
WeakAuras.RegisterTriggerSystemOptions({"event", "status", "custom"}, GetGenericTriggerOptions);
File diff suppressed because it is too large Load Diff
+405
View File
@@ -0,0 +1,405 @@
if not WeakAuras.IsCorrectVersion() then return end
local L = WeakAuras.L
-- Options translation
L["1 Match"] = "1 Match"
L["Actions"] = "Actions"
L["Activate when the given aura(s) |cFFFF0000can't|r be found"] = "Activate when the given aura(s) |cFFFF0000can't|r be found"
L["Add a new display"] = "Add a new display"
L["Add Dynamic Text"] = "Add Dynamic Text"
L["Addon"] = "Addon"
L["Addons"] = "Addons"
L["Add to group %s"] = "Add to group %s"
L["Add to new Dynamic Group"] = "Add to new Dynamic Group"
L["Add to new Group"] = "Add to new Group"
L["Add Trigger"] = "Add Trigger"
L["A group that dynamically controls the positioning of its children"] = "A group that dynamically controls the positioning of its children"
L["Align"] = "Align"
L["Allow Full Rotation"] = "Allow Full Rotation"
L["Alpha"] = "Alpha"
L["Anchor"] = "Anchor"
L["Anchor Point"] = "Anchor Point"
L["Angle"] = "Angle"
L["Animate"] = "Animate"
L["Animated Expand and Collapse"] = "Animated Expand and Collapse"
L["Animation relative duration description"] = [=[
The duration of the animation relative to the duration of the display, expressed as a fraction (1/2), percentage (50%), or decimal (0.5).
|cFFFF0000Note:|r if a display does not have progress (it has a non-timed event trigger, is an aura with no duration, etc.), the animation will not play.
|cFF4444FFFor Example:|r
If the animation's duration is set to |cFF00CC0010%|r, and the display's trigger is a buff that lasts 20 seconds, the start animation will play for 2 seconds.
If the animation's duration is set to |cFF00CC0010%|r, and the display's trigger is a buff that has no set duration, no start animation will play (although it would if you specified a duration in seconds)."
]=]
L["Animations"] = "Animations"
L["Animation Sequence"] = "Animation Sequence"
L["Aquatic"] = "Aquatic"
L["Aura (Paladin)"] = "Aura"
L["Aura(s)"] = "Aura(s)"
L["Auto"] = "Auto"
L["Auto-cloning enabled"] = "Auto-cloning enabled"
L["Automatic Icon"] = "Automatic Icon"
L["Backdrop Color"] = "Backdrop Color"
L["Backdrop Style"] = "Backdrop Style"
L["Background"] = "Background"
L["Background Color"] = "Background Color"
L["Background Inset"] = "Background Inset"
L["Background Offset"] = "Background Offset"
L["Background Texture"] = "Background Texture"
L["Bar Alpha"] = "Bar Alpha"
L["Bar Color"] = "Bar Color"
L["Bar Color Settings"] = "Bar Color Settings"
L["Bar in Front"] = "Bar in Front"
L["Bar Texture"] = "Bar Texture"
L["Battle"] = "Battle"
L["Bear"] = "Bear"
L["Berserker"] = "Berserker"
L["Blend Mode"] = "Blend Mode"
L["Blood"] = "Blood"
L["Border"] = "Border"
L["Border Color"] = "Border Color"
L["Border Inset"] = "Border Inset"
L["Border Offset"] = "Border Offset"
L["Border Settings"] = "Border Settings"
L["Border Size"] = "Border Size"
L["Border Style"] = "Border Style"
L["Bottom Text"] = "Bottom Text"
L["Button Glow"] = "Button Glow"
L["Can be a name or a UID (e.g., party1). A name only works on friendly players in your group."] = "Can be a name or a UID (e.g., party1). A name only works on friendly players in your group."
L["Cancel"] = "Cancel"
L["Cat"] = "Cat"
L["Change the name of this display"] = "Change the name of this display"
L["Channel Number"] = "Channel Number"
L["Check On..."] = "Check On..."
L["Choose"] = "Choose"
L["Choose Trigger"] = "Choose Trigger"
L["Choose whether the displayed icon is automatic or defined manually"] = "Choose whether the displayed icon is automatic or defined manually"
L["Clone option enabled dialog"] = [=[
You have enabled an option that uses |cFFFF0000Auto-cloning|r.
|cFFFF0000Auto-cloning|r causes a display to be automatically duplicated to display multiple sources of information.
Unless you put this display in a |cFF22AA22Dynamic Group|r, all the clones will be displayed on top of each other in a big heap.
Would you like this display to be placed in a new |cFF22AA22Dynamic Group|r?]=]
L["Close"] = "Close"
L["Collapse"] = "Collapse"
L["Collapse all loaded displays"] = "Collapse all loaded displays"
L["Collapse all non-loaded displays"] = "Collapse all non-loaded displays"
L["Color"] = "Color"
L["Compress"] = "Compress"
L["Concentration"] = "Concentration"
L["Constant Factor"] = "Constant Factor"
L["Control-click to select multiple displays"] = "Control-click to select multiple displays"
L["Controls the positioning and configuration of multiple displays at the same time"] = "Controls the positioning and configuration of multiple displays at the same time"
L["Convert to..."] = "Convert to..."
L["Cooldown"] = "Cooldown"
L["Copy"] = "Copy"
L["Copy settings from..."] = "Copy settings from..."
L["Copy settings from another display"] = "Copy settings from another display"
L["Copy settings from %s"] = "Copy settings from %s"
L["Count"] = "Count"
L["Creating buttons: "] = "Creating buttons: "
L["Creating options: "] = "Creating options: "
L["Crop X"] = "Crop X"
L["Crop Y"] = "Crop Y"
L["Crusader"] = "Crusader"
L["Custom Code"] = "Custom Code"
L["Custom Trigger"] = "Custom Trigger"
L["Custom trigger event tooltip"] = [=[
Choose which events cause the custom trigger to be checked.
Multiple events can be specified using commas or spaces.
|cFF4444FFFor example:|r
UNIT_POWER_UPDATE, UNIT_AURA PLAYER_TARGET_CHANGED
]=]
L["Custom trigger status tooltip"] = [=[
Choose which events cause the custom trigger to be checked.
Since this is a status-type trigger, the specified events may be called by WeakAuras without the expected arguments.
Multiple events can be specified using commas or spaces.
|cFF4444FFFor example:|r
UNIT_POWER_UPDATE, UNIT_AURA PLAYER_TARGET_CHANGED
]=]
L["Custom Untrigger"] = "Custom Untrigger"
L["Custom untrigger event tooltip"] = [=[
Choose which events cause the custom un-trigger to be checked.
This can be different than the events defined for the trigger.
Multiple events can be specified using commas or spaces.
|cFF4444FFFor example:|r
UNIT_POWER_UPDATE, UNIT_AURA PLAYER_TARGET_CHANGED
]=]
L["Death"] = "Death"
L["Death Rune"] = "Death Rune"
L["Debuff Type"] = "Debuff Type"
L["Defensive"] = "Defensive"
L["Delete"] = "Delete"
L["Delete all"] = "Delete all"
L["Delete children and group"] = "Delete children and group"
L["Deletes this display - |cFF8080FFShift|r must be held down while clicking"] = "Deletes this display - |cFF8080FFShift|r must be held down while clicking"
L["Delete Trigger"] = "Delete Trigger"
L["Desaturate"] = "Desaturate"
L["Devotion"] = "Devotion"
L["Disabled"] = "Disabled"
L["Discrete Rotation"] = "Discrete Rotation"
L["Display"] = "Display"
L["Display Icon"] = "Display Icon"
L["Display Text"] = "Display Text"
L["Distribute Horizontally"] = "Distribute Horizontally"
L["Distribute Vertically"] = "Distribute Vertically"
L["Do not copy any settings"] = "Do not copy any settings"
L["Do not group this display"] = "Do not group this display"
L["Duplicate"] = "Duplicate"
L["Duration Info"] = "Duration Info"
L["Duration (s)"] = "Duration (s)"
L["Dynamic Group"] = "Dynamic Group"
L["Dynamic text tooltip"] = [=[
There are several special codes available to make this text dynamic:
|cFFFF0000%p|r - Progress - The remaining time of a timer, or a non-timer value
|cFFFF0000%t|r - Total - The maximum duration of a timer, or a maximum non-timer value
|cFFFF0000%n|r - Name - The name of the display (usually an aura name), or the display's ID if there is no dynamic name
|cFFFF0000%i|r - Icon - The icon associated with the display
|cFFFF0000%s|r - Stacks - The number of stacks of an aura (usually)
|cFFFF0000%c|r - Custom - Allows you to define a custom Lua function that returns a list of string values. %c1 will be replaced by the first value returned, %c2 by the second, etc.
|cFFFF0000%%|r - % - To show a percent sign
By default these show the information from the trigger selected via dynamic information. The information from a specific trigger can be shown via e.g. %2.p.
]=]
L["Enabled"] = "Enabled"
L["Enter an aura name, partial aura name, or spell id"] = "Enter an aura name, partial aura name, or spell id"
L["Event Type"] = "Event Type"
L["Expand"] = "Expand"
L["Expand all loaded displays"] = "Expand all loaded displays"
L["Expand all non-loaded displays"] = "Expand all non-loaded displays"
L["Expand Text Editor"] = "Expand Text Editor"
L["Expansion is disabled because this group has no children"] = "Expansion is disabled because this group has no children"
L["Export"] = "Export"
L["Export to Lua table..."] = "Export to Lua table..."
L["Export to string..."] = "Export to string..."
L["Fade"] = "Fade"
L["Finish"] = "Finish"
L["Fire Resistance"] = "Fire Resistance"
L["Flight(Non-Feral)"] = "Flight(Non-Feral)"
L["Font"] = "Font"
L["Font Flags"] = "Font Flags"
L["Font Size"] = "Font Size"
L["Font Type"] = "Font Type"
L["Foreground Color"] = "Foreground Color"
L["Foreground Texture"] = "Foreground Texture"
L["Form (Druid)"] = "Form"
L["Form (Priest)"] = "Form"
L["Form (Shaman)"] = "Form"
L["Form (Warlock)"] = "Form"
L["Frame"] = "Frame"
L["Frame Strata"] = "Frame Strata"
L["Frost"] = "Frost"
L["Frost Resistance"] = "Frost Resistance"
L["Full Scan"] = "Full Scan"
L["Ghost Wolf"] = "Ghost Wolf"
L["Glow Action"] = "Glow Action"
L["Group aura count description"] = [=[
The amount of units of type '%s' which must be affected by one or more of the given auras for the display to trigger.
If the entered number is a whole number (e.g. 5), the number of affected units will be compared with the entered number.
If the entered number is a decimal (e.g. 0.5), fraction (e.g. 1/2), or percentage (e.g. 50%%), then that fraction of the %s must be affected.
|cFF4444FFFor example:|r
|cFF00CC00> 0|r will trigger when any unit of type '%s' is is affected
|cFF00CC00= 100%%|r will trigger when ever unit of type '%s' is affected
|cFF00CC00!= 2|r will trigger when the number of units of type '%s' affected is not exactly 2
|cFF00CC00<= 0.8|r will trigger when less than 80%% of the units of type '%s' is affected (4 of 5 party members, 8 of 10 or 20 of 25 raid members)
|cFF00CC00> 1/2|r will trigger when more than half of the units of type '%s' is affected
|cFF00CC00>= 0|r will always trigger, no matter what
]=]
L["Group Member Count"] = "Group Member Count"
L["Group (verb)"] = "Group"
L["Height"] = "Height"
L["Hide this group's children"] = "Hide this group's children"
L["Hide When Not In Group"] = "Hide When Not In Group"
L["Horizontal Align"] = "Horizontal Align"
L["Icon Info"] = "Icon Info"
L["Icon Inset"] = "Icon Inset"
L["Ignored"] = "Ignored"
L["Ignore GCD"] = "Ignore GCD"
L["%i Matches"] = "%i Matches"
L["Import"] = "Import"
L["Import a display from an encoded string"] = "Import a display from an encoded string"
L["Justify"] = "Justify"
L["Left Text"] = "Left Text"
L["Load"] = "Load"
L["Loaded"] = "Loaded"
L["Main"] = "Main"
L["Main Trigger"] = "Main Trigger"
L["Mana (%)"] = "Mana (%)"
L["Manage displays defined by Addons"] = "Manage displays defined by Addons"
L["Message Prefix"] = "Message Prefix"
L["Message Suffix"] = "Message Suffix"
L["Metamorphosis"] = "Metamorphosis"
L["Mirror"] = "Mirror"
L["Model"] = "Model"
L["Moonkin/Tree/Flight(Feral)"] = "Moonkin/Tree/Flight(Feral)"
L["Move Down"] = "Move Down"
L["Move this display down in its group's order"] = "Move this display down in its group's order"
L["Move this display up in its group's order"] = "Move this display up in its group's order"
L["Move Up"] = "Move Up"
L["Multiple Displays"] = "Multiple Displays"
L["Multiple Triggers"] = "Multiple Triggers"
L["Multiselect ignored tooltip"] = [=[
|cFFFF0000Ignored|r - |cFF777777Single|r - |cFF777777Multiple|r
This option will not be used to determine when this display should load]=]
L["Multiselect multiple tooltip"] = [=[
|cFF777777Ignored|r - |cFF777777Single|r - |cFF00FF00Multiple|r
Any number of matching values can be picked]=]
L["Multiselect single tooltip"] = [=[
|cFF777777Ignored|r - |cFF00FF00Single|r - |cFF777777Multiple|r
Only a single matching value can be picked]=]
L["Must be spelled correctly!"] = "Must be spelled correctly!"
L["Name Info"] = "Name Info"
L["Negator"] = "Not"
L["New"] = "New"
L["Next"] = "Next"
L["No"] = "No"
L["No Children"] = "No Children"
L["Not all children have the same value for this option"] = "Not all children have the same value for this option"
L["Not Loaded"] = "Not Loaded"
L["No tooltip text"] = "No tooltip text"
L["% of Progress"] = "% of Progress"
L["Okay"] = "Okay"
L["On Hide"] = "On Hide"
L["On Init"] = "On Init"
L["Only match auras cast by people other than the player"] = "Only match auras cast by people other than the player"
L["Only match auras cast by the player"] = "Only match auras cast by the player"
L["On Show"] = "On Show"
L["Operator"] = "Operator"
L["or"] = "or"
L["Orientation"] = "Orientation"
L["Other"] = "Other"
L["Outline"] = "Outline"
L["Own Only"] = "Own Only"
L["Player Character"] = "Player Character"
L["Play Sound"] = "Play Sound"
L["Presence (DK)"] = "Presence"
L["Presence (Rogue)"] = "Presence"
L["Prevents duration information from decreasing when an aura refreshes. May cause problems if used with multiple auras with different durations."] = "Prevents duration information from decreasing when an aura refreshes. May cause problems if used with multiple auras with different durations."
L["Primary"] = "Primary"
L["Progress Bar"] = "Progress Bar"
L["Progress Texture"] = "Progress Texture"
L["Put this display in a group"] = "Put this display in a group"
L["Ready For Use"] = "Ready For Use"
L["Re-center X"] = "Re-center X"
L["Re-center Y"] = "Re-center Y"
L["Remaining Time Precision"] = "Remaining Time Precision"
L["Remove this display from its group"] = "Remove this display from its group"
L["Rename"] = "Rename"
L["Requesting display information"] = "Requesting display information from %s..."
L["Required for Activation"] = "Required for Activation"
L["Retribution"] = "Retribution"
L["Right-click for more options"] = "Right-click for more options"
L["Right Text"] = "Right Text"
L["Rotate"] = "Rotate"
L["Rotate In"] = "Rotate In"
L["Rotate Out"] = "Rotate Out"
L["Rotate Text"] = "Rotate Text"
L["Rotation"] = "Rotation"
L["Same"] = "Same"
L["Search"] = "Search"
L["Secondary"] = "Secondary"
L["Select the auras you always want to be listed first"] = "Select the auras you always want to be listed first"
L["Send To"] = "Send To"
L["Set tooltip description"] = "Set tooltip description"
L["Shadow Dance"] = "Shadow Dance"
L["Shadowform"] = "Shadowform"
L["Shadow Resistance"] = "Shadow Resistance"
L["Shift-click to create chat link"] = "Shift-click to create a |cFF8800FF[Chat Link]"
L["Show all matches (Auto-clone)"] = "Show all matches (Auto-clone)"
L["Show players that are |cFFFF0000not affected"] = "Show players that are |cFFFF0000not affected"
L["Shows a 3D model from the game files"] = "Shows a 3D model from the game files"
L["Shows a custom texture"] = "Shows a custom texture"
L["Shows a progress bar with name, timer, and icon"] = "Shows a progress bar with name, timer, and icon"
L["Shows a spell icon with an optional cooldown overlay"] = "Shows a spell icon with an optional cooldown overlay"
L["Shows a texture that changes based on duration"] = "Shows a texture that changes based on duration"
L["Shows one or more lines of text, which can include dynamic information such as progress or stacks"] = "Shows one or more lines of text, which can include dynamic information such as progress or stacks"
L["Shows the remaining or expended time for an aura or timed event"] = "Shows the remaining or expended time for an aura or timed event"
L["Show this group's children"] = "Show this group's children"
L["Size"] = "Size"
L["Slide"] = "Slide"
L["Slide In"] = "Slide In"
L["Slide Out"] = "Slide Out"
L["Sort"] = "Sort"
L["Sound"] = "Sound"
L["Sound Channel"] = "Sound Channel"
L["Sound File Path"] = "Sound File Path"
L["Space"] = "Space"
L["Space Horizontally"] = "Space Horizontally"
L["Space Vertically"] = "Space Vertically"
L["Spell ID"] = "Spell ID"
L["Spell ID dialog"] = [=[
You have specified an aura by |cFFFF0000spell ID|r.
By default, |cFF8800FFWeakAuras|r cannot distinguish between auras with the same name but different |cFFFF0000spell ID|r.
However, if the Use Full Scan option is enabled, |cFF8800FFWeakAuras|r can search for specific |cFFFF0000spell ID|rs.
Would you like to enable Use Full Scan to match this |cFFFF0000spell ID|r?]=]
L["Stack Count"] = "Stack Count"
L["Stack Count Position"] = "Stack Count Position"
L["Stack Info"] = "Stack Info"
L["Stacks Settings"] = "Stacks Settings"
L["Stagger"] = "Stagger"
L["Stance (Warrior)"] = "Stance"
L["Start"] = "Start"
L["Stealable"] = "Stealable"
L["Stealthed"] = "Stealthed"
L["Temporary Group"] = "Temporary Group"
L["Text"] = "Text"
L["Text Color"] = "Text Color"
L["Text Position"] = "Text Position"
L["Text Settings"] = "Text Settings"
L["Texture"] = "Texture"
L["Texture Info"] = "Texture Info"
L["The children of this group have different display types, so their display options cannot be set as a group."] = "The children of this group have different display types, so their display options cannot be set as a group."
L["The duration of the animation in seconds."] = "The duration of the animation in seconds."
L["The type of trigger"] = "The type of trigger"
L["This condition will not be tested"] = "This condition will not be tested"
L["This display is currently loaded"] = "This display is currently loaded"
L["This display is not currently loaded"] = "This display is not currently loaded"
L["This display will only show when |cFF00FF00%s"] = "This display will only show when |cFF00FF00%s"
L["This display will only show when |cFFFF0000 Not %s"] = "This display will only show when |cFFFF0000 Not %s"
L["This region of type \"%s\" has no configuration options."] = "This region of type \"%s\" has no configuration options."
L["Time in"] = "Time in"
L["Timer"] = "Timer"
L["Timer Settings"] = "Timer Settings"
L["Toggle the visibility of all loaded displays"] = "Toggle the visibility of all loaded displays"
L["Toggle the visibility of all non-loaded displays"] = "Toggle the visibility of all non-loaded displays"
L["Toggle the visibility of this display"] = "Toggle the visibility of this display"
L["to group's"] = "to group's"
L["Tooltip"] = "Tooltip"
L["Tooltip on Mouseover"] = "Tooltip on Mouseover"
L["Top Text"] = "Top Text"
L["To Screen's"] = "To Screen's"
L["Total Time Precision"] = "Total Time Precision"
L["Tracking"] = "Tracking"
L["Travel"] = "Travel"
L["Trigger"] = "Trigger"
L["Trigger %d"] = "Trigger %d"
L["Triggers"] = "Triggers"
L["Type"] = "Type"
L["Ungroup"] = "Ungroup"
L["Unholy"] = "Unholy"
L["Unit Exists"] = "Unit Exists"
L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."
L["Unstealthed"] = "Unstealthed"
L["Update Custom Text On..."] = "Update Custom Text On..."
L["Use Full Scan (High CPU)"] = "Use Full Scan (High CPU)"
L["Use tooltip \"size\" instead of stacks"] = "Use tooltip \"size\" instead of stacks"
L["Vertical Align"] = "Vertical Align"
L["View"] = "View"
L["Width"] = "Width"
L["X Offset"] = "X Offset"
L["X Scale"] = "X Scale"
L["Yes"] = "Yes"
L["Y Offset"] = "Y Offset"
L["Y Scale"] = "Y Scale"
L["Z Offset"] = "Z Offset"
L["Zoom"] = "Zoom"
L["Zoom In"] = "Zoom In"
L["Zoom Out"] = "Zoom Out"
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+817
View File
@@ -0,0 +1,817 @@
if not WeakAuras.IsCorrectVersion() then return end
if not(GetLocale() == "frFR") then
return
end
local L = WeakAuras.L
-- WeakAuras/Options
L["-- Do not remove this comment, it is part of this trigger: "] = "-- Ne retirez pas ce commentaire, il fait partie de ce déclencheur : "
L["% of Progress"] = "% de progression"
L["%i auras selected"] = "%i auras sélectionnées"
L["%i Matches"] = "%i Correspondances"
L["%s - Option #%i has the key %s. Please choose a different option key."] = "%s - L'option #%i est attribuée à la touche %s. Veuillez choisir une touche différente."
L["%s %s, Lines: %d, Frequency: %0.2f, Length: %d, Thickness: %d"] = "%s %s, Lignes : %d, Fréquence : %0.2f, Longueur : %d, Epaisseur : %d"
L["%s %s, Particles: %d, Frequency: %0.2f, Scale: %0.2f"] = "%s %s, Particules : %d, Fréquence : %0.2f, Échelle : %0.2f"
L["%s Alpha: %d%%"] = "%s opacité : %d%%"
L["%s Color"] = "%s Couleur"
--[[Translation missing --]]
L["%s Default Alpha, Zoom, Icon Inset, Aspect Ratio"] = "%s Default Alpha, Zoom, Icon Inset, Aspect Ratio"
--[[Translation missing --]]
L["%s Inset: %d%%"] = "%s Inset: %d%%"
--[[Translation missing --]]
L["%s is not a valid SubEvent for COMBAT_LOG_EVENT_UNFILTERED"] = "%s is not a valid SubEvent for COMBAT_LOG_EVENT_UNFILTERED"
--[[Translation missing --]]
L["%s Keep Aspect Ratio"] = "%s Keep Aspect Ratio"
L["%s total auras"] = "%s auras au total"
L["%s Zoom: %d%%"] = "%s Zoom: %d%%"
L["%s, Border"] = "%s, Bordure"
--[[Translation missing --]]
L["%s, Offset: %0.2f;%0.2f"] = "%s, Offset: %0.2f;%0.2f"
--[[Translation missing --]]
L["%s, offset: %0.2f;%0.2f"] = "%s, offset: %0.2f;%0.2f"
--[[Translation missing --]]
L["|c%02x%02x%02x%02xCustom Color|r"] = "|c%02x%02x%02x%02xCustom Color|r"
--[[Translation missing --]]
L["|cFFFF0000Note:|r The unit '%s' is not a trackable unit."] = "|cFFFF0000Note:|r The unit '%s' is not a trackable unit."
L["|cFFffcc00Anchors:|r Anchored |cFFFF0000%s|r to frame's |cFFFF0000%s|r"] = "|cFFffcc00Ancrages :|r Ancré |cFFFF0000%s|r au cadre de |cFFFF0000%s|r"
L["|cFFffcc00Anchors:|r Anchored |cFFFF0000%s|r to frame's |cFFFF0000%s|r with offset |cFFFF0000%s/%s|r"] = "|cFFffcc00Ancrages :|r Ancré |cFFFF0000%s|r au cadre de ... |cFFFF0000%s|r avec un décalage de |cFFFF0000%s/%s|r"
L["|cFFffcc00Anchors:|r Anchored to frame's |cFFFF0000%s|r"] = "|cFFffcc00Ancrages :|r Ancré au cadre de |cFFFF0000%s|r"
L["|cFFffcc00Anchors:|r Anchored to frame's |cFFFF0000%s|r with offset |cFFFF0000%s/%s|r"] = "|cFFffcc00Ancrages :|r Ancré au cadre de ... |cFFFF0000%s|r avec un décalage de |cFFFF0000%s/%s|r"
L["|cFFffcc00Extra Options:|r"] = "|cFFffcc00Options supplémentaires :|r"
--[[Translation missing --]]
L["|cFFffcc00Font Flags:|r |cFFFF0000%s|r and shadow |c%sColor|r with offset |cFFFF0000%s/%s|r%s%s%s"] = "|cFFffcc00Font Flags:|r |cFFFF0000%s|r and shadow |c%sColor|r with offset |cFFFF0000%s/%s|r%s%s%s"
L["1 Match"] = "1 Correspondance"
L["A 20x20 pixels icon"] = "Une icône de 20x20 pixels."
L["A 32x32 pixels icon"] = "Une icône de 32x32 pixels."
L["A 40x40 pixels icon"] = "Une icône de 40x40 pixels."
L["A 48x48 pixels icon"] = "Une icône de 48x48 pixels."
L["A 64x64 pixels icon"] = "Une icône de 64x64 pixels."
L["A group that dynamically controls the positioning of its children"] = "Un groupe qui contrôle dynamiquement le positionnement de ses enfants"
L["A Unit ID (e.g., party1)."] = "Un identifiant d'unité (par.ex., groupe1)"
L["Actions"] = "Actions"
L["Add %s"] = "Ajouter %s"
L["Add a new display"] = "Ajouter un nouvel affichage"
L["Add Condition"] = "Ajouter une Condition"
L["Add Entry"] = "Ajouter une entrée"
L["Add Extra Elements"] = "Ajouter des éléments supplémentaires"
L["Add Option"] = "Ajouter Option"
L["Add Overlay"] = "Ajouter un Overlay"
L["Add Property Change"] = "Ajouter un Changement de Propriété"
L["Add Sub Option"] = "Ajouter un sous-option"
L["Add to group %s"] = "Ajouter au groupe %s"
L["Add to new Dynamic Group"] = "Ajouter à un nouveau groupe dynamique"
L["Add to new Group"] = "Ajouter à un nouveau groupe"
L["Add Trigger"] = "Ajouter un déclencheur"
L["Addon"] = "Addon"
L["Addons"] = "Addons"
L["Advanced"] = "Avancé"
L["Align"] = "Aligner"
L["Alignment"] = "Alignement"
L["All of"] = "Tous vos"
L["Allow Full Rotation"] = "Permettre une rotation complète"
L["Alpha"] = "Opacité"
L["Anchor"] = "Ancrage"
L["Anchor Point"] = "Point d'ancrage"
L["Anchored To"] = "Ancré à"
L["And "] = "Et"
L["and aligned left"] = "et alignés à gauche"
L["and aligned right"] = "et alignés à droite"
--[[Translation missing --]]
L["and rotated left"] = "and rotated left"
--[[Translation missing --]]
L["and rotated right"] = "and rotated right"
L["and Trigger %s"] = "et Déclencheur %s"
--[[Translation missing --]]
L["and with width |cFFFF0000%s|r and %s"] = "and with width |cFFFF0000%s|r and %s"
L["Angle"] = "Angle"
L["Animate"] = "Animer"
L["Animated Expand and Collapse"] = "Expansion et réduction animés"
L["Animates progress changes"] = "Animer les changement de progression"
L["Animation relative duration description"] = [=[La durée de l'animation par rapport à la durée du graphique, exprimée en fraction (1/2), pourcentage (50%), ou décimal (0.5).
|cFFFF0000Note :|r si un graphique n'a pas de progression (déclencheur d'événement sans durée définie, aura sans durée, etc), l'animation ne jouera pas.
|cFF4444FFPar exemple :|r
Si la durée de l'animation est définie à |cFF00CC0010%|r, et le déclencheur du graphique est une amélioration qui dure 20 secondes, l'animation de début jouera pendant 2 secondes.
Si la durée de l'animation est définie à |cFF00CC0010%|r, et le déclencheur du graphique n'a pas de durée définie, aucune d'animation de début ne jouera (mais elle jouerait si vous aviez spécifié une durée en secondes).
]=]
L["Animation Sequence"] = "Séquence d'animation"
L["Animations"] = "Animations"
L["Any of"] = "Un de"
L["Apply Template"] = "Appliquer le modèle"
L["Arc Length"] = "Longueur de l'Arc"
L["Arcane Orb"] = "Orbe d'arcane"
L["At a position a bit left of Left HUD position."] = "Une position à gauche de la Position ATH Gauche."
L["At a position a bit left of Right HUD position"] = "Une position à droite de la Position ATH Droite."
L["At the same position as Blizzard's spell alert"] = "À la même position que l'alerte de sort de Blizzard."
L["Aura Name"] = "Nom de l'aura"
L["Aura Name Pattern"] = "Modèle de Nom de l'Aura"
L["Aura Type"] = "Type de l'aura"
L["Aura(s)"] = "Aura(s)"
L["Author Options"] = "Options de l'Auteur"
L["Auto"] = "Auto"
L["Auto-Clone (Show All Matches)"] = "Clonage Automatique (Afficher tous les résultats)"
L["Auto-cloning enabled"] = "Auto-clonage activé"
L["Automatic"] = "Automatique"
L["Automatic Icon"] = "Icône automatique"
L["Backdrop Color"] = "Couleur de Fond"
L["Backdrop in Front"] = "Fond Devant"
L["Backdrop Style"] = "Style de Fond"
L["Background Color"] = "Couleur de fond"
L["Background Offset"] = "Décalage du Fond "
L["Background Texture"] = "Texture d'arrière plan"
L["Bar"] = "Barre"
L["Bar Alpha"] = "Opacité de la barre"
L["Bar Color"] = "Couleur de barre"
L["Bar Color Settings"] = "Paramètres de la barre de couleur"
L["Bar Inner"] = "Barre intérieure"
L["Bar Texture"] = "Texture de barre"
L["Big Icon"] = "Grande icône"
--[[Translation missing --]]
L["Blacklisted Aura Name"] = "Blacklisted Aura Name"
--[[Translation missing --]]
L["Blacklisted Exact Spell ID(s)"] = "Blacklisted Exact Spell ID(s)"
--[[Translation missing --]]
L["Blacklisted Name(s)"] = "Blacklisted Name(s)"
--[[Translation missing --]]
L["Blacklisted Spell ID"] = "Blacklisted Spell ID"
L["Blend Mode"] = "Mode du fusion"
L["Blue Rune"] = "Rune bleue"
L["Blue Sparkle Orb"] = "Orbe pétillant bleu"
L["Border"] = "Encadrement"
L["Border %s"] = "Encadrement %s"
L["Border Anchor"] = "Ancrage de l'encadrement"
L["Border Color"] = "Couleur de l'encadrement"
L["Border in Front"] = "Bordure Devant"
L["Border Inset"] = "Encart Fond"
L["Border Offset"] = "Décalage Bordure"
L["Border Settings"] = "Paramètres de l'encadrement"
L["Border Size"] = "Taille de l'encadrement"
L["Border Style"] = "Style d'encadrement"
L["Bottom"] = "Bas"
L["Bottom Left"] = "Bas gauche"
L["Bottom Right"] = "Bas droit"
L["Bracket Matching"] = "Crochet Correspondant"
L["Can be a Name or a Unit ID (e.g. party1). A name only works on friendly players in your group."] = "Peut être un nom ou un identifiant d'unité (par.ex..groupe1).Un nom ne fonctionne que sur les joueurs amicaux de votre groupe"
--[[Translation missing --]]
L["Can be a UID (e.g., party1)."] = "Can be a UID (e.g., party1)."
L["Cancel"] = "Annuler"
L["Center"] = "Centre"
L["Channel Number"] = "Numéro de canal"
L["Chat Message"] = "Message dans le chat"
L["Check On..."] = "Vérifier sur..."
L["Children:"] = "Enfant :"
L["Choose"] = "Choisir"
L["Choose Trigger"] = "Choisir un déclencheur"
L["Choose whether the displayed icon is automatic or defined manually"] = "Choisir si l'icône affichée est automatique ou définie manuellement"
--[[Translation missing --]]
L["Class"] = "Class"
L["Clip Overlays"] = "Superposition de l'attache "
--[[Translation missing --]]
L["Clipped by Progress"] = "Clipped by Progress"
L["Clone option enabled dialog"] = [=[
Vous avez activé une option qui utilise l'|cFFFF0000Auto-clonage|r.
L'|cFFFF0000Auto-clonage|r permet à un graphique d'être automatiquement dupliqué pour afficher plusieurs sources d'information.
A moins que vous mettiez ce graphique dans un |cFF22AA22Groupe Dynamique|r, tous les clones seront affichés en tas l'un sur l'autre.
Souhaitez-vous que ce graphiques soit placé dans un nouveau |cFF22AA22Groupe Dynamique|r ?]=]
L["Close"] = "Fermer"
L["Collapse"] = "Réduire"
L["Collapse all loaded displays"] = "Réduire tous les affichages chargés"
L["Collapse all non-loaded displays"] = "Réduire tous les affichage non-chargés"
--[[Translation missing --]]
L["Collapsible Group"] = "Collapsible Group"
L["color"] = "couleur"
L["Color"] = "Couleur"
L["Column Height"] = "Hauteur de colonne"
L["Column Space"] = "Espace de colonne"
L["Combinations"] = "Combinaisons"
L["Combine Matches Per Unit"] = "Combiner toutes les Correspondances Par Unité"
--[[Translation missing --]]
L["Common Text"] = "Common Text"
L["Compare against the number of units affected."] = "Comparer contre le nombre d'unités affectées."
L["Compress"] = "Compresser"
L["Condition %i"] = "Condition %i"
L["Conditions"] = "Conditions"
--[[Translation missing --]]
L["Configure what options appear on this panel."] = "Configure what options appear on this panel."
L["Constant Factor"] = "Facteur constant"
L["Control-click to select multiple displays"] = "Ctrl-clic pour sélectionner plusieurs affichages"
L["Controls the positioning and configuration of multiple displays at the same time"] = "Contrôle la position et la configuration de plusieurs affichages en même temps"
L["Convert to New Aura Trigger"] = "Convertir au nouveau déclencheur d'aura"
L["Convert to..."] = "Convertir en..."
L["Cooldown Edge"] = "Marge de la Recharge "
L["Cooldown Settings"] = "Paramètres du temps de recharge"
L["Cooldown Swipe"] = "Balayage du temps de recharge"
L["Copy"] = "Copier"
L["Copy settings..."] = "Copier les paramètres..."
L["Copy to all auras"] = "Copier toutes les auras"
L["Copy URL"] = "Copier l'URL"
L["Count"] = "Compte"
L["Counts the number of matches over all units."] = "Comptes de tout le nombre de correspondances sur toutes les unités."
L["Creating buttons: "] = "Création de boutons :"
L["Creating options: "] = "Création d'options :"
L["Crop X"] = "Couper X"
L["Crop Y"] = "Couper Y"
L["Custom"] = "Personnalisé"
L["Custom Anchor"] = "Ancrage personnalisé"
L["Custom Code"] = "Code personnalisé"
--[[Translation missing --]]
L["Custom Color"] = "Custom Color"
L["Custom Configuration"] = "Configuration personnalisée"
L["Custom Frames"] = "Cadres personnalisés"
L["Custom Function"] = "Fonction personnalisée"
L["Custom Grow"] = "Surbrillance personnalisée"
L["Custom Options"] = "Options personnalisées"
L["Custom Sort"] = "Tri personnalisé"
L["Custom Trigger"] = "Déclencheur personnalisé"
L["Custom trigger event tooltip"] = [=[
Choisissez quels évènements peuvent activer le déclencheur.
Plusieurs évènements peuvent être spécifiés avec des virgules ou des espaces.
|cFF4444FFPar exemple:|r
UNIT_POWER, UNIT_AURA PLAYER_TARGET_CHANGED
]=]
L["Custom trigger status tooltip"] = [=[
Choisissez quels évènements peuvent activer le déclencheur.
Comme c'est un déclencheur de type statut, les évènements spécifiés peuvent être appelés par WeakAuras sans les arguments attendus.
Plusieurs évènements peuvent être spécifiés avec des virgules ou des espaces.
|cFF4444FFPar exemple:|r
UNIT_POWER, UNIT_AURA PLAYER_TARGET_CHANGED
]=]
L["Custom Untrigger"] = "Désactivation personnalisée"
L["Custom Variables"] = "Variables personnalisées"
L["Debuff Type"] = "Type d'affaiblissement"
L["Default"] = "Par défaut"
--[[Translation missing --]]
L["Default Color"] = "Default Color"
L["Delete"] = "Supprimer"
L["Delete all"] = "Supprimer tout"
L["Delete children and group"] = "Supprimer enfants et groupe"
--[[Translation missing --]]
L["Delete Entry"] = "Delete Entry"
L["Delete Trigger"] = "Supprimer le déclencheur"
L["Desaturate"] = "Dé-saturer"
L["Description Text"] = "Texte de Description"
--[[Translation missing --]]
L["Determines how many entries can be in the table."] = "Determines how many entries can be in the table."
L["Differences"] = "Différences"
L["Disabled"] = "Désactivé"
--[[Translation missing --]]
L["Disallow Entry Reordering"] = "Disallow Entry Reordering"
L["Discrete Rotation"] = "Rotation individuelle"
L["Display"] = "Affichage"
L["Display Icon"] = "Icône de l'affichage"
L["Display Name"] = "Nom de l'affichage"
L["Display Text"] = "Texte de l'affichage"
L["Displays a text, works best in combination with other displays"] = "Affiche du texte, fonctionne mieux en combinaison avec d'autres affichages."
L["Distribute Horizontally"] = "Distribuer horizontalement"
L["Distribute Vertically"] = "Distribuer verticalement"
L["Do not group this display"] = "Ne pas grouper cet affichage"
L["Done"] = "Terminé"
L["Don't skip this Version"] = [=[
Ne sautez pas cette version]=]
L["Down"] = "Vers le bas"
L["Drag to move"] = "Glisser pour déplacer"
L["Duplicate"] = "Doubler"
L["Duplicate All"] = "Doubler Tout"
L["Duration (s)"] = "Durée (s)"
L["Duration Info"] = "Info de durée"
L["Dynamic Duration"] = "Durée Dynamique"
L["Dynamic Group"] = "Groupe Dynamique"
L["Dynamic Group Settings"] = "Paramètres de Groupe Dynamiques"
L["Dynamic Information"] = "Information Dynamique"
L["Dynamic information from first active trigger"] = "Information dynamique depuis le premier déclencheur"
L["Dynamic information from Trigger %i"] = "Information dynamique du Déclencheur %i"
L["Dynamic text tooltip"] = [=[Il y a plusieurs codes spéciaux disponibles pour rendre ce texte dynamique :
|cFFFF0000%p|r - Progression - Le temps restant sur un compteur, ou une valeur autre
|cFFFF0000%t|r - Total - La durée maximum d'un compteur, ou le maximum d'une valeur autre
|cFFFF0000%n|r - Nom - Le nom du graphique (souvent le nom d'une aura), ou l'ID du graphique s'il n'y a pas de nom dynamique
|cFFFF0000%i|r - Icône - L'icône associée à l'affichage
|cFFFF0000%s|r - Pile - La taille de la pile d'une aura (généralement)
|cFFFF0000%c|r - Personnalisé - Vous permet de définir une fonction Lua personnalisée qui donne un texte à afficher]=]
--[[Translation missing --]]
L["Ease Strength"] = "Ease Strength"
--[[Translation missing --]]
L["Ease type"] = "Ease type"
--[[Translation missing --]]
L["Edge"] = "Edge"
--[[Translation missing --]]
L["eliding"] = "eliding"
L["Enabled"] = "Activé"
L["End Angle"] = "Angle de fin"
--[[Translation missing --]]
L["End of %s"] = "End of %s"
L["Enter a Spell ID"] = "Entrer un ID de sort"
L["Enter an aura name, partial aura name, or spell id"] = "Entrez un nom d'aura, nom d'aura partiel ou ID de sort"
L["Enter an Aura Name, partial Aura Name, or Spell ID. A Spell ID will match any spells with the same name."] = "Entrez un nom daura, un nom daura partiel ou un identifiant de sort. Un identifiant de sort correspond à tous les sorts de même nom."
L["Enter Author Mode"] = "Entrer en Mode Auteur"
L["Enter User Mode"] = "Entrer en Mode Utilisateur."
L["Enter user mode."] = "Entrer en Mode Utilisateur."
--[[Translation missing --]]
L["Entry %i"] = "Entry %i"
--[[Translation missing --]]
L["Entry limit"] = "Entry limit"
--[[Translation missing --]]
L["Entry Name Source"] = "Entry Name Source"
L["Event"] = "Évènement"
L["Event Type"] = "Type d'évènement"
L["Event(s)"] = "Évènement(s)"
L["Everything"] = "Tous"
L["Exact Spell ID(s)"] = "ID(s) de sort exact(s)"
L["Exact Spell Match"] = "Correspondance Exacte du Sort"
L["Expand"] = "Agrandir"
L["Expand all loaded displays"] = "Agrandir tous affichages chargés"
L["Expand all non-loaded displays"] = "Agrandir tous affichage non-chargés"
L["Expansion is disabled because this group has no children"] = "L'expansion est désactivée car ce groupe n'a pas d'enfants"
L["Export to Lua table..."] = "Exporter vers une table Lua..."
L["Export to string..."] = "Exporter vers une chaîne..."
L["External"] = "Externe"
L["Fade"] = "Fondu"
L["Fade In"] = "Fondu entrant"
L["Fade Out"] = "Fondu sortant"
L["False"] = "Faux"
L["Fetch Affected/Unaffected Names"] = "chercher concerné/Noms non-concernés"
--[[Translation missing --]]
L["Filter by Class"] = "Filter by Class"
L["Filter by Group Role"] = "Filtrer par Rôle de Groupe"
L["Finish"] = "Finir"
L["Fire Orb"] = "Orbe de feu"
L["Font"] = "Police"
L["Font Size"] = "Taille de Police"
L["Foreground"] = "Premier plan"
L["Foreground Color"] = "Couleur premier-plan"
L["Foreground Texture"] = "Texture premier-plan"
L["Frame"] = "Cadre"
--[[Translation missing --]]
L["Frame Selector"] = "Frame Selector"
L["Frame Strata"] = "Strate du cadre"
L["Frequency"] = "Fréquence"
L["From Template"] = "D'après un modèle"
--[[Translation missing --]]
L["From version %s to version %s"] = "From version %s to version %s"
L["Global Conditions"] = "Conditions globales"
--[[Translation missing --]]
L["Glow %s"] = "Glow %s"
L["Glow Action"] = "Action de l'éclat"
--[[Translation missing --]]
L["Glow Anchor"] = "Glow Anchor"
L["Glow Color"] = "Couleur de la surbrillance"
--[[Translation missing --]]
L["Glow External Element"] = "Glow External Element"
--[[Translation missing --]]
L["Glow Frame Type"] = "Glow Frame Type"
L["Glow Type"] = "Type de la surbrillance"
L["Green Rune"] = "Rune verte"
L["Grid direction"] = "Direction de la grille"
L["Group"] = "Groupe"
L["Group (verb)"] = "Groupe (verbe)"
L["Group aura count description"] = [=[Le nombre de membres du %s qui doivent être affectés par une ou plusieurs des auras sélectionnées pour que l'affichage soit déclenché.
Si le nombre entré est un entier (ex. 5), le nombre de membres du raid affectés sera comparé au nombre entré.
Si le nombre entré est decimal (ex. 0.5), une fraction (ex. 1/2), ou un pourcentage (ex. 50%%), alors cette fraction du %s doit être affectée.
|cFF4444FFPar exemple :|r
|cFF00CC00> 0|r se déclenchera quand n'importe quel membre du %s est affecté
|cFF00CC00= 100%%|r se déclenchera quand tous les membres du %s sont affectés
|cFF00CC00!= 2|r se déclenchera quand le nombre de membres du %s affectés est différent de 2
|cFF00CC00<= 0.8|r se déclenchera quand moins de 80%% du %s est affecté (4 des 5 membres du groupe, 8 des 10 ou 20 des 25 membres du raid )
|cFF00CC00> 1/2|r se déclenchera quand plus de la moitié du %s est affecté
|cFF00CC00>= 0|r se déclenchera toujours, quoi qu'il arrive
]=]
--[[Translation missing --]]
L["Group by Frame"] = "Group by Frame"
L["Group contains updates from Wago"] = "Le groupe contient des mises à jour de https://wago.io/"
L["Group Icon"] = "Icône du groupe"
--[[Translation missing --]]
L["Group key"] = "Group key"
L["Group Member Count"] = "Nombre de membres du groupe"
L["Group Role"] = "Rôle du Groupe"
L["Group Scale"] = "Échelle du Groupe"
L["Group Settings"] = "Paramètres du groupe"
--[[Translation missing --]]
L["Group Type"] = "Group Type"
L["Grow"] = "Grandir"
L["Hawk"] = "Faucon"
L["Height"] = "Hauteur"
--[[Translation missing --]]
L["Help"] = "Help"
L["Hide"] = "Cacher"
L["Hide Cooldown Text"] = "Cacher le texte du temps de recharge"
--[[Translation missing --]]
L["Hide Glows applied by this aura"] = "Hide Glows applied by this aura"
L["Hide on"] = "Cacher à"
L["Hide this group's children"] = "Cacher les enfants de ce groupe"
L["Hide When Not In Group"] = "Cacher hors d'un groupe"
L["Horizontal Align"] = "Aligner horizontalement"
L["Horizontal Bar"] = "Barre horizontale"
L["Huge Icon"] = "Énorme icône"
L["Hybrid Position"] = "Position hybride"
L["Hybrid Sort Mode"] = "Mode de tri hybride"
L["Icon"] = "Icône"
L["Icon Info"] = "Info d'icône"
L["Icon Inset"] = "Objet inséré"
L["Icon Position"] = "Position de l'icône"
L["Icon Settings"] = "Paramètres de l'icône"
L["If"] = "Si"
--[[Translation missing --]]
L["If checked, then the user will see a multi line edit box. This is useful for inputting large amounts of text."] = "If checked, then the user will see a multi line edit box. This is useful for inputting large amounts of text."
--[[Translation missing --]]
L["If checked, then this option group can be temporarily collapsed by the user."] = "If checked, then this option group can be temporarily collapsed by the user."
--[[Translation missing --]]
L["If checked, then this option group will start collapsed."] = "If checked, then this option group will start collapsed."
L["If checked, then this separator will include text. Otherwise, it will be just a horizontal line."] = [=[
Si cette case est cochée, ce séparateur inclura du texte. Sinon, ce sera juste une ligne horizontale]=]
--[[Translation missing --]]
L["If checked, then this separator will not merge with other separators when selecting multiple auras."] = "If checked, then this separator will not merge with other separators when selecting multiple auras."
L["If checked, then this space will span across multiple lines."] = "Si cette case est cochée, cet espace s'étendra sur plusieurs lignes."
L["If Trigger %s"] = "Si Déclencheur %s"
L["If unchecked, then a default color will be used (usually yellow)"] = "Si cette case n'est pas cochée, une couleur par défaut sera utilisée (généralement jaune)"
L["If unchecked, then this space will fill the entire line it is on in User Mode."] = "Si cette case n'est pas cochée, cet espace remplira toute la ligne sur laquelle il est activé en Mode Utilisateur."
L["Ignore all Updates"] = "Ignorer toutes les mises à jour"
L["Ignore Self"] = "S'ignorer"
L["Ignore self"] = "Ignorer soi-même"
L["Ignored"] = "Ignoré"
L["Import"] = "Importer"
L["Import a display from an encoded string"] = "Importer un graphique d'un texte encodé"
L["Inner"] = "Intérieur"
L["Invalid Item Name/ID/Link"] = "Nom/ID/Lien Invalide"
L["Invalid Spell ID"] = "ID du Sort Invalide"
L["Invalid Spell Name/ID/Link"] = "Nom du Sort/ID/Lien Invalide"
L["Inverse"] = "Inverser"
L["Inverse Slant"] = "Inverser l'Inclinaison"
L["Is Stealable"] = "Est subtilisable "
L["Justify"] = "Justification"
L["Keep Aspect Ratio"] = "Conserver les Proportions"
--[[Translation missing --]]
L["Large Input"] = "Large Input"
L["Leaf"] = "Feuille"
L["Left"] = "Gauche"
L["Left 2 HUD position"] = "Position ATH Gauche 2"
L["Left HUD position"] = "Position ATH Gauche"
L["Legacy Aura Trigger"] = "Déclencheur de l'Aura Hérité"
L["Length"] = "Longueur"
L["Limit"] = "Limite"
--[[Translation missing --]]
L["Lines & Particles"] = "Lines & Particles"
L["Load"] = "Chargement"
L["Loaded"] = "Chargé"
L["Loop"] = "Boucle"
L["Low Mana"] = "Mana bas"
--[[Translation missing --]]
L["Magnetically Align"] = "Magnetically Align"
L["Main"] = "Principal"
L["Manage displays defined by Addons"] = "Gérer les affichages définis par des addons"
--[[Translation missing --]]
L["Match Count"] = "Match Count"
L["Max"] = "Max"
L["Max Length"] = "Longueur max"
L["Medium Icon"] = "Icône moyenne"
L["Message"] = "Message"
L["Message Prefix"] = "Préfixe du message"
L["Message Suffix"] = "Suffixe du message"
L["Message Type"] = "Type de message"
L["Min"] = "Min (minutes?)"
L["Mirror"] = "Miroir"
L["Model"] = "Modèle"
L["Model %s"] = "Modèle %s"
L["Model Settings"] = "Paramètres du modèle"
L["Move Above Group"] = "Déplacer au dessus du groupe"
L["Move Below Group"] = "Déplacer en dessous du grouoe"
L["Move Down"] = "Déplacer vers le bas"
--[[Translation missing --]]
L["Move Entry Down"] = "Move Entry Down"
--[[Translation missing --]]
L["Move Entry Up"] = "Move Entry Up"
--[[Translation missing --]]
L["Move Into Above Group"] = "Move Into Above Group"
--[[Translation missing --]]
L["Move Into Below Group"] = "Move Into Below Group"
L["Move this display down in its group's order"] = "Déplacer cet affichage vers le bas dans l'ordre de son groupe"
L["Move this display up in its group's order"] = "Déplacer cet affichage vers le haut dans l'ordre de son groupe"
L["Move Up"] = "Déplacer vers le haut"
L["Multiple Displays"] = "Affichages multiples"
L["Multiple Triggers"] = "Déclencheur multiples"
L["Multiselect ignored tooltip"] = [=[
|cFFFF0000Ignoré|r - |cFF777777Unique|r - |cFF777777Multiple|r
Cette option ne sera pas utilisée pour déterminer quand ce graphique doit être chargé]=]
L["Multiselect multiple tooltip"] = [=[
|cFF777777Ignoré|r - |cFF777777Unique|r - |cFF00FF00Multiple|r
Plusieurs valeurs peuvent être choisies]=]
L["Multiselect single tooltip"] = [=[
|cFF777777Ignoré|r - |cFF00FF00Unique|r - |cFF777777Multiple|r
Seule une unique valeur peut être choisie]=]
L["Name Info"] = "Info du nom"
L["Name Pattern Match"] = "Correspondance de modèle de nom"
L["Name(s)"] = "Nom(s)"
--[[Translation missing --]]
L["Negator"] = "Pas"
L["Never"] = "Jamais"
--[[Translation missing --]]
L["New Aura"] = "New Aura"
L["New Value"] = "Nouvelle Valeur"
L["No"] = "Non"
L["No Children"] = "Pas d'Enfants"
L["No tooltip text"] = "Pas d'infobulle"
L["None"] = "Aucun"
L["Not all children have the same value for this option"] = "Tous les enfants n'ont pas la même valeur pour cette option"
L["Not Loaded"] = "Non chargé"
--[[Translation missing --]]
L["Note: Automated Messages to SAY and YELL are blocked outside of Instances."] = "Note: Automated Messages to SAY and YELL are blocked outside of Instances."
--[[Translation missing --]]
L["Number of Entries"] = "Number of Entries"
--[[Translation missing --]]
L["Offer a guided way to create auras for your character"] = "Offer a guided way to create auras for your character"
L["Okay"] = "Okay"
L["On Hide"] = "Au masquage"
L["On Init"] = "À l'initialisation"
L["On Show"] = "A l'affichage"
L["Only match auras cast by people other than the player"] = "Ne considérer que les auras lancées par d'autres que le joueur"
L["Only match auras cast by people other than the player or his pet"] = "uniquement les auras lancées par des personnes autres que le joueur ou son animal de compagnie"
L["Only match auras cast by the player"] = "Ne considérer que les auras lancées par le joueur"
L["Only match auras cast by the player or his pet"] = "correspond à des auras lancés uniquement par le joueur ou son animal de compagnie"
L["Operator"] = "Opérateur"
L["Option %i"] = "Option %i"
L["Option key"] = "Touche d'option"
L["Option Type"] = "Type d'option"
L["Options will open after combat ends."] = "Les options s'ouvriront après la fin du combat."
L["or"] = "ou"
L["or Trigger %s"] = "ou Déclencheur %s"
L["Orange Rune"] = "Rune orange"
L["Orientation"] = "Orientation"
L["Outer"] = "Extérieur"
L["Outline"] = "Contour"
L["Overflow"] = "Débordement"
L["Overlay %s Info"] = "%s Infos en Superposition"
L["Overlays"] = "Superpositions"
L["Own Only"] = "Le mien uniquement"
L["Paste Action Settings"] = "Coller les paramètres d'Actions"
L["Paste Animations Settings"] = "Coller les paramètres d'Animations"
L["Paste Author Options Settings"] = "Coller les paramètres des options de l'auteur"
L["Paste Condition Settings"] = "Coller les paramètres de Conditions"
L["Paste Custom Configuration"] = "Coller les Options personnalisées"
L["Paste Display Settings"] = "Coller les paramètres d'Affichage"
L["Paste Group Settings"] = "Coller les paramètres du Groupe"
L["Paste Load Settings"] = "Coller les paramètres de Chargement"
L["Paste Settings"] = "Coller Paramètres"
L["Paste text below"] = "Coller le texte ci-dessous"
L["Paste Trigger Settings"] = "Coller les paramètres de Déclencheurs"
L["Play Sound"] = "Jouer un son"
L["Position Settings"] = "Paramètres de position"
--[[Translation missing --]]
L["Preferred Match"] = "Preferred Match"
L["Preset"] = "Préréglé"
--[[Translation missing --]]
L["Press Ctrl+C to copy"] = "Press Ctrl+C to copy"
--[[Translation missing --]]
L["Prevent Merging"] = "Prevent Merging"
L["Processed %i chars"] = "%i caractères traité "
L["Progress Bar"] = "Barre de progression"
L["Progress Bar Settings"] = "Paramètres de la barre de progression"
L["Progress Texture"] = "Texture de progression"
L["Progress Texture Settings"] = "Paramètres de la texture de progression"
L["Purple Rune"] = "Rune violette"
L["Put this display in a group"] = "Placer cet affichage dans un groupe"
L["Radius"] = "Rayon"
L["Re-center X"] = "Recentrer X"
L["Re-center Y"] = "Recentrer Y"
L["Regions of type \"%s\" are not supported."] = "Les régions de type \"%s\" ne sont pas prises en charge."
L["Remaining Time"] = "Temps restant"
L["Remaining Time Precision"] = "Précision du temps restant"
L["Remove"] = "Retirer"
L["Remove this display from its group"] = "Retirer cet affichage de son groupe"
L["Remove this property"] = "Retirer cette propriété"
L["Rename"] = "Renommer"
L["Repeat After"] = "Répéter Après"
L["Repeat every"] = "Répéter tous les"
--[[Translation missing --]]
L["Require unit from trigger"] = "Require unit from trigger"
L["Required for Activation"] = "Requis pour l'activation"
L["Reset all options to their default values."] = "Réinitialiser toutes les options à leurs valeurs par défaut."
--[[Translation missing --]]
L["Reset Entry"] = "Reset Entry"
L["Reset to Defaults"] = "Réinitialiser les paramètres par défaut"
L["Right"] = "Droite"
L["Right 2 HUD position"] = "Position ATH Droite 2"
L["Right HUD position"] = "Position ATH Droite"
L["Right-click for more options"] = "Clic-droit pour plus d'options"
L["Rotate"] = "Tourner"
L["Rotate In"] = "Rotation entrante"
L["Rotate Out"] = "Rotation sortante"
L["Rotate Text"] = "Tourner le texte"
L["Rotation"] = "Rotation"
L["Rotation Mode"] = "Mode de rotation"
--[[Translation missing --]]
L["Row Space"] = "Row Space"
--[[Translation missing --]]
L["Row Width"] = "Row Width"
L["Same"] = "Le même"
L["Scale"] = "Échelle"
L["Search"] = "Chrecher"
L["Select the auras you always want to be listed first"] = "Choisissez les auras que vous voulez toujours voir apparaître en premier dans la liste"
L["Send To"] = "Envoyer vers"
L["Separator Text"] = "Texte Séparateur"
L["Separator text"] = "texte séparateur"
L["Set Parent to Anchor"] = "Définir Parent à l'Ancrage"
L["Set Thumbnail Icon"] = "Définir la miniature"
L["Set tooltip description"] = "Définir la description de l'info-bulle"
L["Sets the anchored frame as the aura's parent, causing the aura to inherit attributes such as visiblility and scale."] = "Définit le cadre ancré en tant que parent de l'aura, ce qui lui permet d'hériter des attributs tels que la visibilité et l'échelle."
L["Settings"] = "Paramètres"
--[[Translation missing --]]
L["Shadow Color"] = "Shadow Color"
L["Shadow X Offset"] = "Décalage X de l'ombre"
L["Shadow Y Offset"] = "Décalage Y de l'ombre"
L["Shift-click to create chat link"] = "Maj-clic pour créer un lien de discussion"
L["Show all matches (Auto-clone)"] = "Montrer toutes correspondances (Auto-Clone)"
L["Show Border"] = "Afficher l'encadrement"
L["Show Cooldown"] = "Afficher le temps de recharge"
L["Show Glow"] = "Surbrillance"
L["Show Icon"] = "Afficher l'icône"
--[[Translation missing --]]
L["Show If Unit Does Not Exist"] = "Show If Unit Does Not Exist"
L["Show If Unit Is Invalid"] = "Afficher Si l'Unité Est Invalide"
--[[Translation missing --]]
L["Show Matches for"] = "Show Matches for"
--[[Translation missing --]]
L["Show Matches for Units"] = "Show Matches for Units"
--[[Translation missing --]]
L["Show Model"] = "Show Model"
L["Show model of unit "] = "Montrer le modèle de l'unité"
L["Show On"] = "Afficher Sur"
L["Show Spark"] = "Afficher l'étincelle"
--[[Translation missing --]]
L["Show Text"] = "Show Text"
L["Show this group's children"] = "Afficher les enfants de ce groupe"
L["Shows a 3D model from the game files"] = "Affiche un modèle 3D tiré du jeu"
L["Shows a border"] = "Affiche un encadrement"
L["Shows a custom texture"] = "Affiche une texture personnalisée"
--[[Translation missing --]]
L["Shows a glow"] = "Shows a glow"
L["Shows a model"] = "Affiche un modèle"
L["Shows a progress bar with name, timer, and icon"] = "Affiche une barre de progression avec nom, temps, et icône"
L["Shows a spell icon with an optional cooldown overlay"] = "Affiche une icône de sort avec optionnellement la durée ou le temps de recharge intégré"
L["Shows a texture that changes based on duration"] = "Affiche une texture qui change selon la durée"
L["Shows one or more lines of text, which can include dynamic information such as progress or stacks"] = "Affiche une ligne de texte ou plus, qui peut inclure des infos dynamiques telles que progression ou piles."
L["Simple"] = "Basique"
L["Size"] = "Taille"
--[[Translation missing --]]
L["Skip this Version"] = "Skip this Version"
--[[Translation missing --]]
L["Slant Amount"] = "Slant Amount"
--[[Translation missing --]]
L["Slant Mode"] = "Slant Mode"
--[[Translation missing --]]
L["Slanted"] = "Slanted"
L["Slide"] = "Glisser"
L["Slide In"] = "Glisser entrant"
L["Slide Out"] = "Glisser sortant"
--[[Translation missing --]]
L["Slider Step Size"] = "Slider Step Size"
L["Small Icon"] = "Petite icône"
L["Smooth Progress"] = "Progrès Doux"
--[[Translation missing --]]
L["Soft Max"] = "Soft Max"
--[[Translation missing --]]
L["Soft Min"] = "Soft Min"
L["Sort"] = "Trier"
L["Sound"] = "Son"
L["Sound Channel"] = "Canal sonore"
L["Sound File Path"] = "Chemin fichier son"
L["Sound Kit ID"] = "ID Kit Son"
L["Space"] = "Espacer"
L["Space Horizontally"] = "Espacer horizontalement"
L["Space Vertically"] = "Espacer verticalement"
L["Spark"] = "Étincelle"
L["Spark Settings"] = "Paramètres de l'étincelle"
L["Spark Texture"] = "Texture Étincelle"
L["Specific Unit"] = "Unité spécifique"
L["Spell ID"] = "ID de sort"
L["Stack Count"] = "Nombre de Piles"
L["Stack Info"] = "Info de Piles"
L["Stagger"] = "Report"
L["Star"] = "Étoile"
L["Start"] = "Début"
L["Start Angle"] = "Angle de départ"
--[[Translation missing --]]
L["Start Collapsed"] = "Start Collapsed"
--[[Translation missing --]]
L["Start of %s"] = "Start of %s"
L["Status"] = "Statut"
L["Stealable"] = "Volable"
--[[Translation missing --]]
L["Step Size"] = "Step Size"
L["Stop ignoring Updates"] = "Arrêtez d'ignorer les mises à jour"
L["Stop Sound"] = "Arrêter Son"
--[[Translation missing --]]
L["Sub Elements"] = "Sub Elements"
--[[Translation missing --]]
L["Sub Option %i"] = "Sub Option %i"
L["Temporary Group"] = "Groupe temporaire"
L["Text"] = "Texte"
L["Text %s"] = "Texte %s"
L["Text Color"] = "Couleur Texte"
L["Text Settings"] = "Paramètres du texte"
L["Texture"] = "Texture"
L["Texture Info"] = "Info Texture"
L["Texture Settings"] = "Paramètres de la texture"
L["Texture Wrap"] = "Enveloppe de texture"
L["The duration of the animation in seconds."] = "La durée de l'animation en secondes."
L["The duration of the animation in seconds. The finish animation does not start playing until after the display would normally be hidden."] = "La durée de l'animation en secondes. L'animation de fin ne commence qu'après le moment où l'affichage est normalement caché."
L["The type of trigger"] = "Le type de déclencheur"
L["Then "] = "Alors"
--[[Translation missing --]]
L["Thickness"] = "Thickness"
L["This adds %tooltip, %tooltip1, %tooltip2, %tooltip3 as text replacements."] = "Cela ajoute %infobulle, %infobulle1, %infobulle2, %infobulle3 en remplacement du texte."
L["This aura has legacy aura trigger(s). Convert them to the new system to benefit from enhanced performance and features"] = "Cette aura possède un ou plusieurs déclencheurs daura hérités. Convertissez-les dans le nouveau système pour bénéficier de performances et de fonctionnalités améliorées"
L["This display is currently loaded"] = "Cet affichage est actuellement chargé"
L["This display is not currently loaded"] = "Cet affichage n'est pas chargé"
L["This region of type \"%s\" is not supported."] = "Cette région de type \"%s\" n'est pas supportée."
L["This setting controls what widget is generated in user mode."] = "Ce paramètre contrôle le widget généré en mode utilisateur."
L["Time in"] = "Temps entrant"
L["Tiny Icon"] = "Très petite icône"
L["To Frame's"] = "Au cadre de"
--[[Translation missing --]]
L["To Group's"] = "To Group's"
L["To Personal Ressource Display's"] = "À ... du cadre des Res. Perso"
L["To Screen's"] = "À ... de l'écran"
L["Toggle the visibility of all loaded displays"] = "Change la visibilité de tous les affichages chargés"
L["Toggle the visibility of all non-loaded displays"] = "Change la visibilité de tous les affichages non-chargés"
L["Toggle the visibility of this display"] = "Activer/Désactiver la visibilité de cet affichage"
L["Tooltip"] = "Infobulle"
L["Tooltip Content"] = "Contenu de l'info-bulle"
L["Tooltip on Mouseover"] = "Infobulle à la souris"
L["Tooltip Pattern Match"] = "Correspondance de modèle de l'info-bulle"
L["Tooltip Text"] = "Texte de l'Info-bulle."
L["Tooltip Value"] = "Valeur de l'info-bulle"
L["Tooltip Value #"] = "Valeur de l'info-bulle #"
L["Top"] = "Haut"
L["Top HUD position"] = "Position ATH Haute"
L["Top Left"] = "Haut gauche"
L["Top Right"] = "Haut droite"
--[[Translation missing --]]
L["Total Time"] = "Total Time"
L["Total Time Precision"] = "Précision Temps total"
L["Trigger"] = "Déclencheur"
L["Trigger %d"] = "Déclencheur %d"
L["Trigger %s"] = "Déclencheur %s"
L["True"] = "Vrai"
L["Type"] = "Type"
L["Ungroup"] = "Dissocier"
L["Unit"] = "Unité"
--[[Translation missing --]]
L["Unit %s is not a valid unit for RegisterUnitEvent"] = "Unit %s is not a valid unit for RegisterUnitEvent"
L["Unit Count"] = "Nombre d'unité"
--[[Translation missing --]]
L["Unit Frame"] = "Unit Frame"
L["Unit Frames"] = "Cadre d'unité"
L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "Contrairement aux animations de début et de fin, l'animation principale bouclera tant que l'affichage est visible."
L["Up"] = "Vers le haut"
--[[Translation missing --]]
L["Update %s by %s"] = "Update %s by %s"
L["Update Custom Text On..."] = "Mettre à jour le texte personnalisé sur..."
L["Update in Group"] = "Mettre à jour dans le Groupe"
L["Update this Aura"] = "Mettre à jour cette Aura"
--[[Translation missing --]]
L["Use Custom Color"] = "Use Custom Color"
L["Use Display Info Id"] = "Utiliser les informations d'identifiant de l'affichage"
L["Use Full Scan (High CPU)"] = "Utiliser Scan Complet (CPU élevé)"
L["Use nth value from tooltip:"] = "Utilisez la nième valeur de l'info-bulle:"
L["Use SetTransform"] = "Utiliser SetTransform"
L["Use tooltip \"size\" instead of stacks"] = "Utiliser la \"taille\" de l'infobulle plutôt que la pile"
L["Use Tooltip Information"] = "Utiliser l'information de la boite de dialogue"
L["Used in Auras:"] = "Utilisé(e) dans les Auras:"
L["Used in auras:"] = "Utilisé dans les auras:"
L["Value %i"] = "Valeur %i"
L["Values are in normalized rgba format."] = "Les valeurs sont normalisées dans le format rvba"
L["Values:"] = "Valeurs:"
L["Version: "] = "Version: "
L["Vertical Align"] = "Aligner verticalement"
L["Vertical Bar"] = "Barre verticale"
L["View"] = "Vue"
--[[Translation missing --]]
L["Wago Update"] = "Wago Update"
--[[Translation missing --]]
L["Whole Area"] = "Whole Area"
L["Width"] = "Largeur"
--[[Translation missing --]]
L["wrapping"] = "wrapping"
L["X Offset"] = "Décalage X"
L["X Rotation"] = "Rotation X"
L["X Scale"] = "Echelle X"
L["X-Offset"] = "Décalage X"
L["Y Offset"] = "Décalage Y"
L["Y Rotation"] = "Rotation Y"
L["Y Scale"] = "Echelle Y"
L["Yellow Rune"] = "Rune jaune"
L["Yes"] = "Oui"
L["Y-Offset"] = "Décalage Y"
L["You are about to delete %d aura(s). |cFFFF0000This cannot be undone!|r Would you like to continue?"] = "Vous êtes sur le point de supprimer %d aura(s). |cFFFF0000Cela ne peut pas être annulé !|r Voulez-vous continuer ?"
L["Z Offset"] = "Décalage Z"
L["Z Rotation"] = "Rotation Z"
L["Zoom"] = "Zoom"
L["Zoom In"] = "Zoom entrant"
L["Zoom Out"] = "Zoom sortant"
File diff suppressed because it is too large Load Diff
+861
View File
@@ -0,0 +1,861 @@
if not WeakAuras.IsCorrectVersion() then return end
if not(GetLocale() == "koKR") then
return
end
local L = WeakAuras.L
-- WeakAuras/Options
L["-- Do not remove this comment, it is part of this trigger: "] = "-- 이 주석을 삭제하지 마세요, 이 활성 조건의 일부입니다: "
L["% of Progress"] = "진행 상태의 %"
L["%i auras selected"] = "%i개 효과 선택됨"
L["%i Matches"] = "%i개 일치"
--[[Translation missing --]]
L["%s - Option #%i has the key %s. Please choose a different option key."] = "%s - Option #%i has the key %s. Please choose a different option key."
--[[Translation missing --]]
L["%s %s, Lines: %d, Frequency: %0.2f, Length: %d, Thickness: %d"] = "%s %s, Lines: %d, Frequency: %0.2f, Length: %d, Thickness: %d"
--[[Translation missing --]]
L["%s %s, Particles: %d, Frequency: %0.2f, Scale: %0.2f"] = "%s %s, Particles: %d, Frequency: %0.2f, Scale: %0.2f"
L["%s Alpha: %d%%"] = "%s 투명도: %d%%"
L["%s Color"] = "%s 색상"
--[[Translation missing --]]
L["%s Default Alpha, Zoom, Icon Inset, Aspect Ratio"] = "%s Default Alpha, Zoom, Icon Inset, Aspect Ratio"
--[[Translation missing --]]
L["%s Inset: %d%%"] = "%s Inset: %d%%"
--[[Translation missing --]]
L["%s is not a valid SubEvent for COMBAT_LOG_EVENT_UNFILTERED"] = "%s is not a valid SubEvent for COMBAT_LOG_EVENT_UNFILTERED"
L["%s Keep Aspect Ratio"] = "%s 종횡비 유지"
L["%s total auras"] = "총 %s개 효과"
L["%s Zoom: %d%%"] = "%s 확대: %d%%"
L["%s, Border"] = "%s, 테두리"
L["%s, Offset: %0.2f;%0.2f"] = "%s, 좌표: %0.2f;%0.2f"
L["%s, offset: %0.2f;%0.2f"] = "%s, 좌표: %0.2f;%0.2f"
--[[Translation missing --]]
L["|c%02x%02x%02x%02xCustom Color|r"] = "|c%02x%02x%02x%02xCustom Color|r"
--[[Translation missing --]]
L["|cFFFF0000Note:|r The unit '%s' is not a trackable unit."] = "|cFFFF0000Note:|r The unit '%s' is not a trackable unit."
--[[Translation missing --]]
L["|cFFffcc00Anchors:|r Anchored |cFFFF0000%s|r to frame's |cFFFF0000%s|r"] = "|cFFffcc00Anchors:|r Anchored |cFFFF0000%s|r to frame's |cFFFF0000%s|r"
--[[Translation missing --]]
L["|cFFffcc00Anchors:|r Anchored |cFFFF0000%s|r to frame's |cFFFF0000%s|r with offset |cFFFF0000%s/%s|r"] = "|cFFffcc00Anchors:|r Anchored |cFFFF0000%s|r to frame's |cFFFF0000%s|r with offset |cFFFF0000%s/%s|r"
--[[Translation missing --]]
L["|cFFffcc00Anchors:|r Anchored to frame's |cFFFF0000%s|r"] = "|cFFffcc00Anchors:|r Anchored to frame's |cFFFF0000%s|r"
--[[Translation missing --]]
L["|cFFffcc00Anchors:|r Anchored to frame's |cFFFF0000%s|r with offset |cFFFF0000%s/%s|r"] = "|cFFffcc00Anchors:|r Anchored to frame's |cFFFF0000%s|r with offset |cFFFF0000%s/%s|r"
L["|cFFffcc00Extra Options:|r"] = "|cFFffcc00추가 옵션:|r"
--[[Translation missing --]]
L["|cFFffcc00Font Flags:|r |cFFFF0000%s|r and shadow |c%sColor|r with offset |cFFFF0000%s/%s|r%s%s%s"] = "|cFFffcc00Font Flags:|r |cFFFF0000%s|r and shadow |c%sColor|r with offset |cFFFF0000%s/%s|r%s%s%s"
L["1 Match"] = "1개 일치"
L["A 20x20 pixels icon"] = "20x20 픽셀 아이콘"
L["A 32x32 pixels icon"] = "32x32 픽셀 아이콘"
L["A 40x40 pixels icon"] = "40x40 픽셀 아이콘"
L["A 48x48 pixels icon"] = "48x48 픽셀 아이콘"
L["A 64x64 pixels icon"] = "64x64 픽셀 아이콘"
L["A group that dynamically controls the positioning of its children"] = "포함된 개체들의 배열을 유동적으로 조절하는 그룹"
L["A Unit ID (e.g., party1)."] = "유닛 ID (예 : party1)."
L["Actions"] = "동작"
L["Add %s"] = "%s 추가"
L["Add a new display"] = "새로운 디스플레이 추가"
L["Add Condition"] = "조건 추가"
L["Add Entry"] = "항목 추가"
L["Add Extra Elements"] = "추가 요소 추가"
L["Add Option"] = "옵션 추가"
L["Add Overlay"] = "오버레이 추가"
L["Add Property Change"] = "속성 변경 추가"
L["Add Sub Option"] = "하위 옵션 추가"
L["Add to group %s"] = "그룹 %s에 추가"
L["Add to new Dynamic Group"] = "새 유동적 그룹에 추가"
L["Add to new Group"] = "새 그룹에 추가"
L["Add Trigger"] = "활성 조건 추가"
L["Addon"] = "애드온"
L["Addons"] = "애드온"
L["Advanced"] = "고급"
L["Align"] = "정렬"
L["Alignment"] = "정렬"
L["All of"] = "다음 모두"
L["Allow Full Rotation"] = "전체 회전 허용"
L["Alpha"] = "투명도"
L["Anchor"] = "고정시키기"
L["Anchor Point"] = "고정 지점"
L["Anchored To"] = "다음에 고정:"
--[[Translation missing --]]
L["And "] = "And "
--[[Translation missing --]]
L["and aligned left"] = "and aligned left"
--[[Translation missing --]]
L["and aligned right"] = "and aligned right"
--[[Translation missing --]]
L["and rotated left"] = "and rotated left"
--[[Translation missing --]]
L["and rotated right"] = "and rotated right"
--[[Translation missing --]]
L["and Trigger %s"] = "and Trigger %s"
--[[Translation missing --]]
L["and with width |cFFFF0000%s|r and %s"] = "and with width |cFFFF0000%s|r and %s"
L["Angle"] = "각도"
L["Animate"] = "애니메이션"
L["Animated Expand and Collapse"] = "확장 / 접기 애니메이션"
L["Animates progress changes"] = "진행 변화 애니메이션"
L["Animation relative duration description"] = [=[
디스플레이 지속시간의 비율로 애니메이션 지속시간을 설정합니다, 분수 (1/2), 백분율 (50%), 또는 소수 (0.5)로 표현합니다.
|cFFFF0000참고:|r 디스플레이가 진행 시간이 없으면 (비-지속적 이벤트 활성 조건, 지속시간이 없는 오라, 등등), 애니메이션은 재생되지 않습니다.
|cFF4444FF예제:|r
애니메이션의 지속시간을 |cFF00CC0010%|r로 설정하고, 디스플레이의 활성 조건이 20초 지속 강화 효과일 때, 시작 애니메이션은 2초 동안 재생됩니다.
애니메이션의 지속시간을 |cFF00CC0010%|r로 설정하고, 디스플레이의 활성 조건이 지속시간이 없는 강화 효과일 때, 시작 애니메이션은 재생되지 않습니다 (지속시간을 따로 설정했더라도)."
]=]
L["Animation Sequence"] = "애니메이션 순서"
L["Animations"] = "애니메이션"
L["Any of"] = "다음 중 하나"
L["Apply Template"] = "견본 적용"
L["Arc Length"] = "호 길이"
L["Arcane Orb"] = "비전 구슬"
L["At a position a bit left of Left HUD position."] = "좌측 HUD 위치보다 약간 왼쪽에 위치시킵니다."
L["At a position a bit left of Right HUD position"] = "우측 HUD 위치보다 약간 왼쪽에 위치시킵니다"
L["At the same position as Blizzard's spell alert"] = "블리자드의 주문 경보와 같은 위치에 위치시킵니다"
L["Aura Name"] = "효과 이름"
L["Aura Name Pattern"] = "효과 이름 패턴"
L["Aura Type"] = "효과 유형"
L["Aura(s)"] = "효과"
L["Author Options"] = "작성자 옵션"
L["Auto"] = "자동"
L["Auto-Clone (Show All Matches)"] = "자동 복제 (모든 일치 항목 표시)"
L["Auto-cloning enabled"] = "자동 복제 활성화"
L["Automatic"] = "자동"
L["Automatic Icon"] = "자동 아이콘"
L["Backdrop Color"] = "배경 색상"
--[[Translation missing --]]
L["Backdrop in Front"] = "Backdrop in Front"
L["Backdrop Style"] = "배경 스타일"
L["Background Color"] = "배경 색상"
L["Background Offset"] = "배경 위치"
L["Background Texture"] = "배경 텍스쳐"
L["Bar"] = ""
L["Bar Alpha"] = "바 투명도"
L["Bar Color"] = "바 색상"
L["Bar Color Settings"] = "바 색상 설정"
--[[Translation missing --]]
L["Bar Inner"] = "Bar Inner"
L["Bar Texture"] = "바 텍스쳐"
L["Big Icon"] = "큰 아이콘"
--[[Translation missing --]]
L["Blacklisted Aura Name"] = "Blacklisted Aura Name"
--[[Translation missing --]]
L["Blacklisted Exact Spell ID(s)"] = "Blacklisted Exact Spell ID(s)"
--[[Translation missing --]]
L["Blacklisted Name(s)"] = "Blacklisted Name(s)"
--[[Translation missing --]]
L["Blacklisted Spell ID"] = "Blacklisted Spell ID"
L["Blend Mode"] = "혼합 모드"
L["Blue Rune"] = "푸른색 룬"
L["Blue Sparkle Orb"] = "푸른 불꽃 구슬"
L["Border"] = "테두리"
L["Border %s"] = "테두리 %s"
--[[Translation missing --]]
L["Border Anchor"] = "Border Anchor"
L["Border Color"] = "테두리 색상"
--[[Translation missing --]]
L["Border in Front"] = "Border in Front"
L["Border Inset"] = "테두리 삽입"
L["Border Offset"] = "테두리 위치"
L["Border Settings"] = "테두리 설정"
L["Border Size"] = "테두리 크기"
L["Border Style"] = "테두리 모양"
L["Bottom"] = "아래"
L["Bottom Left"] = "왼쪽 아래"
L["Bottom Right"] = "오른쪽 아래"
L["Bracket Matching"] = "괄호 맞춤"
L["Can be a Name or a Unit ID (e.g. party1). A name only works on friendly players in your group."] = "이름 또는 UID (예. party1)를 사용할 수 있습니다. 이름은 같은 파티에 속해 있는 우호적 플레이어에게만 작동합니다."
--[[Translation missing --]]
L["Can be a UID (e.g., party1)."] = "Can be a UID (e.g., party1)."
L["Cancel"] = "취소"
L["Center"] = "중앙"
L["Channel Number"] = "채널 번호"
L["Chat Message"] = "대화 메시지"
L["Check On..."] = "확인..."
L["Children:"] = "자식:"
L["Choose"] = "선택"
L["Choose Trigger"] = "활성 조건 선택"
L["Choose whether the displayed icon is automatic or defined manually"] = "아이콘을 자동으로 표시할 지 또는 수동 지정할 지 선택하세요"
--[[Translation missing --]]
L["Class"] = "Class"
--[[Translation missing --]]
L["Clip Overlays"] = "Clip Overlays"
--[[Translation missing --]]
L["Clipped by Progress"] = "Clipped by Progress"
L["Clone option enabled dialog"] = [=[
|cFFFF0000자동복제|r 옵션을 활성화 했습니다.
|cFFFF0000자동복제|r는 디스플레이를 자동으로 복사하여 여러 정보를 표시하게 합니다.
이 디스플레이를 |cFF22AA22유동적 그룹|r에 넣을 때까지, 복제된 모든 디스플레이가 표시됩니다.
이 디스플레이를 새로운 |cFF22AA22유동적 그룹|r으로 옮길까요?]=]
L["Close"] = "닫기"
L["Collapse"] = "접기"
L["Collapse all loaded displays"] = "불러온 모든 디스플레이 접기"
L["Collapse all non-loaded displays"] = "불러오지 않은 모든 디스플레이 접기"
--[[Translation missing --]]
L["Collapsible Group"] = "Collapsible Group"
L["color"] = "색상"
L["Color"] = "색상"
--[[Translation missing --]]
L["Column Height"] = "Column Height"
--[[Translation missing --]]
L["Column Space"] = "Column Space"
L["Combinations"] = "조합"
--[[Translation missing --]]
L["Combine Matches Per Unit"] = "Combine Matches Per Unit"
L["Common Text"] = "공통 문자"
--[[Translation missing --]]
L["Compare against the number of units affected."] = "Compare against the number of units affected."
L["Compress"] = "누르기"
L["Condition %i"] = "조건 %i"
L["Conditions"] = "조건"
--[[Translation missing --]]
L["Configure what options appear on this panel."] = "Configure what options appear on this panel."
L["Constant Factor"] = "고정 요소"
L["Control-click to select multiple displays"] = "Ctrl+클릭 - 여러 디스플레이 선택"
L["Controls the positioning and configuration of multiple displays at the same time"] = "동시에 여러 디스플레이의 위치와 설정을 조절합니다"
L["Convert to New Aura Trigger"] = "신규 방식 효과 활성 조건으로 변환"
L["Convert to..."] = "변환하기..."
L["Cooldown Edge"] = "재사용 대기시간 경계"
L["Cooldown Settings"] = "재사용 대기시간 설정"
L["Cooldown Swipe"] = "재사용 대기시간 바늘"
L["Copy"] = "복사"
L["Copy settings..."] = "설정 복사..."
L["Copy to all auras"] = "모든 효과에 복사"
L["Copy URL"] = "URL 복사"
L["Count"] = "횟수"
L["Counts the number of matches over all units."] = "모든 유닛에 대해 일치 횟수를 계산합니다."
L["Creating buttons: "] = "버튼 생성:"
L["Creating options: "] = "옵션 생성:"
L["Crop X"] = "X 자르기"
L["Crop Y"] = "Y 자르기"
L["Custom"] = "사용자 설정"
--[[Translation missing --]]
L["Custom Anchor"] = "Custom Anchor"
L["Custom Code"] = "사용자 정의 코드"
L["Custom Color"] = "사용자 설정 색상"
L["Custom Configuration"] = "사용자 설정 구성"
--[[Translation missing --]]
L["Custom Frames"] = "Custom Frames"
L["Custom Function"] = "사용자 설정 함수"
L["Custom Grow"] = "사용자 설정 반짝임"
L["Custom Options"] = "사용자 설정 옵션"
L["Custom Sort"] = "사용자 설정 정렬"
L["Custom Trigger"] = "사용자 설정 활성 조건"
L["Custom trigger event tooltip"] = [=[
사용자 설정 활성 조건을 확인할 이벤트를 선택하세요.
콤마와 공백을 사용해 여러 이벤트를 선택할 수 있습니다.
|cFF4444FF예제:|r
UNIT_POWER, UNIT_AURA PLAYER_TARGET_CHANGED]=]
L["Custom trigger status tooltip"] = [=[
사용자 설정 활성 조건을 확인할 이벤트를 선택하세요.
상태 형식 조건이면 특정 이벤트는 독립 변수없이 WeakAuras에 의해 불러와집니다.
콤마와 공백을 사용해 여러 이벤트를 선택할 수 있습니다.
|cFF4444FF예제:|r
UNIT_POWER, UNIT_AURA PLAYER_TARGET_CHANGED]=]
L["Custom Untrigger"] = "사용자 설정 비활성 조건"
L["Custom Variables"] = "사용자 설정 변수"
L["Debuff Type"] = "약화 효과 유형"
L["Default"] = "기본"
L["Default Color"] = "기본 색상"
L["Delete"] = "삭제"
L["Delete all"] = "모두 삭제"
L["Delete children and group"] = "자식과 그룹 삭제"
L["Delete Entry"] = "항목 삭제"
L["Delete Trigger"] = "활성 조건 삭제"
L["Desaturate"] = "흑백"
--[[Translation missing --]]
L["Description Text"] = "Description Text"
--[[Translation missing --]]
L["Determines how many entries can be in the table."] = "Determines how many entries can be in the table."
--[[Translation missing --]]
L["Differences"] = "Differences"
L["Disabled"] = "비활성화됨"
--[[Translation missing --]]
L["Disallow Entry Reordering"] = "Disallow Entry Reordering"
L["Discrete Rotation"] = "90도 단위 회전"
L["Display"] = "디스플레이"
L["Display Icon"] = "디스플레이 아이콘"
L["Display Name"] = "디스플레이 이름"
L["Display Text"] = "디스플레이 문자"
L["Displays a text, works best in combination with other displays"] = "문자를 표시합니다, 다른 디스플레이와 조합하여 사용하기 좋습니다"
L["Distribute Horizontally"] = "가로로 퍼뜨리기"
L["Distribute Vertically"] = "세로로 퍼뜨리기"
L["Do not group this display"] = "이 디스플레이 그룹하지 않기"
L["Done"] = "완료"
L["Don't skip this Version"] = "이 버전을 건너 뛰지 마십시오."
L["Down"] = "아래로"
L["Drag to move"] = "끌기 - 이동"
L["Duplicate"] = "복제"
L["Duplicate All"] = "모두 복제"
L["Duration (s)"] = "지속시간 (초)"
L["Duration Info"] = "지속시간 정보"
--[[Translation missing --]]
L["Dynamic Duration"] = "Dynamic Duration"
L["Dynamic Group"] = "유동적 그룹"
L["Dynamic Group Settings"] = "유동적 그룹 셋팅"
L["Dynamic Information"] = "유동적 정보"
L["Dynamic information from first active trigger"] = "첫번째 활성화된 활성 조건의 유동적 정보"
L["Dynamic information from Trigger %i"] = "활성 조건 %i의 유동적 정보"
L["Dynamic text tooltip"] = [=[이 문자를 유동적으로 만들 수 있는 특별 코드들입니다:
|cFFFF0000%p|r - 진행 - 타이머의 남은 시간, 또는 비-타이머 값
|cFFFF0000%t|r - 전체 - 타이머의 최대 지속시간, 또는 최대 비-타이머 값
|cFFFF0000%n|r - 이름 - 디스플레이의 이름 (보통 오라 이름), 또는 유동적 이름이 없을 때 디스플레이의 ID
|cFFFF0000%i|r - 아이콘 - 디스플레이와 연관된 아이콘
|cFFFF0000%s|r - 중첩 - 오라의 중첩 횟수 (보통)
|cFFFF0000%c|r - 사용자 설정 - 표시할 string 값을 반환하는 사용자 설정 Lua 함수 정의를 허용합니다]=]
--[[Translation missing --]]
L["Ease Strength"] = "Ease Strength"
--[[Translation missing --]]
L["Ease type"] = "Ease type"
--[[Translation missing --]]
L["Edge"] = "Edge"
--[[Translation missing --]]
L["eliding"] = "eliding"
L["Enabled"] = "활성화됨"
L["End Angle"] = "종료 각도"
--[[Translation missing --]]
L["End of %s"] = "End of %s"
L["Enter a Spell ID"] = "주문 ID 입력"
L["Enter an aura name, partial aura name, or spell id"] = "효과 이름 / 효과 이름의 일부 / 주문 ID를 입력하세요"
--[[Translation missing --]]
L["Enter an Aura Name, partial Aura Name, or Spell ID. A Spell ID will match any spells with the same name."] = "Enter an Aura Name, partial Aura Name, or Spell ID. A Spell ID will match any spells with the same name."
--[[Translation missing --]]
L["Enter Author Mode"] = "Enter Author Mode"
L["Enter User Mode"] = "사용자 모드 시작"
L["Enter user mode."] = "사용자 모드를 시작합니다."
L["Entry %i"] = "항목 %i"
--[[Translation missing --]]
L["Entry limit"] = "Entry limit"
--[[Translation missing --]]
L["Entry Name Source"] = "Entry Name Source"
L["Event"] = "이벤트"
L["Event Type"] = "이벤트 유형"
L["Event(s)"] = "이벤트"
L["Everything"] = "모두"
L["Exact Spell ID(s)"] = "정확한 주문 ID"
--[[Translation missing --]]
L["Exact Spell Match"] = "Exact Spell Match"
L["Expand"] = "확장"
L["Expand all loaded displays"] = "불러온 모든 디스플레이 확장"
L["Expand all non-loaded displays"] = "불러오지 않은 모드 디스플레이 확장"
L["Expansion is disabled because this group has no children"] = "이 그룹에 자식이 없어 확장이 비활성되었습니다"
L["Export to Lua table..."] = "Lua table로 내보내기..."
L["Export to string..."] = "문자열로 내보내기..."
L["External"] = "외부"
L["Fade"] = "사라짐"
L["Fade In"] = "서서히 나타남"
L["Fade Out"] = "서서히 사라짐"
L["False"] = "거짓"
--[[Translation missing --]]
L["Fetch Affected/Unaffected Names"] = "Fetch Affected/Unaffected Names"
--[[Translation missing --]]
L["Filter by Class"] = "Filter by Class"
--[[Translation missing --]]
L["Filter by Group Role"] = "Filter by Group Role"
L["Finish"] = "종료"
L["Fire Orb"] = "화염 구슬"
L["Font"] = "글꼴"
L["Font Size"] = "글꼴 크기"
--[[Translation missing --]]
L["Foreground"] = "Foreground"
L["Foreground Color"] = "전경 색상"
L["Foreground Texture"] = "전경 텍스쳐"
L["Frame"] = "프레임"
--[[Translation missing --]]
L["Frame Selector"] = "Frame Selector"
L["Frame Strata"] = "프레임 우선순위"
--[[Translation missing --]]
L["Frequency"] = "Frequency"
L["From Template"] = "견본으로부터"
--[[Translation missing --]]
L["From version %s to version %s"] = "From version %s to version %s"
L["Global Conditions"] = "전역 조건"
L["Glow %s"] = "반짝임 %s"
L["Glow Action"] = "반짝임 동작"
--[[Translation missing --]]
L["Glow Anchor"] = "Glow Anchor"
L["Glow Color"] = "반짝임 색상"
--[[Translation missing --]]
L["Glow External Element"] = "Glow External Element"
--[[Translation missing --]]
L["Glow Frame Type"] = "Glow Frame Type"
L["Glow Type"] = "반짝임 유형"
L["Green Rune"] = "녹색 룬"
--[[Translation missing --]]
L["Grid direction"] = "Grid direction"
L["Group"] = "그룹"
L["Group (verb)"] = "그룹시키기"
L["Group aura count description"] = [=[디스플레이 조건을 충족하기 위해 주어진 효과에 영향을 받는 한명 이상의 %s원의 숫자.
정수를 입력하면 (예. 5), 영향을 받는 공격대원의 숫자를 입력된 숫자와 비교합니다.
소수 (예. 0.5), 분수 (예. 1/2), 또는 백분율 (예. 50%%)을 입력하면, %s원 중 일부가 영향을 받아야 합니다.
|cFF4444FF예제:|r
|cFF00CC00> 0|r %s 중 아무나 영향 받을 때 발생
|cFF00CC00= 100%%|r %s 중 모두가 영향 받을 때 발생
|cFF00CC00!= 2|r 영향 받는 %s원의 숫자가 2가 아닐 때 발생
|cFF00CC00<= 0.8|r %s 중 80%% 이하가 영향 받을 때 발생 (5명 파티원중 4명, 10명 공격대원 중 8명 또는 25명 공격대원중 20명)
|cFF00CC00> 1/2|r %s의 절반 이상이 영향 받을 때 발생
|cFF00CC00>= 0|r 상관없이, 항상 발생]=]
--[[Translation missing --]]
L["Group by Frame"] = "Group by Frame"
--[[Translation missing --]]
L["Group contains updates from Wago"] = "Group contains updates from Wago"
L["Group Icon"] = "그룹 아이콘"
--[[Translation missing --]]
L["Group key"] = "Group key"
L["Group Member Count"] = "그룹원 수"
L["Group Role"] = "그룹 역할"
L["Group Scale"] = "그룹 크기 비율"
L["Group Settings"] = "그룹 설정"
L["Group Type"] = "그룹 유형"
L["Grow"] = "성장"
L["Hawk"] = ""
L["Height"] = "높이"
--[[Translation missing --]]
L["Help"] = "Help"
L["Hide"] = "숨기기"
L["Hide Cooldown Text"] = "재사용 대기시간 문자 숨기기"
--[[Translation missing --]]
L["Hide Glows applied by this aura"] = "Hide Glows applied by this aura"
L["Hide on"] = "숨기기"
L["Hide this group's children"] = "이 그룹의 자식 숨기기"
L["Hide When Not In Group"] = "파티에 없을 때 숨기기"
L["Horizontal Align"] = "가로 정렬"
L["Horizontal Bar"] = "가로 바"
L["Huge Icon"] = "거대한 아이콘"
L["Hybrid Position"] = "복합 위치"
L["Hybrid Sort Mode"] = "복합 정렬 모드"
L["Icon"] = "아이콘"
L["Icon Info"] = "아이콘 정보"
L["Icon Inset"] = "아이템 축소"
L["Icon Position"] = "아이콘 위치"
L["Icon Settings"] = "아이콘 설정"
--[[Translation missing --]]
L["If"] = "If"
--[[Translation missing --]]
L["If checked, then the user will see a multi line edit box. This is useful for inputting large amounts of text."] = "If checked, then the user will see a multi line edit box. This is useful for inputting large amounts of text."
--[[Translation missing --]]
L["If checked, then this option group can be temporarily collapsed by the user."] = "If checked, then this option group can be temporarily collapsed by the user."
--[[Translation missing --]]
L["If checked, then this option group will start collapsed."] = "If checked, then this option group will start collapsed."
--[[Translation missing --]]
L["If checked, then this separator will include text. Otherwise, it will be just a horizontal line."] = "If checked, then this separator will include text. Otherwise, it will be just a horizontal line."
--[[Translation missing --]]
L["If checked, then this separator will not merge with other separators when selecting multiple auras."] = "If checked, then this separator will not merge with other separators when selecting multiple auras."
--[[Translation missing --]]
L["If checked, then this space will span across multiple lines."] = "If checked, then this space will span across multiple lines."
--[[Translation missing --]]
L["If Trigger %s"] = "If Trigger %s"
L["If unchecked, then a default color will be used (usually yellow)"] = "체크하지 않으면 기본 색상(보통 노란색)이 사용됩니다."
--[[Translation missing --]]
L["If unchecked, then this space will fill the entire line it is on in User Mode."] = "If unchecked, then this space will fill the entire line it is on in User Mode."
--[[Translation missing --]]
L["Ignore all Updates"] = "Ignore all Updates"
--[[Translation missing --]]
L["Ignore Self"] = "Ignore Self"
--[[Translation missing --]]
L["Ignore self"] = "Ignore self"
L["Ignored"] = "무시됨"
L["Import"] = "가져오기"
L["Import a display from an encoded string"] = "암호화된 문자열에서 디스플레이 가져오기"
--[[Translation missing --]]
L["Inner"] = "Inner"
L["Invalid Item Name/ID/Link"] = "잘못된 아이템 이름/ID/링크"
L["Invalid Spell ID"] = "잘못된 주문 ID"
L["Invalid Spell Name/ID/Link"] = "잘못된 주문 이름/ID/링크"
L["Inverse"] = "반대로"
L["Inverse Slant"] = "역 경사"
L["Is Stealable"] = "훔치기 가능할 때"
L["Justify"] = "정렬"
L["Keep Aspect Ratio"] = "종횡비 유지"
--[[Translation missing --]]
L["Large Input"] = "Large Input"
L["Leaf"] = ""
--[[Translation missing --]]
L["Left"] = "Left"
L["Left 2 HUD position"] = "좌측 2 HUD 위치"
L["Left HUD position"] = "좌측 HUD 위치"
L["Legacy Aura Trigger"] = "v2.9.0 이전 효과 활성 조건"
L["Length"] = "길이"
--[[Translation missing --]]
L["Limit"] = "Limit"
--[[Translation missing --]]
L["Lines & Particles"] = "Lines & Particles"
L["Load"] = "불러오기"
L["Loaded"] = "불러옴"
L["Loop"] = "반복"
L["Low Mana"] = "마나 낮음"
L["Magnetically Align"] = "자석 정렬"
L["Main"] = "메인"
L["Manage displays defined by Addons"] = "애드온에 의해 정의된 디스플레이 관리"
L["Match Count"] = "일치 횟수"
L["Max"] = "최대"
L["Max Length"] = "최대 길이"
L["Medium Icon"] = "보통 아이콘"
L["Message"] = "메시지"
L["Message Prefix"] = "메시지 접두사"
L["Message Suffix"] = "메시지 접미사"
L["Message Type"] = "메시지 유형"
--[[Translation missing --]]
L["Min"] = "Min"
L["Mirror"] = "뒤집기"
L["Model"] = "모델"
--[[Translation missing --]]
L["Model %s"] = "Model %s"
L["Model Settings"] = "모델 설정"
--[[Translation missing --]]
L["Move Above Group"] = "Move Above Group"
--[[Translation missing --]]
L["Move Below Group"] = "Move Below Group"
L["Move Down"] = "아래로 이동"
--[[Translation missing --]]
L["Move Entry Down"] = "Move Entry Down"
--[[Translation missing --]]
L["Move Entry Up"] = "Move Entry Up"
--[[Translation missing --]]
L["Move Into Above Group"] = "Move Into Above Group"
--[[Translation missing --]]
L["Move Into Below Group"] = "Move Into Below Group"
L["Move this display down in its group's order"] = "이 디스플레이를 그룹 내 순서에서 아래로 이동"
L["Move this display up in its group's order"] = "이 디스플레이를 그룹 내 순서에서 위로 이동"
L["Move Up"] = "위로 이동"
L["Multiple Displays"] = "다중 디스플레이"
L["Multiple Triggers"] = "다중 활성 조건"
L["Multiselect ignored tooltip"] = [=[
|cFFFF0000무시|r - |cFF777777단일|r - |cFF777777다중|r
디스플레이를 불러오는 데 영향을 주지 않습니다]=]
L["Multiselect multiple tooltip"] = [=[
|cFF777777무시|r - |cFF777777단일|r - |cFF00FF00다중|r
선택한 것중 하나라도 일치할 때 불러옵니다]=]
L["Multiselect single tooltip"] = [=[
|cFF777777무시|r - |cFF00FF00단일|r - |cFF777777다중|r
선택한 한가지만 일치할 때 불러옴]=]
L["Name Info"] = "이름 정보"
L["Name Pattern Match"] = "이름 패턴 일치"
L["Name(s)"] = "이름(s)"
--[[Translation missing --]]
L["Negator"] = "Not"
L["Never"] = "절대 안함"
L["New Aura"] = "새 효과"
L["New Value"] = "새 값"
L["No"] = "아니오"
L["No Children"] = "자식 없음"
L["No tooltip text"] = "툴팁 문자 없음"
L["None"] = "없음"
L["Not all children have the same value for this option"] = "모든 자식의 이 옵션 값이 같지 않습니다"
L["Not Loaded"] = "불러오지 않음"
--[[Translation missing --]]
L["Note: Automated Messages to SAY and YELL are blocked outside of Instances."] = "Note: Automated Messages to SAY and YELL are blocked outside of Instances."
--[[Translation missing --]]
L["Number of Entries"] = "Number of Entries"
--[[Translation missing --]]
L["Offer a guided way to create auras for your character"] = "Offer a guided way to create auras for your character"
L["Okay"] = "확인"
L["On Hide"] = "숨겨질 때"
L["On Init"] = "초기 실행 시"
L["On Show"] = "표시될 때"
L["Only match auras cast by people other than the player"] = "플레이어가 아닌 다른 사람이 시전한 효과와 일치할 때만"
L["Only match auras cast by people other than the player or his pet"] = "플레이어나 소환수 이외의 사람들이 시전한 효과와 일치할 때만"
L["Only match auras cast by the player"] = "플레이어가 시전한 효과와 일치할 때만"
L["Only match auras cast by the player or his pet"] = "플레이어나 소환수가 시전한 효과와 일치할 때만"
L["Operator"] = "연산자"
L["Option %i"] = "옵션 %i"
L["Option key"] = "옵션 키"
L["Option Type"] = "옵션 종류"
L["Options will open after combat ends."] = "전투가 끝난 후 옵션이 열립니다."
L["or"] = "혹은"
--[[Translation missing --]]
L["or Trigger %s"] = "or Trigger %s"
L["Orange Rune"] = "오렌지색 룬"
L["Orientation"] = "방향"
--[[Translation missing --]]
L["Outer"] = "Outer"
L["Outline"] = "외곽선"
--[[Translation missing --]]
L["Overflow"] = "Overflow"
L["Overlay %s Info"] = "오버레이 %s 정보"
L["Overlays"] = "오버레이"
L["Own Only"] = "내 것만"
L["Paste Action Settings"] = "동작 설정 붙여넣기"
L["Paste Animations Settings"] = "애니메이션 설정 붙여넣기"
--[[Translation missing --]]
L["Paste Author Options Settings"] = "Paste Author Options Settings"
L["Paste Condition Settings"] = "조건 설정 붙여넣기"
--[[Translation missing --]]
L["Paste Custom Configuration"] = "Paste Custom Configuration"
L["Paste Display Settings"] = "디스플레이 설정 붙여넣기"
L["Paste Group Settings"] = "그룹 설정 붙여넣기"
L["Paste Load Settings"] = "불러오기 설정 붙여넣기"
L["Paste Settings"] = "붙여넣기 설정"
L["Paste text below"] = "아래에 문자를 붙여 넣으세요."
L["Paste Trigger Settings"] = "활성 조건 설정 붙여넣기"
L["Play Sound"] = "소리 재생"
L["Position Settings"] = "자리 설정"
--[[Translation missing --]]
L["Preferred Match"] = "Preferred Match"
L["Preset"] = "프리셋"
--[[Translation missing --]]
L["Press Ctrl+C to copy"] = "Press Ctrl+C to copy"
--[[Translation missing --]]
L["Prevent Merging"] = "Prevent Merging"
L["Processed %i chars"] = "%i 문자 복사됨"
L["Progress Bar"] = "진행 바"
L["Progress Bar Settings"] = "진행 바 설정"
L["Progress Texture"] = "진행 텍스쳐"
L["Progress Texture Settings"] = "진행 텍스쳐 설정"
L["Purple Rune"] = "보라색 룬"
L["Put this display in a group"] = "이 디스플레이를 그룹에 넣기"
L["Radius"] = "반경"
L["Re-center X"] = "내부 X 좌표"
L["Re-center Y"] = "내부 Y 좌표"
--[[Translation missing --]]
L["Regions of type \"%s\" are not supported."] = "Regions of type \"%s\" are not supported."
L["Remaining Time"] = "남은 시간"
L["Remaining Time Precision"] = "남은 시간 정밀도"
L["Remove"] = "제거"
L["Remove this display from its group"] = "이 디스플레이를 그룹에서 제거하기"
L["Remove this property"] = "이 속성 제거"
L["Rename"] = "이름 변경"
L["Repeat After"] = "반복 횟수"
--[[Translation missing --]]
L["Repeat every"] = "Repeat every"
--[[Translation missing --]]
L["Require unit from trigger"] = "Require unit from trigger"
L["Required for Activation"] = "활성화에 필요"
L["Reset all options to their default values."] = "모든 옵션을 기본값으로 재설정하십시오."
--[[Translation missing --]]
L["Reset Entry"] = "Reset Entry"
L["Reset to Defaults"] = "기본값으로 재설정"
--[[Translation missing --]]
L["Right"] = "Right"
L["Right 2 HUD position"] = "우측 2 HUD 위치"
L["Right HUD position"] = "우측 HUD 위치"
L["Right-click for more options"] = "우클릭 - 추가 옵션"
L["Rotate"] = "회전"
L["Rotate In"] = "시계방향 회전"
L["Rotate Out"] = "반시계방향 회전"
L["Rotate Text"] = "문자 회전"
L["Rotation"] = "회전"
L["Rotation Mode"] = "회전 모드"
--[[Translation missing --]]
L["Row Space"] = "Row Space"
--[[Translation missing --]]
L["Row Width"] = "Row Width"
L["Same"] = "동일한"
L["Scale"] = "크기 비율"
L["Search"] = "검색"
L["Select the auras you always want to be listed first"] = "목록에서 첫번째로 표시할 오라를 선택하세요"
L["Send To"] = "보내기..."
--[[Translation missing --]]
L["Separator Text"] = "Separator Text"
--[[Translation missing --]]
L["Separator text"] = "Separator text"
L["Set Parent to Anchor"] = "부모를 고정기로 설정"
--[[Translation missing --]]
L["Set Thumbnail Icon"] = "Set Thumbnail Icon"
L["Set tooltip description"] = "툴팁 설명 설정"
--[[Translation missing --]]
L["Sets the anchored frame as the aura's parent, causing the aura to inherit attributes such as visiblility and scale."] = "Sets the anchored frame as the aura's parent, causing the aura to inherit attributes such as visiblility and scale."
L["Settings"] = "설정"
L["Shadow Color"] = "그림자 색상"
L["Shadow X Offset"] = "그림자 X 좌표"
L["Shadow Y Offset"] = "그림자 Y 좌표"
L["Shift-click to create chat link"] = "Shift+클릭 - 대화 링크 만들기"
L["Show all matches (Auto-clone)"] = "모든 일치 표시 (자동 복제)"
L["Show Border"] = "테두리 표시"
L["Show Cooldown"] = "재사용 대기시간 표시"
L["Show Glow"] = "반짝임 표시"
L["Show Icon"] = "아이콘 표시"
L["Show If Unit Does Not Exist"] = "유닛이 존재하지 않는 경우 표시"
L["Show If Unit Is Invalid"] = "유닛이 유효하지 않은 경우 표시"
L["Show Matches for"] = "일치 항목 표시"
--[[Translation missing --]]
L["Show Matches for Units"] = "Show Matches for Units"
L["Show Model"] = "모델 표시"
L["Show model of unit "] = "유닛의 모델 표시"
--[[Translation missing --]]
L["Show On"] = "Show On"
L["Show Spark"] = "섬광 표시"
L["Show Text"] = "문자 표시"
L["Show this group's children"] = "이 그룹의 자식 표시"
L["Shows a 3D model from the game files"] = "게임 데이터의 3D 모델을 표시합니다"
--[[Translation missing --]]
L["Shows a border"] = "Shows a border"
L["Shows a custom texture"] = "사용자 설정 텍스쳐 표시"
--[[Translation missing --]]
L["Shows a glow"] = "Shows a glow"
--[[Translation missing --]]
L["Shows a model"] = "Shows a model"
L["Shows a progress bar with name, timer, and icon"] = "이름, 타이머, 아이콘과 함께 진행 바를 표시합니다"
L["Shows a spell icon with an optional cooldown overlay"] = "재사용 대기시간 오버레이와 함께 주문 아이콘을 표시합니다"
L["Shows a texture that changes based on duration"] = "지속시간에 따라 변화하는 텍스쳐를 표시합니다"
L["Shows one or more lines of text, which can include dynamic information such as progress or stacks"] = "여러 줄의 문자를 표시합니다, 진행 시간 또는 중첩과 같은 여러 정보를 포함할 수 있습니다"
L["Simple"] = "단순"
L["Size"] = "크기"
--[[Translation missing --]]
L["Skip this Version"] = "Skip this Version"
L["Slant Amount"] = "기울기 양"
L["Slant Mode"] = "기울기 모드"
L["Slanted"] = "기울임"
L["Slide"] = "슬라이드"
L["Slide In"] = "안으로 슬라이드"
L["Slide Out"] = "바깥으로 슬라이드"
--[[Translation missing --]]
L["Slider Step Size"] = "Slider Step Size"
L["Small Icon"] = "작은 아이콘"
L["Smooth Progress"] = "부드러운 진행"
--[[Translation missing --]]
L["Soft Max"] = "Soft Max"
--[[Translation missing --]]
L["Soft Min"] = "Soft Min"
L["Sort"] = "정렬"
L["Sound"] = "소리"
L["Sound Channel"] = "소리 채널"
L["Sound File Path"] = "소리 파일 경로"
L["Sound Kit ID"] = "소리 Kit ID"
L["Space"] = "공간"
L["Space Horizontally"] = "수평 공간"
L["Space Vertically"] = "수직 공간"
L["Spark"] = "섬광"
L["Spark Settings"] = "섬광 설정"
L["Spark Texture"] = "섬광 텍스쳐"
L["Specific Unit"] = "특정 유닛"
L["Spell ID"] = "주문 ID"
L["Stack Count"] = "중첩 횟수"
L["Stack Info"] = "중첩 정보"
L["Stagger"] = "계단식 배치"
L["Star"] = ""
L["Start"] = "시작"
L["Start Angle"] = "시작 각도"
--[[Translation missing --]]
L["Start Collapsed"] = "Start Collapsed"
--[[Translation missing --]]
L["Start of %s"] = "Start of %s"
L["Status"] = "상태"
L["Stealable"] = "훔치기 가능"
--[[Translation missing --]]
L["Step Size"] = "Step Size"
--[[Translation missing --]]
L["Stop ignoring Updates"] = "Stop ignoring Updates"
L["Stop Sound"] = "소리 중지"
L["Sub Elements"] = "하위 요소"
L["Sub Option %i"] = "하위 옵션 %i"
L["Temporary Group"] = "임시 그룹"
L["Text"] = "문자"
L["Text %s"] = "문자 %s"
L["Text Color"] = "문자 색상"
L["Text Settings"] = "문자 설정"
L["Texture"] = "텍스쳐"
L["Texture Info"] = "텍스쳐 정보"
L["Texture Settings"] = "텍스쳐 설정"
L["Texture Wrap"] = "텍스쳐 줄바꿈"
L["The duration of the animation in seconds."] = "애니메이션 지속시간 (초)"
--[[Translation missing --]]
L["The duration of the animation in seconds. The finish animation does not start playing until after the display would normally be hidden."] = "The duration of the animation in seconds. The finish animation does not start playing until after the display would normally be hidden."
L["The type of trigger"] = "활성 조건의 유형"
--[[Translation missing --]]
L["Then "] = "Then "
--[[Translation missing --]]
L["Thickness"] = "Thickness"
--[[Translation missing --]]
L["This adds %tooltip, %tooltip1, %tooltip2, %tooltip3 as text replacements."] = "This adds %tooltip, %tooltip1, %tooltip2, %tooltip3 as text replacements."
--[[Translation missing --]]
L["This aura has legacy aura trigger(s). Convert them to the new system to benefit from enhanced performance and features"] = "This aura has legacy aura trigger(s). Convert them to the new system to benefit from enhanced performance and features"
L["This display is currently loaded"] = "이 디스플레이는 불러온 상태입니다"
L["This display is not currently loaded"] = "이 디스플레이는 불러오지 않았습니다"
L["This region of type \"%s\" is not supported."] = "이 영역은 \"%s\" 유형을 지원하지 않습니다."
L["This setting controls what widget is generated in user mode."] = "이 설정은 사용자 모드에서 생성된 위젯을 제어합니다."
L["Time in"] = "시간 단위"
L["Tiny Icon"] = "더 작은 아이콘"
L["To Frame's"] = "프레임의 다음 지점:"
--[[Translation missing --]]
L["To Group's"] = "To Group's"
L["To Personal Ressource Display's"] = "개인 자원 표시의 다음 지점:"
L["To Screen's"] = "화면의 다음 지점:"
L["Toggle the visibility of all loaded displays"] = "불러온 모든 디스플레이 표시 전환"
L["Toggle the visibility of all non-loaded displays"] = "불러오지 않은 모든 디스플레이 표시 토글"
L["Toggle the visibility of this display"] = "이 디스플레이의 표시 전환"
L["Tooltip"] = "툴팁"
L["Tooltip Content"] = "툴팁 내용"
L["Tooltip on Mouseover"] = "마우스오버 툴팁"
L["Tooltip Pattern Match"] = "툴팁 패턴 일치"
L["Tooltip Text"] = "툴팁 문자"
L["Tooltip Value"] = "툴팁 값"
L["Tooltip Value #"] = "툴팁 값 #"
L["Top"] = ""
L["Top HUD position"] = "상단 HUD 위치"
L["Top Left"] = "왼쪽 위"
L["Top Right"] = "오른쪽 위"
L["Total Time"] = "전체 시간"
L["Total Time Precision"] = "전체 시간 정밀도"
L["Trigger"] = "활성 조건"
L["Trigger %d"] = "%d 활성 조건"
L["Trigger %s"] = "활성 조건 %s"
L["True"] = ""
L["Type"] = "유형"
L["Ungroup"] = "그룹 해제"
L["Unit"] = "유닛"
--[[Translation missing --]]
L["Unit %s is not a valid unit for RegisterUnitEvent"] = "Unit %s is not a valid unit for RegisterUnitEvent"
L["Unit Count"] = "유닛 수"
--[[Translation missing --]]
L["Unit Frame"] = "Unit Frame"
--[[Translation missing --]]
L["Unit Frames"] = "Unit Frames"
L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "시작 또는 종료 애니메이션과 달리 메인 애니메이션은 디스플레이가 숨겨질 때까지 계속 반복됩니다."
L["Up"] = "위로"
--[[Translation missing --]]
L["Update %s by %s"] = "Update %s by %s"
L["Update Custom Text On..."] = "사용자 설정 문자 갱신 중..."
--[[Translation missing --]]
L["Update in Group"] = "Update in Group"
--[[Translation missing --]]
L["Update this Aura"] = "Update this Aura"
L["Use Custom Color"] = "사용자 설정 색상 사용"
--[[Translation missing --]]
L["Use Display Info Id"] = "Use Display Info Id"
L["Use Full Scan (High CPU)"] = "전체 스캔 사용 (높은 CPU 사용률)"
--[[Translation missing --]]
L["Use nth value from tooltip:"] = "Use nth value from tooltip:"
L["Use SetTransform"] = "SetTransform 사용"
L["Use tooltip \"size\" instead of stacks"] = "중첩 대신 툴팁 \"크기\" 사용"
L["Use Tooltip Information"] = "툴팁 정보 사용"
L["Used in Auras:"] = "사용되는 효과:"
L["Used in auras:"] = "사용되는 효과:"
L["Value %i"] = "값 %i"
--[[Translation missing --]]
L["Values are in normalized rgba format."] = "Values are in normalized rgba format."
L["Values:"] = "값:"
L["Version: "] = "버전:"
L["Vertical Align"] = "수직 정렬"
L["Vertical Bar"] = "수직 바"
L["View"] = "보기"
L["Wago Update"] = "Wago 업데이트"
L["Whole Area"] = "전체 영역"
L["Width"] = "너비"
--[[Translation missing --]]
L["wrapping"] = "wrapping"
L["X Offset"] = "X 좌표"
L["X Rotation"] = "X 회전"
L["X Scale"] = "가로 크기"
L["X-Offset"] = "X-좌표"
L["Y Offset"] = "Y 좌표"
L["Y Rotation"] = "Y 회전"
L["Y Scale"] = "세로 크기"
L["Yellow Rune"] = "노란색 룬"
L["Yes"] = ""
L["Y-Offset"] = "Y-좌표"
L["You are about to delete %d aura(s). |cFFFF0000This cannot be undone!|r Would you like to continue?"] = "효과 %d개를 삭제하려고 합니다. |cFFFF0000이는 취소할 수 없습니다!|r 계속할까요?"
L["Z Offset"] = "Z 좌표"
L["Z Rotation"] = "Z 회전"
L["Zoom"] = "확대"
L["Zoom In"] = "확대"
L["Zoom Out"] = "축소"
File diff suppressed because it is too large Load Diff
+749
View File
@@ -0,0 +1,749 @@
if not WeakAuras.IsCorrectVersion() then return end
if not(GetLocale() == "ruRU") then
return
end
local L = WeakAuras.L
-- WeakAuras/Options
L["-- Do not remove this comment, it is part of this trigger: "] = "-- Не удаляйте этот комментарий, он является частью этого триггера: "
L["% of Progress"] = "% прогресса"
L["%i auras selected"] = "%i |4индикация выбрана:индикации выбраны:индикаций выбрано;"
L["%i Matches"] = "%i |4совпадение:совпадения:совпадений;"
L["%s - Option #%i has the key %s. Please choose a different option key."] = "Ключ |cFFE6CC80%3$s|r уже используется в Параметре %2$i индикации %1$s. Пожалуйста, выберите другой ключ."
L["%s %s, Lines: %d, Frequency: %0.2f, Length: %d, Thickness: %d"] = "%s %s; Линии %d; Частота %.3g; Длина %0.3g; Толщина %0.3g"
L["%s %s, Particles: %d, Frequency: %0.2f, Scale: %0.2f"] = "%s %s; Частицы %d; Частота %.3g; Масштаб %.3g"
L["%s Alpha: %d%%"] = "%s Прозрачность %d%%"
L["%s Color"] = "%s "
L["%s Default Alpha, Zoom, Icon Inset, Aspect Ratio"] = "%s Значения по умолчанию"
L["%s Inset: %d%%"] = "%s Вставка %d%%"
L["%s is not a valid SubEvent for COMBAT_LOG_EVENT_UNFILTERED"] = "%s не является допустимым внутренним событием COMBAT_LOG_EVENT_UNFILTERED"
L["%s Keep Aspect Ratio"] = "%s Сохранение пропорций изображения"
L["%s total auras"] = "Всего %s |4индикация:индикации:индикаций;"
L["%s Zoom: %d%%"] = "%s Увеличение %d%%"
L["%s, Border"] = "%s; Граница"
L["%s, Offset: %0.2f;%0.2f"] = "%s; Смещение (%.4g, %.4g)"
L["%s, offset: %0.2f;%0.2f"] = "%s; Смещение (%.4g, %.4g)"
L["|c%02x%02x%02x%02xCustom Color|r"] = "Свечение |c%02x%02x%02x%02xO|r цвета"
L["|cFFFF0000Note:|r The unit '%s' is not a trackable unit."] = "|cFFFFCC00Предупреждение.|r Единица |cFFE6CC80%s|r не поддерживается."
L["|cFFffcc00Anchors:|r Anchored |cFFFF0000%s|r to frame's |cFFFF0000%s|r"] = "|cFFFFCC00Крепление.|r Элемент с точкой крепления |cFFE6CC80%s|r привязан к кадру в точке |cFFE6CC80%s|r"
L["|cFFffcc00Anchors:|r Anchored |cFFFF0000%s|r to frame's |cFFFF0000%s|r with offset |cFFFF0000%s/%s|r"] = "|cFFFFCC00Крепление.|r Элемент с точкой крепления |cFFE6CC80%s|r привязан к кадру в точке |cFFE6CC80%s|r со смещением (%s, %s)"
L["|cFFffcc00Anchors:|r Anchored to frame's |cFFFF0000%s|r"] = "|cFFFFCC00Крепление.|r Элемент привязан к кадру в точке |cFFE6CC80%s|r"
L["|cFFffcc00Anchors:|r Anchored to frame's |cFFFF0000%s|r with offset |cFFFF0000%s/%s|r"] = "|cFFFFCC00Крепление.|r Элемент привязан к кадру в точке |cFFE6CC80%s|r со смещением (%s, %s)"
L["|cFFffcc00Extra Options:|r"] = "|cFFFFCC00Дополнительные параметры:|r"
L["|cFFffcc00Font Flags:|r |cFFFF0000%s|r and shadow |c%sColor|r with offset |cFFFF0000%s/%s|r%s%s%s"] = "|cFFFFCC00Атрибуты текста:|r |cFFE6CC80%s|r; Тень |c%sO|r цвета со смещением (%s, %s);%s%s%s"
L["1 Match"] = "1 cовпадение"
L["A 20x20 pixels icon"] = "Иконка 20х20 пикселей"
L["A 32x32 pixels icon"] = "Иконка 32х32 пикселей"
L["A 40x40 pixels icon"] = "Иконка 40х40 пикселей"
L["A 48x48 pixels icon"] = "Иконка 48х48 пикселей"
L["A 64x64 pixels icon"] = "Иконка 64х64 пикселей"
L["A group that dynamically controls the positioning of its children"] = "Группа, динамически изменяющая позиции своих индикаций"
L["A Unit ID (e.g., party1)."] = [=[Введите идентификатор единицы (UID, Unit ID).
Например: party4, raid7, arena3, boss2, target, focus, pet и др.]=]
L["Actions"] = "Действия"
L["Add %s"] = "%s"
L["Add a new display"] = "Добавить новую индикацию"
L["Add Condition"] = "Добавить условие"
L["Add Entry"] = "Добавить запись"
L["Add Extra Elements"] = "Добавить дополнительные элементы"
L["Add Option"] = "Добавить параметр"
L["Add Overlay"] = "Добавить наложение"
L["Add Property Change"] = "Добавить свойство"
L["Add Sub Option"] = "Добавить внутр. параметр"
L["Add to group %s"] = "Добавить в группу %s"
L["Add to new Dynamic Group"] = "Добавить в новую динамическую группу"
L["Add to new Group"] = "Добавить в новую группу"
L["Add Trigger"] = "Добавить триггер"
L["Addon"] = "Аддон"
L["Addons"] = "Аддоны"
L["Advanced"] = "Комплексный подход"
L["Align"] = "Выравнивание"
L["Alignment"] = "Выравнивание"
L["All of"] = "И (все условия)"
L["Allow Full Rotation"] = "Разрешить полное вращение"
L["Alpha"] = "Прозрачность"
L["Anchor"] = "Крепление"
L["Anchor Point"] = "Точка крепления"
L["Anchored To"] = "Прикрепить к"
L["And "] = "И "
L["and aligned left"] = "Выранивание по левому краю;"
L["and aligned right"] = "Выранивание по правому краю;"
L["and rotated left"] = "Текст повернут вверх;"
L["and rotated right"] = "Текст повернут вниз;"
L["and Trigger %s"] = "Триггер %s"
L["and with width |cFFFF0000%s|r and %s"] = "Ширина поля %s; %s"
L["Angle"] = "Угол"
L["Animate"] = "Анимация"
L["Animated Expand and Collapse"] = "Анимированное свёртывание и развёртывание"
L["Animates progress changes"] = "Изменение прогресса отображается при помощи анимации"
L["Animation relative duration description"] = [=[Длительность анимации относительно длительности индикации, выраженная в виде обыкновенной (1/2) или десятичной (0.5) дробей, процента (50%).
|cFFFF0000Замечание:|r если у индикации нет прогресса (аура без длительности, триггер события без времени и т. д.), то анимация не будет отображаться.
|cFF4444FFПримеры:|r
Если длительность анимации установлена в |cFF00CC0010%|r и триггер индикации - это бафф длительностью 20 секунд, то анимация будет отображаться в течение 2 секунд.
Если длительность анимации установлена в |cFF00CC0010%|r и триггер индикации - это бесконечная аура, то анимация отображаться не будет (хотя могла бы, если бы вы указали длительность в секундах).]=]
L["Animation Sequence"] = "Цепочка анимаций"
L["Animations"] = "Анимация"
L["Any of"] = "ИЛИ (любое условие)"
L["Apply Template"] = "Применить шаблон"
L["Arc Length"] = "Угол дуги"
L["Arcane Orb"] = "Чародейский шар"
L["At a position a bit left of Left HUD position."] = "Немного левее позиции левого HUD"
L["At a position a bit left of Right HUD position"] = "Немного правее позиции правого HUD"
L["At the same position as Blizzard's spell alert"] = "В таком же положении, как предупреждение заклинаний Blizzard"
L["Aura Name"] = "Название эффекта"
L["Aura Name Pattern"] = "Образец названия эффекта"
L["Aura Type"] = "Тип эффекта"
L["Aura(s)"] = "Эффекты"
L["Author Options"] = "Параметры Автора"
L["Auto"] = "Авто"
L["Auto-Clone (Show All Matches)"] = "Показать все совпадения (Автоклонирование)"
L["Auto-cloning enabled"] = "Автоклонирование включено"
L["Automatic"] = "Автоматический"
L["Automatic Icon"] = "Автоматическая иконка"
L["Backdrop Color"] = "Цвет фона"
L["Backdrop in Front"] = "Фон спереди"
L["Backdrop Style"] = "Стиль фона"
L["Background Color"] = "Цвет подложки"
L["Background Offset"] = "Смещение подложки"
L["Background Texture"] = "Текстура подложки"
L["Bar"] = "Полоса"
L["Bar Alpha"] = "Прозрачность полосы"
L["Bar Color"] = "Цвет полосы"
L["Bar Color Settings"] = "Настройки цвета полосы"
--[[Translation missing --]]
L["Bar Inner"] = "Bar Inner"
L["Bar Texture"] = "Текстура полосы"
L["Big Icon"] = "Большая иконка"
L["Blacklisted Aura Name"] = "Исключаемое название эффекта"
L["Blacklisted Exact Spell ID(s)"] = "Исключить ID заклинания"
L["Blacklisted Name(s)"] = "Исключить название"
L["Blacklisted Spell ID"] = "Исключаемый ID заклинания"
L["Blend Mode"] = "Режим наложения"
L["Blue Rune"] = "Синяя руна"
L["Blue Sparkle Orb"] = "Синий искрящийся шар"
L["Border"] = "Граница"
L["Border %s"] = "Граница %s"
L["Border Anchor"] = "Крепление границы"
L["Border Color"] = "Цвет границы"
L["Border in Front"] = "Граница спереди"
L["Border Inset"] = "Вставка границы"
L["Border Offset"] = "Смещение границы"
L["Border Settings"] = "Настройки границы"
L["Border Size"] = "Размер границы"
L["Border Style"] = "Стиль границы"
L["Bottom"] = "Снизу"
L["Bottom Left"] = "Снизу слева"
L["Bottom Right"] = "Снизу справа"
L["Bracket Matching"] = "Закрывать скобки"
L["Can be a Name or a Unit ID (e.g. party1). A name only works on friendly players in your group."] = "Введите имя или идентификатор единицы (Unit ID). Имена работают только для игроков, находящихся в вашей группе."
L["Can be a UID (e.g., party1)."] = [=[Введите идентификатор единицы (UID, Unit ID).
Например: party4, raid7, arena3, boss2, target, focus, pet и др.]=]
L["Cancel"] = "Отмена"
L["Center"] = "Центр"
L["Channel Number"] = "Номер канала"
L["Chat Message"] = "Сообщение в чат"
L["Check On..."] = "Проверять..."
L["Children:"] = "Индикации:"
L["Choose"] = "Выбрать"
L["Choose Trigger"] = "Выберите триггер"
L["Choose whether the displayed icon is automatic or defined manually"] = "Выберите, будет ли иконка задана автоматически или вручную"
L["Class"] = "Класс"
--[[Translation missing --]]
L["Clip Overlays"] = "Clip Overlays"
--[[Translation missing --]]
L["Clipped by Progress"] = "Clipped by Progress"
L["Clone option enabled dialog"] = [=[Вы активировали параметр, использующий |cFFFF0000Автоклонирование|r.
|cFFFF0000Автоклонирование|r заставляет индикацию автоматически дублироваться для отображения нескольких источников информации. Если вы не разместите ее в |cFF22AA22Динамической группе|r, то все клоны будут отображаться друг над другом в большой куче.
Вы хотите поместить эту индикацию в новую |cFF22AA22Динамическую группу|r?]=]
L["Close"] = "Закрыть"
L["Collapse"] = "Свернуть"
L["Collapse all loaded displays"] = "Свернуть все загруженные индикации"
L["Collapse all non-loaded displays"] = "Свернуть все не загруженные индикации"
L["Collapsible Group"] = "Свёртываемая группа"
L["color"] = "цвет"
L["Color"] = "Цвет"
L["Column Height"] = "Высота столбца"
L["Column Space"] = "Отступ между столбцами"
L["Combinations"] = "Логические операции"
L["Combine Matches Per Unit"] = "Объединить совпадения для каждой единицы"
L["Common Text"] = "Общие параметры текста"
L["Compare against the number of units affected."] = "Сравнение с количеством единиц, находящихся под действием эффекта."
L["Compress"] = "Сжать"
L["Condition %i"] = "Условие %i"
L["Conditions"] = "Условия"
L["Configure what options appear on this panel."] = "Перейти в режим автора, в котором вы можете создавать и редактировать параметры индикации для пользователей."
L["Constant Factor"] = "Постоянный параметр"
L["Control-click to select multiple displays"] = "Ctrl-клик для выбора нескольких индикаций"
L["Controls the positioning and configuration of multiple displays at the same time"] = "Управляет позиционированием и настройкой нескольких индикаций одновременно"
L["Convert to New Aura Trigger"] = "Преобразовать в новую версию триггера"
L["Convert to..."] = "Преобразовать в ..."
L["Cooldown Edge"] = "Эффект Edge (кромка)"
L["Cooldown Settings"] = "Настройки восстановления"
L["Cooldown Swipe"] = "Эффект Swipe (затемнение)"
L["Copy"] = "Копировать"
L["Copy settings..."] = "Копировать настройки из ..."
L["Copy to all auras"] = "Копировать во все индикации"
L["Copy URL"] = "Копировать строку URL"
L["Count"] = "Количество"
L["Counts the number of matches over all units."] = "Сравнение с количеством совпадений для всех единиц."
L["Creating buttons: "] = "Создание кнопок:"
L["Creating options: "] = "Создание настроек:"
L["Crop X"] = "Обрезать по X"
L["Crop Y"] = "Обрезать по Y"
L["Custom"] = "Самостоятельно"
L["Custom Anchor"] = "Свое крепление"
L["Custom Code"] = "Свой код"
L["Custom Color"] = "Цвет"
L["Custom Configuration"] = "Пользовательская конфигурация"
L["Custom Frames"] = "Пользовательские рамки"
L["Custom Function"] = "Своя функция"
--[[Translation missing --]]
L["Custom Grow"] = "Custom Grow"
L["Custom Options"] = "Пользовательские параметры"
L["Custom Sort"] = "Свой критерий сортировки"
L["Custom Trigger"] = "Свой триггер"
L["Custom trigger event tooltip"] = [=[Напишите события, которые будут вызывать проверку вашего триггера. Несколько событий должны быть разделены запятыми или пробелами.
|cFF4444FFПример:|r
UNIT_POWER UNIT_AURA, PLAYER_TARGET_CHANGED]=]
L["Custom trigger status tooltip"] = [=[Напишите события, которые будут вызывать проверку вашего триггера. Несколько событий должны быть разделены запятыми или пробелами.
Поскольку это триггер статуса, указанные события могут быть переданы WeakAuras без ожидаемых аргументов.
|cFF4444FFПример:|r
UNIT_POWER UNIT_AURA, PLAYER_TARGET_CHANGED]=]
L["Custom Untrigger"] = "Свой детриггер"
L["Custom Variables"] = "Свои переменные"
L["Debuff Type"] = "Тип дебаффа"
L["Default"] = "По умолчанию"
L["Default Color"] = "Цвет по умолчанию"
L["Delete"] = "Удалить"
L["Delete all"] = "Удалить всё"
L["Delete children and group"] = "Удалить индикации и группу"
L["Delete Entry"] = "Удалить запись"
L["Delete Trigger"] = "Удалить триггер"
L["Desaturate"] = "Обесцветить"
L["Description Text"] = "Текст описания"
L["Determines how many entries can be in the table."] = "Определяет, сколько записей может быть в таблице."
L["Differences"] = "Различия"
L["Disabled"] = "Выключено"
L["Disallow Entry Reordering"] = "Запретить изменение порядка записей"
L["Discrete Rotation"] = "Дискретный поворот"
L["Display"] = "Отображение"
L["Display Icon"] = "Отображаемая иконка"
L["Display Name"] = "Отображаемое имя"
L["Display Text"] = "Отображаемый текст"
L["Displays a text, works best in combination with other displays"] = "Отображает текст, лучше всего работает в сочетании с другими индикациями"
L["Distribute Horizontally"] = "Распределить по горизонтали"
L["Distribute Vertically"] = "Распределить по вертикали"
L["Do not group this display"] = "Не группировать эту индикацию"
L["Done"] = "Выполнено"
L["Don't skip this Version"] = "Не пропускать эту версию"
L["Down"] = "Переместить вниз"
L["Drag to move"] = "Перетащите для перемещения"
L["Duplicate"] = "Дублировать"
L["Duplicate All"] = "Дублировать все"
L["Duration (s)"] = "Длительность"
L["Duration Info"] = "Информация о длительности"
L["Dynamic Duration"] = "Динамическое значение"
L["Dynamic Group"] = "Динамическая группа"
L["Dynamic Group Settings"] = "Настройки динамической группы"
L["Dynamic Information"] = "Динамическая информация"
L["Dynamic information from first active trigger"] = "Динамическая информация из первого активного триггера"
L["Dynamic information from Trigger %i"] = "Динамическая информация из Триггера %i"
L["Dynamic text tooltip"] = [=[Несколько специальных кодов для отображения динамической информации в тексте:
|cFFFF0000%p|r - Прогресс - Оставшееся время таймера или текущее бестаймерное значение
|cFFFF0000%t|r - Всего - Максимальное время таймера или бестаймерное значение
|cFFFF0000%n|r - Название - Название эффекта, заклинания, предмета и т. д. или ID индикации
|cFFFF0000%i|r - Иконка - Иконка, связанная с индикацией
|cFFFF0000%s|r - Стаки - Количество стаков эффекта, предмета, зарядов заклинания и т. д.
|cFFFF0000%c|r - Свой код - Позволяет написать функцию на Lua, которая возвращает одно значение или их список. Для отображения единственного значения используйте |cFFFF0000%c|r, для j-го значения из списка - |cFFFF0000%cj|r
|cFFFF0000%%|r - Показывает символ процента
Запись формата |cFFFF0000%k.m|r выводит на экран информацию из k-го триггера, определённую посредством кода m.
]=]
L["Ease Strength"] = "Степень функции скорости"
L["Ease type"] = "Тип изменения скорости анимации"
L["Edge"] = "Кромка"
L["eliding"] = "Скрытие текста при переполнении"
L["Enabled"] = "Включено"
L["End Angle"] = "Конечный угол"
L["End of %s"] = "Конец группы \"%s\""
L["Enter a Spell ID"] = "Введите ID заклинания"
L["Enter an aura name, partial aura name, or spell id"] = "Введите название эффекта, часть его имени или ID заклинания."
L["Enter an Aura Name, partial Aura Name, or Spell ID. A Spell ID will match any spells with the same name."] = [=[Введите название эффекта, часть его имени или ID заклинания.
Указание ID не обеспечивает нахождение (или исключение) единственного результата, поскольку сопоставление эффектов всё равно происходит по названию заклинания, заданного этим ID.
Для получения взаимно однозначного соответствия используйте параметр "ID заклинания"]=]
L["Enter Author Mode"] = "Режим автора"
L["Enter User Mode"] = "Режим пользователя"
L["Enter user mode."] = "Перейти в режим пользователя, в котором вы можете настроить параметры, заданные автором индикации."
L["Entry %i"] = "Запись %i"
--[[Translation missing --]]
L["Entry limit"] = "Entry limit"
L["Entry Name Source"] = "Источник названий записей"
L["Event"] = "Событие"
L["Event Type"] = "Тип триггера"
L["Event(s)"] = "События"
L["Everything"] = "Всех вкладок"
L["Exact Spell ID(s)"] = "ID заклинания"
L["Exact Spell Match"] = "Точное совпадение"
L["Expand"] = "Развернуть"
L["Expand all loaded displays"] = "Развернуть все загруженные индикации"
L["Expand all non-loaded displays"] = "Развернуть все не загруженные индикации"
L["Expansion is disabled because this group has no children"] = "Расширение отключено, так как эта группа не имеет индикаций"
L["Export to Lua table..."] = "Экспорт в таблицу Lua ..."
L["Export to string..."] = "Экспорт в строку ..."
L["External"] = "Внешний ресурс"
L["Fade"] = "Выцветание"
L["Fade In"] = "Появление"
L["Fade Out"] = "Исчезновение"
L["False"] = "Ложь"
L["Fetch Affected/Unaffected Names"] = "Извлечь имена задействованных и незадействованных игроков"
L["Filter by Class"] = "Фильтр по классу"
L["Filter by Group Role"] = "Фильтр по роли"
L["Finish"] = "Конечная"
L["Fire Orb"] = "Огненный шар"
L["Font"] = "Шрифт"
L["Font Size"] = "Размер шрифта"
--[[Translation missing --]]
L["Foreground"] = "Foreground"
L["Foreground Color"] = "Основной цвет"
L["Foreground Texture"] = "Основная текстура"
L["Frame"] = "Кадр"
--[[Translation missing --]]
L["Frame Selector"] = "Frame Selector"
L["Frame Strata"] = "Слой кадра"
L["Frequency"] = "Частота"
L["From Template"] = "Из шаблона"
L["From version %s to version %s"] = "C %s до %s версии"
L["Global Conditions"] = "Универсальные условия"
L["Glow %s"] = "Свечение %s"
L["Glow Action"] = "Действие"
L["Glow Anchor"] = "Крепление свечения"
--[[Translation missing --]]
L["Glow Color"] = "Glow Color"
--[[Translation missing --]]
L["Glow External Element"] = "Glow External Element"
--[[Translation missing --]]
L["Glow Frame Type"] = "Glow Frame Type"
--[[Translation missing --]]
L["Glow Type"] = "Glow Type"
L["Green Rune"] = "Зеленая руна"
--[[Translation missing --]]
L["Grid direction"] = "Grid direction"
L["Group"] = "Группа"
L["Group (verb)"] = "Группировать"
L["Group aura count description"] = [=[Количество единиц заданного типа (|cFFE6CC80%s|r), к которым должен быть применен один или несколько вышеперечисленных эффектов, чтобы сработал триггер.
Если указано целое число (10), то количество единиц, имеющих этот эффект, будет сравниваться с введенным числом.
Если указана обыкновенная (1/2) или десятичная (0.5) дроби, процент (50%%), то в сравнении будет использовано отношение числа задействованных единиц к их общему количеству.
|cFF4444FFПримеры:|r
|cFF00CC00> 0|r - сработает, когда любая единица попала под воздействие
|cFF00CC00= 100%%|r - сработает, когда все единицы попали под воздействие
|cFF00CC00!= 2|r - сработает, если количество единиц с этим эффектом не равно 2
|cFF00CC00<= 0.8|r - сработает, если задействовано не более 80%% от общего числа единиц (4 из 5, 7 из 10)
|cFF00CC00> 1/2|r - сработает, если задействовано больше половины единиц (5 из 5, 6 из 10)
|cFF00CC00>= 0|r - всегда срабатывает, независимо от обстоятельств]=]
--[[Translation missing --]]
L["Group by Frame"] = "Group by Frame"
L["Group contains updates from Wago"] = "Группа содержит индикации, для которых есть обновление"
L["Group Icon"] = "Иконка группы"
L["Group key"] = "Ключ группы"
L["Group Member Count"] = "Кол-во участников"
L["Group Role"] = "Роль в группе"
L["Group Scale"] = "Масштаб группы"
L["Group Settings"] = "Настройки группы"
L["Group Type"] = "Тип группы"
L["Grow"] = "Направление роста"
L["Hawk"] = "Ястреб"
L["Height"] = "Высота"
L["Help"] = "Справка"
L["Hide"] = "Скрыть"
L["Hide Cooldown Text"] = "Скрыть отсчет времени"
--[[Translation missing --]]
L["Hide Glows applied by this aura"] = "Hide Glows applied by this aura"
L["Hide on"] = "Скрыть на"
L["Hide this group's children"] = "Скрыть индикации этой группы"
L["Hide When Not In Group"] = "Скрыть когда не в группе"
L["Horizontal Align"] = "Выравнивание по горизонтали"
L["Horizontal Bar"] = "Горизонтальная полоса"
L["Huge Icon"] = "Огромная иконка"
L["Hybrid Position"] = "Гибридная позиция"
L["Hybrid Sort Mode"] = "Режим гибридной сортировки"
L["Icon"] = "Иконка"
L["Icon Info"] = "Информация об иконке"
L["Icon Inset"] = "Вставка иконки"
L["Icon Position"] = "Расположение иконки"
L["Icon Settings"] = "Настройки иконки"
L["If"] = "Если"
L["If checked, then the user will see a multi line edit box. This is useful for inputting large amounts of text."] = "Если флажок установлен, то строка преобразуется в многострочное текстовое поле. Это удобная форма для ввода большого количества текста."
L["If checked, then this option group can be temporarily collapsed by the user."] = "Если флажок установлен, то пользователь может свернуть и развернуть эту группу параметров."
L["If checked, then this option group will start collapsed."] = "Если флажок установлен, то эта группа параметров отобразится в свёрнутом виде."
L["If checked, then this separator will include text. Otherwise, it will be just a horizontal line."] = "Если флажок установлен, то разделитель будет содержать текст, расположенный по центру. В противном случае, он представляет собой просто горизонтальную линию."
--[[Translation missing --]]
L["If checked, then this separator will not merge with other separators when selecting multiple auras."] = "If checked, then this separator will not merge with other separators when selecting multiple auras."
L["If checked, then this space will span across multiple lines."] = "Если флажок установлен, то данный элемент будет занимать несколько строк."
L["If Trigger %s"] = "Если Триггер %s"
L["If unchecked, then a default color will be used (usually yellow)"] = "Если флажок не установлен, то будет использоваться цвет по умолчанию (желтый)"
L["If unchecked, then this space will fill the entire line it is on in User Mode."] = "Если флажок не установлен, то данный элемент будет занимать всю строку, в которой он находится."
L["Ignore all Updates"] = "Игнорировать все обновления"
L["Ignore Self"] = "Не учитывать себя"
L["Ignore self"] = "Не учитывать себя"
L["Ignored"] = "Игнорируется"
L["Import"] = "Импорт"
L["Import a display from an encoded string"] = "Импортировать индикацию из закодированной строки"
L["Inner"] = "Внутри"
L["Invalid Item Name/ID/Link"] = "Неверное название, ссылка или ID предмета"
L["Invalid Spell ID"] = "Неверный ID заклинания"
L["Invalid Spell Name/ID/Link"] = "Неверное название, ссылка или ID заклинания"
L["Inverse"] = "Инверсия"
L["Inverse Slant"] = "В обратную сторону"
L["Is Stealable"] = "Может быть украден"
L["Justify"] = "Выравнивание"
L["Keep Aspect Ratio"] = "Сохранять пропорции"
L["Large Input"] = "Многострочное поле ввода"
L["Leaf"] = "Лист"
L["Left"] = "Слева"
L["Left 2 HUD position"] = "Позиция 2-го левого HUD"
L["Left HUD position"] = "Позиция левого HUD"
L["Legacy Aura Trigger"] = "Триггер устаревшего типа"
L["Length"] = "Длина"
--[[Translation missing --]]
L["Limit"] = "Limit"
L["Lines & Particles"] = "Линии или частицы"
L["Load"] = "Загрузка"
L["Loaded"] = "Загружено"
L["Loop"] = "Зациклить"
L["Low Mana"] = "Мало маны"
L["Magnetically Align"] = "Привязка к направляющим"
L["Main"] = "Основная"
L["Manage displays defined by Addons"] = "Управление индикациями, определенными аддонами"
L["Match Count"] = "Количество совпадений"
L["Max"] = "Макс. значение"
L["Max Length"] = "Максимальная длина"
L["Medium Icon"] = "Средняя иконка"
L["Message"] = "Сообщение"
L["Message Prefix"] = "Префикс сообщения"
L["Message Suffix"] = "Суффикс сообщения"
L["Message Type"] = "Тип сообщения"
L["Min"] = "Мин. значение"
L["Mirror"] = "Отразить"
L["Model"] = "Модель"
L["Model %s"] = "Модель %s"
L["Model Settings"] = "Настройки модели"
L["Move Above Group"] = "Переместить выше группы"
L["Move Below Group"] = "Переместить ниже группы"
L["Move Down"] = "Переместить вниз"
L["Move Entry Down"] = "Переместить запись вниз"
L["Move Entry Up"] = "Переместить запись вверх"
L["Move Into Above Group"] = "Переместить в группу выше"
L["Move Into Below Group"] = "Переместить в группу ниже"
L["Move this display down in its group's order"] = "Переместить индикацию вниз в порядке элементов группы"
L["Move this display up in its group's order"] = "Переместить индикацию вверх в порядке элементов группы"
L["Move Up"] = "Переместить вверх"
L["Multiple Displays"] = "Несколько индикаций"
L["Multiple Triggers"] = "Несколько триггеров"
L["Multiselect ignored tooltip"] = [=[
|cFFFF0000Ничего|r - |cFF777777Одно|r - |cFF777777Несколько|r
Этот параметр не определяет, когда индикация должна быть загружена]=]
L["Multiselect multiple tooltip"] = [=[
|cFF777777Ничего|r - |cFF777777Одно|r - |cFF00FF00Несколько|r
Можно выбрать любое количество соответствующих значений. Выполнение любого условия приведет к загрузке]=]
L["Multiselect single tooltip"] = [=[
|cFF777777Ничего|r - |cFF00FF00Одно|r - |cFF777777Несколько|r
Можно выбрать только одно соответствующее значение]=]
L["Name Info"] = "Информация о названии"
L["Name Pattern Match"] = "Совпадение названия с образцом"
L["Name(s)"] = "Название"
--[[Translation missing --]]
L["Negator"] = "Не"
L["Never"] = "Никогда"
L["New Aura"] = "Новая индикация"
L["New Value"] = "Новое значение"
L["No"] = "Нет"
L["No Children"] = "Нет индикаций"
L["No tooltip text"] = "Без подсказки"
L["None"] = "Нет"
L["Not all children have the same value for this option"] = "Не все индикации имеют одинаковое значение для этого параметра"
L["Not Loaded"] = "Не загружено"
L["Note: Automated Messages to SAY and YELL are blocked outside of Instances."] = "|cFFFFCC00Примечание.|r Вне подземелий (instances) автоматическая отправка сообщений в чат заблокирована для Сказать и Крик."
L["Number of Entries"] = "Число записей"
L["Offer a guided way to create auras for your character"] = "Предлагаем пошаговый способ создания индикаций для вашего персонажа"
L["Okay"] = "Ок"
L["On Hide"] = "При скрытии"
L["On Init"] = "При инициализации"
L["On Show"] = "При появлении"
L["Only match auras cast by people other than the player"] = "Эффекты, применённые другими людьми, но не игроком"
L["Only match auras cast by people other than the player or his pet"] = "Эффекты, применённые другими людьми, но не игроком или его питомцем"
L["Only match auras cast by the player"] = "Эффекты, применённые только игроком"
L["Only match auras cast by the player or his pet"] = "Эффекты, применённые только игроком или его питомцем"
L["Operator"] = "Оператор"
L["Option %i"] = "Параметр %i"
L["Option key"] = "Ключ параметра"
L["Option Type"] = "Тип параметра"
L["Options will open after combat ends."] = "Параметры откроются после окончания боя."
L["or"] = "или"
L["or Trigger %s"] = "Триггер %s"
L["Orange Rune"] = "Оранжевая руна"
L["Orientation"] = "Ориентация"
L["Outer"] = "Снаружи"
L["Outline"] = "Контур"
L["Overflow"] = "Переполнение"
L["Overlay %s Info"] = "Информация о наложении %s"
L["Overlays"] = "Настройка цвета наложений"
L["Own Only"] = "Свои эффекты"
L["Paste Action Settings"] = "Вставить настройки действий"
L["Paste Animations Settings"] = "Вставить настройки анимации"
--[[Translation missing --]]
L["Paste Author Options Settings"] = "Paste Author Options Settings"
L["Paste Condition Settings"] = "Вставить настройки условий"
--[[Translation missing --]]
L["Paste Custom Configuration"] = "Paste Custom Configuration"
L["Paste Display Settings"] = "Вставить настройки отображения"
L["Paste Group Settings"] = "Вставить настройки группы"
L["Paste Load Settings"] = "Вставить настройки загрузки"
L["Paste Settings"] = "Вставить настройки"
L["Paste text below"] = "Вставьте текст ниже"
L["Paste Trigger Settings"] = "Вставить настройки триггера"
L["Play Sound"] = "Воспроизвести звук"
L["Position Settings"] = "Настройки размера и расположения"
L["Preferred Match"] = "Предпочтительный результат"
L["Preset"] = "Предустановка"
L["Press Ctrl+C to copy"] = "Нажмите Ctrl+C, чтобы скопировать"
--[[Translation missing --]]
L["Prevent Merging"] = "Prevent Merging"
L["Processed %i chars"] = "Обработано %i |4символ:символа:символов;"
L["Progress Bar"] = "Полоса прогресса"
L["Progress Bar Settings"] = "Настройки полосы прогресса"
L["Progress Texture"] = "Текстура прогресса"
L["Progress Texture Settings"] = "Настройки текстуры прогресса"
L["Purple Rune"] = "Фиолетовая руна"
L["Put this display in a group"] = "Переместить эту индикацию в группу"
L["Radius"] = "Радиус"
L["Re-center X"] = "Рецентрировать по X"
L["Re-center Y"] = "Рецентрировать по Y"
L["Regions of type \"%s\" are not supported."] = "Регионы типа \"%s\" не поддерживаются."
L["Remaining Time"] = "Оставшееся время"
L["Remaining Time Precision"] = "Точность оставшегося времени"
L["Remove"] = "Удалить"
L["Remove this display from its group"] = "Убрать индикацию из этой группы"
L["Remove this property"] = "Удалить это свойство"
L["Rename"] = "Переименовать"
L["Repeat After"] = "Повторять после"
L["Repeat every"] = "Повторять каждые"
--[[Translation missing --]]
L["Require unit from trigger"] = "Require unit from trigger"
L["Required for Activation"] = "Необходимо для активации"
L["Reset all options to their default values."] = "Возвращает всем параметрам значения по умолчанию, заданные автором."
L["Reset Entry"] = "Сбросить запись"
L["Reset to Defaults"] = "Сбросить настройки"
L["Right"] = "Справа"
L["Right 2 HUD position"] = "Позиция 2-го правого HUD"
L["Right HUD position"] = "Позиция правого HUD"
L["Right-click for more options"] = "Правый клик для дополнительных опций"
L["Rotate"] = "Поворот"
L["Rotate In"] = [=[Поворот в
(исходное положение)]=]
L["Rotate Out"] = [=[Поворот из
(исходного положения)]=]
L["Rotate Text"] = "Повернуть текст"
L["Rotation"] = "Поворот"
L["Rotation Mode"] = "Режим вращения"
L["Row Space"] = "Отступ между строками"
L["Row Width"] = "Ширина строки"
L["Same"] = "Похожие"
L["Scale"] = "Масштаб"
L["Search"] = "Поиск"
L["Select the auras you always want to be listed first"] = "Выберите индикации для гибридной позиции"
L["Send To"] = "Отправить"
L["Separator Text"] = "Текст разделителя"
L["Separator text"] = "Текст разделителя"
L["Set Parent to Anchor"] = "Назначить родителем"
--[[Translation missing --]]
L["Set Thumbnail Icon"] = "Set Thumbnail Icon"
L["Set tooltip description"] = "Описание подсказки"
L["Sets the anchored frame as the aura's parent, causing the aura to inherit attributes such as visiblility and scale."] = "Устанавливает данный кадр в качестве родителя для кадра индикации. При этом индикация наследует такие атрибуты, как видимость и масштаб"
L["Settings"] = "Параметры"
L["Shadow Color"] = "Цвет тени"
L["Shadow X Offset"] = "Смещение тени по X"
L["Shadow Y Offset"] = "Смещение тени по Y"
L["Shift-click to create chat link"] = "Shift-клик для создания ссылки чата"
L["Show all matches (Auto-clone)"] = "Показать все совпадения (Автоклонирование)"
L["Show Border"] = "Показать границу"
L["Show Cooldown"] = "Показать восстановление"
L["Show Glow"] = "Показать свечение"
L["Show Icon"] = "Показать иконку"
L["Show If Unit Does Not Exist"] = "Показать при отсутствии единицы"
L["Show If Unit Is Invalid"] = "Показать при отсутствии единицы"
L["Show Matches for"] = "Показать совпадения для единиц"
L["Show Matches for Units"] = "Показать совпадения для единиц"
L["Show Model"] = "Показать модель"
L["Show model of unit "] = "Показать модель элемента"
L["Show On"] = "Показать"
L["Show Spark"] = "Показать вспышку"
L["Show Text"] = "Показать текст"
L["Show this group's children"] = "Показать индикации этой группы"
L["Shows a 3D model from the game files"] = "Показывает 3D модель из файлов игры"
--[[Translation missing --]]
L["Shows a border"] = "Shows a border"
L["Shows a custom texture"] = "Показывает свою текстуру"
--[[Translation missing --]]
L["Shows a glow"] = "Shows a glow"
--[[Translation missing --]]
L["Shows a model"] = "Shows a model"
L["Shows a progress bar with name, timer, and icon"] = "Показывает полосу прогресса с названием, таймером и иконкой"
L["Shows a spell icon with an optional cooldown overlay"] = "Показывает иконку заклинания с наложением анимации восстановления (перезарядки)"
L["Shows a texture that changes based on duration"] = "Показывает текстуру, меняющуюся в зависимости от длительности"
L["Shows one or more lines of text, which can include dynamic information such as progress or stacks"] = "Показывает одну или несколько строк текста, которые могут включать в себя динамическую информацию такую как длительность или стаки"
L["Simple"] = "Простой способ"
L["Size"] = "Размер"
L["Skip this Version"] = "Пропустить эту версию"
L["Slant Amount"] = "Уровень наклона"
L["Slant Mode"] = "Режим наклона"
L["Slanted"] = "Наклонная текстура"
L["Slide"] = "Перемещение"
L["Slide In"] = "Приближение"
L["Slide Out"] = "Отдаление"
L["Slider Step Size"] = "Размер шага ползунка"
L["Small Icon"] = "Маленькая иконка"
L["Smooth Progress"] = "Плавный прогресс"
L["Soft Max"] = "Макс. значение ползунка"
L["Soft Min"] = "Мин. значение ползунка"
L["Sort"] = "Сортировка"
L["Sound"] = "Звук"
L["Sound Channel"] = "Звуковой канал"
L["Sound File Path"] = "Путь к звуковому файлу"
L["Sound Kit ID"] = "ID звукового набора (см. ru.wowhead.com/sounds)"
L["Space"] = "Отступ"
L["Space Horizontally"] = "Отступ по горизонтали"
L["Space Vertically"] = "Отступ по вертикали"
L["Spark"] = "Вспышка"
L["Spark Settings"] = "Настройки вспышки"
L["Spark Texture"] = "Текстура вспышки"
L["Specific Unit"] = "Конкретная единица"
L["Spell ID"] = "ID заклинания"
L["Stack Count"] = "Количество стаков"
L["Stack Info"] = "Информация о стаках"
L["Stagger"] = "Выступ (смещение уровня)"
L["Star"] = "Звезда"
L["Start"] = "Начальная"
L["Start Angle"] = "Начальный угол"
L["Start Collapsed"] = "Свернуть"
L["Start of %s"] = "Начало группы \"%s\""
L["Status"] = "Статус"
L["Stealable"] = "Может быть украден"
L["Step Size"] = "Размер шага"
L["Stop ignoring Updates"] = "Перестать игнорировать обновления"
L["Stop Sound"] = "Остановить звук"
L["Sub Elements"] = "Внутренние элементы"
L["Sub Option %i"] = "Внутренний параметр %i"
L["Temporary Group"] = "Временная группа"
L["Text"] = "Текст"
L["Text %s"] = "Текст %s"
L["Text Color"] = "Цвет текста"
L["Text Settings"] = "Настройки текста"
L["Texture"] = "Текстура"
L["Texture Info"] = "Информация о текстуре"
L["Texture Settings"] = "Настройки текстуры"
L["Texture Wrap"] = "Режим обертки текстурой"
L["The duration of the animation in seconds."] = "Длительность анимации в секундах."
L["The duration of the animation in seconds. The finish animation does not start playing until after the display would normally be hidden."] = [=[Длительность анимации в секундах.
Конечная анимация не начнет отображаться, пока индикация не будет нормально скрыта (должен сработать детриггер).]=]
L["The type of trigger"] = "Тип триггера"
L["Then "] = "Тогда "
L["Thickness"] = "Толщина"
L["This adds %tooltip, %tooltip1, %tooltip2, %tooltip3 as text replacements."] = "Добавляет строки %tooltip, %tooltip1, %tooltip2 и %tooltip3 к специальным кодам отображения динамической информации в тексте."
L["This aura has legacy aura trigger(s). Convert them to the new system to benefit from enhanced performance and features"] = "Индикация содержит триггеры Аура устаревшего (legacy) типа. Преобразуйте их в новую версию, чтобы воспользоваться улучшенной производительностью и расширенными возможностями"
L["This display is currently loaded"] = "Эта индикация загружена"
L["This display is not currently loaded"] = "Эта индикация не загружена"
L["This region of type \"%s\" is not supported."] = "Регион типа \"%s\" не поддерживается."
L["This setting controls what widget is generated in user mode."] = "Настройка определяет, какой примитив графического интерфейса (виджет) создается для этого параметра в режиме пользователя."
L["Time in"] = "Время"
L["Tiny Icon"] = "Крошечная иконка"
L["To Frame's"] = "Относительно кадра"
L["To Group's"] = "Относительно группы"
L["To Personal Ressource Display's"] = "На индикаторе личного ресурса"
L["To Screen's"] = "Относительно экрана"
L["Toggle the visibility of all loaded displays"] = "Переключить видимость всех загруженных индикаций"
L["Toggle the visibility of all non-loaded displays"] = "Переключить видимость всех не загруженных индикаций"
L["Toggle the visibility of this display"] = "Переключить видимость этой индикации"
L["Tooltip"] = "Подсказка"
L["Tooltip Content"] = "Содержание подсказки"
L["Tooltip on Mouseover"] = "Подсказка при наведении курсора"
L["Tooltip Pattern Match"] = "Совпадение подсказки с образцом"
L["Tooltip Text"] = "Текст подсказки"
L["Tooltip Value"] = "Значение из текста подсказки"
L["Tooltip Value #"] = "Номер значения"
L["Top"] = "Сверху"
L["Top HUD position"] = "Верхняя позиция HUD"
L["Top Left"] = "Сверху слева"
L["Top Right"] = "Сверху справа"
L["Total Time"] = "Общее время"
L["Total Time Precision"] = "Точность общего времени"
L["Trigger"] = "Триггер"
L["Trigger %d"] = "Триггер %d"
L["Trigger %s"] = "Триггер %s"
L["True"] = "Истина"
L["Type"] = "Тип"
L["Ungroup"] = "Разгруппировать"
L["Unit"] = "Единица"
L["Unit %s is not a valid unit for RegisterUnitEvent"] = "%s не является допустимой единицей для метода RegisterUnitEvent"
L["Unit Count"] = "Количество единиц"
--[[Translation missing --]]
L["Unit Frame"] = "Unit Frame"
--[[Translation missing --]]
L["Unit Frames"] = "Unit Frames"
L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "В отличие от начальной или конечной анимации, основная зациклена и будет повторяться пока индикация не пропадет."
L["Up"] = "Переместить вверх"
L["Update %s by %s"] = "Обновить %s (автор %s)"
L["Update Custom Text On..."] = "Обновление текста, заданного с помощью функции, происходит"
L["Update in Group"] = "Доступно обновление"
L["Update this Aura"] = "Применить к индикации"
L["Use Custom Color"] = "Использовать свой цвет"
L["Use Display Info Id"] = "Использовать id отображения информации"
L["Use Full Scan (High CPU)"] = "Использовать Полное сканирование (загрузка ЦП)"
L["Use nth value from tooltip:"] = "Номер значения из текста подсказки"
L["Use SetTransform"] = "Использовать ф. SetTransform()"
L["Use tooltip \"size\" instead of stacks"] = "Использовать значение из текста подсказки вместо стаков"
L["Use Tooltip Information"] = "Использовать информацию из подсказки"
L["Used in Auras:"] = "Использовано в индикациях:"
L["Used in auras:"] = "Использовано в индикациях:"
L["Value %i"] = "Значение %i"
L["Values are in normalized rgba format."] = "Значения представлены в нормализованном формате RGBA (от 0 до 1)."
L["Values:"] = "Значения:"
L["Version: "] = "Версия: "
L["Vertical Align"] = "Выравнивание по вертикали"
L["Vertical Bar"] = "Вертикальная полоса"
L["View"] = "Вид"
L["Wago Update"] = "Обновление"
L["Whole Area"] = "Вся область"
L["Width"] = "Ширина"
L["wrapping"] = "Перенос слов при переполнении"
L["X Offset"] = "Смещение по X"
L["X Rotation"] = "Поворот по X"
L["X Scale"] = "Масштаб по X"
L["X-Offset"] = "Смещение по X"
L["Y Offset"] = "Смещение по Y"
L["Y Rotation"] = "Поворот по Y"
L["Y Scale"] = "Масштаб по Y"
L["Yellow Rune"] = "Жёлтая руна"
L["Yes"] = "Да"
L["Y-Offset"] = "Смещение по Y"
L["You are about to delete %d aura(s). |cFFFF0000This cannot be undone!|r Would you like to continue?"] = [=[Вы собираетесь удалить %d |4индикацию:индикации:индикаций;.
|cFFFF0000Это действие необратимо!|r Продолжить?]=]
L["Z Offset"] = "Смещение по Z"
L["Z Rotation"] = "Поворот по Z"
L["Zoom"] = "Масштаб"
L["Zoom In"] = "Увеличение"
L["Zoom Out"] = "Уменьшение"
+728
View File
@@ -0,0 +1,728 @@
if not WeakAuras.IsCorrectVersion() then return end
if not(GetLocale() == "zhCN") then
return
end
local L = WeakAuras.L
-- WeakAuras/Options
L["-- Do not remove this comment, it is part of this trigger: "] = "-- 不要移除此注释,这是该触发器的一部分:"
L["% of Progress"] = "进度%"
L["%i auras selected"] = "已选中%i个光环"
L["%i Matches"] = "%i个符合"
L["%s - Option #%i has the key %s. Please choose a different option key."] = "%s - 选项#%i已经使用了键%s,请选择一个其他的键。"
L["%s %s, Lines: %d, Frequency: %0.2f, Length: %d, Thickness: %d"] = "%s %s,行数:%d,频率:%0.2f,长度:%d,粗细:%d"
L["%s %s, Particles: %d, Frequency: %0.2f, Scale: %0.2f"] = "%s %s,粒子数:%d,频率:%0.2f,缩放:%0.2f"
L["%s Alpha: %d%%"] = "%s 透明度:%d%%"
L["%s Color"] = "%s 颜色"
L["%s Default Alpha, Zoom, Icon Inset, Aspect Ratio"] = "%s 默认透明度,缩放,内嵌图标,宽高比"
L["%s Inset: %d%%"] = "%s 内嵌:%d%%"
L["%s is not a valid SubEvent for COMBAT_LOG_EVENT_UNFILTERED"] = "%s不是COMBAT_LOG_EVENT_UNFILTERED的有效子事件"
L["%s Keep Aspect Ratio"] = "%s 保持宽高比"
L["%s total auras"] = "共%s个光环"
L["%s Zoom: %d%%"] = "%s 缩放:%d%%"
L["%s, Border"] = "%s,边框"
L["%s, Offset: %0.2f;%0.2f"] = "%s,偏移:%0.2f; %0.2f"
L["%s, offset: %0.2f;%0.2f"] = "%s,偏移:%0.2f; %0.2f"
L["|c%02x%02x%02x%02xCustom Color|r"] = "|c%02x%02x%02x%02x自定义颜色|r"
L["|cFFFF0000Note:|r The unit '%s' is not a trackable unit."] = "|cFFFF0000注意:|r '%s' 不是一个可以追踪的单位。"
L["|cFFffcc00Anchors:|r Anchored |cFFFF0000%s|r to frame's |cFFFF0000%s|r"] = "|cFFffcc00锚点:|r将|cFFFF0000%s|r对齐至框架的|cFFFF0000%s|r"
L["|cFFffcc00Anchors:|r Anchored |cFFFF0000%s|r to frame's |cFFFF0000%s|r with offset |cFFFF0000%s/%s|r"] = "|cFFffcc00锚点:|r将|cFFFF0000%s|r对齐至框架的|cFFFF0000%s|r,偏移|cFFFF0000%s/%s|r"
L["|cFFffcc00Anchors:|r Anchored to frame's |cFFFF0000%s|r"] = "|cFFffcc00锚点:|r对齐至框架的|cFFFF0000%s|r"
L["|cFFffcc00Anchors:|r Anchored to frame's |cFFFF0000%s|r with offset |cFFFF0000%s/%s|r"] = "|cFFffcc00锚点:|r对齐至框架的|cFFFF0000%s|r,偏移|cFFFF0000%s/%s|r"
L["|cFFffcc00Extra Options:|r"] = "|cFFffcc00额外选项:|r"
--[[Translation missing --]]
L["|cFFffcc00Font Flags:|r |cFFFF0000%s|r and shadow |c%sColor|r with offset |cFFFF0000%s/%s|r%s%s%s"] = "|cFFffcc00Font Flags:|r |cFFFF0000%s|r and shadow |c%sColor|r with offset |cFFFF0000%s/%s|r%s%s%s"
L["1 Match"] = "1个符合"
L["A 20x20 pixels icon"] = "20x20像素图标"
L["A 32x32 pixels icon"] = "32x32像素图标"
L["A 40x40 pixels icon"] = "40x40像素图标"
L["A 48x48 pixels icon"] = "48x48像素图标"
L["A 64x64 pixels icon"] = "64x64像素图标"
L["A group that dynamically controls the positioning of its children"] = "动态控制子元素位置的群组"
L["A Unit ID (e.g., party1)."] = "单位ID(如 party1)。"
L["Actions"] = "动作"
L["Add %s"] = "添加 %s"
L["Add a new display"] = "添加一个新的提醒效果"
L["Add Condition"] = "添加条件"
L["Add Entry"] = "添加条目"
L["Add Extra Elements"] = "添加额外元素"
L["Add Option"] = "添加选项"
L["Add Overlay"] = "添加覆盖层"
L["Add Property Change"] = "添加属性修改"
L["Add Sub Option"] = "添加子选项"
L["Add to group %s"] = "添加到组%s"
L["Add to new Dynamic Group"] = "添加到新的动态群组"
L["Add to new Group"] = "添加到新的群组"
L["Add Trigger"] = "添加触发器"
L["Addon"] = "插件"
L["Addons"] = "插件"
L["Advanced"] = "高级"
L["Align"] = "对齐"
L["Alignment"] = "对齐"
L["All of"] = "全部"
L["Allow Full Rotation"] = "允许完全旋转"
L["Alpha"] = "透明度"
L["Anchor"] = "锚点"
L["Anchor Point"] = "锚点指向"
L["Anchored To"] = "对齐到"
L["And "] = ""
L["and aligned left"] = "并且左对齐"
L["and aligned right"] = "并且右对齐"
L["and rotated left"] = "并且向左旋转"
L["and rotated right"] = "并且向右旋转"
L["and Trigger %s"] = "和触发器 %s"
--[[Translation missing --]]
L["and with width |cFFFF0000%s|r and %s"] = "and with width |cFFFF0000%s|r and %s"
L["Angle"] = "角度"
L["Animate"] = "动画"
L["Animated Expand and Collapse"] = "展开折叠动画"
L["Animates progress changes"] = "进度变化动画"
L["Animation relative duration description"] = [=[动画的相对持续时间,表示为 分数(1/2),百分比(50%),或数字(0.5)。
|cFFFF0000注意:|r 如果没有进度(没有时间事件的触发器,没有持续时间的光环,或其他),动画将不会播放。
|cFF4444FF举例:|r
如果动画的持续时间设定为 |cFF00CC0010%|r,然后触发的增益时间为20秒,入场动画会播放2秒。
如果动画的持续时间设定为 |cFF00CC0010%|r,然后触发的增益没有持续时间,将不会播放开始动画.]=]
L["Animation Sequence"] = "动画序列"
L["Animations"] = "动画"
L["Any of"] = "任意的"
L["Apply Template"] = "应用模板"
L["Arc Length"] = "弧长"
L["Arcane Orb"] = "奥术宝珠"
L["At a position a bit left of Left HUD position."] = "在左侧HUD偏左一点的位置。"
L["At a position a bit left of Right HUD position"] = "在右侧HUD偏左一点的位置。"
L["At the same position as Blizzard's spell alert"] = "与暴雪的法术警报在同一位置"
L["Aura Name"] = "光环名称"
L["Aura Name Pattern"] = "光环名称规则匹配"
L["Aura Type"] = "光环类型"
L["Aura(s)"] = "光环"
L["Author Options"] = "作者选项"
L["Auto"] = "自动"
L["Auto-Clone (Show All Matches)"] = "自动克隆(显示所有符合项)"
L["Auto-cloning enabled"] = "自动克隆已启用"
L["Automatic"] = "自动"
L["Automatic Icon"] = "自动显示图标"
L["Backdrop Color"] = "背景颜色"
L["Backdrop in Front"] = "背景在前"
L["Backdrop Style"] = "背景图案类型 "
L["Background Color"] = "背景色"
L["Background Offset"] = "背景偏移"
L["Background Texture"] = "背景材质"
L["Bar"] = "进度条"
L["Bar Alpha"] = "进度条透明度"
L["Bar Color"] = "进度条颜色"
L["Bar Color Settings"] = "进度条颜色设置"
L["Bar Inner"] = "进度条内部"
L["Bar Texture"] = "进度条材质"
L["Big Icon"] = "大图标"
--[[Translation missing --]]
L["Blacklisted Aura Name"] = "Blacklisted Aura Name"
--[[Translation missing --]]
L["Blacklisted Exact Spell ID(s)"] = "Blacklisted Exact Spell ID(s)"
--[[Translation missing --]]
L["Blacklisted Name(s)"] = "Blacklisted Name(s)"
--[[Translation missing --]]
L["Blacklisted Spell ID"] = "Blacklisted Spell ID"
L["Blend Mode"] = "混合模式"
L["Blue Rune"] = "蓝色符文"
L["Blue Sparkle Orb"] = "蓝色闪光球"
L["Border"] = "边框"
L["Border %s"] = "边框 %s"
L["Border Anchor"] = "边框锚点"
L["Border Color"] = "边框颜色"
L["Border in Front"] = "边框在前"
L["Border Inset"] = "插入边框"
L["Border Offset"] = "边框偏移"
L["Border Settings"] = "边框设置"
L["Border Size"] = "边框大小 "
L["Border Style"] = "边框风格"
L["Bottom"] = "底部"
L["Bottom Left"] = "左下"
L["Bottom Right"] = "右下"
L["Bracket Matching"] = "括号自动匹配"
L["Can be a Name or a Unit ID (e.g. party1). A name only works on friendly players in your group."] = "可以是名字或单位 ID(例如 party1),只有在团队中的友方玩家名字是有效的。"
L["Can be a UID (e.g., party1)."] = "可以是 UID(例如:party1"
L["Cancel"] = "取消"
L["Center"] = "中间"
L["Channel Number"] = "频道索引"
L["Chat Message"] = "聊天讯息"
L["Check On..."] = "检查..."
L["Children:"] = "子元素:"
L["Choose"] = "选择"
L["Choose Trigger"] = "选择触发器"
L["Choose whether the displayed icon is automatic or defined manually"] = "选择显示的图示是自动显示还是手动定义"
--[[Translation missing --]]
L["Class"] = "Class"
L["Clip Overlays"] = "覆盖遮罩"
L["Clipped by Progress"] = "被进度条遮挡"
L["Clone option enabled dialog"] = [=[
你已经启用|cFFFF0000自动复制|r。
|cFFFF0000自动复制|r 会让一个图示自动重复来显示多目标的讯息。
直到你把这个图示放在一个|cFF22AA22动态群组|r里,所有被复制的图示都会显示在其它图示的顶端.
你想要让它被放到新的|cFF22AA22动态群组|r的吗?]=]
L["Close"] = "关闭"
L["Collapse"] = "折叠"
L["Collapse all loaded displays"] = "折叠所有载入的图示"
L["Collapse all non-loaded displays"] = "折叠所有未载入的图示"
L["Collapsible Group"] = "可折叠的组"
L["color"] = "颜色"
L["Color"] = "颜色"
L["Column Height"] = "行高度"
L["Column Space"] = "行空间"
L["Combinations"] = "组合"
L["Combine Matches Per Unit"] = "组合每个单位满足条件的"
L["Common Text"] = "一般文本"
L["Compare against the number of units affected."] = "比较受影响的单位数量"
L["Compress"] = "压缩"
L["Condition %i"] = "条件 %i"
L["Conditions"] = "条件"
L["Configure what options appear on this panel."] = "配置哪些选项出现在此面板中"
L["Constant Factor"] = "常数因子"
L["Control-click to select multiple displays"] = "按住 Control 并点击来选择多种显示"
L["Controls the positioning and configuration of multiple displays at the same time"] = "同时控制多个图示的位置和设定"
L["Convert to New Aura Trigger"] = "转换为新的光环触发器"
L["Convert to..."] = "转换为..."
L["Cooldown Edge"] = "冷却边缘"
L["Cooldown Settings"] = "冷却设置"
L["Cooldown Swipe"] = "冷却旋转动画"
L["Copy"] = "拷贝"
L["Copy settings..."] = "拷贝设置"
L["Copy to all auras"] = "拷贝至所有的光环"
L["Copy URL"] = "复制 URL"
L["Count"] = "计数 "
L["Counts the number of matches over all units."] = "计算所有单位上匹配的数量"
L["Creating buttons: "] = "创建按钮:"
L["Creating options: "] = "创建配置:"
L["Crop X"] = "裁剪X"
L["Crop Y"] = "裁剪Y"
L["Custom"] = "自定义"
L["Custom Anchor"] = "自定义锚点"
L["Custom Code"] = "自定义代码"
L["Custom Color"] = "自定义颜色"
L["Custom Configuration"] = "自定义设置"
L["Custom Frames"] = "自定义框架"
L["Custom Function"] = "自定义功能"
L["Custom Grow"] = "自定义增长"
L["Custom Options"] = "自定义选项"
L["Custom Sort"] = "自定义排序"
L["Custom Trigger"] = "自定义生效触发器"
L["Custom trigger event tooltip"] = [=[选择用于检查自订触发的事件。
如果有多个事件,可以用逗号或空白分隔。
|cFF4444FF例:|r
UNIT_POWER, UNIT_AURA PLAYER_TARGET_CHANGED]=]
L["Custom trigger status tooltip"] = [=[选择用于检查自订触发的事件。
因为这一个是状态触发器, 指定的事件 可以被 WeakAuras 调用, 而不需指定参数.
如果有多个事件,可以用逗号或空白分隔。
|cFF4444FF例:|r
UNIT_POWER, UNIT_AURA PLAYER_TARGET_CHANGED]=]
L["Custom Untrigger"] = "自定义失效触发器"
L["Custom Variables"] = "自定义变量"
L["Debuff Type"] = "减益类型"
L["Default"] = "默认"
L["Default Color"] = "默认颜色"
L["Delete"] = "删除"
L["Delete all"] = "删除所有"
L["Delete children and group"] = "删除子节点和组"
L["Delete Entry"] = "删除条目"
L["Delete Trigger"] = "删除触发器"
L["Desaturate"] = "褪色"
L["Description Text"] = "描述文本"
L["Determines how many entries can be in the table."] = "决定表格中可以有多少条目"
L["Differences"] = "差异"
L["Disabled"] = "禁用"
L["Disallow Entry Reordering"] = "不允许重新排列条目"
L["Discrete Rotation"] = "离散旋转"
L["Display"] = "图示"
L["Display Icon"] = "图示图标"
L["Display Name"] = "显示的名字"
L["Display Text"] = "图示文字"
L["Displays a text, works best in combination with other displays"] = "显示一条文本,最好与其他显示效果结合运用"
L["Distribute Horizontally"] = "横向分布"
L["Distribute Vertically"] = "纵向分布"
L["Do not group this display"] = "不要将此显示内容编组"
L["Done"] = "完成"
L["Don't skip this Version"] = "不要跳过这个版本"
L["Down"] = ""
L["Drag to move"] = "拖拽来移动"
L["Duplicate"] = "复制"
L["Duplicate All"] = "复制所有"
L["Duration (s)"] = "持续时间"
L["Duration Info"] = "持续时间讯息"
L["Dynamic Duration"] = "动态时长"
L["Dynamic Group"] = "动态群组"
L["Dynamic Group Settings"] = "动态群组设置"
L["Dynamic Information"] = "动态信息"
L["Dynamic information from first active trigger"] = "排列最前的活跃的触发器的动态信息"
L["Dynamic information from Trigger %i"] = "触发器%i的动态信息"
L["Dynamic text tooltip"] = [=[这里有几个特别的编码允许文字动态显示:
|cFFFF0000%p|r - 进度 - 剩余持续时间或非时间值
|cFFFF0000%t|r - 总共 - 总持续时间或最大的非时间值
|cFFFF0000%n|r - 名称 - 图示名称(通常是光环名称)或是没有动态名称图示的编号
|cFFFF0000%i|r - 图标 - 图示关连的显标
|cFFFF0000%s|r - 堆叠 - 光环堆叠数量(通常)
|cFFFF0000%c|r - 自定义 - 允许你自定义一个Lua函数并返回一个用于显示的字符串]=]
--[[Translation missing --]]
L["Ease Strength"] = "Ease Strength"
--[[Translation missing --]]
L["Ease type"] = "Ease type"
L["Edge"] = "边缘"
--[[Translation missing --]]
L["eliding"] = "eliding"
L["Enabled"] = "启用"
L["End Angle"] = "结束角度"
L["End of %s"] = "%s 的结尾"
L["Enter a Spell ID"] = "输入一个法术 ID"
L["Enter an aura name, partial aura name, or spell id"] = "键入一个法术名,或者法术ID"
L["Enter an Aura Name, partial Aura Name, or Spell ID. A Spell ID will match any spells with the same name."] = "输入一个光环名称,部分光环名称或法术 ID。如果输入一个法术 ID 则会匹配所有相同名字的法术。"
L["Enter Author Mode"] = "进入作者模式"
L["Enter User Mode"] = "进入用户模式"
L["Enter user mode."] = "进入到使用者的模式。"
L["Entry %i"] = "条目 %i"
L["Entry limit"] = "条目限制"
L["Entry Name Source"] = "条目名称来源"
L["Event"] = "事件"
L["Event Type"] = "事件类型"
L["Event(s)"] = "事件(复数)"
L["Everything"] = "全部"
L["Exact Spell ID(s)"] = "精确法术 ID"
L["Exact Spell Match"] = "严格法术匹配"
L["Expand"] = "展开"
L["Expand all loaded displays"] = "展开所有载入的图示"
L["Expand all non-loaded displays"] = "展开所有未载入的图示"
L["Expansion is disabled because this group has no children"] = "由于此组没有子物件所以无法进行扩展"
L["Export to Lua table..."] = "导出为 Lua 表格..."
L["Export to string..."] = "导出为字符串"
L["External"] = "外部"
L["Fade"] = "淡化"
L["Fade In"] = "渐入"
L["Fade Out"] = "渐出"
L["False"] = ""
L["Fetch Affected/Unaffected Names"] = "获取受影响的/未受影响的名称"
--[[Translation missing --]]
L["Filter by Class"] = "Filter by Class"
L["Filter by Group Role"] = "根据团队职责过滤"
L["Finish"] = "结束"
L["Fire Orb"] = "火焰宝珠"
L["Font"] = "字体"
L["Font Size"] = "字体大小"
L["Foreground"] = "前景"
L["Foreground Color"] = "前景色"
L["Foreground Texture"] = "前景材质"
L["Frame"] = "框架"
--[[Translation missing --]]
L["Frame Selector"] = "Frame Selector"
L["Frame Strata"] = "框架层级"
L["Frequency"] = "频率"
L["From Template"] = "从模板"
--[[Translation missing --]]
L["From version %s to version %s"] = "From version %s to version %s"
L["Global Conditions"] = "全局条件"
L["Glow %s"] = "发光 %s"
L["Glow Action"] = "发光动作"
--[[Translation missing --]]
L["Glow Anchor"] = "Glow Anchor"
L["Glow Color"] = "发光颜色"
--[[Translation missing --]]
L["Glow External Element"] = "Glow External Element"
--[[Translation missing --]]
L["Glow Frame Type"] = "Glow Frame Type"
L["Glow Type"] = "发光类型"
L["Green Rune"] = "绿色符文"
L["Grid direction"] = "表格方向"
L["Group"] = ""
L["Group (verb)"] = "群组(动态)"
L["Group aura count description"] = [=[所输入的队伍或团队成员的数量必须给定一个或多个光环作为显示触发的条件。
如果输入的数字是一个整数(如5),受影响的团队成员数量将与输入的数字相同。
如果输入的数字是一个小数(如0.5),分数(例如1/ 2),或百分比(例如50%%),那么多比例的队伍或团队成员的必须受到影响。
|cFF4444FF举例:|r
|cFF00CC00大于 0|r 会在任意一人受影响时触发
|cFF00CC00等于 100%%|r 会在所有人受影响时触发
|cFF00CC00不等于 2|r 会在2人受影响之外时触发
|cFF00CC00小于等于 0.8|r 会在小于80%%的人受影响时触发
|cFF00CC00大于 1/2|r 会在超过一半以上的人受影响时触发
|cFF00CC00大于等于 0|r 总是触发.]=]
L["Group by Frame"] = "根据框架分组"
L["Group contains updates from Wago"] = "包含 Wago 更新的群组"
L["Group Icon"] = "组图标"
L["Group key"] = "组键值"
L["Group Member Count"] = "队伍或团队成员数"
L["Group Role"] = "团队职责"
L["Group Scale"] = "组缩放"
L["Group Settings"] = "群组设置"
L["Group Type"] = "组类别"
L["Grow"] = "生长"
L["Hawk"] = ""
L["Height"] = "高度"
L["Help"] = "帮助"
L["Hide"] = "隐藏"
L["Hide Cooldown Text"] = "隐藏冷却文本"
--[[Translation missing --]]
L["Hide Glows applied by this aura"] = "Hide Glows applied by this aura"
L["Hide on"] = "隐藏于"
L["Hide this group's children"] = "隐藏此组的子节点"
L["Hide When Not In Group"] = "不在队伍时隐藏"
L["Horizontal Align"] = "水平对齐"
L["Horizontal Bar"] = "水平条"
L["Huge Icon"] = "巨型图标"
L["Hybrid Position"] = "混合定位"
L["Hybrid Sort Mode"] = "混合排序模式"
L["Icon"] = "图标"
L["Icon Info"] = "图标信息"
L["Icon Inset"] = "项目插入"
L["Icon Position"] = "图标位置"
L["Icon Settings"] = "图标设置"
L["If"] = "如果"
L["If checked, then the user will see a multi line edit box. This is useful for inputting large amounts of text."] = "勾选后用户可以看见一个多行的输入框,在输入大量文本时很有用。"
L["If checked, then this option group can be temporarily collapsed by the user."] = "勾选后选项组可以临时被用户折叠"
L["If checked, then this option group will start collapsed."] = "勾选后选项组将会在打开时折叠"
L["If checked, then this separator will include text. Otherwise, it will be just a horizontal line."] = "如果选中,则此分隔符将会包含文本,否则就只是一条横线。"
--[[Translation missing --]]
L["If checked, then this separator will not merge with other separators when selecting multiple auras."] = "If checked, then this separator will not merge with other separators when selecting multiple auras."
L["If checked, then this space will span across multiple lines."] = "如果勾选,此空白区域将横跨多行。"
L["If Trigger %s"] = "如果触发器 %s"
L["If unchecked, then a default color will be used (usually yellow)"] = "如果不勾选,则使用默认颜色(通常是黄色)"
L["If unchecked, then this space will fill the entire line it is on in User Mode."] = "如果不勾选,则在用户模式下此空白区域将填充一整行。"
L["Ignore all Updates"] = "忽略所有更新"
L["Ignore Self"] = "忽略自身"
L["Ignore self"] = "忽略自己的"
L["Ignored"] = "被忽略"
L["Import"] = "导入"
L["Import a display from an encoded string"] = "从字串导入一个图示"
L["Inner"] = "内部"
L["Invalid Item Name/ID/Link"] = "无效的物品名称/ID/链接"
L["Invalid Spell ID"] = "无效的法术 ID"
L["Invalid Spell Name/ID/Link"] = "无效的法术名称/ID/链接"
L["Inverse"] = "反转"
L["Inverse Slant"] = "边缘反色"
L["Is Stealable"] = "可偷取"
L["Justify"] = "对齐"
L["Keep Aspect Ratio"] = "保持比例不变"
L["Large Input"] = "大输入框"
L["Leaf"] = "叶子"
L["Left"] = "左方"
L["Left 2 HUD position"] = "左侧第二 HUD 位置"
L["Left HUD position"] = "左侧 HUD 位置"
L["Legacy Aura Trigger"] = "传统光环触发器"
L["Length"] = "长度"
L["Limit"] = "限制"
L["Lines & Particles"] = "线条和粒子"
L["Load"] = "载入"
L["Loaded"] = "已载入"
L["Loop"] = "循环"
L["Low Mana"] = "低法力值"
L["Magnetically Align"] = "磁力对齐"
L["Main"] = "主要的"
L["Manage displays defined by Addons"] = "由插件管理已定义的图示"
L["Match Count"] = "计数匹配"
L["Max"] = "最大"
L["Max Length"] = "最大长度"
L["Medium Icon"] = "中等图标"
L["Message"] = "讯息"
L["Message Prefix"] = "讯息前缀"
L["Message Suffix"] = "讯息后缀"
L["Message Type"] = "讯息类型"
L["Min"] = "最小"
L["Mirror"] = "镜像"
L["Model"] = "模型"
L["Model %s"] = "模型 %s"
L["Model Settings"] = "模型设置"
L["Move Above Group"] = "移动上方的组"
L["Move Below Group"] = "移动下方的组"
L["Move Down"] = "向下移"
--[[Translation missing --]]
L["Move Entry Down"] = "Move Entry Down"
L["Move Entry Up"] = "将条目上移"
L["Move Into Above Group"] = "移动到上方的组"
L["Move Into Below Group"] = "移动到下方的组"
L["Move this display down in its group's order"] = "在组内将此显示内容下移"
L["Move this display up in its group's order"] = "在组内将此显示内容上移"
L["Move Up"] = "向上移"
L["Multiple Displays"] = "多个图示"
L["Multiple Triggers"] = "多触发器"
L["Multiselect ignored tooltip"] = [=[|cFFFF0000忽略|r - |cFF777777单个|r - |cFF777777多个|r
当图示应该载入时这项设定不应该使用]=]
L["Multiselect multiple tooltip"] = [=[|cFFFF0000忽略|r - |cFF777777单个|r - |cFF777777多个|r
任何相匹配的值的值可以提取]=]
L["Multiselect single tooltip"] = [=[|cFFFF0000忽略|r - |cFF777777单个|r - |cFF777777多个|r
只有一个单一的匹配值可以提取]=]
L["Name Info"] = "名称讯息"
L["Name Pattern Match"] = "名称规则匹配"
L["Name(s)"] = "名称"
--[[Translation missing --]]
L["Negator"] = ""
L["Never"] = "从不"
L["New Aura"] = "新建"
L["New Value"] = "新值"
L["No"] = ""
L["No Children"] = "没有子物件"
L["No tooltip text"] = "没有提示文字"
L["None"] = ""
L["Not all children have the same value for this option"] = "并非所有子元素都拥有相同的此选项的值"
L["Not Loaded"] = "未载入"
L["Note: Automated Messages to SAY and YELL are blocked outside of Instances."] = "注意:自动发送“大喊”和“说话”功能在副本外会被屏蔽。"
L["Number of Entries"] = "条目数"
L["Offer a guided way to create auras for your character"] = "提供为角色创建光环的指导"
L["Okay"] = ""
L["On Hide"] = "图示隐藏时触发"
L["On Init"] = "于初始时"
L["On Show"] = "图示显示时触发"
L["Only match auras cast by people other than the player"] = "只匹配其它玩家施放的光环"
L["Only match auras cast by people other than the player or his pet"] = "只匹配由不是玩家和玩家宠物施放的光环"
L["Only match auras cast by the player"] = "只匹配玩家自己施放的光环"
L["Only match auras cast by the player or his pet"] = "只匹配由玩家和玩家宠物施放的光环"
L["Operator"] = "运算符"
L["Option %i"] = "选项 %i"
L["Option key"] = "选项键值"
L["Option Type"] = "选项类型"
L["Options will open after combat ends."] = "选项面板将在战斗结束后打开"
L["or"] = ""
L["or Trigger %s"] = "或触发器 %s"
L["Orange Rune"] = "橙色符文"
L["Orientation"] = "方向"
L["Outer"] = "外部"
L["Outline"] = "轮廓"
L["Overflow"] = "溢出"
L["Overlay %s Info"] = "覆盖层 %s 信息"
L["Overlays"] = "覆盖层"
L["Own Only"] = "只来源于自己"
L["Paste Action Settings"] = "粘贴动作设置"
L["Paste Animations Settings"] = "粘贴动画设置"
L["Paste Author Options Settings"] = "粘贴作者选项设置"
L["Paste Condition Settings"] = "粘贴条件设置"
L["Paste Custom Configuration"] = "粘贴自定义设置"
L["Paste Display Settings"] = "粘贴显示设置"
L["Paste Group Settings"] = "粘贴团队设置"
L["Paste Load Settings"] = "粘贴加载设置"
L["Paste Settings"] = "粘贴设置"
L["Paste text below"] = "在下方粘贴文本"
L["Paste Trigger Settings"] = "粘贴触发器设置"
L["Play Sound"] = "播放声音"
L["Position Settings"] = "位置设置"
L["Preferred Match"] = "匹配偏好"
L["Preset"] = "预设"
L["Press Ctrl+C to copy"] = "按 Ctrl+C 复制"
--[[Translation missing --]]
L["Prevent Merging"] = "Prevent Merging"
L["Processed %i chars"] = "已处理%i个字符"
L["Progress Bar"] = "进度条"
L["Progress Bar Settings"] = "进度条设置"
L["Progress Texture"] = "进度条材质"
L["Progress Texture Settings"] = "进度条材质设置"
L["Purple Rune"] = "紫色符文"
L["Put this display in a group"] = "将此显示内容放到组中"
L["Radius"] = "范围"
L["Re-center X"] = "到中心 X 偏移"
L["Re-center Y"] = "到中心 Y 偏移"
L["Regions of type \"%s\" are not supported."] = "%s 区域类型不被支持。"
L["Remaining Time"] = "剩余时间"
L["Remaining Time Precision"] = "剩余时间精度"
L["Remove"] = "移除"
L["Remove this display from its group"] = "从所在组中移除此显示内容"
L["Remove this property"] = "移除此属性"
L["Rename"] = "重命名"
L["Repeat After"] = "每当此条件发生后重复"
L["Repeat every"] = "每当此条件满足时重复"
--[[Translation missing --]]
L["Require unit from trigger"] = "Require unit from trigger"
L["Required for Activation"] = "激活需要的条件"
L["Reset all options to their default values."] = "重置所有选项为默认值"
L["Reset Entry"] = "重置条目"
L["Reset to Defaults"] = "重置为默认"
L["Right"] = "右方"
L["Right 2 HUD position"] = "右侧第二 HUD 位置"
L["Right HUD position"] = "右侧 HUD 位置"
L["Right-click for more options"] = "右键点击获得更多选项"
L["Rotate"] = "旋转"
L["Rotate In"] = "旋转进入"
L["Rotate Out"] = "旋转退出"
L["Rotate Text"] = "旋转文字"
L["Rotation"] = "旋转"
L["Rotation Mode"] = "旋转模式"
L["Row Space"] = "列空间"
L["Row Width"] = "列宽度"
L["Same"] = "相同"
L["Scale"] = "缩放"
L["Search"] = "搜索"
L["Select the auras you always want to be listed first"] = "选择优先列出的光环"
L["Send To"] = "发送给"
L["Separator Text"] = "分隔符文本"
L["Separator text"] = "分隔符文本"
L["Set Parent to Anchor"] = "将父框架置于锚点"
L["Set Thumbnail Icon"] = "设置缩略图标"
L["Set tooltip description"] = "设置鼠标提示内容"
L["Sets the anchored frame as the aura's parent, causing the aura to inherit attributes such as visiblility and scale."] = "将锚点框架设置为光环的父框架,使得光环继承锚点框架的一些属性(例如:可见性和缩放)"
L["Settings"] = "设置"
L["Shadow Color"] = "阴影颜色"
L["Shadow X Offset"] = "阴影 X 轴偏移"
L["Shadow Y Offset"] = "阴影 Y 轴偏移"
L["Shift-click to create chat link"] = "按住 Shift 点击来生成聊天链接"
L["Show all matches (Auto-clone)"] = "列出所有符合的(自动复制)"
L["Show Border"] = "显示边框"
L["Show Cooldown"] = "显示冷却"
L["Show Glow"] = "显示发光效果"
L["Show Icon"] = "显示图标"
L["Show If Unit Does Not Exist"] = "如果单位不存在时显示"
L["Show If Unit Is Invalid"] = "当单位无效时显示"
L["Show Matches for"] = "为下列项显示匹配项"
L["Show Matches for Units"] = "为单位显示匹配项"
L["Show Model"] = "显示模型"
L["Show model of unit "] = "显示该单位的模型"
L["Show On"] = "当此条件满足时显示"
L["Show Spark"] = "显示闪光效果"
L["Show Text"] = "显示文本"
L["Show this group's children"] = "显示此组的子物件"
L["Shows a 3D model from the game files"] = "显示游戏文件中的3D模形"
L["Shows a border"] = "显示一个边框"
L["Shows a custom texture"] = "显示自定义材质"
L["Shows a glow"] = "显示发光效果"
L["Shows a model"] = "以模型显示"
L["Shows a progress bar with name, timer, and icon"] = "显示一个有名称,时间,图标的进度条"
L["Shows a spell icon with an optional cooldown overlay"] = "显示可选的法术图示有冷却时间重叠"
L["Shows a texture that changes based on duration"] = "显示一个随持续时间而变的材质"
L["Shows one or more lines of text, which can include dynamic information such as progress or stacks"] = "显示一行或多行文字, 它们包换动态信息, 如进度和叠加层数"
L["Simple"] = "简单"
L["Size"] = "大小"
L["Skip this Version"] = "跳过这个版本"
L["Slant Amount"] = "斜线数量"
L["Slant Mode"] = "倾斜模式"
L["Slanted"] = "倾斜的"
L["Slide"] = "滑动"
L["Slide In"] = "滑动"
L["Slide Out"] = "滑出"
L["Slider Step Size"] = "滑动条步进尺寸"
L["Small Icon"] = "小图标"
L["Smooth Progress"] = "过程平滑"
L["Soft Max"] = "软上限"
L["Soft Min"] = "软下限"
L["Sort"] = "排序"
L["Sound"] = "声音"
L["Sound Channel"] = "声道"
L["Sound File Path"] = "声音文件路径"
L["Sound Kit ID"] = "音效包ID"
L["Space"] = "间隙"
L["Space Horizontally"] = "横向间隙"
L["Space Vertically"] = "纵向间隙"
L["Spark"] = "高光"
L["Spark Settings"] = "高光设置"
L["Spark Texture"] = "高光材质"
L["Specific Unit"] = "指定单位"
L["Spell ID"] = "法术ID"
L["Stack Count"] = "层数"
L["Stack Info"] = "层数信息"
L["Stagger"] = "交错"
L["Star"] = "星星"
L["Start"] = "开始"
L["Start Angle"] = "起始角度"
L["Start Collapsed"] = "打开时折叠"
L["Start of %s"] = "%s 的开始"
L["Status"] = "状态"
L["Stealable"] = "可偷取"
L["Step Size"] = "步进尺寸"
L["Stop ignoring Updates"] = "不再忽略更新"
L["Stop Sound"] = "停止播放声音"
L["Sub Elements"] = "子元素"
L["Sub Option %i"] = "子选项 %i"
L["Temporary Group"] = "模板群组"
L["Text"] = "文字"
L["Text %s"] = "文本 %s"
L["Text Color"] = "文字颜色"
L["Text Settings"] = "文本设置"
L["Texture"] = "材质"
L["Texture Info"] = "材质信息"
L["Texture Settings"] = "材质设置"
L["Texture Wrap"] = "材质折叠"
L["The duration of the animation in seconds."] = "动画持续秒数"
L["The duration of the animation in seconds. The finish animation does not start playing until after the display would normally be hidden."] = "动画时长秒时。直到显示内容被正常隐藏之后结束动画才会播放。"
L["The type of trigger"] = "触发器类型"
L["Then "] = "然后"
L["Thickness"] = "粗细"
L["This adds %tooltip, %tooltip1, %tooltip2, %tooltip3 as text replacements."] = "这将替换 %tooltip, %tooltip1, %tooltip2, %tooltip3 的文本。"
L["This aura has legacy aura trigger(s). Convert them to the new system to benefit from enhanced performance and features"] = "这个光环使用了传统光环触发器,将它们转换到新版来获得更好的体验和更多的功能。"
L["This display is currently loaded"] = "此显示内容已加载"
L["This display is not currently loaded"] = "此显示内容未加载"
L["This region of type \"%s\" is not supported."] = "该类型区域“%s”不受支持。"
L["This setting controls what widget is generated in user mode."] = "这些设置用来控制在用户模式下生成的控件。"
L["Time in"] = "时间"
L["Tiny Icon"] = "微型图标"
L["To Frame's"] = "到框架的"
--[[Translation missing --]]
L["To Group's"] = "To Group's"
L["To Personal Ressource Display's"] = "到个人资源显示的"
L["To Screen's"] = "到屏幕的"
L["Toggle the visibility of all loaded displays"] = "切换当前已载入图示的可见状态"
L["Toggle the visibility of all non-loaded displays"] = "切换当前未载入图示的可见状态"
L["Toggle the visibility of this display"] = "切换此显示内容的可见性"
L["Tooltip"] = "提示"
L["Tooltip Content"] = "鼠标提示内容"
L["Tooltip on Mouseover"] = "鼠标提示"
L["Tooltip Pattern Match"] = "鼠标提示规则匹配"
L["Tooltip Text"] = "鼠标提示文本"
L["Tooltip Value"] = "鼠标提示值"
L["Tooltip Value #"] = "鼠标提示值 #"
L["Top"] = "上方"
L["Top HUD position"] = "顶部 HUD 位置"
L["Top Left"] = "左上"
L["Top Right"] = "右上"
L["Total Time"] = "总时间"
L["Total Time Precision"] = "总时间精度"
L["Trigger"] = "触发"
L["Trigger %d"] = "触发器 %d"
L["Trigger %s"] = "触发器 %s"
L["True"] = ""
L["Type"] = "类型"
L["Ungroup"] = "不分组"
L["Unit"] = "单位"
L["Unit %s is not a valid unit for RegisterUnitEvent"] = "单位 %s 并不是 RegisterUnitEvent 的有效单位"
L["Unit Count"] = "单位计数"
--[[Translation missing --]]
L["Unit Frame"] = "Unit Frame"
L["Unit Frames"] = "单位框架"
L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "不同于开始或结束动画,主动画将不停循环,直到图示被隐藏。"
L["Up"] = ""
--[[Translation missing --]]
L["Update %s by %s"] = "Update %s by %s"
L["Update Custom Text On..."] = "更新自定义文字于"
L["Update in Group"] = "更新群组内所有项"
L["Update this Aura"] = "更新此光环"
L["Use Custom Color"] = "使用自定义颜色"
L["Use Display Info Id"] = "使用显示信息 ID"
L["Use Full Scan (High CPU)"] = "使用完整扫描(高CPU)"
L["Use nth value from tooltip:"] = "使用来自鼠标提示的值的顺序:"
L["Use SetTransform"] = "使用 SetTransform 方法"
L["Use tooltip \"size\" instead of stacks"] = "使用\\\"大小\\\"提示,而不是\\\"层数\\\""
L["Use Tooltip Information"] = "使用鼠标提示信息"
L["Used in Auras:"] = "在下列光环中被使用:"
L["Used in auras:"] = "在下列光环中被使用:"
L["Value %i"] = "值 %i"
L["Values are in normalized rgba format."] = "数值为标准化的 RGBA 格式"
L["Values:"] = "值:"
L["Version: "] = "版本:"
L["Vertical Align"] = "垂直对齐"
L["Vertical Bar"] = "垂直条"
L["View"] = "视图"
L["Wago Update"] = "Wago.io 更新"
L["Whole Area"] = "整个区域"
L["Width"] = "宽度"
--[[Translation missing --]]
L["wrapping"] = "wrapping"
L["X Offset"] = "X 偏移"
L["X Rotation"] = "X旋转"
L["X Scale"] = "宽度比例"
L["X-Offset"] = "X 偏移"
L["Y Offset"] = "Y 偏移"
L["Y Rotation"] = "Y旋转"
L["Y Scale"] = "长度比例"
L["Yellow Rune"] = "黄色符文"
L["Yes"] = ""
L["Y-Offset"] = "Y 偏移"
L["You are about to delete %d aura(s). |cFFFF0000This cannot be undone!|r Would you like to continue?"] = "正在删除 %d 个光环,|cFFFF0000此操作无法被撤销!|r真的要删除吗?"
L["Z Offset"] = "深度 偏移"
L["Z Rotation"] = "Z旋转"
L["Zoom"] = "缩放"
L["Zoom In"] = "放大"
L["Zoom Out"] = "缩小"
+705
View File
@@ -0,0 +1,705 @@
if not WeakAuras.IsCorrectVersion() then return end
if not(GetLocale() == "zhTW") then
return
end
local L = WeakAuras.L
-- WeakAuras/Options
L["-- Do not remove this comment, it is part of this trigger: "] = "-- Do not remove this comment, it is part of this trigger: "
L["% of Progress"] = "進度%"
L["%i auras selected"] = "已選擇 %i 個提醒效果"
L["%i Matches"] = "%i 個符合"
L["%s - Option #%i has the key %s. Please choose a different option key."] = "%s - 選項 #%i 已經有 key %s。請選擇另一個不同的選項 key。"
L["%s %s, Lines: %d, Frequency: %0.2f, Length: %d, Thickness: %d"] = "%s %s, 直線: %d, 頻率: %0.2f, 長度: %d, 粗細: %d"
L["%s %s, Particles: %d, Frequency: %0.2f, Scale: %0.2f"] = "%s %s, 粒子: %d, 頻率: %0.2f, 縮放大小: %0.2f"
L["%s Alpha: %d%%"] = "%s透明度: %d%%"
L["%s Color"] = "%s 顏色"
L["%s Default Alpha, Zoom, Icon Inset, Aspect Ratio"] = "%s預設透明度, 檢視大小, 圖示內縮, 保持比例"
L["%s Inset: %d%%"] = "%s內縮: %d%%"
L["%s is not a valid SubEvent for COMBAT_LOG_EVENT_UNFILTERED"] = "%s 不是 COMBAT_LOG_EVENT_UNFILTERED 的有效 SubEvent"
L["%s Keep Aspect Ratio"] = "%s保持寬高比例"
L["%s total auras"] = "總共 %s 個提醒效果"
L["%s Zoom: %d%%"] = "%s檢視大小: %d%%"
L["%s, Border"] = "%s, 邊框"
L["%s, Offset: %0.2f;%0.2f"] = "%s, 位置偏移: %0.2f;%0.2f"
L["%s, offset: %0.2f;%0.2f"] = "%s, 位置偏移: %0.2f;%0.2f"
L["|c%02x%02x%02x%02xCustom Color|r"] = "|c%02x%02x%02x%02x自訂顏色|r"
L["|cFFFF0000Note:|r The unit '%s' is not a trackable unit."] = "|cFFFF0000注意:|r單位'%s'不是可追蹤的單位。"
L["|cFFffcc00Anchors:|r Anchored |cFFFF0000%s|r to frame's |cFFFF0000%s|r"] = "|cFFffcc00對齊:|r |cFFFF0000%s|r對齊到框架的|cFFFF0000%s|r"
L["|cFFffcc00Anchors:|r Anchored |cFFFF0000%s|r to frame's |cFFFF0000%s|r with offset |cFFFF0000%s/%s|r"] = "|cFFffcc00對齊:|r |cFFFF0000%s|r對齊到框架的|cFFFF0000%s|r,偏移|cFFFF0000%s/%s|r"
L["|cFFffcc00Anchors:|r Anchored to frame's |cFFFF0000%s|r"] = "|cFFffcc00對齊:|r 對齊到框架的|cFFFF0000%s|r"
L["|cFFffcc00Anchors:|r Anchored to frame's |cFFFF0000%s|r with offset |cFFFF0000%s/%s|r"] = "|cFFffcc00對齊:|r 對齊到框架的|cFFFF0000%s|r,偏移|cFFFF0000%s/%s|r"
L["|cFFffcc00Extra Options:|r"] = "|cFFffcc00額外選項:|r"
L["|cFFffcc00Font Flags:|r |cFFFF0000%s|r and shadow |c%sColor|r with offset |cFFFF0000%s/%s|r%s%s%s"] = "|cFFffcc00文字樣式:|r |cFFFF0000%s|r和陰影|c%s顏色|r,偏移|cFFFF0000%s/%s|r%s%s%s"
L["1 Match"] = "1 個符合"
L["A 20x20 pixels icon"] = "20x20 大小的圖示"
L["A 32x32 pixels icon"] = "32x32 大小的圖示"
L["A 40x40 pixels icon"] = "40x40 大小的圖示"
L["A 48x48 pixels icon"] = "48x48 大小的圖示"
L["A 64x64 pixels icon"] = "64x64 大小的圖示"
L["A group that dynamically controls the positioning of its children"] = "可動態控制子項目位置的群組"
L["A Unit ID (e.g., party1)."] = "單位 ID (例如 party1)。"
L["Actions"] = "動作"
L["Add %s"] = "新增%s"
L["Add a new display"] = "新增提醒效果"
L["Add Condition"] = "新增條件"
L["Add Entry"] = "新增項目"
L["Add Extra Elements"] = "新增額外元素"
L["Add Option"] = "新增選項"
L["Add Overlay"] = "加上疊加圖層"
L["Add Property Change"] = "新增屬性變化"
L["Add Sub Option"] = "新增子選項"
L["Add to group %s"] = "加入到群組 %s"
L["Add to new Dynamic Group"] = "加入到新的動態群組"
L["Add to new Group"] = "加入到新的群組"
L["Add Trigger"] = "新增觸發"
L["Addon"] = "插件"
L["Addons"] = "插件"
L["Advanced"] = "進階"
L["Align"] = "置中"
L["Alignment"] = "對齊方式"
L["All of"] = "全部的"
L["Allow Full Rotation"] = "允許完整旋轉"
L["Alpha"] = "透明度"
L["Anchor"] = "對齊"
L["Anchor Point"] = "對齊點"
L["Anchored To"] = "對齊到"
L["And "] = ""
L["and aligned left"] = "和靠左對齊"
L["and aligned right"] = "和靠右對齊"
L["and rotated left"] = "和向左旋轉"
L["and rotated right"] = "和向右旋轉"
L["and Trigger %s"] = "和觸發 %s"
L["and with width |cFFFF0000%s|r and %s"] = "、寬度 |cFFFF0000%s|r 和 %s"
L["Angle"] = "角度"
L["Animate"] = "閃爍"
L["Animated Expand and Collapse"] = "展開和收合的動畫效果"
L["Animates progress changes"] = "進度變化動畫效果"
L["Animation relative duration description"] = [=[動畫的持續時間是相對於提醒效果的持續時間,使用分數 (1/2)、百分比 (50%) 或小數 (0.5) 來表示。
|cFFFF0000特別注意:|r 如果提醒效果沒有進度 (是非時間性的事件觸發,或沒有時間的光環...等),動畫將不會播放。
|cFF4444FF例如:|r
如果動畫的持續時間設為 |cFF00CC0010%|r,提醒效果的觸發是 20 秒的光環,那麼開始動畫將會播放 2 秒。
如果動畫的持續時間設為 |cFF00CC0010%|r,提醒效果的觸發沒有設定持續時間,將不會播放開始動畫 (儘管你有設定持續時間的秒數)。]=]
L["Animation Sequence"] = "動畫序列"
L["Animations"] = "動畫"
L["Any of"] = "任何的"
L["Apply Template"] = "套用範本"
L["Arc Length"] = "弧長"
L["Arcane Orb"] = "祕法光球"
L["At a position a bit left of Left HUD position."] = "比左方 HUD 更左一點的位置"
L["At a position a bit left of Right HUD position"] = "比右方 HUD 更右一點的位置"
L["At the same position as Blizzard's spell alert"] = "和暴雪法術警告效果相同的位置"
L["Aura Name"] = "光環名稱"
L["Aura Name Pattern"] = "光環名稱模式 (Pattern)"
L["Aura Type"] = "光環類型"
L["Aura(s)"] = "光環"
L["Author Options"] = "作者選項"
L["Auto"] = "自動"
L["Auto-Clone (Show All Matches)"] = "自動複製 (顯示所有符合的)"
L["Auto-cloning enabled"] = "自動複製已啟用"
L["Automatic"] = "自動"
L["Automatic Icon"] = "自動圖示"
L["Backdrop Color"] = "背景顏色"
L["Backdrop in Front"] = "背景在前面"
L["Backdrop Style"] = "背景類型"
L["Background Color"] = "背景顏色"
L["Background Offset"] = "背景位置"
L["Background Texture"] = "背景材質"
L["Bar"] = "進度條"
L["Bar Alpha"] = "進度條透明度"
L["Bar Color"] = "進度條顏色"
L["Bar Color Settings"] = "進度條顏色設定"
L["Bar Inner"] = "進度條內側"
L["Bar Texture"] = "進度條材質"
L["Big Icon"] = "大圖示"
L["Blacklisted Aura Name"] = "忽略的光環名稱"
L["Blacklisted Exact Spell ID(s)"] = "忽略的正確法術 ID"
L["Blacklisted Name(s)"] = "忽略的名稱"
L["Blacklisted Spell ID"] = "忽略的法術 ID"
L["Blend Mode"] = "混合模式"
L["Blue Rune"] = "藍色符文"
L["Blue Sparkle Orb"] = "藍色光球"
L["Border"] = "邊框"
L["Border %s"] = "邊框 %s"
L["Border Anchor"] = "邊框對齊"
L["Border Color"] = "邊框顏色"
L["Border in Front"] = "邊框在前面"
L["Border Inset"] = "邊框內縮"
L["Border Offset"] = "邊框位置"
L["Border Settings"] = "邊框設定"
L["Border Size"] = "邊框大小"
L["Border Style"] = "邊框樣式"
L["Bottom"] = ""
L["Bottom Left"] = "左下"
L["Bottom Right"] = "右下"
L["Bracket Matching"] = "括號配對符合"
L["Can be a Name or a Unit ID (e.g. party1). A name only works on friendly players in your group."] = "可以是名字或單位 ID (例如 party1)。只有同隊伍中的友方玩家才能使用名字。"
L["Can be a UID (e.g., party1)."] = "可以是單位 ID (例如 party1) 。"
L["Cancel"] = "取消"
L["Center"] = ""
L["Channel Number"] = "頻道編號"
L["Chat Message"] = "聊天訊息文字"
L["Check On..."] = "檢查..."
L["Children:"] = "子項目:"
L["Choose"] = "選擇"
L["Choose Trigger"] = "選擇觸發"
L["Choose whether the displayed icon is automatic or defined manually"] = "選擇要顯示的圖示是自動的或手動選擇圖示"
L["Class"] = "職業"
L["Clip Overlays"] = "裁剪疊加圖層"
L["Clipped by Progress"] = "被進度縮減"
L["Clone option enabled dialog"] = [=[你啟用了一個選項會用到 |cFFFF0000自動複製|r 的功能。
|cFFFF0000自動複製|r 會讓提醒效果自動複製出多份以顯示多個資訊來源。
除非將這個提醒效果放在 |cFF22AA22動態群組|r 中,所有複製出來的都會顯示在另一個的上方,變成一大堆。
是否要將這個顯示效果放到一個新的 |cFF22AA22動態群組|r 裡面?]=]
L["Close"] = "關閉"
L["Collapse"] = "收合"
L["Collapse all loaded displays"] = "收合所有已載入的提醒效果"
L["Collapse all non-loaded displays"] = "收合所有未載入的提醒效果"
L["Collapsible Group"] = "可收合群組"
L["color"] = "顏色"
L["Color"] = "顏色"
L["Column Height"] = "行高度"
L["Column Space"] = "行間距"
L["Combinations"] = "組合"
L["Combine Matches Per Unit"] = "合併每個單位符合的"
L["Common Text"] = "普通文字"
L["Compare against the number of units affected."] = "與受影響的單位數量進行比較。"
L["Compress"] = "精簡"
L["Condition %i"] = "條件 %i"
L["Conditions"] = "條件"
L["Configure what options appear on this panel."] = "設定這個面板中要出現哪些選項。"
L["Constant Factor"] = "常數因子"
L["Control-click to select multiple displays"] = "按住 Ctrl 鍵點擊可選擇多個提醒效果"
L["Controls the positioning and configuration of multiple displays at the same time"] = "同時控制多個提醒效果的位置和設定"
L["Convert to New Aura Trigger"] = "轉換成新的光環觸發"
L["Convert to..."] = "轉換成..."
L["Cooldown Edge"] = "冷卻邊緣"
L["Cooldown Settings"] = "冷卻設定"
L["Cooldown Swipe"] = "冷卻轉圈動畫"
L["Copy"] = "複製"
L["Copy settings..."] = "複製設定..."
L["Copy to all auras"] = "複製到全部的光環"
L["Copy URL"] = "複製 URL"
L["Count"] = "數量"
L["Counts the number of matches over all units."] = "計算所有單位中符合的數量。"
L["Creating buttons: "] = "建立按鈕: "
L["Creating options: "] = "建立選項: "
L["Crop X"] = "裁剪X"
L["Crop Y"] = "裁剪Y"
L["Custom"] = "自訂"
L["Custom Anchor"] = "自訂對齊"
L["Custom Code"] = "自訂程式碼"
L["Custom Color"] = "自訂顏色"
L["Custom Configuration"] = "自訂設定選項"
L["Custom Frames"] = "自訂框架"
L["Custom Function"] = "自訂函數"
L["Custom Grow"] = "自訂增長"
L["Custom Options"] = "自訂選項"
L["Custom Sort"] = "自訂排序"
L["Custom Trigger"] = "自訂觸發"
L["Custom trigger event tooltip"] = [=[選擇自訂觸發要檢查的事件。
可用逗號分隔多個事件。
|cFF4444FF例如:|r
UNIT_POWER, UNIT_AURA PLAYER_TARGET_CHANGED]=]
L["Custom trigger status tooltip"] = [=[選擇自訂觸發要檢查的事件。
因為這是狀態類型的觸發,所指定的事件必須不用加參數就能夠被 WeakAuras 呼叫。
可用逗號分隔多個事件。
|cFF4444FF例如:|r
UNIT_POWER, UNIT_AURA PLAYER_TARGET_CHANGED]=]
L["Custom Untrigger"] = "自訂取消觸發"
L["Custom Variables"] = "自訂變數"
L["Debuff Type"] = "減益類型"
L["Default"] = "預設"
L["Default Color"] = "減益顏色"
L["Delete"] = "刪除"
L["Delete all"] = "全部刪除"
L["Delete children and group"] = "刪除子項目和群組"
L["Delete Entry"] = "刪除項目"
L["Delete Trigger"] = "刪除觸發"
L["Desaturate"] = "去色"
L["Description Text"] = "說明文字"
L["Determines how many entries can be in the table."] = "決定表格中可以有多少項目。"
L["Differences"] = "差異"
L["Disabled"] = "停用"
L["Disallow Entry Reordering"] = "不允許重新排序項目"
L["Discrete Rotation"] = "分離旋轉"
L["Display"] = "提醒效果"
L["Display Icon"] = "提醒效果圖示"
L["Display Name"] = "顯示名稱"
L["Display Text"] = "提醒效果文字"
L["Displays a text, works best in combination with other displays"] = "顯示文字,最適合和其他顯示效果一起搭配使用"
L["Distribute Horizontally"] = "水平分佈"
L["Distribute Vertically"] = "垂直分佈"
L["Do not group this display"] = "不要群組這個提醒效果"
L["Done"] = "完成"
L["Don't skip this Version"] = "不要跳過此版本"
L["Down"] = "下移"
L["Drag to move"] = "滑鼠拖曳來移動"
L["Duplicate"] = "多複製一份"
L["Duplicate All"] = "全部多複製一份"
L["Duration (s)"] = "持續時間 (秒)"
L["Duration Info"] = "持續時間訊息"
L["Dynamic Duration"] = "動態持續時間"
L["Dynamic Group"] = "動態群組"
L["Dynamic Group Settings"] = "動態群組設定"
L["Dynamic Information"] = "動態資訊"
L["Dynamic information from first active trigger"] = "來自最先被觸發的動態資訊"
L["Dynamic information from Trigger %i"] = "來自觸發 %i 的動態資訊"
L["Dynamic text tooltip"] = [=[有幾種特別的代碼可以讓文字顯示為動態的:
|cFFFF0000%p|r - 進度 - 剩餘的時間,或是非時間的數值。
|cFFFF0000%t|r - 總共 - 持續時間的最大值,或是非時間的最大值。
|cFFFF0000%n|r - 名稱 - 提醒效果的名稱 (通常是光環的名稱),沒有動態名稱時會顯示提醒效果的 ID。
|cFFFF0000%i|r - 圖示 - 和這個提醒效果關聯的圖示。
|cFFFF0000%s|r - 堆疊 - 通常是光環的堆疊層數。
|cFFFF0000%c|r - 自訂 - 允許自訂 Lua 函數傳回要顯示的文字字串。]=]
L["Ease Strength"] = "淡出強度"
L["Ease type"] = "淡出類型"
L["Edge"] = "邊緣"
L["eliding"] = "符合寬度"
L["Enabled"] = "啟用"
L["End Angle"] = "結束角度"
L["End of %s"] = "%s 的結尾"
L["Enter a Spell ID"] = "輸入法術 ID"
L["Enter an aura name, partial aura name, or spell id"] = "輸入光環名稱、光環部分名稱,或是法術 ID"
L["Enter an Aura Name, partial Aura Name, or Spell ID. A Spell ID will match any spells with the same name."] = "輸入光環名稱、光環部分名稱,或是法術 ID。法術 ID 會找出名稱相同的任何法術。"
L["Enter Author Mode"] = "進入作者模式"
L["Enter User Mode"] = "進入使用者模式"
L["Enter user mode."] = "進入使用者模式。"
L["Entry %i"] = "項目 %i"
L["Entry limit"] = "項目限制"
L["Entry Name Source"] = "項目名稱來源"
L["Event"] = "事件"
L["Event Type"] = "事件類型"
L["Event(s)"] = "事件"
L["Everything"] = "全部"
L["Exact Spell ID(s)"] = "正確的法術 ID"
L["Exact Spell Match"] = "完全符合法術"
L["Expand"] = "展開"
L["Expand all loaded displays"] = "展開所有已載入的提醒效果"
L["Expand all non-loaded displays"] = "展開所有未載入的提醒效果"
L["Expansion is disabled because this group has no children"] = "無法展開,因為這個群組沒有子項目"
L["Export to Lua table..."] = "匯出成 Lua table..."
L["Export to string..."] = "匯出成文字字串..."
L["External"] = "外部"
L["Fade"] = "淡化"
L["Fade In"] = "淡入"
L["Fade Out"] = "淡出"
L["False"] = "否 (False)"
L["Fetch Affected/Unaffected Names"] = "取得受影響/未受影響的名字"
L["Filter by Class"] = "依職業過濾"
L["Filter by Group Role"] = "依角色職責過濾"
L["Finish"] = "結束"
L["Fire Orb"] = "火球"
L["Font"] = "文字"
L["Font Size"] = "文字大小"
L["Foreground"] = "前景"
L["Foreground Color"] = "前景顏色"
L["Foreground Texture"] = "前景材質"
L["Frame"] = "框架"
L["Frame Selector"] = "框架選擇器"
L["Frame Strata"] = "框架層級"
L["Frequency"] = "頻率"
L["From Template"] = "從範本建立 (**推薦**)"
L["From version %s to version %s"] = "從版本 %s 到版本 %s"
L["Global Conditions"] = "整體條件"
L["Glow %s"] = "發光 %s"
L["Glow Action"] = "發光動作"
L["Glow Anchor"] = "發光對齊位置"
L["Glow Color"] = "發光顏色"
L["Glow External Element"] = "發光外部元素"
L["Glow Frame Type"] = "發光框架類型"
L["Glow Type"] = "發光類型"
L["Green Rune"] = "綠色符文"
L["Grid direction"] = "網格方向"
L["Group"] = "群組"
L["Group (verb)"] = "群組"
L["Group aura count description"] = [=[要觸發這個提醒效果,必須有 %s 個成員受到一個或多個指定光環的影響。
如果輸入的數字是整數 (例如 5),受到影響的團隊成員數量會和輸入的數字做比較。
如果輸入的數字是小數 (例如 0.5)、分數 (例如 1/2) 或百分比 (例如 50%%),那麼 %s 的部分必須受到影響。
|cFF4444FF舉例來說:|r
|cFF00CC00> 0|r 當 %s 中的任何人受到影響時會觸發
|cFF00CC00= 100%%|r 當 %s 中的任何人受到影響時會觸發
|cFF00CC00!= 2|r 當 %s 中受到影響的人數不剛好為 2 的時候會觸發
|cFF00CC00<= 0.8|r 當 %s 中受到影響的人數少於 80%% 的時候會觸發 (5人隊伍時為4人、10人團隊時為8人、25人團隊時為20人)
|cFF00CC00> 1/2|r 當 %s 中受到影響的人數超過一半時會觸發
|cFF00CC00>= 0|r 無論如何永遠都會觸發]=]
L["Group by Frame"] = "依框架分群組"
L["Group contains updates from Wago"] = "群組包含來自 Wago 的更新"
L["Group Icon"] = "群組圖示"
L["Group key"] = "群組 key"
L["Group Member Count"] = "群組成員總數"
L["Group Role"] = "角色職責"
L["Group Scale"] = "群組縮放大小"
L["Group Settings"] = "群組設定"
L["Group Type"] = "群組類型"
L["Grow"] = "增長"
L["Hawk"] = "老鷹"
L["Height"] = "高度"
L["Help"] = "說明"
L["Hide"] = "隱藏"
L["Hide Cooldown Text"] = "隱藏冷卻文字"
L["Hide Glows applied by this aura"] = "隱藏這個光環所套用的發光效果"
L["Hide on"] = "隱藏"
L["Hide this group's children"] = "隱藏這個群組的子項目"
L["Hide When Not In Group"] = "不在隊伍中時隱藏"
L["Horizontal Align"] = "水平對齊"
L["Horizontal Bar"] = "水平進度條"
L["Huge Icon"] = "超大圖示"
L["Hybrid Position"] = "混合位置"
L["Hybrid Sort Mode"] = "混合模式"
L["Icon"] = "圖示"
L["Icon Info"] = "圖示訊息"
L["Icon Inset"] = "圖示內縮"
L["Icon Position"] = "圖示位置"
L["Icon Settings"] = "圖示設定"
L["If"] = "(if) 如果"
L["If checked, then the user will see a multi line edit box. This is useful for inputting large amounts of text."] = "勾選時,使用者會看到多行的文字編輯方塊,適用於輸入大量文字。"
L["If checked, then this option group can be temporarily collapsed by the user."] = "勾選時,使用者可以將群組暫時摺疊收起來。"
L["If checked, then this option group will start collapsed."] = "勾選時,這個選項群組一開始就會呈現摺疊收起來的狀態。"
L["If checked, then this separator will include text. Otherwise, it will be just a horizontal line."] = "勾選時,分隔線會包含文字,否則只會有水平線。"
L["If checked, then this separator will not merge with other separators when selecting multiple auras."] = "勾選時,選擇多個提醒效果的時候,這個分隔線不會和其他分隔線合併。"
L["If checked, then this space will span across multiple lines."] = "勾選時,此間距將會跨越多行。"
L["If Trigger %s"] = "(if) 如果觸發 %s"
L["If unchecked, then a default color will be used (usually yellow)"] = "不勾選時會使用預設的顏色 (通常是黃色)"
L["If unchecked, then this space will fill the entire line it is on in User Mode."] = "取消勾選時,會用這個空格填滿使用者模式中的整行。"
L["Ignore all Updates"] = "忽略所有更新"
L["Ignore Self"] = "忽略自己"
L["Ignore self"] = "忽略自己"
L["Ignored"] = "忽略"
L["Import"] = "匯入"
L["Import a display from an encoded string"] = "從編碼字串匯入提醒效果"
L["Inner"] = "內部"
L["Invalid Item Name/ID/Link"] = "無效的物品名稱/ID/連結"
L["Invalid Spell ID"] = "無效的法術 ID"
L["Invalid Spell Name/ID/Link"] = "無效的法術名稱/ID/連結"
L["Inverse"] = "反向"
L["Inverse Slant"] = "反向傾斜"
L["Is Stealable"] = "可偷取"
L["Justify"] = "左右對齊"
L["Keep Aspect Ratio"] = "保持長寬比例"
L["Large Input"] = "大量輸入"
L["Leaf"] = "葉子"
L["Left"] = ""
L["Left 2 HUD position"] = "左2 HUD 位置"
L["Left HUD position"] = "左方 HUD 位置"
L["Legacy Aura Trigger"] = "傳統光環觸發"
L["Length"] = "長度"
L["Limit"] = "限制"
L["Lines & Particles"] = "直線 & 粒子"
L["Load"] = "載入"
L["Loaded"] = "已載入"
L["Loop"] = "重複循環"
L["Low Mana"] = "低法力"
L["Magnetically Align"] = "磁性對齊"
L["Main"] = "主要"
L["Manage displays defined by Addons"] = "管理插件所定義的提醒效果"
L["Match Count"] = "符合的數量"
L["Max"] = "最大"
L["Max Length"] = "最大長度"
L["Medium Icon"] = "中圖示"
L["Message"] = "訊息"
L["Message Prefix"] = "訊息字首"
L["Message Suffix"] = "訊息字尾"
L["Message Type"] = "訊息類型"
L["Min"] = "最小"
L["Mirror"] = "鏡像"
L["Model"] = "模組"
L["Model %s"] = "模組 %s"
L["Model Settings"] = "模組設定"
L["Move Above Group"] = "移至群組上方"
L["Move Below Group"] = "移至群組下方"
L["Move Down"] = "往下移動"
L["Move Entry Down"] = "項目往下移"
L["Move Entry Up"] = "項目往上移動"
L["Move Into Above Group"] = "移動至上方的群組內"
L["Move Into Below Group"] = "移動至下方的群組內"
L["Move this display down in its group's order"] = "將這個提醒效果在群組中的順序往下移動"
L["Move this display up in its group's order"] = "將這個提醒效果在群組中的順序往上移動"
L["Move Up"] = "往上移動"
L["Multiple Displays"] = "多個提醒效果"
L["Multiple Triggers"] = "多個觸發"
L["Multiselect ignored tooltip"] = [=[|cFFFF0000忽略|r - |cFF777777單一|r - |cFF777777多個|r
這個選項將不會用來決定何時該載入這個顯示效果]=]
L["Multiselect multiple tooltip"] = [=[|cFF777777忽略|r - |cFF777777單一|r - |cFF00FF00多個|r
只要符合其中任何一個都會被載入]=]
L["Multiselect single tooltip"] = [=[|cFF777777忽略|r - |cFF00FF00單一|r - |cFF777777多個|r
只有符合這一個值的時候會被載入]=]
L["Name Info"] = "名稱訊息"
L["Name Pattern Match"] = "名稱模式符合"
L["Name(s)"] = "名稱"
L["Negator"] = ""
L["Never"] = "永不"
L["New Aura"] = "新增提醒效果"
L["New Value"] = "新的值"
L["No"] = "取消"
L["No Children"] = "沒有子項目"
L["No tooltip text"] = "沒有滑鼠提示文字"
L["None"] = ""
L["Not all children have the same value for this option"] = "並非所有子項目的這個設定都使用相同的數值"
L["Not Loaded"] = "未載入"
L["Note: Automated Messages to SAY and YELL are blocked outside of Instances."] = "注意:自動說與大喊的訊息在副本外是會被阻擋的。"
L["Number of Entries"] = "項目數量"
L["Offer a guided way to create auras for your character"] = "用步驟導引的方式替角色建立提醒效果"
L["Okay"] = "確認"
L["On Hide"] = "消失時"
L["On Init"] = "初始化時"
L["On Show"] = "出現時"
L["Only match auras cast by people other than the player"] = "只符合其他玩家施放的光環"
L["Only match auras cast by people other than the player or his pet"] = "只符合其他玩家施放的光環"
L["Only match auras cast by the player"] = "只符合玩家自己施放的光環"
L["Only match auras cast by the player or his pet"] = "只符合玩家自己或寵物施放的光環"
L["Operator"] = "運算符"
L["Option %i"] = "選項 %i"
L["Option key"] = "選項 key"
L["Option Type"] = "選項類型"
L["Options will open after combat ends."] = "設定選項會在戰鬥結束後開啟。"
L["or"] = ""
L["or Trigger %s"] = "或觸發 %s"
L["Orange Rune"] = "橘色符文"
L["Orientation"] = "方向"
L["Outer"] = "外部"
L["Outline"] = "外框"
L["Overflow"] = "超出範圍"
L["Overlay %s Info"] = "疊加 %s 資訊"
L["Overlays"] = "疊加圖層"
L["Own Only"] = "只顯示自己的"
L["Paste Action Settings"] = "貼上動作設定"
L["Paste Animations Settings"] = "貼上動畫設定"
L["Paste Author Options Settings"] = "貼上作者選項設定"
L["Paste Condition Settings"] = "貼上條件設定"
L["Paste Custom Configuration"] = "貼上自訂設定選項"
L["Paste Display Settings"] = "貼上顯示設定"
L["Paste Group Settings"] = "貼上群組設定"
L["Paste Load Settings"] = "貼上載入設定"
L["Paste Settings"] = "貼上設定"
L["Paste text below"] = "在下面貼上文字"
L["Paste Trigger Settings"] = "貼上觸發設定"
L["Play Sound"] = "播放音效"
L["Position Settings"] = "位置設定"
L["Preferred Match"] = "優先選擇符合"
L["Preset"] = "預設配置"
L["Press Ctrl+C to copy"] = "按下 Ctrl+C 複製"
L["Prevent Merging"] = "防止合併"
L["Processed %i chars"] = "處理進度 %i 個字元"
L["Progress Bar"] = "進度條"
L["Progress Bar Settings"] = "進度條設定"
L["Progress Texture"] = "進度材質"
L["Progress Texture Settings"] = "進度材質設定"
L["Purple Rune"] = "紫色符文"
L["Put this display in a group"] = "將這個提醒效果放入群組中"
L["Radius"] = "半徑"
L["Re-center X"] = "重新水平置中"
L["Re-center Y"] = "重新垂直置中"
L["Regions of type \"%s\" are not supported."] = "不支援區域類型 \"%s\""
L["Remaining Time"] = "剩餘時間"
L["Remaining Time Precision"] = "剩餘時間精確度"
L["Remove"] = "移除"
L["Remove this display from its group"] = "將這個提醒效果從群組中移除"
L["Remove this property"] = "移除這個屬性"
L["Rename"] = "重新命名"
L["Repeat After"] = "之後重複"
L["Repeat every"] = "每次重複"
L["Require unit from trigger"] = "需要來自觸發的單位"
L["Required for Activation"] = "啟用需要"
L["Reset all options to their default values."] = "重置所有選項,恢復成預設值。"
L["Reset Entry"] = "重置項目"
L["Reset to Defaults"] = "重置為預設值"
L["Right"] = ""
L["Right 2 HUD position"] = "右2 HUD 位置"
L["Right HUD position"] = "右方 HUD 位置"
L["Right-click for more options"] = "右鍵點擊顯示更多設定"
L["Rotate"] = "旋轉"
L["Rotate In"] = "旋轉進入"
L["Rotate Out"] = "旋轉退出"
L["Rotate Text"] = "旋轉文字"
L["Rotation"] = "旋轉"
L["Rotation Mode"] = "旋轉模式"
L["Row Space"] = "列間距"
L["Row Width"] = "列寬度"
L["Same"] = "相同"
L["Scale"] = "縮放大小"
L["Search"] = "搜尋"
L["Select the auras you always want to be listed first"] = "選擇永遠要列在前面的特效"
L["Send To"] = "發送到"
L["Separator Text"] = "分隔線文字"
L["Separator text"] = "分隔線文字"
L["Set Parent to Anchor"] = "將對齊點設為上一層"
L["Set Thumbnail Icon"] = "設定縮圖圖示"
L["Set tooltip description"] = "設定滑鼠提示說明內容"
L["Sets the anchored frame as the aura's parent, causing the aura to inherit attributes such as visiblility and scale."] = "將對齊的框架設定為提醒效果的上一層,會讓提醒效果繼承其屬性,像是可見性和縮放大小。"
L["Settings"] = "設定"
L["Shadow Color"] = "陰影顏色"
L["Shadow X Offset"] = "陰影水平偏移"
L["Shadow Y Offset"] = "陰影垂直偏移"
L["Shift-click to create chat link"] = "Shift-左鍵點擊建立 |cFF8800FF[聊天連結]"
L["Show all matches (Auto-clone)"] = "顯示所有符合的 (自動複製)"
L["Show Border"] = "顯示邊框"
L["Show Cooldown"] = "顯示冷卻"
L["Show Glow"] = "顯示發光"
L["Show Icon"] = "顯示圖示"
L["Show If Unit Does Not Exist"] = "單位不存在時要顯示"
L["Show If Unit Is Invalid"] = "單位無效時要顯示"
L["Show Matches for"] = "顯示符合的"
L["Show Matches for Units"] = "顯示單位符合的"
L["Show Model"] = "顯示模組"
L["Show model of unit "] = "顯示單位的模組"
L["Show On"] = "顯示於"
L["Show Spark"] = "顯示亮點"
L["Show Text"] = "顯示文字"
L["Show this group's children"] = "顯示這個群組的子項目"
L["Shows a 3D model from the game files"] = "顯示遊戲檔案中的3D模組"
L["Shows a border"] = "顯示邊框"
L["Shows a custom texture"] = "顯示自訂材質"
L["Shows a glow"] = "顯示發光效果"
L["Shows a model"] = "顯示模組"
L["Shows a progress bar with name, timer, and icon"] = "顯示一個包含名稱、時間和圖示的進度條"
L["Shows a spell icon with an optional cooldown overlay"] = "顯示法術圖示,可選擇是否要在上面顯示冷卻時間。"
L["Shows a texture that changes based on duration"] = "顯示根據時間變化的材質"
L["Shows one or more lines of text, which can include dynamic information such as progress or stacks"] = "顯示包含動態資訊的文字 (例如進度或是堆疊層數,允許一行或多行)"
L["Simple"] = "簡單"
L["Size"] = "大小"
L["Skip this Version"] = "跳過此版本"
L["Slant Amount"] = "傾斜大小"
L["Slant Mode"] = "傾斜模式"
L["Slanted"] = "已傾斜"
L["Slide"] = "滑動"
L["Slide In"] = "滑入"
L["Slide Out"] = "滑出"
L["Slider Step Size"] = "滑桿數值間距"
L["Small Icon"] = "小圖示"
L["Smooth Progress"] = "平順顯示進度"
L["Soft Max"] = "最大軟上限"
L["Soft Min"] = "最小軟上限"
L["Sort"] = "排序"
L["Sound"] = "音效"
L["Sound Channel"] = "音效頻道"
L["Sound File Path"] = "音效檔案路徑"
L["Sound Kit ID"] = "Sound Kit ID"
L["Space"] = "間距"
L["Space Horizontally"] = "橫向間隔"
L["Space Vertically"] = "縱向間隔"
L["Spark"] = "亮點"
L["Spark Settings"] = "亮點設定"
L["Spark Texture"] = "亮點材質"
L["Specific Unit"] = "指定單位"
L["Spell ID"] = "法術 ID"
L["Stack Count"] = "堆疊層數"
L["Stack Info"] = "堆疊層數資訊"
L["Stagger"] = "交錯"
L["Star"] = "星星"
L["Start"] = "開始"
L["Start Angle"] = "開始時的角度"
L["Start Collapsed"] = "開始先收合"
L["Start of %s"] = "%s 的開始"
L["Status"] = "狀態"
L["Stealable"] = "可法術竊取"
L["Step Size"] = "數值間距"
L["Stop ignoring Updates"] = "停止忽略更新"
L["Stop Sound"] = "停止音效"
L["Sub Elements"] = "子元素"
L["Sub Option %i"] = "子選項 %i"
L["Temporary Group"] = "暫時性的群組"
L["Text"] = "文字"
L["Text %s"] = "文字 %s"
L["Text Color"] = "文字顏色"
L["Text Settings"] = "文字設定"
L["Texture"] = "材質"
L["Texture Info"] = "材質資訊"
L["Texture Settings"] = "材質設定"
L["Texture Wrap"] = "材質包覆"
L["The duration of the animation in seconds."] = "動畫的持續時間(秒)。"
L["The duration of the animation in seconds. The finish animation does not start playing until after the display would normally be hidden."] = "動畫的持續時間 (秒)。直到提醒效果正常隱藏後,才會播放結束時的動畫。"
L["The type of trigger"] = "觸發類型"
L["Then "] = "(then) 則 "
L["Thickness"] = "粗細"
L["This adds %tooltip, %tooltip1, %tooltip2, %tooltip3 as text replacements."] = "這會加入 %tooltip, %tooltip1, %tooltip2, %tooltip3 用來替換文字。"
L["This aura has legacy aura trigger(s). Convert them to the new system to benefit from enhanced performance and features"] = "這個提醒效果包含傳統的光環觸發,將它們轉換成新的系統以獲得效能和功能增強的好處。"
L["This display is currently loaded"] = "這個提醒效果已經載入"
L["This display is not currently loaded"] = "這個提醒效果尚未載入"
L["This region of type \"%s\" is not supported."] = "不支援的地區類型 \"%s\""
L["This setting controls what widget is generated in user mode."] = "這個設定控制使用者模式中會產生什麼控制項。"
L["Time in"] = "時間"
L["Tiny Icon"] = "小小圖示"
L["To Frame's"] = "對齊框架的"
L["To Group's"] = "到群組的"
L["To Personal Ressource Display's"] = "對齊個人資源條的"
L["To Screen's"] = "對齊螢幕的"
L["Toggle the visibility of all loaded displays"] = "切換顯示所有已載入的提醒效果"
L["Toggle the visibility of all non-loaded displays"] = "切換顯示所有未載入的提醒效果"
L["Toggle the visibility of this display"] = "切換顯示這個提醒效果"
L["Tooltip"] = "滑鼠提示"
L["Tooltip Content"] = "滑鼠提示內容"
L["Tooltip on Mouseover"] = "顯示滑鼠提示說明"
L["Tooltip Pattern Match"] = "滑鼠提示模式符合"
L["Tooltip Text"] = "滑鼠提示文字"
L["Tooltip Value"] = "滑鼠提示值"
L["Tooltip Value #"] = "滑鼠提示值 #"
L["Top"] = ""
L["Top HUD position"] = "上方 HUD 位置"
L["Top Left"] = "左上"
L["Top Right"] = "右上"
L["Total Time"] = "總共時間"
L["Total Time Precision"] = "總共時間精確度"
L["Trigger"] = "觸發"
L["Trigger %d"] = "觸發 %d"
L["Trigger %s"] = "觸發 %s"
L["True"] = "是 (True)"
L["Type"] = "類型"
L["Ungroup"] = "解散群組"
L["Unit"] = "單位"
L["Unit %s is not a valid unit for RegisterUnitEvent"] = "%s 不是 RegisterUnitEvent 的有效單位"
L["Unit Count"] = "單位數量"
L["Unit Frame"] = "單位框架"
L["Unit Frames"] = "單位框架"
L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "不同於開始或結束時的動畫,主要動畫將重複循環直到提醒效果被隱藏。"
L["Up"] = "上移"
L["Update %s by %s"] = "更新 %s 透過 %s"
L["Update Custom Text On..."] = "更新自訂文字於..."
L["Update in Group"] = "群組中的更新"
L["Update this Aura"] = "更新這個提醒效果"
L["Use Custom Color"] = "使用自訂顏色"
L["Use Display Info Id"] = "使用顯示資訊 ID"
L["Use Full Scan (High CPU)"] = "使用完整掃描 (高 CPU)"
L["Use nth value from tooltip:"] = "使用滑鼠提示中的第 N 個值:"
L["Use SetTransform"] = "使用 SetTransform"
L["Use tooltip \"size\" instead of stacks"] = "使用滑鼠提示的 \"大小\" 而不是堆疊"
L["Use Tooltip Information"] = "使用滑鼠提示中的資訊"
L["Used in Auras:"] = "使用的提醒效果:"
L["Used in auras:"] = "用於光環:"
L["Value %i"] = "數值 %i"
L["Values are in normalized rgba format."] = "數值為標準化的 rgba 格式。"
L["Values:"] = "數值:"
L["Version: "] = "版本: "
L["Vertical Align"] = "垂直對齊"
L["Vertical Bar"] = "垂直進度條"
L["View"] = "檢視"
L["Wago Update"] = "Wago 更新"
L["Whole Area"] = "整個區域"
L["Width"] = "寬度"
L["wrapping"] = "自動換行"
L["X Offset"] = "水平位置"
L["X Rotation"] = "水平旋轉"
L["X Scale"] = "水平縮放"
L["X-Offset"] = "水平位置"
L["Y Offset"] = "垂直位置"
L["Y Rotation"] = "垂直旋轉"
L["Y Scale"] = "垂直縮放"
L["Yellow Rune"] = "黃色符文"
L["Yes"] = "是的"
L["Y-Offset"] = "垂直位置"
L["You are about to delete %d aura(s). |cFFFF0000This cannot be undone!|r Would you like to continue?"] = "你正準備要刪除 %d 個提醒效果,刪除後將|cFFFF0000無法還原!|r 請問是否要繼續?"
L["Z Offset"] = "Z軸位置"
L["Z Rotation"] = "Z軸旋轉"
L["Zoom"] = "縮放"
L["Zoom In"] = "放大"
L["Zoom Out"] = "縮小"
@@ -0,0 +1,123 @@
if not WeakAuras.IsCorrectVersion() then return end
-- Lua APIs
local pairs = pairs
-- WoW APIs
local CreateFrame = CreateFrame
local AceGUI = LibStub("AceGUI-3.0")
local SharedMedia = LibStub("LibSharedMedia-3.0")
local IndentationLib = IndentationLib
local WeakAuras = WeakAuras
local L = WeakAuras.L
local codeReview
local tableColor = "|c00ff3333"
local arithmeticColor = "|c00ff3333"
local relationColor = "|c00ff3333"
local logicColor = "|c004444ff"
local colorScheme = {
[IndentationLib.tokens.TOKEN_SPECIAL] = "|c00ff3333",
[IndentationLib.tokens.TOKEN_KEYWORD] = "|c004444ff",
[IndentationLib.tokens.TOKEN_COMMENT_SHORT] = "|c0000aa00",
[IndentationLib.tokens.TOKEN_COMMENT_LONG] = "|c0000aa00",
[IndentationLib.tokens.TOKEN_NUMBER] = "|c00ff9900",
[IndentationLib.tokens.TOKEN_STRING] = "|c00999999",
-- ellipsis, curly braces, table acces
["..."] = tableColor,
["{"] = tableColor,
["}"] = tableColor,
["["] = tableColor,
["]"] = tableColor,
-- arithmetic operators
["+"] = arithmeticColor,
["-"] = arithmeticColor,
["/"] = arithmeticColor,
["*"] = arithmeticColor,
[".."] = arithmeticColor,
-- relational operators
["=="] = relationColor,
["<"] = relationColor,
["<="] = relationColor,
[">"] = relationColor,
[">="] = relationColor,
["~="] = relationColor,
-- logical operators
["and"] = logicColor,
["or"] = logicColor,
["not"] = logicColor,
-- misc
[0] = "|r",
}
local function ConstructCodeReview(frame)
local group = AceGUI:Create("InlineGroup");
group.frame:SetParent(frame);
group.frame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -17, 30);
group.frame:SetPoint("TOPLEFT", frame, "TOPLEFT", 17, -10);
group.frame:Hide();
group:SetLayout("flow");
local codeTree = AceGUI:Create("TreeGroup");
group.codeTree = codeTree;
group:SetLayout("fill");
group:AddChild(codeTree);
local codebox = AceGUI:Create("MultiLineEditBox");
codebox.frame:SetAllPoints(codeTree.content);
codebox.frame:SetFrameStrata("FULLSCREEN");
codebox:SetLabel("");
group:AddChild(codebox);
codebox.button:Hide();
IndentationLib.enable(codebox.editBox, colorScheme, 4);
local fontPath = SharedMedia:Fetch("font", "Fira Mono Medium");
if(fontPath) then
codebox.editBox:SetFont(fontPath, 12);
end
group.codebox = codebox;
codeTree:SetCallback("OnGroupSelected", function(self, event, value)
for _, v in pairs(group.data) do
if (v.value == value) then
codebox:SetText(v.code);
end
end
end);
local cancel = CreateFrame("Button", nil, group.frame, "UIPanelButtonTemplate");
cancel:SetScript("OnClick", function() group:Close() end);
cancel:SetPoint("bottomright", frame, "bottomright", -27, 11);
cancel:SetHeight(20);
cancel:SetWidth(100);
cancel:SetText(L["Okay"]);
function group.Open(self, data)
if frame.window == "codereview" then
return
end
self.data = data;
self.codeTree:SetTree(data);
WeakAuras.ShowOptions();
frame.window = "codereview";
frame:UpdateFrameVisible()
end
function group.Close()
frame.window = "default";
frame:UpdateFrameVisible()
end
return group
end
function WeakAuras.CodeReview(frame)
codeReview = codeReview or ConstructCodeReview(frame)
return codeReview
end
@@ -0,0 +1,99 @@
if not WeakAuras.IsCorrectVersion() then return end
-- Lua APIs
local pairs = pairs
-- WoW APIs
local CreateFrame, IsMouseButtonDown, SetCursor, GetMouseFocus, MouseIsOver, ResetCursor
= CreateFrame, IsMouseButtonDown, SetCursor, GetMouseFocus, MouseIsOver, ResetCursor
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local WeakAuras = WeakAuras
local L = WeakAuras.L
local valueFromPath = WeakAuras.ValueFromPath
local valueToPath = WeakAuras.ValueToPath
local frameChooserFrame
local frameChooserBox
local oldFocus
local oldFocusName
function WeakAuras.StartFrameChooser(data, path)
local frame = WeakAuras.OptionsFrame();
if not(frameChooserFrame) then
frameChooserFrame = CreateFrame("frame");
frameChooserBox = CreateFrame("frame", nil, frameChooserFrame);
frameChooserBox:SetFrameStrata("TOOLTIP");
frameChooserBox:SetBackdrop({
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
edgeSize = 12,
insets = {left = 0, right = 0, top = 0, bottom = 0}
});
frameChooserBox:SetBackdropBorderColor(0, 1, 0);
frameChooserBox:Hide();
end
local givenValue = valueFromPath(data, path);
frameChooserFrame:SetScript("OnUpdate", function()
if(IsMouseButtonDown("RightButton")) then
valueToPath(data, path, givenValue);
AceConfigDialog:Open("WeakAuras", frame.container);
WeakAuras.StopFrameChooser(data);
elseif(IsMouseButtonDown("LeftButton") and oldFocusName) then
WeakAuras.StopFrameChooser(data);
else
SetCursor("CAST_CURSOR");
local focus = GetMouseFocus();
local focusName;
if(focus) then
focusName = focus:GetName();
if(focusName == "WorldFrame" or not focusName) then
focusName = nil;
local focusIsGroup = false;
for id, regionData in pairs(WeakAuras.regions) do
if(regionData.region:IsVisible() and MouseIsOver(regionData.region)) then
local isGroup = regionData.regionType == "group" or regionData.regionType == "dynamicgroup";
if (not focusName or (not isGroup and focusIsGroup)) then
focus = regionData.region;
focusName = "WeakAuras:"..id;
focusIsGroup = focusIsGroup;
end
end
end
end
if(focus ~= oldFocus) then
if(focusName) then
frameChooserBox:SetPoint("bottomleft", focus, "bottomleft", -4, -4);
frameChooserBox:SetPoint("topright", focus, "topright", 4, 4);
frameChooserBox:Show();
end
if(focusName ~= oldFocusName) then
valueToPath(data, path, focusName);
oldFocusName = focusName;
AceConfigDialog:Open("WeakAuras", frame.container);
end
oldFocus = focus;
end
end
if not(focusName) then
frameChooserBox:Hide();
end
end
end);
end
function WeakAuras.StopFrameChooser(data)
if(frameChooserFrame) then
frameChooserFrame:SetScript("OnUpdate", nil);
frameChooserBox:Hide();
end
ResetCursor();
WeakAuras.Add(data);
end
@@ -0,0 +1,199 @@
if not WeakAuras.IsCorrectVersion() then return end
-- Lua APIs
local pairs = pairs
-- WoW APIs
local CreateFrame, GetSpellInfo = CreateFrame, GetSpellInfo
local AceGUI = LibStub("AceGUI-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local WeakAuras = WeakAuras
local L = WeakAuras.L
local iconPicker
local spellCache = WeakAuras.spellCache
local function ConstructIconPicker(frame)
local group = AceGUI:Create("InlineGroup");
group.frame:SetParent(frame);
group.frame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -17, 30); -- 12
group.frame:SetPoint("TOPLEFT", frame, "TOPLEFT", 17, -50);
group.frame:Hide();
group:SetLayout("flow");
local scroll = AceGUI:Create("ScrollFrame");
scroll:SetLayout("flow");
--scroll.frame:SetClipsChildren(true);
group:AddChild(scroll);
local function iconPickerFill(subname, doSort)
scroll:ReleaseChildren();
local distances = {};
local names = {};
-- Work around special numbers such as inf and nan
if (tonumber(subname)) then
local spellId = tonumber(subname);
if (abs(spellId) < math.huge and tostring(spellId) ~= "nan") then
subname = GetSpellInfo(spellId or 0)
end
end
if subname then
subname = subname:lower();
end
local usedIcons = {};
local num = 0;
if(subname and subname ~= "") then
for name, icons in pairs(spellCache.Get()) do
local bestDistance = math.huge;
local bestName;
if(name:lower():find(subname, 1, true)) then
for spellId, icon in pairs(icons) do
if (not usedIcons[icon]) then
local button = AceGUI:Create("WeakAurasIconButton");
button:SetName(name);
button:SetTexture(icon);
button:SetClick(function()
group:Pick(icon);
end);
scroll:AddChild(button);
usedIcons[icon] = true;
num = num + 1;
if(num >= 500) then
break;
end
end
end
end
if(num >= 500) then
break;
end
end
end
end
local input = CreateFrame("EDITBOX", nil, group.frame, "InputBoxTemplate");
input:SetScript("OnTextChanged", function(...) iconPickerFill(input:GetText(), false); end);
input:SetScript("OnEnterPressed", function(...) iconPickerFill(input:GetText(), true); end);
input:SetScript("OnEscapePressed", function(...) input:SetText(""); iconPickerFill(input:GetText(), true); end);
input:SetWidth(170);
input:SetHeight(15);
input:SetPoint("BOTTOMRIGHT", group.frame, "TOPRIGHT", -12, -5);
WeakAuras.input = input;
local inputLabel = input:CreateFontString(nil, "OVERLAY", "GameFontNormal");
inputLabel:SetText(L["Search"]);
inputLabel:SetJustifyH("RIGHT");
inputLabel:SetPoint("BOTTOMLEFT", input, "TOPLEFT", 0, 5);
local icon = AceGUI:Create("WeakAurasIconButton");
icon.frame:Disable();
icon.frame:SetParent(group.frame);
icon.frame:SetPoint("BOTTOMLEFT", group.frame, "TOPLEFT", 15, -15);
local iconLabel = input:CreateFontString(nil, "OVERLAY", "GameFontNormalHuge");
iconLabel:SetNonSpaceWrap("true");
iconLabel:SetJustifyH("LEFT");
iconLabel:SetPoint("LEFT", icon.frame, "RIGHT", 5, 0);
iconLabel:SetPoint("RIGHT", input, "LEFT", -50, 0);
function group.Pick(self, texturePath)
if(not self.groupIcon and self.data.controlledChildren) then
for index, childId in pairs(self.data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
if(childData) then
childData[self.field] = texturePath;
WeakAuras.Add(childData);
WeakAuras.UpdateThumbnail(childData);
WeakAuras.SetIconNames(childData);
end
end
else
self.data[self.field] = texturePath;
WeakAuras.Add(self.data);
WeakAuras.UpdateThumbnail(self.data);
WeakAuras.SetIconNames(self.data);
end
local success = icon:SetTexture(texturePath) and texturePath;
if(success) then
iconLabel:SetText(texturePath);
else
iconLabel:SetText();
end
end
function group.Open(self, data, field, groupIcon)
self.data = data;
self.field = field;
self.groupIcon = groupIcon
if(not groupIcon and data.controlledChildren) then
self.givenPath = {};
for index, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
if(childData) then
self.givenPath[childId] = childData[field];
end
end
else
self.givenPath = self.data[self.field];
end
-- group:Pick(self.givenPath);
frame.window = "icon";
frame:UpdateFrameVisible()
input:SetText("");
end
function group.Close()
frame.window = "default";
frame:UpdateFrameVisible()
AceConfigDialog:Open("WeakAuras", frame.container);
end
function group.CancelClose()
if(not group.groupIcon and group.data.controlledChildren) then
for index, childId in pairs(group.data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
if(childData) then
childData[group.field] = group.givenPath[childId] or childData[group.field];
WeakAuras.Add(childData);
WeakAuras.UpdateThumbnail(childData);
WeakAuras.SetIconNames(childData);
end
end
else
group:Pick(group.givenPath);
end
group.Close();
end
local cancel = CreateFrame("Button", nil, group.frame, "UIPanelButtonTemplate");
cancel:SetScript("OnClick", group.CancelClose);
cancel:SetPoint("bottomright", frame, "bottomright", -27, 11);
cancel:SetHeight(20);
cancel:SetWidth(100);
cancel:SetText(L["Cancel"]);
local close = CreateFrame("Button", nil, group.frame, "UIPanelButtonTemplate");
close:SetScript("OnClick", group.Close);
close:SetPoint("RIGHT", cancel, "LEFT", -10, 0);
close:SetHeight(20);
close:SetWidth(100);
close:SetText(L["Okay"]);
scroll.frame:SetPoint("BOTTOM", close, "TOP", 0, 10);
return group
end
function WeakAuras.IconPicker(frame)
iconPicker = iconPicker or ConstructIconPicker(frame)
return iconPicker
end
@@ -0,0 +1,96 @@
if not WeakAuras.IsCorrectVersion() then return end
-- Lua APIs
local strtrim, strsub = strtrim, strsub
-- WoW APIs
local GetTime, CreateFrame = GetTime, CreateFrame
local AceGUI = LibStub("AceGUI-3.0")
local WeakAuras = WeakAuras
local L = WeakAuras.L
local importexport
local function ConstructImportExport(frame)
local group = AceGUI:Create("InlineGroup");
group.frame:SetParent(frame);
group.frame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -17, 12);
group.frame:SetPoint("TOPLEFT", frame, "TOPLEFT", 17, -10);
group.frame:Hide();
group:SetLayout("fill");
local input = AceGUI:Create("MultiLineEditBox");
input:SetWidth(400);
input.button:Hide();
--input.frame:SetClipsChildren(true);
group:AddChild(input);
local close = CreateFrame("Button", nil, group.frame, "UIPanelButtonTemplate");
close:SetScript("OnClick", function() group:Close() end);
close:SetPoint("BOTTOMRIGHT", -27, 13);
close:SetFrameLevel(close:GetFrameLevel() + 1)
close:SetHeight(20);
close:SetWidth(100);
close:SetText(L["Done"])
function group.Open(self, mode, id)
if(frame.window == "texture") then
frame.texturePicker:CancelClose();
elseif(frame.window == "icon") then
frame.iconPicker:CancelClose();
elseif(frame.window == "model") then
frame.modelPicker:CancelClose();
end
frame.window = "importexport";
frame:UpdateFrameVisible()
if(mode == "export" or mode == "table") then
if(id) then
local displayStr;
if(mode == "export") then
displayStr = WeakAuras.DisplayToString(id, true);
elseif(mode == "table") then
displayStr = WeakAuras.DataToString(id);
end
input.editBox:SetMaxBytes(nil);
input.editBox:SetScript("OnEscapePressed", function() group:Close(); end);
input.editBox:SetScript("OnChar", function() input:SetText(displayStr); input.editBox:HighlightText(); end);
input.editBox:SetScript("OnMouseUp", function() input.editBox:HighlightText(); end);
input:SetLabel(id.." - "..#displayStr);
input.button:Hide();
input:SetText(displayStr);
input.editBox:HighlightText();
input:SetFocus();
end
elseif(mode == "import") then
input.editBox:SetScript("OnEscapePressed", function()
importexport:Close()
end)
input.editBox:SetScript("OnChar", nil)
input.editBox:SetScript("OnMouseUp", nil)
input.editBox:SetScript("OnTextChanged", function()
local str = input:GetText()
input:SetLabel(""..#str)
if #str > 20 then
WeakAuras.Import(str)
end
end)
input:SetText("")
input:SetFocus();
end
end
function group.Close(self)
input:ClearFocus();
frame.window = "default";
frame:UpdateFrameVisible()
end
return group
end
function WeakAuras.ImportExport(frame)
importexport = importexport or ConstructImportExport(frame)
return importexport
end
@@ -0,0 +1,212 @@
if not WeakAuras.IsCorrectVersion() then return end
-- Lua APIs
local pairs, rad = pairs, rad
-- WoW APIs
local CreateFrame = CreateFrame
local AceGUI = LibStub("AceGUI-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local WeakAuras = WeakAuras
local L = WeakAuras.L
local modelPicker
local function ConstructModelPicker(frame)
local group = AceGUI:Create("InlineGroup");
group.frame:SetParent(frame);
group.frame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -17, 87);
group.frame:SetPoint("TOPLEFT", frame, "TOPLEFT", 17, -10);
group.frame:Hide();
group:SetLayout("flow");
local modelPickerZ = AceGUI:Create("Slider");
modelPickerZ:SetSliderValues(-20, 20, 0.05);
modelPickerZ:SetLabel(L["Z Offset"]);
modelPickerZ.frame:SetParent(group.frame);
modelPickerZ:SetCallback("OnValueChanged", function()
group:Pick(nil, modelPickerZ:GetValue());
end);
local modelPickerX = AceGUI:Create("Slider");
modelPickerX:SetSliderValues(-20, 20, 0.05);
modelPickerX:SetLabel(L["X Offset"]);
modelPickerX.frame:SetParent(group.frame);
modelPickerX:SetCallback("OnValueChanged", function()
group:Pick(nil, nil, modelPickerX:GetValue());
end);
local modelPickerY = AceGUI:Create("Slider");
modelPickerY:SetSliderValues(-20, 20, 0.05);
modelPickerY:SetLabel(L["Y Offset"]);
modelPickerY.frame:SetParent(group.frame);
modelPickerY:SetCallback("OnValueChanged", function()
group:Pick(nil, nil, nil, modelPickerY:GetValue());
end);
local modelTree = AceGUI:Create("WeakAurasTreeGroup");
group.modelTree = modelTree;
group.frame:SetScript("OnUpdate", function()
local frameWidth = frame:GetWidth();
local sliderWidth = (frameWidth - 50) / 3;
local narrowSliderWidth = (frameWidth - 50) / 7;
modelTree:SetTreeWidth(frameWidth - 370);
modelPickerZ.frame:SetPoint("bottomleft", frame, "bottomleft", 15, 43);
modelPickerZ.frame:SetPoint("bottomright", frame, "bottomleft", 15 + sliderWidth, 43);
modelPickerX.frame:SetPoint("bottomleft", frame, "bottomleft", 25 + sliderWidth, 43);
modelPickerX.frame:SetPoint("bottomright", frame, "bottomleft", 25 + (2 * sliderWidth), 43);
modelPickerY.frame:SetPoint("bottomleft", frame, "bottomleft", 35 + (2 * sliderWidth), 43);
modelPickerY.frame:SetPoint("bottomright", frame, "bottomleft", 35 + (3 * sliderWidth), 43);
end);
group:SetLayout("fill");
modelTree:SetTree(WeakAuras.ModelPaths);
modelTree:SetCallback("OnGroupSelected", function(self, event, value, fileId)
local path = string.gsub(value, "\001", "/");
if(string.lower(string.sub(path, -3, -1)) == ".m2") then
group:Pick(path, fileId);
end
end);
group:AddChild(modelTree);
local model = CreateFrame("PlayerModel", nil, group.content);
model:SetAllPoints(modelTree.content);
model:SetFrameStrata("FULLSCREEN");
group.model = model;
function group.Pick(self, model_path, model_z, model_x, model_y)
model_path = model_path or self.data.model_path;
model_z = model_z or self.data.model_z;
model_x = model_x or self.data.model_x;
model_y = model_y or self.data.model_y;
WeakAuras.SetModel(self.model, model_path)
self.model:SetPosition(model_z, model_x, model_y);
self.model:SetFacing(rad(self.data.rotation));
if(not self.parentData and self.data.controlledChildren) then
for index, childId in pairs(self.data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
if(childData) then
childData.model_path = model_path;
childData.model_z = model_z;
childData.model_x = model_x;
childData.model_y = model_y;
WeakAuras.Add(childData);
WeakAuras.UpdateThumbnail(childData);
WeakAuras.SetIconNames(childData);
end
end
else
self.data.model_path = model_path;
self.data.model_z = model_z;
self.data.model_x = model_x;
self.data.model_y = model_y;
if self.parentData then
WeakAuras.Add(self.parentData)
else
WeakAuras.Add(self.data);
WeakAuras.UpdateThumbnail(self.data);
WeakAuras.SetIconNames(self.data);
end
end
end
function group.Open(self, data, parentData)
self.data = data;
self.parentData = parentData
WeakAuras.SetModel(self.model, data.model_path)
self.model:SetPosition(data.model_z, data.model_x, data.model_y);
self.model:SetFacing(rad(data.rotation));
modelPickerZ:SetValue(data.model_z);
modelPickerZ.editbox:SetText(("%.2f"):format(data.model_z));
modelPickerX:SetValue(data.model_x);
modelPickerX.editbox:SetText(("%.2f"):format(data.model_x));
modelPickerY:SetValue(data.model_y);
modelPickerY.editbox:SetText(("%.2f"):format(data.model_y));
modelPickerZ.frame:Show();
modelPickerY.frame:Show();
modelPickerX.frame:Show();
if(not parentData and data.controlledChildren) then
self.givenModel = {};
self.givenZ = {};
self.givenX = {};
self.givenY = {};
for index, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
if(childData) then
self.givenModel[childId] = childData.model_path;
self.givenZ[childId] = childData.model_z;
self.givenX[childId] = childData.model_x;
self.givenY[childId] = childData.model_y;
end
end
else
self.givenModel = data.model_path;
self.givenZ = data.model_z;
self.givenX = data.model_x;
self.givenY = data.model_y;
end
frame.window = "model";
frame:UpdateFrameVisible()
end
function group.Close()
frame.window = "default"
frame:UpdateFrameVisible()
AceConfigDialog:Open("WeakAuras", frame.container);
end
function group.CancelClose(self)
if(not group.parentData and group.data.controlledChildren) then
for index, childId in pairs(group.data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
if(childData) then
childData.model_path = group.givenModel[childId];
childData.model_z = group.givenZ[childId];
childData.model_x = group.givenX[childId];
childData.model_y = group.givenY[childId];
WeakAuras.Add(childData);
WeakAuras.UpdateThumbnail(childData);
WeakAuras.SetIconNames(childData);
end
end
else
group:Pick(group.givenPath, group.givenZ, group.givenX, group.givenY);
end
group.Close();
end
local cancel = CreateFrame("Button", nil, group.frame, "UIPanelButtonTemplate");
cancel:SetScript("OnClick", group.CancelClose);
cancel:SetPoint("bottomright", frame, "bottomright", -27, 16);
cancel:SetHeight(20);
cancel:SetWidth(100);
cancel:SetText(L["Cancel"]);
local close = CreateFrame("Button", nil, group.frame, "UIPanelButtonTemplate");
close:SetScript("OnClick", group.Close);
close:SetPoint("RIGHT", cancel, "LEFT", -10, 0);
close:SetHeight(20);
close:SetWidth(100);
close:SetText(L["Okay"]);
return group
end
function WeakAuras.ModelPicker(frame)
modelPicker = modelPicker or ConstructModelPicker(frame)
return modelPicker
end
@@ -0,0 +1,975 @@
if not WeakAuras.IsCorrectVersion() then return end
-- Lua APIs
local pairs = pairs
-- WoW APIs
local IsShiftKeyDown, CreateFrame = IsShiftKeyDown, CreateFrame
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local WeakAuras = WeakAuras
local moversizer
local mover
local savedVars = WeakAuras.savedVars
local function EnsureTexture(self, texture)
if texture then
return texture
else
local ret = self:CreateTexture()
ret:SetTexture("Interface\\GLUES\\CharacterSelect\\Glues-AddOn-Icons.blp")
ret:SetWidth(16)
ret:SetHeight(16)
ret:SetTexCoord(0, 0.25, 0, 1)
ret:SetVertexColor(1, 1, 1, 0.25)
return ret
end
end
local function moveOnePxl(direction)
if mover and mover.moving then
local data = mover.moving.data
if data then
if direction == "top" then
data.yOffset = data.yOffset + 1
elseif direction == "bottom" then
data.yOffset = data.yOffset - 1
elseif direction == "left" then
data.xOffset = data.xOffset - 1
elseif direction == "right" then
data.xOffset = data.xOffset + 1
end
WeakAuras.Add(data, nil, true)
WeakAuras.UpdateThumbnail(data)
WeakAuras.ResetMoverSizer()
if data.parent then
local parentData = WeakAuras.GetData(data.parent)
if parentData then
WeakAuras.Add(parentData)
end
end
WeakAuras.ReloadOptions(data.id)
end
end
end
local function ConstructMover(frame)
local topAndBottom = CreateFrame("Frame", nil, frame)
topAndBottom:SetClampedToScreen(true)
topAndBottom:SetSize(25, 45)
topAndBottom:SetPoint("LEFT", frame, "RIGHT", 1, 0)
local top = CreateFrame("BUTTON", nil, topAndBottom)
top:SetSize(25, 25)
top:SetPoint("TOP", topAndBottom)
local bottom = CreateFrame("BUTTON", nil, topAndBottom)
bottom:SetSize(25, 25)
bottom:SetPoint("BOTTOM", topAndBottom)
local leftAndRight = CreateFrame("Frame", nil, frame)
leftAndRight:SetClampedToScreen(true)
leftAndRight:SetSize(45, 25)
leftAndRight:SetPoint("TOP", frame, "BOTTOM", 0, 1)
local left = CreateFrame("BUTTON", nil, leftAndRight)
left:SetSize(25, 25)
left:SetPoint("LEFT", leftAndRight)
local right = CreateFrame("BUTTON", nil, leftAndRight)
right:SetSize(25, 25)
right:SetPoint("RIGHT", leftAndRight)
top:SetNormalTexture("interface\\buttons\\ui-scrollbar-scrollupbutton-up.blp")
top:SetHighlightTexture("interface\\buttons\\ui-scrollbar-scrollupbutton-highlight.blp")
top:SetPushedTexture("interface\\buttons\\ui-scrollbar-scrollupbutton-down.blp")
top:SetScript("OnClick", function() moveOnePxl("top") end)
bottom:SetNormalTexture("interface\\buttons\\ui-scrollbar-scrollupbutton-up.blp")
bottom:GetNormalTexture():SetTexCoord(0, 1, 1, 0)
bottom:SetHighlightTexture("interface\\buttons\\ui-scrollbar-scrollupbutton-highlight.blp")
bottom:GetHighlightTexture():SetTexCoord(0, 1, 1, 0)
bottom:SetPushedTexture("interface\\buttons\\ui-scrollbar-scrollupbutton-down.blp")
bottom:GetPushedTexture():SetTexCoord(0, 1, 1, 0)
bottom:SetScript("OnClick", function() moveOnePxl("bottom") end)
left:SetNormalTexture("interface\\buttons\\ui-scrollbar-scrollupbutton-up.blp")
left:GetNormalTexture():SetRotation(math.pi/2)
left:SetHighlightTexture("interface\\buttons\\ui-scrollbar-scrollupbutton-highlight.blp")
left:GetHighlightTexture():SetRotation(math.pi/2)
left:SetPushedTexture("interface\\buttons\\ui-scrollbar-scrollupbutton-down.blp")
left:GetPushedTexture():SetRotation(math.pi/2)
left:SetScript("OnClick", function() moveOnePxl("left") end)
right:SetNormalTexture("interface\\buttons\\ui-scrollbar-scrollupbutton-up.blp")
right:GetNormalTexture():SetRotation(-math.pi/2)
right:SetHighlightTexture("interface\\buttons\\ui-scrollbar-scrollupbutton-highlight.blp")
right:GetHighlightTexture():SetRotation(-math.pi/2)
right:SetPushedTexture("interface\\buttons\\ui-scrollbar-scrollupbutton-down.blp")
right:GetPushedTexture():SetRotation(-math.pi/2)
right:SetScript("OnClick", function() moveOnePxl("right") end)
--local lineX = frame:CreateLine(nil, "OVERLAY", 7)
local lineX = frame:CreateTexture(nil, "OVERLAY", 7)
lineX:SetSize(2, 2)
lineX:SetTexture(1,1,0)
lineX:SetPoint("BOTTOMLEFT", UIParent)
lineX:SetPoint("BOTTOMRIGHT", UIParent)
lineX:Hide()
--local lineY = frame:CreateLine(nil, "OVERLAY", 7)
local lineY = frame:CreateTexture(nil, "OVERLAY", 7)
lineY:SetSize(2, 2)
lineY:SetTexture(1,1,0)
lineY:SetPoint("TOPLEFT", UIParent)
lineY:SetPoint("BOTTOMLEFT", UIParent)
lineY:Hide()
return lineX, lineY
end
local function ConstructSizer(frame)
-- topright, bottomright, bottomleft, topleft
local topright = CreateFrame("FRAME", nil, frame)
topright:EnableMouse()
topright:SetWidth(16)
topright:SetHeight(16)
topright:SetPoint("TOPRIGHT", frame, "TOPRIGHT")
local texTR1 = topright:CreateTexture(nil, "OVERLAY")
texTR1:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight.blp")
texTR1:SetBlendMode("ADD")
texTR1:SetTexCoord(0.5, 0, 0, 0, 0.5, 1, 0, 1)
texTR1:SetPoint("TOPRIGHT", topright, "TOPRIGHT", -3, -3)
texTR1:SetPoint("BOTTOMLEFT", topright, "BOTTOM")
local texTR2 = topright:CreateTexture(nil, "OVERLAY")
texTR2:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight.blp")
texTR2:SetBlendMode("ADD")
texTR2:SetTexCoord(0, 0, 0, 1, 0.5, 0, 0.5, 1)
texTR2:SetPoint("TOPRIGHT", texTR1, "TOPLEFT")
texTR2:SetPoint("BOTTOMLEFT", topright, "LEFT")
topright.Highlight = function()
texTR1:Show()
texTR2:Show()
end
topright.Clear = function()
texTR1:Hide()
texTR2:Hide()
end
local bottomright = CreateFrame("FRAME", nil, frame)
bottomright:EnableMouse()
bottomright:SetWidth(16)
bottomright:SetHeight(16)
bottomright:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT")
local texBR1 = bottomright:CreateTexture(nil, "OVERLAY")
texBR1:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight.blp")
texBR1:SetBlendMode("ADD")
texBR1:SetTexCoord(1, 0, 0.5, 0, 1, 1, 0.5, 1)
texBR1:SetPoint("BOTTOMRIGHT", bottomright, "BOTTOMRIGHT", -3, 3)
texBR1:SetPoint("TOPLEFT", bottomright, "TOP")
local texBR2 = bottomright:CreateTexture(nil, "OVERLAY")
texBR2:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight.blp")
texBR2:SetBlendMode("ADD")
texBR2:SetTexCoord(0, 0, 0, 1, 0.5, 0, 0.5, 1)
texBR2:SetPoint("BOTTOMRIGHT", texBR1, "BOTTOMLEFT")
texBR2:SetPoint("TOPLEFT", bottomright, "LEFT")
bottomright.Highlight = function()
texBR1:Show()
texBR2:Show()
end
bottomright.Clear = function()
texBR1:Hide()
texBR2:Hide()
end
local bottomleft = CreateFrame("FRAME", nil, frame)
bottomleft:EnableMouse()
bottomleft:SetSize(16, 16)
bottomleft:SetHeight(16)
bottomleft:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT")
local texBL1 = bottomleft:CreateTexture(nil, "OVERLAY")
texBL1:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight.blp")
texBL1:SetBlendMode("ADD")
texBL1:SetTexCoord(1, 0, 0.5, 0, 1, 1, 0.5, 1)
texBL1:SetPoint("BOTTOMLEFT", bottomleft, "BOTTOMLEFT", 3, 3)
texBL1:SetPoint("TOPRIGHT", bottomleft, "TOP")
local texBL2 = bottomleft:CreateTexture(nil, "OVERLAY")
texBL2:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight.blp")
texBL2:SetBlendMode("ADD")
texBL2:SetTexCoord(0.5, 0, 0.5, 1, 1, 0, 1, 1)
texBL2:SetPoint("BOTTOMLEFT", texBL1, "BOTTOMRIGHT")
texBL2:SetPoint("TOPRIGHT", bottomleft, "RIGHT")
bottomleft.Highlight = function()
texBL1:Show()
texBL2:Show()
end
bottomleft.Clear = function()
texBL1:Hide()
texBL2:Hide()
end
local topleft = CreateFrame("FRAME", nil, frame)
topleft:EnableMouse(true)
topleft:SetWidth(16)
topleft:SetHeight(16)
topleft:SetPoint("TOPLEFT", frame, "TOPLEFT")
local texTL1 = topleft:CreateTexture(nil, "OVERLAY")
texTL1:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight.blp")
texTL1:SetBlendMode("ADD")
texTL1:SetTexCoord(0.5, 0, 0, 0, 0.5, 1, 0, 1)
texTL1:SetPoint("TOPLEFT", topleft, "TOPLEFT", 3, -3)
texTL1:SetPoint("BOTTOMRIGHT", topleft, "BOTTOM")
local texTL2 = topleft:CreateTexture(nil, "OVERLAY")
texTL2:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight.blp")
texTL2:SetBlendMode("ADD")
texTL2:SetTexCoord(0.5, 0, 0.5, 1, 1, 0, 1, 1)
texTL2:SetPoint("TOPLEFT", texTL1, "TOPRIGHT")
texTL2:SetPoint("BOTTOMRIGHT", topleft, "RIGHT")
topleft.Highlight = function()
texTL1:Show()
texTL2:Show()
end
topleft.Clear = function()
texTL1:Hide()
texTL2:Hide()
end
-- top, right, bottom, left
local top = CreateFrame("FRAME", nil, frame)
top:EnableMouse(true)
top:SetHeight(8)
top:SetPoint("TOPRIGHT", topright, "TOPLEFT")
top:SetPoint("TOPLEFT", topleft, "TOPRIGHT")
local texT = top:CreateTexture(nil, "OVERLAY")
texT:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight.blp")
texT:SetBlendMode("ADD")
texT:SetPoint("TOPRIGHT", topright, "TOPRIGHT", -3, -3)
texT:SetPoint("BOTTOMLEFT", topleft, "LEFT", 3, 0)
top.Highlight = function()
texT:Show()
end
top.Clear = function()
texT:Hide()
end
local right = CreateFrame("FRAME", nil, frame)
right:EnableMouse(true)
right:SetWidth(8)
right:SetPoint("BOTTOMRIGHT", bottomright, "TOPRIGHT")
right:SetPoint("TOPRIGHT", topright, "BOTTOMRIGHT")
local texR = right:CreateTexture(nil, "OVERLAY")
texR:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight.blp")
texR:SetBlendMode("ADD")
texR:SetPoint("BOTTOMRIGHT", bottomright, "BOTTOMRIGHT", -3, 3)
texR:SetPoint("TOPLEFT", topright, "TOP", 0, -3)
right.Highlight = function()
texR:Show()
end
right.Clear = function()
texR:Hide()
end
local bottom = CreateFrame("FRAME", nil, frame)
bottom:EnableMouse(true)
bottom:SetHeight(8)
bottom:SetPoint("BOTTOMLEFT", bottomleft, "BOTTOMRIGHT")
bottom:SetPoint("BOTTOMRIGHT", bottomright, "BOTTOMLEFT")
local texB = bottom:CreateTexture(nil, "OVERLAY")
texB:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight.blp")
texB:SetBlendMode("ADD")
texB:SetTexCoord(1, 0, 0, 0, 1, 1, 0, 1)
texB:SetPoint("BOTTOMLEFT", bottomleft, "BOTTOMLEFT", 3, 3)
texB:SetPoint("TOPRIGHT", bottomright, "RIGHT", -3, 0)
bottom.Highlight = function()
texB:Show()
end
bottom.Clear = function()
texB:Hide()
end
local left = CreateFrame("FRAME", nil, frame)
left:EnableMouse(true)
left:SetWidth(8)
left:SetPoint("TOPLEFT", topleft, "BOTTOMLEFT")
left:SetPoint("BOTTOMLEFT", bottomleft, "TOPLEFT")
local texL = left:CreateTexture(nil, "OVERLAY")
texL:SetTexture("Interface\\BUTTONS\\UI-Listbox-Highlight.blp")
texL:SetBlendMode("ADD")
texL:SetTexCoord(1, 0, 0, 0, 1, 1, 0, 1)
texL:SetPoint("BOTTOMLEFT", bottomleft, "BOTTOMLEFT", 3, 3)
texL:SetPoint("TOPRIGHT", topleft, "TOP", 0, -3)
left.Highlight = function()
texL:Show()
end
left.Clear = function()
texL:Hide()
end
-- return in cw order
return top, topright, right, bottomright, bottom, bottomleft, left, topleft
end
local function BuildAlignLines(mover)
local data = mover.moving.data
local align = {
x = {},
y = {}
}
local x, y = {}, {}
local skipIds = { [data.id] = true }
if data.controlledChildren then
for _, id in pairs(data.controlledChildren) do
skipIds[id] = true
end
end
for k, v in pairs(WeakAuras.displayButtons) do
local region = v.view.region
if not skipIds[k] and v.view.visibility ~= 0 and region then
local scale = region:GetEffectiveScale() / UIParent:GetEffectiveScale()
if not IsControlKeyDown() then
tinsert(x, (region:GetLeft() or 0) * scale)
tinsert(x, (region:GetRight() or 0) * scale)
tinsert(y, (region:GetTop() or 0) * scale)
tinsert(y, (region:GetBottom() or 0) * scale)
else
local centerX, centerY = region:GetCenter()
tinsert(x, centerX or 0 * scale)
tinsert(y, centerY or 0 * scale)
end
end
end
local midX, midY = UIParent:GetCenter()
tinsert(x, midX)
tinsert(y, midY)
table.sort(x)
table.sort(y)
for index, value in ipairs(x) do
if value ~= x[index+1] then
tinsert(align.x, value)
end
end
for index, value in ipairs(y) do
if value ~= y[index+1] then
tinsert(align.y, value)
end
end
return align
end
local function ConstructMoverSizer(parent)
local frame = CreateFrame("FRAME", nil, parent)
frame:SetBackdrop({
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
edgeSize = 12,
insets = {left = 0, right = 0, top = 0, bottom = 0}
})
frame:EnableMouse()
frame.top, frame.topright, frame.right, frame.bottomright, frame.bottom, frame.bottomleft, frame.left, frame.topleft
= ConstructSizer(frame)
frame.lineX, frame.lineY = ConstructMover(frame)
frame.top.Clear()
frame.topright.Clear()
frame.right.Clear()
frame.bottomright.Clear()
frame.bottom.Clear()
frame.bottomleft.Clear()
frame.left.Clear()
frame.topleft.Clear()
local mover = CreateFrame("FRAME", nil, frame)
mover:RegisterEvent("PLAYER_REGEN_DISABLED")
mover:EnableMouse()
mover.moving = {}
mover.interims = {}
mover.selfPointIcon = mover:CreateTexture()
mover.selfPointIcon:SetTexture("Interface\\GLUES\\CharacterSelect\\Glues-AddOn-Icons.blp")
mover.selfPointIcon:SetWidth(16)
mover.selfPointIcon:SetHeight(16)
mover.selfPointIcon:SetTexCoord(0, 0.25, 0, 1)
mover.anchorPointIcon = mover:CreateTexture()
mover.anchorPointIcon:SetTexture("Interface\\GLUES\\CharacterSelect\\Glues-AddOn-Icons.blp")
mover.anchorPointIcon:SetWidth(16)
mover.anchorPointIcon:SetHeight(16)
mover.anchorPointIcon:SetTexCoord(0, 0.25, 0, 1)
local moverText = mover:CreateFontString(nil, "OVERLAY", "GameFontNormal")
mover.text = moverText
moverText:Hide()
local sizerText = frame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
frame.text = sizerText
sizerText:Hide()
frame.ScaleCorners = function(self, width, height)
local limit = math.min(width, height) + 16
local size = 16
if limit <= 40 then
size = limit * (2/5)
end
frame.bottomleft:SetWidth(size)
frame.bottomleft:SetHeight(size)
frame.bottomright:SetWidth(size)
frame.bottomright:SetHeight(size)
frame.topright:SetWidth(size)
frame.topright:SetHeight(size)
frame.topleft:SetWidth(size)
frame.topleft:SetHeight(size)
end
frame.ReAnchor = function(self)
if mover.moving.region then
self:AnchorPoints(mover.moving.region, mover.moving.data)
end
end
frame.AnchorPoints = function(self, region, data)
local scale = region:GetEffectiveScale() / UIParent:GetEffectiveScale()
if data.regionType == "group" then
mover:SetWidth((region.trx - region.blx) * scale)
mover:SetHeight((region.try - region.bly) * scale)
else
mover:SetWidth(region:GetWidth() * scale)
mover:SetHeight(region:GetHeight() * scale)
end
end
frame.GetCurrentId = function(self)
return self.currentId
end
frame.SetToRegion = function(self, region, data)
frame.currentId = data.id
local scale = region:GetEffectiveScale() / UIParent:GetEffectiveScale()
mover.moving.region = region
mover.moving.data = data
local ok, selfPoint, anchor, anchorPoint, xOff, yOff = pcall(region.GetPoint, region, 1)
if not ok then
return
end
mover.selfPoint, mover.anchor, mover.anchorPoint = selfPoint, anchor, anchorPoint
xOff = xOff or 0
yOff = yOff or 0
mover:ClearAllPoints()
frame:ClearAllPoints()
if data.regionType == "group" then
mover:SetWidth((region.trx - region.blx) * scale)
mover:SetHeight((region.try - region.bly) * scale)
mover:SetPoint(mover.selfPoint or "CENTER", mover.anchor or UIParent, mover.anchorPoint or "CENTER", (xOff + region.blx) * scale, (yOff + region.bly) * scale)
else
mover:SetWidth(region:GetWidth() * scale)
mover:SetHeight(region:GetHeight() * scale)
mover:SetPoint(mover.selfPoint or "CENTER", mover.anchor or UIParent, mover.anchorPoint or "CENTER", xOff * scale, yOff * scale)
end
frame:SetPoint("BOTTOMLEFT", mover, "BOTTOMLEFT", -8, -8)
frame:SetPoint("TOPRIGHT", mover, "TOPRIGHT", 8, 8)
frame:ScaleCorners(region:GetWidth(), region:GetHeight())
local regionStrata = region:GetFrameStrata()
if regionStrata then
local strata = math.min(tIndexOf(WeakAuras.frame_strata_types, regionStrata) + 1, 9)
frame:SetFrameStrata(WeakAuras.frame_strata_types[strata])
mover:SetFrameStrata(WeakAuras.frame_strata_types[strata])
end
local db = savedVars.db
mover.startMoving = function()
WeakAuras.CancelAnimation(region, true, true, true, true, true)
mover:ClearAllPoints()
if data.regionType == "group" then
mover:SetPoint(mover.selfPoint, region, mover.anchorPoint, region.blx * scale, region.bly * scale)
else
mover:SetPoint(mover.selfPoint, region, mover.selfPoint)
end
region:StartMoving()
mover.isMoving = true
mover.text:Show()
-- build list of alignment coordinates
mover.align = BuildAlignLines(mover)
end
mover.doneMoving = function(self, event, key)
if event == "MODIFIER_STATE_CHANGED" then
if key == "LCTRL" or key == "RCTRL" then
mover.align = BuildAlignLines(mover)
end
return
end
if not mover.isMoving then
return
end
region:StopMovingOrSizing()
mover.isMoving = false
mover.text:Hide()
local align = (WeakAurasOptionsSaved.magnetAlign and not IsShiftKeyDown())
or (not WeakAurasOptionsSaved.magnetAlign and IsShiftKeyDown())
if align and (mover.alignXFrom or mover.alignYFrom) then
if mover.alignXFrom == "LEFT" then
local left = region:GetLeft() * scale
local selfPoint, anchor, anchorPoint, xOff, yOff = region:GetPoint(1)
if data.regionType == "group" then
xOff = xOff - region.blx
end
region:ClearAllPoints()
region:SetPoint(selfPoint, anchor, anchorPoint, (xOff * scale - left + mover.alignXOf) / scale, yOff)
elseif mover.alignXFrom == "RIGHT" then
local right = region:GetRight() * scale
local selfPoint, anchor, anchorPoint, xOff, yOff = region:GetPoint(1)
if data.regionType == "group" then
xOff = xOff - region.trx
end
region:ClearAllPoints()
region:SetPoint(selfPoint, anchor, anchorPoint, (xOff * scale - right + mover.alignXOf) / scale, yOff)
elseif mover.alignXFrom == "CENTER" then
local center = region:GetCenter() * scale
local selfPoint, anchor, anchorPoint, xOff, yOff = region:GetPoint(1)
if data.regionType == "group" then
xOff = xOff - region.trx + (region.trx - region.blx) / 2
end
region:ClearAllPoints()
region:SetPoint(selfPoint, anchor, anchorPoint, (xOff * scale - center + mover.alignXOf) / scale, yOff)
end
if mover.alignYFrom == "TOP" then
local top = region:GetTop() * scale
local selfPoint, anchor, anchorPoint, xOff, yOff = region:GetPoint(1)
if data.regionType == "group" then
yOff = yOff - region.try
end
region:ClearAllPoints()
region:SetPoint(selfPoint, anchor, anchorPoint, xOff, (yOff * scale - top + mover.alignYOf) / scale)
elseif mover.alignYFrom == "BOTTOM" then
local bottom = region:GetBottom() * scale
local selfPoint, anchor, anchorPoint, xOff, yOff = region:GetPoint(1)
if data.regionType == "group" then
yOff = yOff - region.bly
end
region:ClearAllPoints()
region:SetPoint(selfPoint, anchor, anchorPoint, xOff, (yOff * scale - bottom + mover.alignYOf) / scale)
elseif mover.alignYFrom == "CENTER" then
local _, center = region:GetCenter()
center = center * scale
local selfPoint, anchor, anchorPoint, xOff, yOff = region:GetPoint(1)
if data.regionType == "group" then
yOff = yOff - region.try + (region.try - region.bly) / 2
end
region:ClearAllPoints()
region:SetPoint(selfPoint, anchor, anchorPoint, xOff, (yOff * scale - center + mover.alignYOf) / scale)
end
end
if data.xOffset and data.yOffset then
local selfX, selfY = mover.selfPointIcon:GetCenter()
local anchorX, anchorY = mover.anchorPointIcon:GetCenter()
local dX = selfX - anchorX
local dY = selfY - anchorY
data.xOffset = dX / scale
data.yOffset = dY / scale
end
region:ResetPosition()
WeakAuras.Add(data, nil, true)
WeakAuras.UpdateThumbnail(data)
local xOff, yOff
mover.selfPoint, mover.anchor, mover.anchorPoint, xOff, yOff = region:GetPoint(1)
mover:ClearAllPoints()
if data.regionType == "group" then
mover:SetWidth((region.trx - region.blx) * scale)
mover:SetHeight((region.try - region.bly) * scale)
mover:SetPoint(mover.selfPoint, mover.anchor, mover.anchorPoint, (xOff + region.blx) * scale, (yOff + region.bly) * scale)
else
mover:SetWidth(region:GetWidth() * scale)
mover:SetHeight(region:GetHeight() * scale)
mover:SetPoint(mover.selfPoint, mover.anchor, mover.anchorPoint, xOff * scale, yOff * scale)
end
if data.parent then
local parentData = db.displays[data.parent]
if parentData then
WeakAuras.Add(parentData)
end
end
AceConfigDialog:Open("WeakAuras", parent.container)
WeakAuras.Animate("display", data, "main", data.animation.main, WeakAuras.regions[data.id].region, false, nil, true)
-- hide alignment lines
frame.lineY:Hide()
frame.lineX:Hide()
end
if data.parent and db.displays[data.parent] and db.displays[data.parent].regionType == "dynamicgroup" then
mover:SetScript("OnMouseDown", nil)
mover:SetScript("OnMouseUp", nil)
mover:SetScript("OnEvent", nil)
mover:SetScript("OnHide", nil)
else
mover:SetScript("OnMouseDown", mover.startMoving)
mover:SetScript("OnMouseUp", mover.doneMoving)
mover:SetScript("OnEvent", mover.doneMoving)
mover:SetScript("OnHide", mover.doneMoving)
mover:RegisterEvent("MODIFIER_STATE_CHANGED")
end
if region:IsResizable() then
frame.startSizing = function(point)
mover.isMoving = true
WeakAuras.CancelAnimation(region, true, true, true, true, true)
local rSelfPoint, rAnchor, rAnchorPoint, rXOffset, rYOffset = region:GetPoint(1)
region:StartSizing(point)
frame.text:ClearAllPoints()
frame.text:SetPoint("CENTER", frame, "CENTER", 0, -15)
frame.text:Show()
mover:ClearAllPoints()
mover:SetAllPoints(region)
frame:SetScript("OnUpdate", function()
frame.text:SetText(("(%.2f, %.2f)"):format(region:GetWidth(), region:GetHeight()))
if data.width and data.height then
if IsControlKeyDown() then
data.width = region:GetWidth()
data.height = region:GetHeight()
else
if point:find("RIGHT") then
data.xOffset = region.xOffset + (region:GetWidth() - data.width) / 2
elseif point:find("LEFT") then
data.xOffset = region.xOffset - (region:GetWidth() - data.width) / 2
end
if point:find("TOP") then
data.yOffset = region.yOffset + (region:GetHeight() - data.height) / 2
elseif point:find("BOTTOM") then
data.yOffset = region.yOffset - (region:GetHeight() - data.height) / 2
end
data.width = region:GetWidth()
data.height = region:GetHeight()
end
end
region:ResetPosition()
WeakAuras.Add(data, nil, true)
frame:ScaleCorners(region:GetWidth(), region:GetHeight())
AceConfigDialog:Open("WeakAuras", parent.container)
end)
mover.align = BuildAlignLines(mover)
mover.sizePoint = point
end
frame.doneSizing = function(point)
mover.isMoving = false
region:StopMovingOrSizing()
local width = region:GetWidth()
local height = region:GetHeight()
local align = (WeakAurasOptionsSaved.magnetAlign and not IsShiftKeyDown())
or (not WeakAurasOptionsSaved.magnetAlign and IsShiftKeyDown())
if not IsControlKeyDown() then
if point:find("RIGHT") then
if mover.alignXFrom and align then
width = math.abs(region:GetLeft() * scale - mover.alignXOf) / scale
end
data.xOffset = region.xOffset + (width - data.width) / 2
elseif point:find("LEFT") then
if mover.alignXFrom and align then
width = math.abs(mover.alignXOf - region:GetRight() * scale) / scale
end
data.xOffset = region.xOffset - (width - data.width) / 2
end
if point:find("TOP") then
if mover.alignYFrom and align then
height = math.abs(region:GetBottom() * scale - mover.alignYOf) / scale
end
data.yOffset = region.yOffset + (height - data.height) / 2
elseif point:find("BOTTOM") then
if mover.alignYFrom and align then
height = math.abs(mover.alignYOf - region:GetTop() * scale) / scale
end
data.yOffset = region.yOffset - (height - data.height) / 2
end
end
data.width = width
data.height = height
region:ResetPosition()
WeakAuras.Add(data, nil, true)
WeakAuras.UpdateThumbnail(data)
frame:ScaleCorners(region:GetWidth(), region:GetHeight())
local xOff, yOff
mover.selfPoint, mover.anchor, mover.anchorPoint, xOff, yOff = region:GetPoint(1)
xOff = xOff or 0
yOff = yOff or 0
mover:ClearAllPoints()
if data.regionType == "group" then
mover:SetWidth((region.trx - region.blx) * scale)
mover:SetHeight((region.try - region.bly) * scale)
mover:SetPoint(mover.selfPoint, mover.anchor, mover.anchorPoint, (xOff + region.blx) * scale, (yOff + region.bly) * scale)
else
mover:SetWidth(region:GetWidth() * scale)
mover:SetHeight(region:GetHeight() * scale)
mover:SetPoint(mover.selfPoint, mover.anchor, mover.anchorPoint, xOff * scale, yOff * scale)
end
frame.text:Hide()
frame:SetScript("OnUpdate", nil)
AceConfigDialog:Open("WeakAuras", parent.container)
WeakAuras.Animate("display", data, "main", data.animation.main, WeakAuras.regions[data.id].region, false, nil, true)
-- hide alignment lines
frame.lineY:Hide()
frame.lineX:Hide()
mover.sizePoint = nil
end
frame.bottomleft:SetScript("OnMouseDown", function() frame.startSizing("BOTTOMLEFT") end)
frame.bottomleft:SetScript("OnMouseUp", function() frame.doneSizing("BOTTOMLEFT") end)
frame.bottomleft:SetScript("OnEnter", frame.bottomleft.Highlight)
frame.bottomleft:SetScript("OnLeave", frame.bottomleft.Clear)
frame.bottom:SetScript("OnMouseDown", function() frame.startSizing("BOTTOM") end)
frame.bottom:SetScript("OnMouseUp", function() frame.doneSizing("BOTTOM") end)
frame.bottom:SetScript("OnEnter", frame.bottom.Highlight)
frame.bottom:SetScript("OnLeave", frame.bottom.Clear)
frame.bottomright:SetScript("OnMouseDown", function() frame.startSizing("BOTTOMRIGHT") end)
frame.bottomright:SetScript("OnMouseUp", function() frame.doneSizing("BOTTOMRIGHT") end)
frame.bottomright:SetScript("OnEnter", frame.bottomright.Highlight)
frame.bottomright:SetScript("OnLeave", frame.bottomright.Clear)
frame.right:SetScript("OnMouseDown", function() frame.startSizing("RIGHT") end)
frame.right:SetScript("OnMouseUp", function() frame.doneSizing("RIGHT") end)
frame.right:SetScript("OnEnter", frame.right.Highlight)
frame.right:SetScript("OnLeave", frame.right.Clear)
frame.topright:SetScript("OnMouseDown", function() frame.startSizing("TOPRIGHT") end)
frame.topright:SetScript("OnMouseUp", function() frame.doneSizing("TOPRIGHT") end)
frame.topright:SetScript("OnEnter", frame.topright.Highlight)
frame.topright:SetScript("OnLeave", frame.topright.Clear)
frame.top:SetScript("OnMouseDown", function() frame.startSizing("TOP") end)
frame.top:SetScript("OnMouseUp", function() frame.doneSizing("TOP") end)
frame.top:SetScript("OnEnter", frame.top.Highlight)
frame.top:SetScript("OnLeave", frame.top.Clear)
frame.topleft:SetScript("OnMouseDown", function() frame.startSizing("TOPLEFT") end)
frame.topleft:SetScript("OnMouseUp", function() frame.doneSizing("TOPLEFT") end)
frame.topleft:SetScript("OnEnter", frame.topleft.Highlight)
frame.topleft:SetScript("OnLeave", frame.topleft.Clear)
frame.left:SetScript("OnMouseDown", function() frame.startSizing("LEFT") end)
frame.left:SetScript("OnMouseUp", function() frame.doneSizing("LEFT") end)
frame.left:SetScript("OnEnter", frame.left.Highlight)
frame.left:SetScript("OnLeave", frame.left.Clear)
frame.bottomleft:Show()
frame.bottom:Show()
frame.bottomright:Show()
frame.right:Show()
frame.topright:Show()
frame.top:Show()
frame.topleft:Show()
frame.left:Show()
else
frame.bottomleft:Hide()
frame.bottom:Hide()
frame.bottomright:Hide()
frame.right:Hide()
frame.topright:Hide()
frame.top:Hide()
frame.topleft:Hide()
frame.left:Hide()
end
mover.alignXFrom = nil
mover.alignYFrom = nil
mover.alignYOf = nil
mover.alignYOf = nil
frame:Show()
end
mover:SetScript("OnUpdate", function(self, elaps)
if not IsShiftKeyDown() then
self.goalAlpha = 1
else
self.goalAlpha = 0.1
end
if self.currentAlpha ~= self.goalAlpha then
self.currentAlpha = self.currentAlpha or self:GetAlpha()
local newAlpha = (self.currentAlpha < self.goalAlpha) and self.currentAlpha + (elaps * 4) or self.currentAlpha - (elaps * 4)
newAlpha = (newAlpha > 1 and 1) or (newAlpha < 0.1 and 0.1) or newAlpha
mover:SetAlpha(newAlpha)
frame:SetAlpha(newAlpha)
self.currentAlpha = newAlpha
end
local align = (WeakAurasOptionsSaved.magnetAlign and not IsShiftKeyDown())
or (not WeakAurasOptionsSaved.magnetAlign and IsShiftKeyDown())
if align then
self.alignGoalAlpha = 1
else
self.alignGoalAlpha = 0.1
end
if self.alignCurrentAlpha ~= self.alignGoalAlpha then
self.alignCurrentAlpha = self.alignCurrentAlpha or self:GetAlpha()
local newAlpha = (self.alignCurrentAlpha < self.alignGoalAlpha) and self.alignCurrentAlpha + (elaps * 4) or self.alignCurrentAlpha - (elaps * 4)
newAlpha = (newAlpha > 1 and 1) or (newAlpha < 0.1 and 0.1) or newAlpha
frame.lineX:SetAlpha(newAlpha)
frame.lineY:SetAlpha(newAlpha)
self.alignCurrentAlpha = newAlpha
end
local db = savedVars.db
local region = self.moving.region
local data = self.moving.data
if not self.isMoving then
self.selfPoint, self.anchor, self.anchorPoint = region:GetPoint(1)
end
self.selfPointIcon:ClearAllPoints()
self.selfPointIcon:SetPoint("CENTER", region, self.selfPoint)
local selfX, selfY = self.selfPointIcon:GetCenter()
selfX, selfY = selfX or 0, selfY or 0
self.anchorPointIcon:ClearAllPoints()
self.anchorPointIcon:SetPoint("CENTER", self.anchor, self.anchorPoint)
local anchorX, anchorY = self.anchorPointIcon:GetCenter()
anchorX, anchorY = anchorX or 0, anchorY or 0
if data.parent and db.displays[data.parent] and db.displays[data.parent].regionType == "dynamicgroup" then
self.selfPointIcon:Hide()
self.anchorPointIcon:Hide()
else
self.selfPointIcon:Show()
self.anchorPointIcon:Show()
end
local dX = selfX - anchorX
local dY = selfY - anchorY
local distance = sqrt(dX^2 + dY^2)
local angle = atan2(dY, dX)
local numInterim = floor(distance/40)
for index, texture in pairs(self.interims) do
texture:Hide()
end
for i = 1, numInterim do
local x = (distance - (i * 40)) * cos(angle)
local y = (distance - (i * 40)) * sin(angle)
self.interims[i] = EnsureTexture(self, self.interims[i])
self.interims[i]:ClearAllPoints()
self.interims[i]:SetPoint("CENTER", self.anchorPointIcon, "CENTER", x, y)
self.interims[i]:Show()
end
local regionScale = self.moving.region:GetScale()
self.text:SetText(("(%.2f, %.2f)"):format(dX*1/regionScale, dY*1/regionScale))
local midx = (distance / 2) * cos(angle)
local midy = (distance / 2) * sin(angle)
self.text:SetPoint("CENTER", self.anchorPointIcon, "CENTER", midx, midy)
local left, right, top, bottom, centerX, centerY = frame:GetLeft(), frame:GetRight(), frame:GetTop(), frame:GetBottom(), frame:GetCenter()
if (midx > 0 and (self.text:GetRight() or 0) > (left or 0))
or (midx < 0 and (self.text:GetLeft() or 0) < (right or 0))
then
if midy > 0 and (self.text:GetTop() or 0) > (top or 0) then
midy = midy - ((self.text:GetTop() or 0) - (bottom or 0))
elseif midy < 0 and (self.text:GetBottom() or 0) < (top or 0) then
midy = midy + ((top or 0) - (self.text:GetBottom() or 0))
end
end
self.text:SetPoint("CENTER", self.anchorPointIcon, "CENTER", midx, midy)
if self.isMoving then
if mover.align then
local ctrlDown = IsControlKeyDown()
local foundX, foundY = false, false
local point = mover.sizePoint
local reverse, start, finish, step
if mover.lastX ~= selfX then
-- if mouse move to the right, take first line found from the right, and match right side of the frame first
reverse = mover.lastX and mover.lastX < selfX -- reverse = mouse move to the right
start = reverse and #mover.align.x or 1
finish = reverse and 1 or #mover.align.x
step = reverse and -1 or 1
for i=start,finish,step do
local v = mover.align.x[i]
if not ctrlDown and (
((left >= v - 5 and left <= v + 5) and (not point or point:find("LEFT")))
or ((right >= v - 5 and right <= v + 5) and (not point or point:find("RIGHT")))
) or (
ctrlDown and centerX >= v - 5 and centerX <= v + 5
)
then
frame.lineY:SetPoint("TOPLEFT", UIParent, v, 0)
frame.lineY:SetPoint("BOTTOMLEFT", UIParent, v, 0)
frame.lineY:Show()
mover.alignXFrom = ctrlDown and "CENTER"
or (reverse and ((right >= v - 5 and right <= v + 5) and "RIGHT" or "LEFT")) -- right side first
or (not reverse and ((left >= v - 5 and left <= v + 5) and "LEFT" or "RIGHT")) -- left side first
mover.alignXOf = v
foundX = true
break
end
end
if not foundX then
mover.alignXFrom = nil
mover.alignXOf = nil
frame.lineY:Hide()
end
end
if mover.lastY ~= selfY then
-- if mouse move to the top, take first line found from the top, and match top side of the frame first
reverse = mover.lastY and mover.lastY < selfY
start = reverse and #mover.align.y or 1
finish = reverse and 1 or #mover.align.y
step = reverse and -1 or 1
for i=start,finish,step do
local v = mover.align.y[i]
if not ctrlDown and (
((top >= v - 5 and top <= v + 5) and (not point or point:find("TOP")))
or ((bottom >= v - 5 and bottom <= v + 5) and (not point or point:find("BOTTOM")))
) or (
ctrlDown and centerY >= v - 5 and centerY <= v + 5
)
then
frame.lineX:SetPoint("BOTTOMLEFT", UIParent, 0, v)
frame.lineX:SetPoint("BOTTOMRIGHT", UIParent, 0, v)
frame.lineX:Show()
mover.alignYFrom = ctrlDown and "CENTER" or (top >= v - 5 and top <= v + 5) and "TOP" or "BOTTOM"
or (reverse and ((top >= v - 5 and top <= v + 5) and "TOP" or "BOTTOM")) -- top side first
or (not reverse and ((bottom >= v - 5 and bottom <= v + 5) and "BOTTOM" or "TOP")) -- bottom side first
mover.alignYOf = v
foundY = true
break
end
end
if not foundY then
mover.alignYFrom = nil
mover.alignYOf = nil
frame.lineX:Hide()
end
end
mover.lastX, mover.lastY = selfX, selfY
end
end
end)
return frame, mover
end
function WeakAuras.MoverSizer(parent)
if not moversizer or not mover then
moversizer, mover = ConstructMoverSizer(parent)
end
return moversizer, mover
end
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,788 @@
if not WeakAuras.IsCorrectVersion() then
return
end
-- Lua APIs
local pairs, type, ipairs = pairs, type, ipairs
local loadstring = loadstring
-- WoW APIs
local CreateFrame = CreateFrame
local AceGUI = LibStub("AceGUI-3.0")
local SharedMedia = LibStub("LibSharedMedia-3.0")
local IndentationLib = IndentationLib
local WeakAuras = WeakAuras
local L = WeakAuras.L
local textEditor
local valueFromPath = WeakAuras.ValueFromPath
local valueToPath = WeakAuras.ValueToPath
local editor_themes = {
["Standard"] = {
["Table"] = "|c00ff3333",
["Arithmetic"] = "|c00ff3333",
["Relational"] = "|c00ff3333",
["Logical"] = "|c004444ff",
["Special"] = "|c00ff3333",
["Keyword"] = "|c004444ff",
["Comment"] = "|c0000aa00",
["Number"] = "|c00ff9900",
["String"] = "|c00999999"
},
["Monokai"] = {
["Table"] = "|c00ffffff",
["Arithmetic"] = "|c00f92672",
["Relational"] = "|c00ff3333",
["Logical"] = "|c00f92672",
["Special"] = "|c0066d9ef",
["Keyword"] = "|c00f92672",
["Comment"] = "|c0075715e",
["Number"] = "|c00ae81ff",
["String"] = "|c00e6db74"
},
["Obsidian"] = {
["Table"] = "|c00AFC0E5",
["Arithmetic"] = "|c00E0E2E4",
["Relational"] = "|c00B3B689",
["Logical"] = "|c0093C763",
["Special"] = "|c00AFC0E5",
["Keyword"] = "|c0093C763",
["Comment"] = "|c0066747B",
["Number"] = "|c00FFCD22",
["String"] = "|c00EC7600"
}
}
local color_scheme = {[0] = "|r"}
local function set_scheme()
if not WeakAurasSaved.editor_theme then
WeakAurasSaved.editor_theme = "Monokai"
end
local theme = editor_themes[WeakAurasSaved.editor_theme]
color_scheme[IndentationLib.tokens.TOKEN_SPECIAL] = theme["Special"]
color_scheme[IndentationLib.tokens.TOKEN_KEYWORD] = theme["Keyword"]
color_scheme[IndentationLib.tokens.TOKEN_COMMENT_SHORT] = theme["Comment"]
color_scheme[IndentationLib.tokens.TOKEN_COMMENT_LONG] = theme["Comment"]
color_scheme[IndentationLib.tokens.TOKEN_NUMBER] = theme["Number"]
color_scheme[IndentationLib.tokens.TOKEN_STRING] = theme["String"]
color_scheme["..."] = theme["Table"]
color_scheme["{"] = theme["Table"]
color_scheme["}"] = theme["Table"]
color_scheme["["] = theme["Table"]
color_scheme["]"] = theme["Table"]
color_scheme["+"] = theme["Arithmetic"]
color_scheme["-"] = theme["Arithmetic"]
color_scheme["/"] = theme["Arithmetic"]
color_scheme["*"] = theme["Arithmetic"]
color_scheme[".."] = theme["Arithmetic"]
color_scheme["=="] = theme["Relational"]
color_scheme["<"] = theme["Relational"]
color_scheme["<="] = theme["Relational"]
color_scheme[">"] = theme["Relational"]
color_scheme[">="] = theme["Relational"]
color_scheme["~="] = theme["Relational"]
color_scheme["and"] = theme["Logical"]
color_scheme["or"] = theme["Logical"]
color_scheme["not"] = theme["Logical"]
end
-- Define the premade snippets
local premadeSnippets = {
{
name = "Basic function",
snippet = [=[
function()
return
end]=]
},
{
name = "Custom Activation",
snippet = [=[
function(trigger)
return trigger[1] and (trigger[2] or trigger[3])
end]=]
},
{
name = "Trigger: CLEU",
snippet = [=[
function(event, timestamp, subEvent, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags, ...)
return
end]=]
},
{
name = "Simple throttle",
snippet = [=[
if not aura_env.last or aura_env.last < GetTime() - 1 then
aura_env.last = GetTime()
end]=]
},
{
name = "Trigger State Updater",
snippet = [=[
function(allstates, event, ...)
allstates[""] = {
show = true,
changed = true,
progressType = "static"||"timed",
value = ,
total = ,
duration = ,
expirationTime = ,
autoHide = true,
name = ,
icon = ,
stacks = ,
index = ,
}
return true
end]=]
},
{
name = "Text: Decimals (percentage)",
snippet = [=[
function()
-- Change percentpower as needed
-- Change [1] to other your trigger number
-- The 0 in `"%.0f"` controls how many decimal places it will round to
if aura_env.states[1] and aura_env.states[1].percentpower then
return string.format("%.0f", aura_env.states[1].percentpower)
end
end]=]
},
{
name = "Text: Abbreviate numbers",
snippet = [=[
function()
-- Change tooltip1 to your value
-- Change [1] to other your trigger number
-- If using a tooltip value, be sure to tick Use Tooltip Values in the trigger
if aura_env.states[1] and aura_env.states[1].tooltip1 then
return AbbreviateNumbers(aura_env.states[1].tooltip1)
end
end]=]
},
{
name = "Text: Colored Name",
snippet = [=[
function()
if aura_env.states[1] and aura_env.states[1].unit then
return WA_ClassColorName(aura_env.states[1].unit)
end
end]=]
},
}
local function settings_dropdown_initialize(frame, level, menu)
for k, v in pairs(editor_themes) do
local item = {
text = k,
isNotRadio = false,
checked = function()
return WeakAurasSaved.editor_theme == k
end,
func = function()
WeakAurasSaved.editor_theme = k
set_scheme()
WeakAuras.editor.editBox:SetText(WeakAuras.editor.editBox:GetText())
end
}
UIDropDownMenu_AddButton(item)
end
UIDropDownMenu_AddButton(
{
text = L["Bracket Matching"],
isNotRadio = true,
checked = function()
return WeakAurasSaved.editor_bracket_matching
end,
func = function()
WeakAurasSaved.editor_bracket_matching = not WeakAurasSaved.editor_bracket_matching
end
}
)
end
local function ConstructTextEditor(frame)
local group = AceGUI:Create("InlineGroup")
group.frame:SetParent(frame)
group.frame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -17, 12)
group.frame:SetPoint("TOPLEFT", frame, "TOPLEFT", 17, -10)
group.frame:Hide()
group:SetLayout("fill")
local editor = AceGUI:Create("MultiLineEditBox")
editor:SetWidth(400)
editor.button:Hide()
local fontPath = SharedMedia:Fetch("font", "Fira Mono Medium")
if (fontPath) then
editor.editBox:SetFont(fontPath, 12)
end
group:AddChild(editor)
--editor.frame:SetClipsChildren(true)
-- The indention lib overrides GetText, but for the line number
-- display we ned the original, so save it here.
local originalGetText = editor.editBox.GetText
set_scheme()
IndentationLib.enable(editor.editBox, color_scheme, 4)
local cancel = CreateFrame("Button", nil, group.frame, "UIPanelButtonTemplate")
cancel:SetScript(
"OnClick",
function()
group:CancelClose()
end
)
cancel:SetPoint("BOTTOMRIGHT", -27, 13)
cancel:SetFrameLevel(cancel:GetFrameLevel() + 1)
cancel:SetHeight(20)
cancel:SetWidth(100)
cancel:SetText(L["Cancel"])
local close = CreateFrame("Button", nil, group.frame, "UIPanelButtonTemplate")
close:SetScript(
"OnClick",
function()
group:Close()
end
)
close:SetPoint("RIGHT", cancel, "LEFT", -10, 0)
close:SetFrameLevel(close:GetFrameLevel() + 1)
close:SetHeight(20)
close:SetWidth(100)
close:SetText(L["Done"])
local settings_frame = CreateFrame("Button", "WASettingsButton", close, "UIPanelButtonTemplate")
settings_frame:SetPoint("RIGHT", close, "LEFT", -10, 0)
settings_frame:SetHeight(20)
settings_frame:SetWidth(100)
settings_frame:SetText(L["Settings"])
settings_frame:RegisterForClicks("LeftButtonUp")
local helpButton = CreateFrame("Button", nil, group.frame, "UIPanelButtonTemplate")
helpButton:SetPoint("BOTTOMLEFT", 12, 13)
helpButton:SetFrameLevel(cancel:GetFrameLevel() + 1)
helpButton:SetHeight(20)
helpButton:SetWidth(100)
helpButton:SetText(L["Help"])
local urlText = CreateFrame("editbox", nil, group.frame)
urlText:SetFrameLevel(cancel:GetFrameLevel() + 1)
urlText:SetFont(STANDARD_TEXT_FONT, 12)
urlText:EnableMouse(true)
urlText:SetAutoFocus(false)
urlText:SetCountInvisibleLetters(false)
urlText:Hide()
local urlCopyLabel = urlText:CreateFontString(nil, "BACKGROUND", "GameFontHighlightSmall")
urlCopyLabel:SetPoint("BOTTOMLEFT", group.frame, "BOTTOMLEFT", 12, 18)
urlCopyLabel:SetText(L["Press Ctrl+C to copy"])
urlCopyLabel:Hide()
urlText:SetPoint("TOPLEFT", urlCopyLabel, "TOPRIGHT", 12, 13)
urlText:SetPoint("RIGHT", settings_frame, "LEFT")
local dropdown = CreateFrame("Frame", "SettingsMenuFrame", settings_frame, "UIDropDownMenuTemplate")
UIDropDownMenu_Initialize(dropdown, settings_dropdown_initialize, "MENU")
settings_frame:SetScript(
"OnClick",
function(self, button, down)
ToggleDropDownMenu(1, nil, dropdown, settings_frame, 0, 0)
end
)
-- Make Snippets button (top right, near the line number)
local snippetsButton = CreateFrame("Button", "WASnippetsButton", group.frame, "UIPanelButtonTemplate")
snippetsButton:SetPoint("BOTTOMRIGHT", editor.frame, "TOPRIGHT", 0, -15)
snippetsButton:SetFrameLevel(group.frame:GetFrameLevel() + 2)
snippetsButton:SetHeight(20)
snippetsButton:SetWidth(100)
snippetsButton:SetText(L["Snippets"])
snippetsButton:RegisterForClicks("LeftButtonUp")
-- Get the saved snippets from SavedVars
WeakAurasOptionsSaved.savedSnippets = WeakAurasOptionsSaved.savedSnippets or {}
local savedSnippets = WeakAurasOptionsSaved.savedSnippets
-- function to build snippet selection list
local function UpdateSnippets(frame)
-- release first before rebuilding
frame:ReleaseChildren()
table.sort(
savedSnippets,
function(a, b)
return a.name < b.name
end
)
local heading1 = AceGUI:Create("Heading")
heading1:SetText(L["Premade Snippets"])
heading1:SetRelativeWidth(1)
frame:AddChild(heading1)
-- Iterate premade snippets and make buttons for them
for order, snippet in ipairs(premadeSnippets) do
local button = AceGUI:Create("WeakAurasSnippetButton")
button:SetTitle(snippet.name)
button:SetDescription(snippet.snippet)
button:SetCallback(
"OnClick",
function()
editor.editBox:Insert(snippet.snippet)
editor:SetFocus()
end
)
button:SetRelativeWidth(1)
frame:AddChild(button)
end
local heading2 = AceGUI:Create("Heading")
heading2:SetText(L["Your Saved Snippets"])
heading2:SetRelativeWidth(1)
frame:AddChild(heading2)
-- iterate saved snippets and make buttons
for order, snippet in ipairs(savedSnippets) do
local button = AceGUI:Create("WeakAurasSnippetButton")
button:SetTitle(snippet.name)
button:SetDescription(snippet.snippet)
button:SetEditable(true)
button:SetRelativeWidth(1)
button:SetNew(snippet.new)
snippet.new = false
button:SetCallback(
"OnClick",
function()
WeakAuras.editor.editBox:Insert(snippet.snippet)
WeakAuras.editor:SetFocus()
end
)
button.deleteButton:SetScript(
"OnClick",
function()
table.remove(savedSnippets, order)
UpdateSnippets(frame)
end
)
button:SetCallback(
"OnEnterPressed",
function()
local newName = button.renameEditBox:GetText()
if newName and #newName > 0 then
local found = false
for _, snippet in ipairs(savedSnippets) do
if snippet.name == newName then
found = true
break
end
end
if not found then
savedSnippets[order].name = newName
UpdateSnippets(frame)
end
end
end
)
frame:AddChild(button)
end
end
-- Make sidebar for snippets
local snippetsFrame = CreateFrame("FRAME", "WeakAurasSnippets", group.frame)
snippetsFrame:SetPoint("TOPLEFT", group.frame, "TOPRIGHT", 20, 0)
snippetsFrame:SetPoint("BOTTOMLEFT", group.frame, "BOTTOMRIGHT", 20, 0)
snippetsFrame:SetWidth(250)
snippetsFrame:SetBackdrop(
{
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
tile = true,
tileSize = 32,
edgeSize = 32,
insets = {left = 8, right = 8, top = 8, bottom = 8}
}
)
snippetsFrame:SetBackdropColor(0, 0, 0, 1)
-- Add button to save new snippet
local AddSnippetButton = CreateFrame("Button", nil, snippetsFrame, "UIPanelButtonTemplate")
AddSnippetButton:SetPoint("TOPLEFT", snippetsFrame, "TOPLEFT", 13, -10)
AddSnippetButton:SetPoint("TOPRIGHT", snippetsFrame, "TOPRIGHT", -13, -10)
AddSnippetButton:SetHeight(20)
AddSnippetButton:SetText(L["Add Snippet"])
AddSnippetButton:RegisterForClicks("LeftButtonUp")
-- house the buttons in a scroll frame
-- All AceGUI from this point, so that buttons can be released and reused
local snippetsScrollContainer = AceGUI:Create("SimpleGroup")
snippetsScrollContainer:SetFullWidth(true)
snippetsScrollContainer:SetFullHeight(true)
snippetsScrollContainer:SetLayout("Fill")
snippetsScrollContainer.frame:SetParent(snippetsFrame)
snippetsScrollContainer.frame:SetPoint("TOPLEFT", snippetsFrame, "TOPLEFT", 17, -35)
snippetsScrollContainer.frame:SetPoint("BOTTOMRIGHT", snippetsFrame, "BOTTOMRIGHT", -10, 10)
local snippetsScroll = AceGUI:Create("ScrollFrame")
snippetsScroll:SetLayout("List")
snippetsScrollContainer:AddChild(snippetsScroll)
snippetsScroll:FixScroll(true)
snippetsScroll.scrollframe:SetScript(
"OnScrollRangeChanged",
function(frame)
frame.obj:DoLayout()
end
)
snippetsFrame:Hide()
-- Toggle the side bar on click
snippetsButton:SetScript(
"OnClick",
function(self, button, down)
if not snippetsFrame:IsShown() then
snippetsFrame:Show()
UpdateSnippets(snippetsScroll)
else
snippetsFrame:Hide()
end
end
)
AddSnippetButton:SetScript(
"OnClick",
function(self)
local snippet = editor.editBox:GetText()
if snippet and #snippet > 0 then
local baseName, name, index = "New Snippet", "New Snippet", 0
local snippetExists = function(name)
for _, snippet in ipairs(savedSnippets) do
if snippet.name == name then
return true
end
end
end
while snippetExists(name) do
index = index + 1
name = format("%s %d", baseName, index)
end
table.insert(savedSnippets, {name = name, snippet = snippet, new = true})
UpdateSnippets(snippetsScroll)
end
end
)
-- CTRL + S saves and closes, ESC cancels and closes
editor.editBox:HookScript(
"OnKeyDown",
function(_, key)
if IsControlKeyDown() and key == "S" then
group:Close()
end
if key == "ESCAPE" then
group:CancelClose()
end
end
)
-- bracket matching
editor.editBox:HookScript(
"OnChar",
function(_, char)
if not IsControlKeyDown() and WeakAurasSaved.editor_bracket_matching then
if char == "(" then
editor.editBox:Insert(")")
editor.editBox:SetCursorPosition(editor.editBox:GetCursorPosition() - 1)
elseif char == "{" then
editor.editBox:Insert("}")
editor.editBox:SetCursorPosition(editor.editBox:GetCursorPosition() - 1)
elseif char == "[" then
editor.editBox:Insert("]")
editor.editBox:SetCursorPosition(editor.editBox:GetCursorPosition() - 1)
end
end
end
)
local editorError = group.frame:CreateFontString(nil, "OVERLAY")
editorError:SetFont(STANDARD_TEXT_FONT, 12)
editorError:SetJustifyH("LEFT")
editorError:SetJustifyV("TOP")
editorError:SetTextColor(1, 0, 0)
editorError:SetPoint("LEFT", helpButton, "RIGHT", 0, 4)
editorError:SetPoint("RIGHT", settings_frame, "LEFT")
local editorLine = CreateFrame("Editbox", nil, group.frame)
-- Set script on enter pressed..
editorLine:SetPoint("BOTTOMRIGHT", editor.frame, "TOPRIGHT", -100, -15)
editorLine:SetFont(STANDARD_TEXT_FONT, 10)
editorLine:SetJustifyH("RIGHT")
editorLine:SetWidth(80)
editorLine:SetHeight(20)
editorLine:SetNumeric(true)
editorLine:SetTextInsets(10, 10, 0, 0)
editorLine:SetAutoFocus(false)
urlText:SetScript(
"OnChar",
function(self)
self:SetText(group.url)
self:HighlightText()
end
)
urlText:SetScript(
"OnEscapePressed",
function()
urlText:ClearFocus()
urlText:Hide()
urlCopyLabel:Hide()
helpButton:Show()
editor:SetFocus()
end
)
helpButton:SetScript(
"OnClick",
function()
urlText:Show()
urlText:SetFocus()
urlText:HighlightText()
urlCopyLabel:Show()
helpButton:Hide()
editorError:Hide()
end
)
local oldOnCursorChanged = editor.editBox:GetScript("OnCursorChanged")
editor.editBox:SetScript(
"OnCursorChanged",
function(...)
oldOnCursorChanged(...)
local cursorPosition = editor.editBox:GetCursorPosition()
local next = -1
local line = 0
while (next and cursorPosition >= next) do
next = originalGetText(editor.editBox):find("[\n]", next + 1)
line = line + 1
end
editorLine:SetNumber(line)
end
)
editorLine:SetScript(
"OnEnterPressed",
function()
local newLine = editorLine:GetNumber()
local newPosition = 0
while (newLine > 1 and newPosition) do
newPosition = originalGetText(editor.editBox):find("[\n]", newPosition + 1)
newLine = newLine - 1
end
if (newPosition) then
editor.editBox:SetCursorPosition(newPosition)
editor.editBox:SetFocus()
end
end
)
function group.Open(self, data, path, enclose, multipath, reloadOptions, setOnParent, url)
self.data = data
self.path = path
self.multipath = multipath
self.reloadOptions = reloadOptions
self.setOnParent = setOnParent
self.url = url
urlText:SetText(url or "")
urlText:Hide()
urlCopyLabel:Hide()
if url then
helpButton:Show()
else
helpButton:Hide()
end
if (frame.window == "texture") then
frame.texturePicker:CancelClose()
elseif (frame.window == "icon") then
frame.iconPicker:CancelClose()
end
frame.window = "texteditor"
frame:UpdateFrameVisible()
local title = (type(data.id) == "string" and data.id or L["Temporary Group"]) .. " -"
if (not multipath) then
for index, field in pairs(path) do
if (type(field) == "number") then
field = "Trigger " .. field + 1
end
title = title .. " " .. field:sub(1, 1):upper() .. field:sub(2)
end
end
editor:SetLabel(title)
editor.editBox:SetScript(
"OnEscapePressed",
function()
group:CancelClose()
end
)
self.oldOnTextChanged = editor.editBox:GetScript("OnTextChanged")
editor.editBox:SetScript(
"OnTextChanged",
function(...)
local str = editor.editBox:GetText()
if not (str) or editor.combinedText == true then
editorError:SetText("")
else
local _, errorString
if (enclose) then
_, errorString = loadstring("return function() " .. str .. "\n end")
else
_, errorString = loadstring("return " .. str)
end
if errorString then
urlText:Hide()
urlCopyLabel:Hide()
if self.url then
helpButton:Show()
end
editorError:Show()
editorError:SetText(errorString)
else
editorError:SetText("")
end
end
self.oldOnTextChanged(...)
end
)
if (data.controlledChildren and not setOnParent) then
local singleText
local sameTexts = true
local combinedText = ""
for index, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId)
local text = valueFromPath(childData, multipath and path[childId] or path)
if text then
if not (singleText) then
singleText = text
else
if not (singleText == text) then
sameTexts = false
end
end
if not (combinedText == "") then
combinedText = combinedText .. "\n\n"
end
combinedText =
combinedText .. L["-- Do not remove this comment, it is part of this trigger: "] .. childId .. "\n"
combinedText = combinedText .. (text or "")
end
end
if (sameTexts) then
editor:SetText(singleText or "")
editor.combinedText = false
else
editor:SetText(combinedText)
editor.combinedText = true
end
else
editor:SetText(valueFromPath(data, path) or "")
end
editor:SetFocus()
end
function group.CancelClose(self)
editor.editBox:SetScript("OnTextChanged", self.oldOnTextChanged)
editor:ClearFocus()
frame.window = "default"
frame:UpdateFrameVisible()
end
local function extractTexts(input, ids)
local texts = {}
local currentPos, id, startIdLine, startId, endId, endIdLine
while (true) do
startIdLine, startId =
string.find(input, L["-- Do not remove this comment, it is part of this trigger: "], currentPos, true)
if (not startId) then
break
end
endId, endIdLine = string.find(input, "\n", startId, true)
if (not endId) then
break
end
if (currentPos) then
local trimmedPosition = startIdLine - 1
while (string.sub(input, trimmedPosition, trimmedPosition) == "\n") do
trimmedPosition = trimmedPosition - 1
end
texts[id] = string.sub(input, currentPos, trimmedPosition)
end
id = string.sub(input, startId + 1, endId - 1)
currentPos = endIdLine + 1
end
if (id) then
texts[id] = string.sub(input, currentPos, string.len(input))
end
return texts
end
function group.Close(self)
if (self.data.controlledChildren and not self.setOnParent) then
local textById = editor.combinedText and extractTexts(editor:GetText(), self.data.controlledChildren)
for index, childId in pairs(self.data.controlledChildren) do
local text = editor.combinedText and (textById[childId] or "") or editor:GetText()
local childData = WeakAuras.GetData(childId)
valueToPath(childData, self.multipath and self.path[childId] or self.path, text)
WeakAuras.Add(childData)
end
else
valueToPath(self.data, self.path, editor:GetText())
WeakAuras.Add(self.data)
end
if (self.reloadOptions) then
if (self.data.controlledChildren) then
for index, childId in pairs(self.data.controlledChildren) do
WeakAuras.ScheduleReloadOptions(WeakAuras.GetData(childId))
end
WeakAuras.ScheduleReloadOptions(self.data)
else
WeakAuras.ScheduleReloadOptions(self.data)
end
else
WeakAuras.ScheduleReloadOptions(self.data)
end
editor.editBox:SetScript("OnTextChanged", self.oldOnTextChanged)
editor:ClearFocus()
frame.window = "default"
frame:UpdateFrameVisible()
frame:RefreshPick()
end
WeakAuras.editor = editor
return group
end
function WeakAuras.TextEditor(frame)
textEditor = textEditor or ConstructTextEditor(frame)
return textEditor
end
@@ -0,0 +1,229 @@
if not WeakAuras.IsCorrectVersion() then return end
-- Lua APIs
local wipe = wipe
local pairs, next, type = pairs, next, type
-- WoW APIs
local CreateFrame = CreateFrame
local AceGUI = LibStub("AceGUI-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local WeakAuras = WeakAuras
local L = WeakAuras.L
local getAll = WeakAuras.getAll
local setAll = WeakAuras.setAll
local texturePicker
local function ConstructTexturePicker(frame)
local group = AceGUI:Create("InlineGroup");
group.frame:SetParent(frame);
group.frame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -17, 42);
group.frame:SetPoint("TOPLEFT", frame, "TOPLEFT", 17, -10);
group.frame:Hide();
group.children = {};
group.categories = {};
local dropdown = AceGUI:Create("DropdownGroup");
dropdown:SetLayout("fill");
dropdown.width = "fill";
dropdown:SetHeight(390);
group:SetLayout("fill");
group:AddChild(dropdown);
dropdown.list = {};
dropdown:SetGroupList(dropdown.list);
local scroll = AceGUI:Create("ScrollFrame");
scroll:SetWidth(540);
scroll:SetLayout("flow");
--scroll.frame:SetClipsChildren(true);
dropdown:AddChild(scroll);
local function texturePickerGroupSelected(widget, event, uniquevalue)
scroll:ReleaseChildren();
for texturePath, textureName in pairs(group.textures[uniquevalue]) do
local textureWidget = AceGUI:Create("WeakAurasTextureButton");
if (group.SetTextureFunc) then
group.SetTextureFunc(textureWidget, texturePath, textureName);
else
textureWidget:SetTexture(texturePath, textureName);
local d = group.textureData;
textureWidget:ChangeTexture(d.r, d.g, d.b, d.a, d.rotate, d.discrete_rotation, d.rotation, d.mirror, d.blendMode);
end
textureWidget:SetClick(function()
group:Pick(texturePath);
end);
scroll:AddChild(textureWidget);
table.sort(scroll.children, function(a, b)
local aPath, bPath = a:GetTexturePath(), b:GetTexturePath();
local aNum, bNum = tonumber(aPath:match("%d+")), tonumber(bPath:match("%d+"));
local aNonNumber, bNonNumber = aPath:match("[^%d]+"), bPath:match("[^%d]+")
if(aNum and bNum and aNonNumber == bNonNumber) then
return aNum < bNum;
else
return aPath < bPath;
end
end);
end
group:Pick(group.data[group.field]);
end
dropdown:SetCallback("OnGroupSelected", texturePickerGroupSelected)
function group.UpdateList(self)
wipe(dropdown.list);
for categoryName, category in pairs(self.textures) do
local match = false;
for texturePath, textureName in pairs(category) do
if(texturePath == self.data[self.field]) then
match = true;
break;
end
end
dropdown.list[categoryName] = (match and "|cFF80A0FF" or "")..categoryName;
end
dropdown:SetGroupList(dropdown.list);
end
function group.Pick(self, texturePath)
local pickedwidget;
for index, widget in ipairs(scroll.children) do
widget:ClearPick();
if(widget:GetTexturePath() == texturePath) then
pickedwidget = widget;
end
end
if(pickedwidget) then
pickedwidget:Pick();
end
if(self.data.controlledChildren) then
setAll(self.data, {"region", self.field}, texturePath);
else
self.data[self.field] = texturePath;
end
if(type(self.data.id) == "string") then
WeakAuras.Add(self.data);
WeakAuras.SetIconNames(self.data);
WeakAuras.UpdateThumbnail(self.data);
end
group:UpdateList();
local status = dropdown.status or dropdown.localstatus
dropdown.dropdown:SetText(dropdown.list[status.selected]);
end
function group.Open(self, data, field, textures, SetTextureFunc)
self.data = data;
self.field = field;
self.textures = textures;
self.SetTextureFunc = SetTextureFunc
if(data.controlledChildren) then
self.givenPath = {};
for index, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
if(childData) then
self.givenPath[childId] = childData[field];
end
end
local colorAll = getAll(data, {"region", "color"}) or {1, 1, 1, 1};
self.textureData = {
r = colorAll[1] or 1,
g = colorAll[2] or 1,
b = colorAll[3] or 1,
a = colorAll[4] or 1,
rotate = getAll(data, {"region", "rotate"}),
discrete_rotation = getAll(data, {"region", "discrete_rotation"}) or 0,
rotation = getAll(data, {"region", "rotation"}) or 0,
mirror = getAll(data, {"region", "mirror"}),
blendMode = getAll(data, {"region", "blendMode"}) or "ADD"
};
else
self.givenPath = data[field];
data.color = data.color or {};
self.textureData = {
r = data.color[1] or 1,
g = data.color[2] or 1,
b = data.color[3] or 1,
a = data.color[4] or 1,
rotate = data.rotate,
discrete_rotation = data.discrete_rotation or 0,
rotation = data.rotation or 0,
mirror = data.mirror,
blendMode = data.blendMode or "ADD"
};
end
frame.window = "texture";
frame:UpdateFrameVisible()
local picked = false;
local _, givenPath
if type(self.givenPath) == "string" then
givenPath = self.givenPath;
else
_, givenPath = next(self.givenPath);
end
WeakAuras.debug(givenPath, 3);
for categoryName, category in pairs(self.textures) do
if not(picked) then
for texturePath, textureName in pairs(category) do
if(texturePath == givenPath) then
dropdown:SetGroup(categoryName);
self:Pick(givenPath);
picked = true;
break;
end
end
end
end
if not(picked) then
local categoryName = next(self.textures)
if(categoryName) then
dropdown:SetGroup(categoryName);
end
end
end
function group.Close()
frame.window = "default";
frame:UpdateFrameVisible()
AceConfigDialog:Open("WeakAuras", frame.container);
end
function group.CancelClose()
if(group.data.controlledChildren) then
for index, childId in pairs(group.data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
if(childData) then
childData[group.field] = group.givenPath[childId];
WeakAuras.Add(childData);
WeakAuras.UpdateThumbnail(childData);
WeakAuras.SetIconNames(childData);
end
end
else
group:Pick(group.givenPath);
end
group.Close();
end
local cancel = CreateFrame("Button", nil, group.frame, "UIPanelButtonTemplate")
cancel:SetScript("OnClick", group.CancelClose)
cancel:SetPoint("BOTTOMRIGHT", -27, -23)
cancel:SetSize(100, 20)
cancel:SetText(L["Cancel"])
local close = CreateFrame("Button", nil, group.frame, "UIPanelButtonTemplate")
close:SetScript("OnClick", group.Close)
close:SetPoint("RIGHT", cancel, "LEFT", -10, 0)
close:SetSize(100, 20)
close:SetText(L["Okay"])
return group
end
function WeakAuras.TexturePicker(frame)
texturePicker = texturePicker or ConstructTexturePicker(frame)
return texturePicker
end
+772
View File
@@ -0,0 +1,772 @@
if not WeakAuras.IsCorrectVersion() then return end
local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L;
-- Create region options table
local function createOptions(id, data)
-- Region options
local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20;
local options = {
__title = L["Progress Bar Settings"],
__order = 1,
texture = {
type = "select",
dialogControl = "LSM30_Statusbar",
order = 1,
width = WeakAuras.doubleWidth,
name = L["Bar Texture"],
values = AceGUIWidgetLSMlists.statusbar
},
orientation = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Orientation"],
order = 25,
values = WeakAuras.orientation_types,
set = function(info, v)
if(
(
data.orientation:find("INVERSE")
and not v:find("INVERSE")
)
or (
v:find("INVERSE")
and not data.orientation:find("INVERSE")
)
) then
data.icon_side = data.icon_side == "LEFT" and "RIGHT" or "LEFT";
end
if(
(
data.orientation:find("HORIZONTAL")
and v:find("VERTICAL")
)
or (
data.orientation:find("VERTICAL")
and v:find("HORIZONTAL")
)
) then
local temp = data.width;
data.width = data.height;
data.height = temp;
data.icon_side = data.icon_side == "LEFT" and "RIGHT" or "LEFT";
if(data.rotateText == "LEFT" or data.rotateText == "RIGHT") then
data.rotateText = "NONE";
elseif(data.rotateText == "NONE") then
data.rotateText = "LEFT"
end
end
data.orientation = v;
WeakAuras.Add(data);
WeakAuras.UpdateThumbnail(data);
WeakAuras.SetIconNames(data);
WeakAuras.ResetMoverSizer();
end
},
inverse = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Inverse"],
order = 35
},
smoothProgress = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Smooth Progress"],
desc = L["Animates progress changes"],
order = 37
},
useTooltip = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Tooltip on Mouseover"],
hidden = function() return not WeakAuras.CanHaveTooltip(data) end,
order = 38
},
bar_header = {
type = "header",
name = L["Bar Color Settings"],
order = 39
},
barColor = {
type = "color",
width = WeakAuras.normalWidth,
name = L["Bar Color"],
hasAlpha = true,
order = 39.1
},
backgroundColor = {
type = "color",
width = WeakAuras.normalWidth,
name = L["Background Color"],
hasAlpha = true,
order = 39.2
},
alpha = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Bar Alpha"],
order = 39.3,
min = 0,
max = 1,
bigStep = 0.01,
isPercent = true
},
icon_header = {
type = "header",
name = L["Icon Settings"],
order = 40.1
},
icon = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Show Icon"],
order = 40.2,
},
auto = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Auto"],
desc = L["Choose whether the displayed icon is automatic or defined manually"],
order = 40.3,
disabled = function() return not WeakAuras.CanHaveAuto(data); end,
get = function() return WeakAuras.CanHaveAuto(data) and data.auto end,
hidden = function() return not data.icon end,
},
displayIcon = {
type = "input",
width = WeakAuras.normalWidth,
name = L["Display Icon"],
hidden = function() return WeakAuras.CanHaveAuto(data) and data.auto or not data.icon; end,
disabled = function() return not data.icon end,
order = 40.4,
get = function()
return data.displayIcon and tostring(data.displayIcon) or "";
end,
set = function(info, v)
data.displayIcon = v;
WeakAuras.Add(data);
WeakAuras.UpdateThumbnail(data);
WeakAuras.SetIconNames(data);
end
},
chooseIcon = {
type = "execute",
width = WeakAuras.normalWidth,
name = L["Choose"],
hidden = function() return WeakAuras.CanHaveAuto(data) and data.auto or not data.icon; end,
disabled = function() return not data.icon end,
order = 40.5,
func = function() WeakAuras.OpenIconPicker(data, "displayIcon"); end
},
icon_side = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Icon Position"],
values = WeakAuras.icon_side_types,
hidden = function() return data.orientation:find("VERTICAL") or not data.icon end,
order = 40.6,
},
icon_side2 = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Icon Position"],
values = WeakAuras.rotated_icon_side_types,
hidden = function() return data.orientation:find("HORIZONTAL") or not data.icon end,
order = 40.7,
get = function()
return data.icon_side;
end,
set = function(info, v)
data.icon_side = v;
WeakAuras.Add(data);
WeakAuras.UpdateThumbnail(data);
WeakAuras.SetIconNames(data);
end
},
desaturate = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Desaturate"],
order = 40.8,
hidden = function() return not data.icon end,
},
icon_color = {
type = "color",
width = WeakAuras.normalWidth,
name = L["Color"],
hasAlpha = true,
order = 40.9,
hidden = function() return not data.icon end,
},
zoom = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Zoom"],
order = 40.91,
min = 0,
max = 1,
bigStep = 0.01,
isPercent = true,
hidden = function() return not data.icon end,
},
spark_header = {
type = "header",
name = L["Spark Settings"],
order = 42
},
spark = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Show Spark"],
order = 43
},
sparkTexture = {
type = "input",
name = L["Spark Texture"],
order = 44,
width = WeakAuras.doubleWidth,
disabled = function() return not data.spark end,
hidden = function() return not data.spark end,
},
sparkDesaturate = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Desaturate"],
order = 44.1,
disabled = function() return not data.spark end,
hidden = function() return not data.spark end,
},
spaceSpark = {
type = "execute",
name = "",
width = WeakAuras.halfWidth,
order = 44.2,
image = function() return "", 0, 0 end,
disabled = function() return not data.spark end,
hidden = function() return not data.spark end,
},
sparkChooseTexture = {
type = "execute",
name = L["Choose"],
width = WeakAuras.halfWidth,
order = 44.3,
func = function()
WeakAuras.OpenTexturePicker(data, "sparkTexture", WeakAuras.texture_types);
end,
disabled = function() return not data.spark end,
hidden = function() return not data.spark end,
},
sparkColor = {
type = "color",
width = WeakAuras.normalWidth,
name = L["Color"],
hasAlpha = true,
order = 44.4,
disabled = function() return not data.spark end,
hidden = function() return not data.spark end,
},
sparkBlendMode = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Blend Mode"],
order = 44.5,
values = WeakAuras.blend_types,
disabled = function() return not data.spark end,
hidden = function() return not data.spark end,
},
sparkWidth = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Width"],
order = 44.6,
min = 1,
softMax = screenWidth,
bigStep = 1,
disabled = function() return not data.spark end,
hidden = function() return not data.spark end,
},
sparkHeight = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Height"],
order = 44.7,
min = 1,
softMax = screenHeight,
bigStep = 1,
disabled = function() return not data.spark end,
hidden = function() return not data.spark end,
},
sparkOffsetX = {
type = "range",
width = WeakAuras.normalWidth,
name = L["X Offset"],
order = 44.8,
min = -screenWidth,
max = screenWidth,
bigStep = 1,
disabled = function() return not data.spark end,
hidden = function() return not data.spark end,
},
sparkOffsetY = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Y Offset"],
order = 44.9,
min = -screenHeight,
max = screenHeight,
bigStep = 1,
disabled = function() return not data.spark end,
hidden = function() return not data.spark end,
},
sparkRotationMode = {
type = "select",
width = WeakAuras.normalWidth,
values = WeakAuras.spark_rotation_types,
name = L["Rotation Mode"],
order = 45,
disabled = function() return not data.spark end,
hidden = function() return not data.spark end,
},
sparkRotation = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Rotation"],
min = 0,
max = 360,
step = 90,
order = 45.1,
disabled = function() return not data.spark or data.sparkRotationMode == "AUTO" end,
hidden = function() return not data.spark or data.sparkRotationMode == "AUTO" end,
},
sparkMirror = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Mirror"],
order = 45.2,
disabled = function() return not data.spark end,
hidden = function() return not data.spark end,
},
sparkHidden = {
type = "select",
width = WeakAuras.normalWidth,
values = WeakAuras.spark_hide_types,
name = L["Hide on"],
order = 45.3,
disabled = function() return not data.spark end,
hidden = function() return not data.spark end,
},
endHeader = {
type = "header",
order = 100,
name = "",
},
};
options = WeakAuras.regionPrototype.AddAdjustedDurationOptions(options, data, 36.5);
local overlayInfo = WeakAuras.GetOverlayInfo(data);
if (overlayInfo and next(overlayInfo)) then
options["overlayheader"] = {
type = "header",
name = L["Overlays"],
order = 58
}
local index = 0.01
for id, display in ipairs(overlayInfo) do
options["overlaycolor" .. id] = {
type = "color",
width = WeakAuras.normalWidth,
name = string.format(L["%s Color"], display),
hasAlpha = true,
order = 58 + index,
get = function()
if (data.overlays and data.overlays[id]) then
return unpack(data.overlays[id]);
end
return 1, 1, 1, 1;
end,
set = function(info, r, g, b, a)
if (not data.overlays) then
data.overlays = {};
end
data.overlays[id] = { r, g, b, a};
WeakAuras.Add(data);
end
}
index = index + 0.01
end
options["overlayclip"] = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Clip Overlays"],
order = 58 + index;
}
end
return {
aurabar = options,
position = WeakAuras.PositionOptions(id, data),
};
end
-- Create preview thumbnail
local function createThumbnail()
-- Preview frame
local borderframe = CreateFrame("FRAME", nil, UIParent);
borderframe:SetWidth(32);
borderframe:SetHeight(32);
-- Preview border
local border = borderframe:CreateTexture(nil, "OVERLAY");
border:SetAllPoints(borderframe);
border:SetTexture("Interface\\BUTTONS\\UI-Quickslot2.blp");
border:SetTexCoord(0.2, 0.8, 0.2, 0.8);
-- Main region
local region = CreateFrame("FRAME", nil, borderframe);
borderframe.region = region;
region:SetWidth(32);
region:SetHeight(32);
-- Status-bar frame
local bar = CreateFrame("FRAME", nil, region);
borderframe.bar = bar;
-- Fake status-bar
local texture = bar:CreateTexture(nil, "OVERLAY");
borderframe.texture = texture;
-- Fake icon
local icon = region:CreateTexture();
borderframe.icon = icon;
icon:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark");
-- Return preview
return borderframe;
end
-- Modify preview thumbnail
local function modifyThumbnail(parent, borderframe, data, fullModify, width, height)
-- Localize
local region, bar, texture, icon = borderframe.region, borderframe.bar, borderframe.texture, borderframe.icon;
borderframe:SetParent(parent)
-- Defaut size
width = width or 26;
height = height or 15;
-- Fake orientation (main region)
if(data.orientation:find("HORIZONTAL")) then
region:SetWidth(width);
region:SetHeight(height);
region:ClearAllPoints();
if(data.orientation == "HORIZONTAL_INVERSE") then
region:SetPoint("RIGHT", borderframe, "RIGHT", -2, 0);
else
region:SetPoint("LEFT", borderframe, "LEFT", 2, 0);
end
else
region:SetWidth(height);
region:SetHeight(width);
region:ClearAllPoints();
if(data.orientation == "VERTICAL_INVERSE") then
region:SetPoint("TOP", borderframe, "TOP", 0, -2);
else
region:SetPoint("BOTTOM", borderframe, "BOTTOM", 0, 2);
end
end
-- Fake status-bar style
texture:SetTexture(SharedMedia:Fetch("statusbar", data.texture));
texture:SetVertexColor(data.barColor[1], data.barColor[2], data.barColor[3], data.barColor[4]);
-- Fake icon size
local iconsize = height;
icon:SetWidth(iconsize);
icon:SetHeight(iconsize);
-- Fake layout variables
local percent, length;
if(data.icon) then
length = width - height;
percent = 1 - (width / 100);
else
length = width;
percent = 1 - (width / 100);
end
-- Reset region members
icon:ClearAllPoints();
bar:ClearAllPoints();
texture:ClearAllPoints();
-- Fake orientation (region members)
if(data.orientation == "HORIZONTAL_INVERSE") then
icon:SetPoint("LEFT", region, "LEFT");
bar:SetPoint("BOTTOMRIGHT", region, "BOTTOMRIGHT");
if(data.icon) then
bar:SetPoint("TOPLEFT", icon, "TOPRIGHT");
else
bar:SetPoint("TOPLEFT", region, "TOPLEFT");
end
texture:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT");
texture:SetPoint("TOPRIGHT", bar, "TOPRIGHT");
texture:SetTexCoord(1, 0, 1, 1, percent, 0, percent, 1);
texture:SetWidth(length);
elseif(data.orientation == "HORIZONTAL") then
icon:SetPoint("RIGHT", region, "RIGHT");
bar:SetPoint("BOTTOMLEFT", region, "BOTTOMLEFT");
if(data.icon) then
bar:SetPoint("TOPRIGHT", icon, "TOPLEFT");
else
bar:SetPoint("TOPRIGHT", region, "TOPRIGHT");
end
texture:SetPoint("BOTTOMLEFT", bar, "BOTTOMLEFT");
texture:SetPoint("TOPLEFT", bar, "TOPLEFT");
texture:SetTexCoord(percent, 0, percent, 1, 1, 0, 1, 1);
texture:SetWidth(length);
elseif(data.orientation == "VERTICAL_INVERSE") then
icon:SetPoint("BOTTOM", region, "BOTTOM");
bar:SetPoint("TOPLEFT", region, "TOPLEFT");
if(data.icon) then
bar:SetPoint("BOTTOMRIGHT", icon, "TOPRIGHT");
else
bar:SetPoint("BOTTOMRIGHT", region, "BOTTOMRIGHT");
end
texture:SetPoint("TOPLEFT", bar, "TOPLEFT");
texture:SetPoint("TOPRIGHT", bar, "TOPRIGHT");
texture:SetTexCoord(percent, 0, 1, 0, percent, 1, 1, 1);
texture:SetHeight(length);
elseif(data.orientation == "VERTICAL") then
icon:SetPoint("TOP", region, "TOP");
bar:SetPoint("BOTTOMRIGHT", region, "BOTTOMRIGHT");
if(data.icon) then
bar:SetPoint("TOPLEFT", icon, "BOTTOMLEFT");
else
bar:SetPoint("TOPLEFT", region, "TOPLEFT");
end
texture:SetPoint("BOTTOMLEFT", bar, "BOTTOMLEFT");
texture:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT");
texture:SetTexCoord(1, 0, percent, 0, 1, 1, percent, 1);
texture:SetHeight(length);
end
-- Fake icon (code)
if(data.icon) then
function borderframe:SetIcon(path)
local success = icon:SetTexture(data.auto and path or data.displayIcon) and (data.auto and path or data.displayIcon);
if not(success) then
icon:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark");
end
end
icon:Show();
else
icon:Hide();
end
end
-- Create "new region" preview
local function createIcon()
-- Default data
local data = {
icon = true,
auto = true,
texture = "Runes",
orientation = "HORIZONTAL",
alpha = 1.0,
barColor = {1, 0, 0, 1}
};
-- Create and configure thumbnail
local thumbnail = createThumbnail(UIParent);
modifyThumbnail(UIParent, thumbnail, data, nil, 32, 18);
thumbnail:SetIcon("Interface\\Icons\\INV_Sword_62");
-- Return thumbnail
return thumbnail;
end
local templates = {
{
title = L["Horizontal Bar"],
data = {
width = 200,
height = 30,
barColor = { 0, 1, 0, 1},
inverse = true,
smoothProgress = true,
}
},
{
title = L["Vertical Bar"],
data = {
width = 30,
height = 200,
barColor = { 0, 1, 0, 1},
rotateText = "LEFT",
orientation = "VERTICAL_INVERSE",
inverse = true,
smoothProgress = true,
}
},
}
local anchorPoints = {
BOTTOMLEFT = {
display = { L["Bar"], L["Bottom Left"] },
type = "point"
},
BOTTOM = {
display = { L["Bar"], L["Bottom"] },
type = "point"
},
BOTTOMRIGHT = {
display = { L["Bar"], L["Bottom Right"] },
type = "point"
},
RIGHT = {
display = { L["Bar"], L["Right"] },
type = "point"
},
TOPRIGHT = {
display = { L["Bar"], L["Top Right"] },
type = "point"
},
TOP = {
display = { L["Bar"], L["Top"] },
type = "point"
},
TOPLEFT = {
display = { L["Bar"], L["Top Left"] },
type = "point"
},
LEFT = {
display = { L["Bar"], L["Left"] },
type = "point"
},
CENTER = {
display = { L["Bar"], L["Center"] },
type = "point"
},
INNER_BOTTOMLEFT = {
display = { L["Bar Inner"], L["Bottom Left"] },
type = "point"
},
INNER_BOTTOM = {
display = { L["Bar Inner"], L["Bottom"] },
type = "point"
},
INNER_BOTTOMRIGHT = {
display = { L["Bar Inner"], L["Bottom Right"] },
type = "point"
},
INNER_RIGHT = {
display = { L["Bar Inner"], L["Right"] },
type = "point"
},
INNER_TOPRIGHT = {
display = { L["Bar Inner"], L["Top Right"] },
type = "point"
},
INNER_TOP = {
display = { L["Bar Inner"], L["Top"] },
type = "point"
},
INNER_TOPLEFT = {
display = { L["Bar Inner"], L["Top Left"] },
type = "point"
},
INNER_LEFT = {
display = { L["Bar Inner"], L["Left"] },
type = "point"
},
INNER_CENTER = {
display = { L["Bar Inner"], L["Center"] },
type = "point"
},
ICON_BOTTOMLEFT = {
display = { L["Icon"], L["Bottom Left"] },
type = "point"
},
ICON_BOTTOM = {
display = { L["Icon"], L["Bottom"] },
type = "point"
},
ICON_BOTTOMRIGHT = {
display = { L["Icon"], L["Bottom Right"] },
type = "point"
},
ICON_RIGHT = {
display = { L["Icon"], L["Right"] },
type = "point"
},
ICON_TOPRIGHT = {
display = { L["Icon"], L["Top Right"] },
type = "point"
},
ICON_TOP = {
display = { L["Icon"], L["Top"] },
type = "point"
},
ICON_TOPLEFT = {
display = { L["Icon"], L["Top Left"] },
type = "point"
},
ICON_LEFT = {
display = { L["Icon"], L["Left"] },
type = "point"
},
ICON_CENTER = {
display = { L["Icon"], L["Center"] },
type = "point"
},
SPARK = {
display = L["Spark"],
type = "point"
},
ALL = {
display = L["Whole Area"],
type = "area"
},
}
local function GetAnchors(data)
return anchorPoints;
end
local function subCreateOptions(parentData, data, index, subIndex)
local order = 9
local options = {
__title = L["Foreground"],
__order = 1,
__up = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionUp, index, "aurabar_bar")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
__down = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionDown, index, "aurabar_bar")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
__nooptions = true
}
return options
end
-- Register new region type options with WeakAuras
WeakAuras.RegisterRegionOptions("aurabar", createOptions, createIcon, L["Progress Bar"], createThumbnail, modifyThumbnail, L["Shows a progress bar with name, timer, and icon"], templates, GetAnchors);
WeakAuras.RegisterSubRegionOptions("aurabar_bar", subCreateOptions, L["Foreground"]);
@@ -0,0 +1,535 @@
if not WeakAuras.IsCorrectVersion() then return end
local L = WeakAuras.L
local selfPoints = {
default = "CENTER",
RIGHT = function(data)
if data.align == "LEFT" then
return "TOPLEFT"
elseif data.align == "RIGHT" then
return "BOTTOMLEFT"
else
return "LEFT"
end
end,
LEFT = function(data)
if data.align == "LEFT" then
return "TOPRIGHT"
elseif data.align == "RIGHT" then
return "BOTTOMRIGHT"
else
return "RIGHT"
end
end,
UP = function(data)
if data.align == "LEFT" then
return "BOTTOMLEFT"
elseif data.align == "RIGHT" then
return "BOTTOMRIGHT"
else
return "BOTTOM"
end
end,
DOWN = function(data)
if data.align == "LEFT" then
return "TOPLEFT"
elseif data.align == "RIGHT" then
return "TOPRIGHT"
else
return "TOP"
end
end,
HORIZONTAL = function(data)
if data.align == "LEFT" then
return "TOP"
elseif data.align == "RIGHT" then
return "BOTTOM"
else
return "CENTER"
end
end,
VERTICAL = function(data)
if data.align == "LEFT" then
return "LEFT"
elseif data.align == "RIGHT" then
return "RIGHT"
else
return "CENTER"
end
end,
CIRCLE = "CENTER",
COUNTERCIRCLE = "CENTER",
}
local gridSelfPoints = {
RU = "BOTTOMLEFT",
UR = "BOTTOMLEFT",
LU = "BOTTOMRIGHT",
UL = "BOTTOMRIGHT",
RD = "TOPLEFT",
DR = "TOPLEFT",
LD = "TOPRIGHT",
DL = "TOPRIGHT",
}
local function createOptions(id, data)
local options = {
__title = L["Dynamic Group Settings"],
__order = 1,
groupIcon = {
type = "input",
width = WeakAuras.normalWidth,
name = WeakAuras.newFeatureString..L["Group Icon"],
desc = L["Set Thumbnail Icon"],
order = 0.5,
get = function()
return data.groupIcon and tostring(data.groupIcon) or ""
end,
set = function(info, v)
data.groupIcon = v
WeakAuras.Add(data)
WeakAuras.UpdateThumbnail(data)
WeakAuras.SetIconNames(data)
end
},
chooseIcon = {
type = "execute",
width = WeakAuras.normalWidth,
name = L["Choose"],
order = 0.51,
func = function() WeakAuras.OpenIconPicker(data, "groupIcon", true) end
},
-- grow options
grow = {
type = "select",
width = WeakAuras.doubleWidth,
name = L["Grow"],
order = 1,
values = WeakAuras.grow_types,
set = function(info, v)
data.grow = v
local selfPoint = selfPoints[data.grow] or selfPoints.default
if type(selfPoint) == "function" then
selfPoint = selfPoint(data)
end
data.selfPoint = selfPoint
WeakAuras.Add(data)
WeakAuras.ReloadTriggerOptions(data)
WeakAuras.ResetMoverSizer()
end,
},
useAnchorPerUnit = {
type = "toggle",
order = 1.5,
width = WeakAuras.normalWidth,
name = WeakAuras.newFeatureString..L["Group by Frame"],
desc = L[
[[Group and anchor each auras by frame.
- Unit Frames: attach to unit frame buttons per unit.
- Custom Frames: choose which frame each region should be anchored to.]]
],
hidden = function() return data.grow == "CUSTOM" end,
},
anchorPerUnit = {
type = "select",
width = WeakAuras.normalWidth,
name = WeakAuras.newFeatureString..L["Group by Frame"],
order = 1.6,
values = {
["UNITFRAME"] = L["Unit Frames"],
["CUSTOM"] = L["Custom Frames"],
},
hidden = function() return data.grow == "CUSTOM" end,
disabled = function() return not data.useAnchorPerUnit end
},
-- custom grow option added below
align = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Align"],
order = 2,
values = WeakAuras.align_types,
set = function(info, v)
data.align = v
local selfPoint = selfPoints[data.grow] or selfPoints.default
if type(selfPoint) == "function" then
selfPoint = selfPoint(data)
end
data.selfPoint = selfPoint
WeakAuras.Add(data)
WeakAuras.ReloadTriggerOptions(data)
WeakAuras.ResetMoverSizer()
end,
hidden = function() return (data.grow == "CUSTOM" or data.grow == "LEFT" or data.grow == "RIGHT" or data.grow == "HORIZONTAL" or data.grow == "CIRCLE" or data.grow == "COUNTERCIRCLE" or data.grow == "GRID") end,
disabled = function() return data.grow == "CIRCLE" or data.grow == "COUNTERCIRCLE" end
},
rotated_align = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Align"],
order = 3,
values = WeakAuras.rotated_align_types,
hidden = function() return (data.grow == "CUSTOM" or data.grow == "UP" or data.grow == "DOWN" or data.grow == "VERTICAL" or data.grow == "CIRCLE" or data.grow == "COUNTERCIRCLE" or data.grow == "GRID") end,
get = function() return data.align; end,
set = function(info, v)
data.align = v
local selfPoint = selfPoints[data.grow] or selfPoints.default
if type(selfPoint) == "function" then
selfPoint = selfPoint(data)
end
data.selfPoint = selfPoint
WeakAuras.Add(data)
WeakAuras.ReloadTriggerOptions(data)
WeakAuras.ResetMoverSizer()
end,
},
-- circle grow options
constantFactor = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Constant Factor"],
order = 4,
values = WeakAuras.circular_group_constant_factor_types,
hidden = function() return data.grow ~= "CIRCLE" and data.grow ~= "COUNTERCIRCLE" end
},
rotation = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Start Angle"],
order = 5,
min = 0,
max = 360,
bigStep = 3,
hidden = function() return data.grow ~= "CIRCLE" and data.grow ~= "COUNTERCIRCLE" end
},
arcLength = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Arc Length"],
order = 7,
min = 0,
max = 360,
bigStep = 3,
hidden = function() return data.grow ~= "CIRCLE" and data.grow ~= "COUNTERCIRCLE" end
},
radius = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Radius"],
order = 6,
softMin = 0,
softMax = 500,
bigStep = 1,
hidden = function() return data.grow == "CUSTOM" or not((data.grow == "CIRCLE" or data.grow == "COUNTERCIRCLE") and data.constantFactor == "RADIUS") end
},
-- grid grow options
gridType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Grid direction"],
order = 8,
values = WeakAuras.grid_types,
hidden = function() return data.grow ~= "GRID" end,
set = function(info, value)
data.selfPoint = gridSelfPoints[value]
data.gridType = value
WeakAuras.Add(data)
WeakAuras.ResetMoverSizer()
end,
},
gridWidth = {
type = "range",
width = WeakAuras.normalWidth,
name = function()
if not data.gridType then return "" end
if data.gridType:find("^[RL]") then
return L["Row Width"]
else
return L["Column Height"]
end
end,
order = 9,
min = 1,
softMax = 20,
step = 1,
hidden = function() return data.grow ~= "GRID" end,
},
rowSpace = {
type = "range",
name = L["Row Space"],
width = WeakAuras.normalWidth,
order = 10,
softMin = 0,
softMax = 300,
step = 1,
hidden = function() return data.grow ~= "GRID" end,
},
columnSpace = {
type = "range",
name = L["Column Space"],
width = WeakAuras.normalWidth,
order = 11,
softMin = 0,
softMax = 300,
step = 1,
hidden = function() return data.grow ~= "GRID" end,
},
-- generic grow options
space = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Space"],
order = 7,
softMin = 0,
softMax = 300,
bigStep = 1,
hidden = function()
return data.grow == "CUSTOM"
or data.grow == "GRID"
or ((data.grow == "CIRCLE" or data.grow == "COUNTERCIRCLE") and data.constantFactor == "RADIUS")
end
},
stagger = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Stagger"],
order = 8,
min = -50,
max = 50,
step = 0.1,
bigStep = 1,
hidden = function()
return data.grow == "CUSTOM"
or data.grow == "CIRCLE"
or data.grow == "COUNTERCIRCLE"
or data.grow == "GRID"
end
},
-- sort options
sort = {
type = "select",
width = WeakAuras.doubleWidth,
name = L["Sort"],
order = 20,
values = WeakAuras.group_sort_types
},
-- custom sort option added below
hybridPosition = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Hybrid Position"],
order = 21,
values = WeakAuras.group_hybrid_position_types,
hidden = function() return not(data.sort == "hybrid") end,
},
hybridSortMode = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Hybrid Sort Mode"],
order = 22,
values = WeakAuras.group_hybrid_sort_types,
hidden = function() return not(data.sort == "hybrid") end,
},
sortHybrid = {
type = "multiselect",
width = "full",
name = L["Select the auras you always want to be listed first"],
order = 23,
hidden = function() return not(data.sort == "hybrid") end,
values = function()
return data.controlledChildren
end,
get = function(info, index)
local id = data.controlledChildren[index]
return data.sortHybridTable and data.sortHybridTable[id] or false;
end,
set = function(info, index)
if not data.sortHybridTable then data.sortHybridTable = {}; end
local id = data.controlledChildren[index]
local cur = data.sortHybridTable and data.sortHybridTable[id] or false;
data.sortHybridTable[id] = not(cur);
end,
},
sortSpace = {
type = "description",
name = "",
width = WeakAuras.doubleWidth,
order = 24,
hidden = function() return data.sort == "hybrid" end
},
useLimit = {
type = "toggle",
order = 25,
width = WeakAuras.normalWidth,
name = L["Limit"],
hidden = function() return data.grow == "CUSTOM" end,
},
limit = {
type = "range",
order = 26,
width = WeakAuras.normalWidth,
name = L["Limit"],
min = 0,
softMax = 20,
step = 1,
disabled = function() return not data.useLimit end,
hidden = function() return data.grow == "CUSTOM" end,
},
animate = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Animated Expand and Collapse"],
order = 27
},
scale = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Group Scale"],
order = 28,
min = 0.05,
softMax = 2,
bigStep = 0.05,
get = function()
return data.scale or 1
end,
set = function(info, v)
data.scale = data.scale or 1
local change = 1 - (v/data.scale)
data.xOffset = data.xOffset/(1-change)
data.yOffset = data.yOffset/(1-change)
data.scale = v
WeakAuras.Add(data);
WeakAuras.ResetMoverSizer();
end
},
endHeader = {
type = "header",
order = 100,
name = "",
},
};
WeakAuras.AddCodeOption(options, data, L["Custom Grow"], "custom_grow", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Dynamic-Group",
2, function() return data.grow ~= "CUSTOM" end, {"customGrow"}, nil, nil, nil, nil, nil, true)
WeakAuras.AddCodeOption(options, data, L["Custom Sort"], "custom_sort", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Dynamic-Group",
21, function() return data.sort ~= "custom" end, {"customSort"}, nil, nil, nil, nil, nil, true)
WeakAuras.AddCodeOption(options, data, L["Custom Anchor"], "custom_anchor_per_unit", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Dynamic-Group",
1.7, function() return not(data.grow ~= "CUSTOM" and data.useAnchorPerUnit and data.anchorPerUnit == "CUSTOM") end, {"customAnchorPerUnit"}, nil, nil, nil, nil, nil, true)
local borderHideFunc = function() return data.useAnchorPerUnit or data.grow == "CUSTOM" end
local disableSelfPoint = function() return data.grow ~= "CUSTOM" and data.grow ~= "GRID" and not data.useAnchorPerUnit end
for k, v in pairs(WeakAuras.BorderOptions(id, data, nil, borderHideFunc, 70)) do
options[k] = v
end
return {
dynamicgroup = options,
position = WeakAuras.PositionOptions(id, data, nil, true, disableSelfPoint),
};
end
local function createThumbnail()
-- frame
local thumbnail = CreateFrame("FRAME", nil, UIParent);
thumbnail:SetWidth(32);
thumbnail:SetHeight(32);
-- border
local border = thumbnail:CreateTexture(nil, "OVERLAY");
border:SetAllPoints(thumbnail);
border:SetTexture("Interface\\BUTTONS\\UI-Quickslot2.blp");
border:SetTexCoord(0.2, 0.8, 0.2, 0.8);
return thumbnail
end
local function defaultIconAnimation(self, elapsed)
self.elapsed = self.elapsed + elapsed
if(self.elapsed < 0.5) then
self.t2:SetPoint("TOP", self.t1, "BOTTOM", 0, -2 + (28 * self.elapsed))
self.t2:SetAlpha(1 - (2 * self.elapsed))
elseif(self.elapsed < 1.5) then
-- do nothing
elseif(self.elapsed < 2) then
self.t2:SetPoint("TOP", self.t1, "BOTTOM", 0, -2 + (28 * (2 - self.elapsed)))
self.t2:SetAlpha((2 * self.elapsed) - 3)
elseif(self.elapsed < 3) then
-- do nothing
else
self.elapsed = self.elapsed - 3
end
end
local function createAnimatedDefaultIcon(parent)
local defaultIcon = CreateFrame("FRAME", nil, parent);
parent.defaultIcon = defaultIcon;
local t1 = defaultIcon:CreateTexture(nil, "ARTWORK");
t1:SetWidth(24);
t1:SetHeight(6);
t1:SetTexture(0.8, 0, 0);
t1:SetPoint("TOP", parent, "TOP", 0, -6);
local t2 = defaultIcon:CreateTexture(nil, "ARTWORK");
t2:SetWidth(12);
t2:SetHeight(12);
t2:SetTexture(0.2, 0.8, 0.2);
t2:SetPoint("TOP", t1, "BOTTOM", 0, -2);
local t3 = defaultIcon:CreateTexture(nil, "ARTWORK");
t3:SetWidth(30);
t3:SetHeight(4);
t3:SetTexture(0.1, 0.25, 1);
t3:SetPoint("TOP", t2, "BOTTOM", 0, -2);
local t4 = defaultIcon:CreateTexture(nil, "OVERLAY");
t4:SetWidth(1);
t4:SetHeight(36);
t4:SetTexture(1, 1, 1);
t4:SetPoint("CENTER", parent, "CENTER");
defaultIcon.t1 = t1
defaultIcon.t2 = t2
defaultIcon.elapsed = 0;
defaultIcon:SetScript("OnUpdate", defaultIconAnimation)
defaultIcon:SetScript("OnHide", function(self) self:SetScript("OnUpdate", nil) end)
defaultIcon:SetScript("OnShow", function(self) self:SetScript("OnUpdate", defaultIconAnimation) end)
return defaultIcon
end
-- Modify preview thumbnail
local function modifyThumbnail(parent, frame, data)
function frame:SetIcon(path)
if not frame.icon then
local icon = frame:CreateTexture(nil, "OVERLAY")
icon:SetAllPoints(frame)
frame.icon = icon
end
local success = frame.icon:SetTexture(path or data.groupIcon) and (path or data.groupIcon)
if success then
if frame.defaultIcon then
frame.defaultIcon:Hide()
end
frame.icon:Show()
else
if frame.icon then
frame.icon:Hide()
end
if not frame.defaultIcon then
frame.defaultIcon = createAnimatedDefaultIcon(frame)
end
frame.defaultIcon:Show()
end
end
frame:SetIcon()
end
local function createIcon()
local thumbnail = createThumbnail(UIParent)
thumbnail.defaultIcon = createAnimatedDefaultIcon(thumbnail)
return thumbnail
end
WeakAuras.RegisterRegionOptions("dynamicgroup", createOptions, createIcon, L["Dynamic Group"], createThumbnail, modifyThumbnail, L["A group that dynamically controls the positioning of its children"]);
+647
View File
@@ -0,0 +1,647 @@
if not WeakAuras.IsCorrectVersion() then return end
local L = WeakAuras.L;
-- Calculate bounding box
local function getRect(data)
-- Temp variables
local blx, bly, trx, try;
blx, bly = data.xOffset or 0, data.yOffset or 0;
if (data.width == nil or data.height == nil) then
return blx, bly, blx, bly;
end
-- Calc bounding box
if(data.selfPoint:find("LEFT")) then
trx = blx + data.width;
elseif(data.selfPoint:find("RIGHT")) then
trx = blx;
blx = blx - data.width;
else
blx = blx - (data.width/2);
trx = blx + data.width;
end
if(data.selfPoint:find("BOTTOM")) then
try = bly + data.height;
elseif(data.selfPoint:find("TOP")) then
try = bly;
bly = bly - data.height;
else
bly = bly - (data.height/2);
try = bly + data.height;
end
-- Return data
return blx, bly, trx, try;
end
-- Create region options table
local function createOptions(id, data)
-- Region options
local options = {
__title = L["Group Settings"],
__order = 1,
groupIcon = {
type = "input",
width = WeakAuras.normalWidth,
name = WeakAuras.newFeatureString..L["Group Icon"],
desc = L["Set Thumbnail Icon"],
order = 0.50,
get = function()
return data.groupIcon and tostring(data.groupIcon) or ""
end,
set = function(info, v)
data.groupIcon = v
WeakAuras.Add(data)
WeakAuras.UpdateThumbnail(data)
WeakAuras.SetIconNames(data)
end
},
chooseIcon = {
type = "execute",
width = WeakAuras.normalWidth,
name = L["Choose"],
order = 0.51,
func = function() WeakAuras.OpenIconPicker(data, "groupIcon", true) end
},
align_h = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Horizontal Align"],
order = 10,
values = WeakAuras.align_types,
get = function()
if(#data.controlledChildren < 1) then
return nil;
end
local alignedCenter, alignedRight, alignedLeft = "CENTER", "RIGHT", "LEFT";
for index, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
if(childData) then
local left, _, right = getRect(childData);
local center = (left + right) / 2;
if(math.abs(right) >= 0.01) then
alignedRight = nil;
end
if(math.abs(left) >= 0.01) then
alignedLeft = nil;
end
if(math.abs(center) >= 0.01) then
alignedCenter = nil;
end
end
end
return (alignedCenter or alignedRight or alignedLeft);
end,
set = function(info, v)
for index, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
local childRegion = WeakAuras.GetRegion(childId)
if(childData and childRegion) then
if(v == "CENTER") then
if(childData.selfPoint:find("LEFT")) then
childData.xOffset = 0 - ((childData.width or childRegion.width) / 2);
elseif(childData.selfPoint:find("RIGHT")) then
childData.xOffset = 0 + ((childData.width or childRegion.width) / 2);
else
childData.xOffset = 0;
end
elseif(v == "LEFT") then
if(childData.selfPoint:find("LEFT")) then
childData.xOffset = 0;
elseif(childData.selfPoint:find("RIGHT")) then
childData.xOffset = 0 + (childData.width or childRegion.width);
else
childData.xOffset = 0 + ((childData.width or childRegion.width) / 2);
end
elseif(v == "RIGHT") then
if(childData.selfPoint:find("LEFT")) then
childData.xOffset = 0 - (childData.width or childRegion.width);
elseif(childData.selfPoint:find("RIGHT")) then
childData.xOffset = 0;
else
childData.xOffset = 0 - ((childData.width or childRegion.width) / 2);
end
end
WeakAuras.Add(childData);
end
end
WeakAuras.Add(data);
WeakAuras.ResetMoverSizer();
end
},
align_v = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Vertical Align"],
order = 15,
values = WeakAuras.rotated_align_types,
get = function()
if(#data.controlledChildren < 1) then
return nil;
end
local alignedCenter, alignedBottom, alignedTop = "CENTER", "RIGHT", "LEFT";
for index, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
if(childData) then
local _, bottom, _, top = getRect(childData);
local center = (bottom + top) / 2;
if(math.abs(bottom) >= 0.01) then
alignedBottom = nil;
end
if(math.abs(top) >= 0.01) then
alignedTop = nil;
end
if(math.abs(center) >= 0.01) then
alignedCenter = nil;
end
end
end
return alignedCenter or alignedBottom or alignedTop;
end,
set = function(info, v)
for index, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
local childRegion = WeakAuras.GetRegion(childId)
if(childData and childRegion) then
if(v == "CENTER") then
if(childData.selfPoint:find("BOTTOM")) then
childData.yOffset = 0 - ((childData.height or childRegion.height) / 2);
elseif(childData.selfPoint:find("TOP")) then
childData.yOffset = 0 + ((childData.height or childRegion.height) / 2);
else
childData.yOffset = 0;
end
elseif(v == "RIGHT") then
if(childData.selfPoint:find("BOTTOM")) then
childData.yOffset = 0;
elseif(childData.selfPoint:find("TOP")) then
childData.yOffset = 0 + (childData.height or childRegion.height);
else
childData.yOffset = 0 + ((childData.height or childRegion.height) / 2);
end
elseif(v == "LEFT") then
if(childData.selfPoint:find("BOTTOM")) then
childData.yOffset = 0 - ( childData.height or childRegion.height);
elseif(childData.selfPoint:find("TOP")) then
childData.yOffset = 0;
else
childData.yOffset = 0 - ((childData.height or childRegion.height) / 2);
end
end
WeakAuras.Add(childData);
end
end
WeakAuras.Add(data);
WeakAuras.ResetMoverSizer();
end
},
distribute_h = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Distribute Horizontally"],
order = 20,
softMin = -100,
softMax = 100,
bigStep = 1,
get = function()
if(#data.controlledChildren < 2) then
return nil;
end
local spaced;
local previousData;
for index, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
if(childData) then
local left, _, right = getRect(childData);
if not(previousData) then
if not(math.abs(left) < 0.01 or math.abs(right) < 0.01) then
return nil;
end
previousData = childData;
else
local pleft, _, pright = getRect(previousData);
if(left - pleft > 0) then
if not(spaced) then
spaced = left - pleft;
else
if(math.abs(spaced - (left - pleft)) > 0.01) then
return nil;
end
end
elseif(right - pright < 0) then
if not(spaced) then
spaced = right - pright;
else
if(math.abs(spaced - (right - pright)) > 0.01) then
return nil;
end
end
else
return nil;
end
end
previousData = childData;
end
end
return spaced;
end,
set = function(info, v)
local xOffset = 0;
for index, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
local childRegion = WeakAuras.GetRegion(childId)
if(childData and childRegion) then
if(v > 0) then
if(childData.selfPoint:find("LEFT")) then
childData.xOffset = xOffset;
elseif(childData.selfPoint:find("RIGHT")) then
childData.xOffset = xOffset + (childData.width or childRegion.width);
else
childData.xOffset = xOffset + ((childData.width or childRegion.width) / 2);
end
xOffset = xOffset + v;
elseif(v < 0) then
if(childData.selfPoint:find("LEFT")) then
childData.xOffset = xOffset - (childData.width or childRegion.width);
elseif(childData.selfPoint:find("RIGHT")) then
childData.xOffset = xOffset;
else
childData.xOffset = xOffset - ((childData.width or childRegion.width) / 2);
end
xOffset = xOffset + v;
end
WeakAuras.Add(childData);
end
end
WeakAuras.Add(data);
WeakAuras.ResetMoverSizer();
end
},
distribute_v = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Distribute Vertically"],
order = 25,
softMin = -100,
softMax = 100,
bigStep = 1,
get = function()
if(#data.controlledChildren < 2) then
return nil;
end
local spaced;
local previousData;
for index, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
if(childData) then
local _, bottom, _, top = getRect(childData);
if not(previousData) then
if not(math.abs(bottom) < 0.01 or math.abs(top) < 0.01) then
return nil;
end
previousData = childData;
else
local _, pbottom, _, ptop = getRect(previousData);
if(bottom - pbottom > 0) then
if not(spaced) then
spaced = bottom - pbottom;
else
if(math.abs(spaced - (bottom - pbottom)) > 0.01) then
return nil;
end
end
elseif(top - ptop < 0) then
if not(spaced) then
spaced = top - ptop;
else
if(math.abs(spaced - (top - ptop)) > 0.01) then
return nil;
end
end
else
return nil;
end
end
previousData = childData;
end
end
return spaced;
end,
set = function(info, v)
local yOffset = 0;
for index, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
local childRegion = WeakAuras.GetRegion(childId)
if(childData and childRegion) then
if(v > 0) then
if(childData.selfPoint:find("BOTTOM")) then
childData.yOffset = yOffset;
elseif(childData.selfPoint:find("TOP")) then
childData.yOffset = yOffset + (childData.height or childRegion.height);
else
childData.yOffset = yOffset + ((childData.height or childRegion.height) / 2);
end
yOffset = yOffset + v;
elseif(v < 0) then
if(childData.selfPoint:find("BOTTOM")) then
childData.yOffset = yOffset - (childData.height or childRegion.height);
elseif(childData.selfPoint:find("TOP")) then
childData.yOffset = yOffset;
else
childData.yOffset = yOffset - ((childData.height or childRegion.height) / 2);
end
yOffset = yOffset + v;
end
WeakAuras.Add(childData);
end
end
WeakAuras.Add(data);
WeakAuras.ResetMoverSizer();
end
},
space_h = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Space Horizontally"],
order = 30,
softMin = -100,
softMax = 100,
bigStep = 1,
get = function()
if(#data.controlledChildren < 2) then
return nil;
end
local spaced;
local previousData;
for index, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
if(childData) then
local left, _, right = getRect(childData);
if not(previousData) then
if not(math.abs(left) < 0.01 or math.abs(right) < 0.01) then
return nil;
end
previousData = childData;
else
local pleft, _, pright = getRect(previousData);
if(left - pright > 0) then
if not(spaced) then
spaced = left - pright;
else
if(math.abs(spaced - (left - pright)) > 0.01) then
return nil;
end
end
elseif(right - pleft < 0) then
if not(spaced) then
spaced = right - pleft;
else
if(math.abs(spaced - (right - pleft)) > 0.01) then
return nil;
end
end
else
return nil;
end
end
previousData = childData;
end
end
return spaced;
end,
set = function(info, v)
local xOffset = 0;
for index, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
local childRegion = WeakAuras.GetRegion(childId)
if(childData and childRegion) then
if(v > 0) then
if(childData.selfPoint:find("LEFT")) then
childData.xOffset = xOffset;
elseif(childData.selfPoint:find("RIGHT")) then
childData.xOffset = xOffset + (childData.width or childRegion.width);
else
childData.xOffset = xOffset + ((childData.width or childRegion.width) / 2);
end
xOffset = xOffset + v + (childData.width or childRegion.width);
elseif(v < 0) then
if(childData.selfPoint:find("LEFT")) then
childData.xOffset = xOffset - (childData.width or childRegion.width);
elseif(childData.selfPoint:find("RIGHT")) then
childData.xOffset = xOffset;
else
childData.xOffset = xOffset - ((childData.width or childRegion.width) / 2);
end
xOffset = xOffset + v - (childData.width or childRegion.width);
end
WeakAuras.Add(childData);
end
end
WeakAuras.Add(data);
WeakAuras.ResetMoverSizer();
end
},
space_v = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Space Vertically"],
order = 35,
softMin = -100,
softMax = 100,
bigStep = 1,
get = function()
if(#data.controlledChildren < 2) then
return nil;
end
local spaced;
local previousData;
for index, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
if(childData) then
local _, bottom, _, top = getRect(childData);
if not(previousData) then
if not(math.abs(bottom) < 0.01 or math.abs(top) < 0.01) then
return nil;
end
previousData = childData;
else
local _, pbottom, _, ptop = getRect(previousData);
if(bottom - ptop > 0) then
if not(spaced) then
spaced = bottom - ptop;
else
if(math.abs(spaced - (bottom - ptop)) > 0.01) then
return nil;
end
end
elseif(top - pbottom < 0) then
if not(spaced) then
spaced = top - pbottom;
else
if(math.abs(spaced - (top - pbottom)) > 0.01) then
return nil;
end
end
else
return nil;
end
end
previousData = childData;
end
end
return spaced;
end,
set = function(info, v)
local yOffset = 0;
for index, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
local childRegion = WeakAuras.GetRegion(childId)
if(childData and childRegion) then
if(v > 0) then
if(childData.selfPoint:find("BOTTOM")) then
childData.yOffset = yOffset;
elseif(childData.selfPoint:find("TOP")) then
childData.yOffset = yOffset + (childData.height or childRegion.height);
else
childData.yOffset = yOffset + ((childData.height or childRegion.height) / 2);
end
yOffset = yOffset + v + (childData.height or childRegion.height);
elseif(v < 0) then
if(childData.selfPoint:find("BOTTOM")) then
childData.yOffset = yOffset - (childData.height or childRegion.height);
elseif(childData.selfPoint:find("TOP")) then
childData.yOffset = yOffset;
else
childData.yOffset = yOffset - ((childData.height or childRegion.height) / 2);
end
yOffset = yOffset + v - (childData.height or childRegion.height);
end
WeakAuras.Add(childData);
end
end
WeakAuras.Add(data);
WeakAuras.ResetMoverSizer();
end
},
scale = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Group Scale"],
order = 45,
min = 0.05,
softMax = 2,
bigStep = 0.05,
get = function()
return data.scale or 1
end,
set = function(info, v)
data.scale = data.scale or 1
local change = 1 - (v/data.scale)
data.xOffset = data.xOffset/(1-change)
data.yOffset = data.yOffset/(1-change)
data.scale = v
WeakAuras.Add(data);
WeakAuras.ResetMoverSizer();
end
},
endHeader = {
type = "header",
order = 100,
name = "",
},
};
for k, v in pairs(WeakAuras.BorderOptions(id, data, nil, nil, 70)) do
options[k] = v
end
return {
group = options,
position = WeakAuras.PositionOptions(id, data, nil, true, true),
};
end
local function createThumbnail()
-- frame
local thumbnail = CreateFrame("FRAME", nil, UIParent);
thumbnail:SetWidth(32);
thumbnail:SetHeight(32);
-- border
local border = thumbnail:CreateTexture(nil, "OVERLAY");
border:SetAllPoints(thumbnail);
border:SetTexture("Interface\\BUTTONS\\UI-Quickslot2.blp");
border:SetTexCoord(0.2, 0.8, 0.2, 0.8);
local icon = thumbnail:CreateTexture(nil, "OVERLAY")
icon:SetAllPoints(thumbnail)
thumbnail.icon = icon
return thumbnail
end
local function createDefaultIcon(parent)
-- default Icon
local defaultIcon = CreateFrame("FRAME", nil, parent);
parent.defaultIcon = defaultIcon;
local t1 = defaultIcon:CreateTexture(nil, "ARTWORK");
t1:SetWidth(24);
t1:SetHeight(8);
t1:SetTexture(0.8, 0, 0, 0.5);
t1:SetPoint("TOP", parent, "TOP", 0, -6);
local t2 = defaultIcon:CreateTexture(nil, "ARTWORK");
t2:SetWidth(20);
t2:SetHeight(20);
t2:SetTexture(0.2, 0.8, 0.2, 0.5);
t2:SetPoint("TOP", t1, "BOTTOM", 0, 5);
local t3 = defaultIcon:CreateTexture(nil, "ARTWORK");
t3:SetWidth(20);
t3:SetHeight(12);
t3:SetTexture(0.1, 0.25, 1, 0.5);
t3:SetPoint("TOP", t2, "BOTTOM", -5, 8);
return defaultIcon
end
-- Modify preview thumbnail
local function modifyThumbnail(parent, frame, data)
function frame:SetIcon(path)
if data.groupIcon then
local success = frame.icon:SetTexture(data.groupIcon)
if success then
if frame.defaultIcon then
frame.defaultIcon:Hide()
end
frame.icon:Show()
return
end
end
if frame.icon then
frame.icon:Hide()
end
if not frame.defaultIcon then
frame.defaultIcon = createDefaultIcon(frame)
end
frame.defaultIcon:Show()
end
frame:SetIcon(nil)
end
-- Create "new region" preview
local function createIcon()
local thumbnail = createThumbnail(UIParent)
thumbnail.defaultIcon = createDefaultIcon(thumbnail)
return thumbnail
end
-- Register new region type options with WeakAuras
WeakAuras.RegisterRegionOptions("group", createOptions, createIcon, L["Group"], createThumbnail, modifyThumbnail, L["Controls the positioning and configuration of multiple displays at the same time"]);
+410
View File
@@ -0,0 +1,410 @@
if not WeakAuras.IsCorrectVersion() then return end
local Masque = LibStub("Masque", true)
local L = WeakAuras.L
local function createOptions(id, data)
local hiddenIconExtra = function()
return WeakAuras.IsCollapsed("icon", "icon", "iconextra", true);
end
local indentWidth = 0.15
local options = {
__title = L["Icon Settings"],
__order = 1,
color = {
type = "color",
width = WeakAuras.normalWidth,
name = L["Color"],
hasAlpha = true,
order = 1
},
auto = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Automatic Icon"],
order = 2,
disabled = function() return not WeakAuras.CanHaveAuto(data); end,
get = function() return WeakAuras.CanHaveAuto(data) and data.auto; end
},
displayIcon = {
type = "input",
width = WeakAuras.normalWidth,
name = L["Display Icon"],
hidden = function() return WeakAuras.CanHaveAuto(data) and data.auto; end,
order = 3,
get = function()
return data.displayIcon and tostring(data.displayIcon) or "";
end,
set = function(info, v)
data.displayIcon = v;
WeakAuras.Add(data);
WeakAuras.UpdateThumbnail(data);
WeakAuras.SetIconNames(data);
end
},
chooseIcon = {
type = "execute",
width = WeakAuras.normalWidth,
name = L["Choose"],
hidden = function() return WeakAuras.CanHaveAuto(data) and data.auto; end,
order = 4,
func = function() WeakAuras.OpenIconPicker(data, "displayIcon"); end
},
desaturate = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Desaturate"],
order = 5,
},
useTooltip = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Tooltip on Mouseover"],
hidden = function() return not WeakAuras.CanHaveTooltip(data) end,
order = 6
},
iconExtraDescription = {
type = "execute",
control = "WeakAurasExpandSmall",
name = function()
local line = L["|cFFffcc00Extra Options:|r"]
local changed = false
if data.alpha ~= 1 then
line = L["%s Alpha: %d%%"]:format(line, data.alpha*100)
changed = true
end
if data.zoom ~= 0 then
line = L["%s Zoom: %d%%"]:format(line, data.zoom*100)
changed = true
end
if data.iconInset and data.iconInset ~= 0 then
line = L["%s Inset: %d%%"]:format(line, data.iconInset*100)
changed = true
end
if data.keepAspectRatio then
line = L["%s Keep Aspect Ratio"]:format(line)
changed = true
end
if not changed then
line = L["%s Default Alpha, Zoom, Icon Inset, Aspect Ratio"]:format(line)
end
return line
end,
width = WeakAuras.doubleWidth,
order = 7,
image = function()
local collapsed = WeakAuras.IsCollapsed("icon", "icon", "iconextra", true);
return collapsed and "Interface\\AddOns\\WeakAuras\\Media\\Textures\\edit" or "Interface\\AddOns\\WeakAuras\\Media\\Textures\\editdown"
end,
imageWidth = 24,
imageHeight = 24,
func = function()
local collapsed = WeakAuras.IsCollapsed("icon", "icon", "iconextra", true);
WeakAuras.SetCollapsed("icon", "icon", "iconextra", not collapsed);
end,
},
iconExtra_space1 = {
type = "description",
name = "",
width = indentWidth,
order = 7.02,
hidden = hiddenIconExtra,
},
alpha = {
type = "range",
width = WeakAuras.normalWidth - indentWidth,
name = L["Alpha"],
order = 7.03,
min = 0,
max = 1,
bigStep = 0.01,
isPercent = true,
hidden = hiddenIconExtra,
},
zoom = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Zoom"],
order = 7.04,
min = 0,
max = 1,
bigStep = 0.01,
isPercent = true,
hidden = hiddenIconExtra,
},
iconExtra_space2 = {
type = "description",
name = "",
width = indentWidth,
order = 7.05,
hidden = hiddenIconExtra,
},
iconInset = {
type = "range",
width = WeakAuras.normalWidth - indentWidth,
name = L["Icon Inset"],
order = 7.06,
min = 0,
max = 1,
bigStep = 0.01,
isPercent = true,
hidden = function()
return not Masque or hiddenIconExtra();
end
},
keepAspectRatio = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Keep Aspect Ratio"],
order = 7.07,
hidden = hiddenIconExtra,
},
cooldownHeader = {
type = "header",
order = 11,
name = L["Cooldown Settings"],
},
cooldown = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Show Cooldown"],
order = 11.1,
disabled = function() return not WeakAuras.CanHaveDuration(data); end,
get = function() return WeakAuras.CanHaveDuration(data) and data.cooldown; end
},
inverse = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Inverse"],
order = 11.2,
disabled = function() return not (WeakAuras.CanHaveDuration(data) and data.cooldown); end,
get = function() return data.inverse and WeakAuras.CanHaveDuration(data) and data.cooldown; end,
hidden = function() return not data.cooldown end
},
cooldownEdge = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Cooldown Edge"],
order = 11.3,
disabled = function() return not WeakAuras.CanHaveDuration(data) end,
hidden = function() return not data.cooldown end,
},
endHeader = {
type = "header",
order = 100,
name = "",
},
};
return {
icon = options,
position = WeakAuras.PositionOptions(id, data),
};
end
local function createThumbnail()
local frame = CreateFrame("FRAME", nil, UIParent)
local icon = frame:CreateTexture();
icon:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark");
icon:SetAllPoints(frame)
frame.icon = icon
return frame;
end
local function modifyThumbnail(parent, frame, data)
local texWidth = 0.25 * data.zoom;
frame.icon:SetTexCoord(texWidth, 1 - texWidth, texWidth, 1 - texWidth);
frame:SetParent(parent)
function frame:SetIcon(path)
local success = self.icon:SetTexture(data.auto and path or data.displayIcon) and (data.auto and path or data.displayIcon);
if not(success) then
self.icon:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark");
end
end
if data then
local name, icon = WeakAuras.GetNameAndIcon(data);
frame:SetIcon(icon)
end
end
local templates = {
{
title = L["Default"],
icon = "Interface\\ICONS\\Temp.blp",
data = {
cooldown = true,
inverse = true,
};
},
{
title = L["Tiny Icon"],
description = L["A 20x20 pixels icon"],
icon = "Interface\\ICONS\\Temp.blp",
data = {
width = 20,
height = 20,
cooldown = true,
inverse = true,
};
},
{
title = L["Small Icon"],
description = L["A 32x32 pixels icon"],
icon = "Interface\\ICONS\\Temp.blp",
data = {
width = 32,
height = 32,
cooldown = true,
inverse = true,
};
},
{
title = L["Medium Icon"],
description = L["A 40x40 pixels icon"],
icon = "Interface\\ICONS\\Temp.blp",
data = {
width = 40,
height = 40,
cooldown = true,
inverse = true,
};
},
{
title = L["Big Icon"],
description = L["A 48x48 pixels icon"],
icon = "Interface\\ICONS\\Temp.blp",
data = {
width = 48,
height = 48,
cooldown = true,
inverse = true,
};
},
{
title = L["Huge Icon"],
description = L["A 64x64 pixels icon"],
icon = "Interface\\ICONS\\Temp.blp",
data = {
width = 64,
height = 64,
cooldown = true,
inverse = true,
};
}
}
local anchorPoints = {
BOTTOMLEFT = {
display = { L["Edge"], L["Bottom Left"] },
type = "point"
},
BOTTOM = {
display = { L["Edge"], L["Bottom"] },
type = "point"
},
BOTTOMRIGHT = {
display = { L["Edge"], L["Bottom Right"] },
type = "point"
},
RIGHT = {
display = { L["Edge"], L["Right"] },
type = "point"
},
TOPRIGHT = {
display = { L["Edge"], L["Top Right"] },
type = "point"
},
TOP = {
display = { L["Edge"], L["Top"] },
type = "point"
},
TOPLEFT = {
display = { L["Edge"], L["Top Left"] },
type = "point"
},
LEFT = {
display = { L["Edge"], L["Left"] },
type = "point"
},
CENTER = {
display = L["Center"],
type = "point"
},
INNER_BOTTOMLEFT = {
display = { L["Inner"], L["Bottom Left"] },
type = "point"
},
INNER_BOTTOM = {
display = { L["Inner"], L["Bottom"] },
type = "point"
},
INNER_BOTTOMRIGHT = {
display = { L["Inner"], L["Bottom Right"] },
type = "point"
},
INNER_RIGHT = {
display = { L["Inner"], L["Right"] },
type = "point"
},
INNER_TOPRIGHT = {
display = { L["Inner"], L["Top Right"] },
type = "point"
},
INNER_TOP = {
display = { L["Inner"], L["Top"] },
type = "point"
},
INNER_TOPLEFT = {
display = { L["Inner"], L["Top Left"] },
type = "point"
},
INNER_LEFT = {
display = { L["Inner"], L["Left"] },
type = "point"
},
OUTER_BOTTOMLEFT = {
display = { L["Outer"], L["Bottom Left"] },
type = "point"
},
OUTER_BOTTOM = {
display = { L["Outer"], L["Bottom"] },
type = "point"
},
OUTER_BOTTOMRIGHT = {
display = { L["Outer"], L["Bottom Right"] },
type = "point"
},
OUTER_RIGHT = {
display = { L["Outer"], L["Right"] },
type = "point"
},
OUTER_TOPRIGHT = {
display = { L["Outer"], L["Top Right"] },
type = "point"
},
OUTER_TOP = {
display = { L["Outer"], L["Top"] },
type = "point"
},
OUTER_TOPLEFT = {
display = { L["Outer"], L["Top Left"] },
type = "point"
},
OUTER_LEFT = {
display = { L["Outer"], L["Left"] },
type = "point"
},
ALL = {
display = L["Whole Area"],
type = "area"
}
}
local function GetAnchors(data)
return anchorPoints;
end
WeakAuras.RegisterRegionOptions("icon", createOptions, "interface\\icons\\spell_holy_sealofsalvation.blp", L["Icon"], createThumbnail, modifyThumbnail, L["Shows a spell icon with an optional cooldown overlay"], templates, GetAnchors);
+296
View File
@@ -0,0 +1,296 @@
if not WeakAuras.IsCorrectVersion() then return end
local L = WeakAuras.L;
local function createOptions(id, data)
local options = {
__title = L["Model Settings"],
__order = 1,
modelIsUnit = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Show model of unit "],
order = 0.5,
hidden = function() return data.modelDisplayInfo and WeakAuras.BuildInfo > 80100 end
},
-- Option for modelIsDisplayInfo added below
-- Option for path/id added below
space2 = {
type = "execute",
width = WeakAuras.normalWidth,
name = "",
order = 1.5,
image = function() return "", 0, 0 end,
hidden = function() return data.modelIsUnit end
},
chooseModel = {
type = "execute",
width = WeakAuras.normalWidth,
name = L["Choose"],
order = 2,
func = function()
WeakAuras.OpenModelPicker(data);
end,
hidden = function() return data.modelIsUnit end
},
advance = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Animate"],
order = 5,
},
sequence = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Animation Sequence"],
min = 0,
max = 150,
step = 1,
bigStep = 1,
order = 6,
disabled = function() return not data.advance end
},
model_z = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Z Offset"],
softMin = -20,
softMax = 20,
step = .001,
bigStep = 0.05,
order = 20,
},
model_x = {
type = "range",
width = WeakAuras.normalWidth,
name = L["X Offset"],
softMin = -20,
softMax = 20,
step = .001,
bigStep = 0.05,
order = 30,
},
model_y = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Y Offset"],
softMin = -20,
softMax = 20,
step = .001,
bigStep = 0.05,
order = 40,
},
rotation = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Rotation"],
min = 0,
max = 360,
step = 1,
bigStep = 3,
order = 45,
},
endHeader = {
type = "header",
order = 100,
name = "",
},
};
if WeakAuras.BuildInfo > 80100 then
options.modelDisplayInfo = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Use Display Info Id"],
order = 0.6,
hidden = function() return data.modelIsUnit end
}
else
options.model_path = {
type = "input",
width = WeakAuras.doubleWidth,
name = L["Model"],
order = 1
}
end
for k, v in pairs(WeakAuras.BorderOptions(id, data, nil, nil, 70)) do
options[k] = v
end
return {
model = options,
position = WeakAuras.PositionOptions(id, data, nil, nil, nil),
};
end
local function createThumbnail()
local borderframe = CreateFrame("FRAME", nil, UIParent);
borderframe:SetWidth(32);
borderframe:SetHeight(32);
local border = borderframe:CreateTexture(nil, "Overlay");
border:SetAllPoints(borderframe);
border:SetTexture("Interface\\BUTTONS\\UI-Quickslot2.blp");
border:SetTexCoord(0.2, 0.8, 0.2, 0.8);
local model = CreateFrame("PlayerModel", nil, borderframe);
borderframe.model = model;
model:SetFrameStrata("FULLSCREEN");
return borderframe;
end
local function modifyThumbnail(parent, region, data)
region:SetParent(parent)
local model = region.model
region:SetScript("OnUpdate", function()
local optionsFrame = WeakAuras.OptionsFrame();
if optionsFrame then
model:SetParent(optionsFrame)
region:SetScript("OnUpdate", nil)
end
end);
model:SetAllPoints(region);
model:SetFrameStrata(region:GetParent():GetFrameStrata());
model:SetWidth(region:GetWidth() - 2);
model:SetHeight(region:GetHeight() - 2);
model:SetPoint("center", region, "center");
WeakAuras.SetModel(model, data.model_path, data.modelIsUnit, data.modelDisplayInfo)
model:SetScript("OnShow", function()
WeakAuras.SetModel(model, data.model_path, data.modelIsUnit, data.modelDisplayInfo)
model:SetPosition(data.model_z, data.model_x, data.model_y);
model:SetFacing(rad(data.rotation));
end);
model:SetPosition(data.model_z, data.model_x, data.model_y);
model:SetFacing(rad(data.rotation));
end
local function createIcon()
local data = {
model_path = "Creature/Arthaslichking/arthaslichking.m2",
modelIsUnit = false,
model_x = 0,
model_y = 0,
model_z = 0.35,
sequence = 1,
advance = false,
rotation = 0,
scale = 1,
height = 40,
width = 40
};
local thumbnail = createThumbnail(UIParent);
modifyThumbnail(UIParent, thumbnail, data, nil, 50);
return thumbnail;
end
local templates = {
{
title = L["Default"],
data = {
};
},
{
title = L["Fire Orb"],
description = "",
data = {
width = 100,
height = 100,
model_path = "spells/6fx_smallfire.m2",
model_x = 0,
model_y = -0.5,
model_z = -1.5
},
},
{
title = L["Blue Sparkle Orb"],
description = "",
data = {
width = 100,
height = 100,
advance = true,
sequence = 1,
model_path = "spells/7fx_druid_halfmoon_missile.m2",
model_x = 0,
model_y = 0.7,
model_z = 1.5
},
},
{
title = L["Arcane Orb"],
description = "",
data = {
width = 100,
height = 100,
advance = true,
sequence = 1,
model_path = "spells/proc_arcane_impact_low.m2",
model_x = 0,
model_y = 0.8,
model_z = 2
},
},
{
title = L["Orange Rune"],
description = "",
data = {
width = 100,
height = 100,
advance = true,
sequence = 1,
model_path = "spells/7fx_godking_orangerune_state.m2",
},
},
{
title = L["Blue Rune"],
description = "",
data = {
width = 100,
height = 100,
advance = true,
sequence = 1,
model_path = "spells/7fx_godking_bluerune_state.m2",
}
},
{
title = L["Yellow Rune"],
description = "",
data = {
width = 100,
height = 100,
advance = true,
sequence = 1,
model_path = "spells/7fx_godking_yellowrune_state.m2",
}
},
{
title = L["Purple Rune"],
description = "",
data = {
width = 100,
height = 100,
advance = true,
sequence = 1,
model_path = "spells/7fx_godking_purplerune_state.m2",
}
},
{
title = L["Green Rune"],
description = "",
data = {
width = 100,
height = 100,
advance = true,
sequence = 1,
model_path = "spells/7fx_godking_greenrune_state.m2",
}
},
}
WeakAuras.RegisterRegionOptions("model", createOptions, createIcon, L["Model"], createThumbnail, modifyThumbnail, L["Shows a 3D model from the game files"], templates);
@@ -0,0 +1,819 @@
if not WeakAuras.IsCorrectVersion() then return end
local L = WeakAuras.L;
local function createOptions(id, data)
local options = {
__title = L["Progress Texture Settings"],
__order = 1,
foregroundTexture = {
width = WeakAuras.normalWidth,
type = "input",
name = L["Foreground Texture"],
order = 1
},
backgroundTexture = {
type = "input",
width = WeakAuras.normalWidth,
name = L["Background Texture"],
order = 5,
disabled = function() return data.sameTexture; end,
get = function() return data.sameTexture and data.foregroundTexture or data.backgroundTexture; end
},
mirror = {
type = "toggle",
width = WeakAuras.halfWidth,
name = L["Mirror"],
order = 10,
disabled = function() return data.orientation == "CLOCKWISE" or data.orientation == "ANTICLOCKWISE"; end
},
chooseForegroundTexture = {
type = "execute",
name = L["Choose"],
width = WeakAuras.halfWidth,
order = 12,
func = function()
WeakAuras.OpenTexturePicker(data, "foregroundTexture", WeakAuras.texture_types);
end
},
sameTexture = {
type = "toggle",
name = L["Same"],
width = WeakAuras.halfWidth,
order = 15
},
chooseBackgroundTexture = {
type = "execute",
name = L["Choose"],
width = WeakAuras.halfWidth,
order = 17,
func = function()
WeakAuras.OpenTexturePicker(data, "backgroundTexture", WeakAuras.texture_types);
end,
disabled = function() return data.sameTexture; end
},
desaturateForeground = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Desaturate"],
order = 17.5,
},
desaturateBackground = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Desaturate"],
order = 17.6,
},
blendMode = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Blend Mode"],
order = 20,
values = WeakAuras.blend_types
},
backgroundOffset = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Background Offset"],
min = 0,
softMax = 25,
bigStep = 1,
order = 25
},
orientation = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Orientation"],
order = 35,
values = WeakAuras.orientation_with_circle_types
},
compress = {
type = "toggle",
width = WeakAuras.halfWidth,
name = L["Compress"],
order = 40,
disabled = function() return data.orientation == "CLOCKWISE" or data.orientation == "ANTICLOCKWISE"; end
},
inverse = {
type = "toggle",
width = WeakAuras.halfWidth,
name = L["Inverse"],
order = 41
},
foregroundColor = {
type = "color",
width = WeakAuras.normalWidth,
name = L["Foreground Color"],
hasAlpha = true,
order = 30
},
backgroundColor = {
type = "color",
width = WeakAuras.normalWidth,
name = L["Background Color"],
hasAlpha = true,
order = 37
},
user_x = {
type = "range",
width = WeakAuras.normalWidth,
order = 42,
name = L["Re-center X"],
min = -0.5,
max = 0.5,
bigStep = 0.01,
hidden = function() return data.orientation == "CLOCKWISE" or data.orientation == "ANTICLOCKWISE"; end
},
user_y = {
type = "range",
width = WeakAuras.normalWidth,
order = 44,
name = L["Re-center Y"],
min = -0.5,
max = 0.5,
bigStep = 0.01,
hidden = function() return data.orientation == "CLOCKWISE" or data.orientation == "ANTICLOCKWISE"; end
},
startAngle = {
type = "range",
width = WeakAuras.normalWidth,
order = 42,
name = L["Start Angle"],
min = 0,
max = 360,
bigStep = 1,
hidden = function() return data.orientation ~= "CLOCKWISE" and data.orientation ~= "ANTICLOCKWISE"; end
},
endAngle = {
type = "range",
width = WeakAuras.normalWidth,
order = 44,
name = L["End Angle"],
min = 0,
max = 360,
bigStep = 1,
hidden = function() return data.orientation ~= "CLOCKWISE" and data.orientation ~= "ANTICLOCKWISE"; end
},
crop_x = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Crop X"],
order = 46,
min = 0,
softMax = 2,
bigStep = 0.01,
isPercent = true,
set = function(info, v)
data.width = data.width * ((1 + data.crop_x) / (1 + v));
data.crop_x = v;
WeakAuras.Add(data);
WeakAuras.UpdateThumbnail(data);
WeakAuras.SetIconNames(data);
if(data.parent) then
local parentData = WeakAuras.GetData(data.parent);
if(parentData) then
WeakAuras.Add(parentData);
end
end
WeakAuras.ResetMoverSizer();
end,
},
crop_y = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Crop Y"],
order = 47,
min = 0,
softMax = 2,
bigStep = 0.01,
isPercent = true,
set = function(info, v)
data.height = data.height * ((1 + data.crop_y) / (1 + v));
data.crop_y = v;
WeakAuras.Add(data);
WeakAuras.UpdateThumbnail(data);
WeakAuras.SetIconNames(data);
if(data.parent) then
local parentData = WeakAuras.GetData(data.parent);
if(parentData) then
WeakAuras.Add(parentData);
end
end
WeakAuras.ResetMoverSizer();
end,
},
rotation = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Rotation"],
order = 52,
min = 0,
max = 360,
bigStep = 1
},
alpha = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Alpha"],
order = 48,
min = 0,
max = 1,
bigStep = 0.01,
isPercent = true
},
smoothProgress = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Smooth Progress"],
desc = L["Animates progress changes"],
order = 55.1
},
textureWrapMode = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Texture Wrap"],
order = 55.2,
values = WeakAuras.texture_wrap_types
},
slanted = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Slanted"],
order = 55.3,
hidden = function() return data.orientation == "CLOCKWISE" or data.orientation == "ANTICLOCKWISE"; end
},
slant = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Slant Amount"],
order = 55.4,
min = 0,
max = 1,
bigStep = 0.1,
hidden = function() return not data.slanted or data.orientation == "CLOCKWISE" or data.orientation == "ANTICLOCKWISE" end
},
slantFirst = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Inverse Slant"],
order = 55.5,
hidden = function() return not data.slanted or data.orientation == "CLOCKWISE" or data.orientation == "ANTICLOCKWISE" end
},
slantMode = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Slant Mode"],
order = 55.6,
hidden = function() return not data.slanted or data.orientation == "CLOCKWISE" or data.orientation == "ANTICLOCKWISE" end,
values = WeakAuras.slant_mode
},
spacer = {
type = "header",
name = "",
order = 56
},
endHeader = {
type = "header",
order = 100,
name = "",
},
};
options = WeakAuras.regionPrototype.AddAdjustedDurationOptions(options, data, 57);
local overlayInfo = WeakAuras.GetOverlayInfo(data);
if (overlayInfo and next(overlayInfo)) then
options["overlayheader"] = {
type = "header",
name = L["Overlays"],
order = 58
}
local index = 58.01
for id, display in ipairs(overlayInfo) do
options["overlaycolor" .. id] = {
type = "color",
width = WeakAuras.normalWidth,
name = string.format(L["%s Color"], display),
hasAlpha = true,
order = index,
get = function()
if (data.overlays and data.overlays[id]) then
return unpack(data.overlays[id]);
end
return 1, 1, 1, 1;
end,
set = function(info, r, g, b, a)
if (not data.overlays) then
data.overlays = {};
end
data.overlays[id] = { r, g, b, a};
WeakAuras.Add(data);
end
}
index = index + 0.01
end
options["overlayclip"] = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Clip Overlays"],
order = index
}
end
return {
progresstexture = options,
position = WeakAuras.PositionOptions(id, data),
};
end
-- Credit to CommanderSirow for taking the time to properly craft the ApplyTransform function
-- to the enhance the abilities of Progress Textures.
-- NOTES:
-- Most SetValue() changes are quite equal (among compress/non-compress)
-- (There is no GUI button for mirror_v, but mirror_h)
-- New/Used variables
-- region.user_x (0) - User defined center x-shift [-1, 1]
-- region.user_y (0) - User defined center y-shift [-1, 1]
-- region.mirror_v (false) - Mirroring along x-axis [bool]
-- region.mirror_h (false) - Mirroring along y-axis [bool]
-- region.cos_rotation (1) - cos(ANGLE), precalculated cos-function for given ANGLE [-1, 1]
-- region.sin_rotation (0) - sin(ANGLE), precalculated cos-function for given ANGLE [-1, 1]
-- region.scale (1.0) - user defined scaling [1, INF]
-- region.full_rotation (false) - Allow full rotation [bool]
local function ApplyTransform(x, y, region)
-- 1) Translate texture-coords to user-defined center
x = x - 0.5
y = y - 0.5
-- 2) Shrink texture by 1/sqrt(2)
x = x * 1.4142
y = y * 1.4142
-- 3) Scale texture by user-defined amount
x = x / region.scale_x
y = y / region.scale_y
-- 4) Apply mirroring if defined
if region.mirror_h then
x = -x
end
if region.mirror_v then
y = -y
end
-- 5) Rotate texture by user-defined value
--[[local x_tmp = region.cos_rotation * x - region.sin_rotation * y
local y_tmp = region.sin_rotation * x + region.cos_rotation * y
x = x_tmp
y = y_tmp]]
x, y = region.cos_rotation * x - region.sin_rotation * y, region.sin_rotation * x + region.cos_rotation * y
-- 6) Translate texture-coords back to (0,0)
x = x + 0.5 + region.user_x
y = y + 0.5 + region.user_y
-- Return results
return x, y
end
local function Transform(tx, x, y, angle, aspect) -- Translates texture to x, y and rotates about its center
local c, s = cos(angle), sin(angle)
y = y / aspect
local oy = 0.5 / aspect
local ULx, ULy = 0.5 + (x - 0.5) * c - (y - oy) * s, (oy + (y - oy) * c + (x - 0.5) * s) * aspect
local LLx, LLy = 0.5 + (x - 0.5) * c - (y + oy) * s, (oy + (y + oy) * c + (x - 0.5) * s) * aspect
local URx, URy = 0.5 + (x + 0.5) * c - (y - oy) * s, (oy + (y - oy) * c + (x + 0.5) * s) * aspect
local LRx, LRy = 0.5 + (x + 0.5) * c - (y + oy) * s, (oy + (y + oy) * c + (x + 0.5) * s) * aspect
tx:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy)
end
local function createThumbnail()
local borderframe = CreateFrame("FRAME", nil, UIParent);
borderframe:SetWidth(32);
borderframe:SetHeight(32);
local border = borderframe:CreateTexture(nil, "OVERLAY");
border:SetAllPoints(borderframe);
border:SetTexture("Interface\\BUTTONS\\UI-Quickslot2.blp");
border:SetTexCoord(0.2, 0.8, 0.2, 0.8);
local region = CreateFrame("FRAME", nil, borderframe);
borderframe.region = region;
region:SetWidth(32);
region:SetHeight(32);
local background = region:CreateTexture(nil, "BACKGROUND");
borderframe.background = background;
local foreground = region:CreateTexture(nil, "ART");
borderframe.foreground = foreground;
local OrgSetTexture = foreground.SetTexture;
-- WORKAROUND, setting the same texture with a different wrap mode does not change the wrap mode
foreground.SetTexture = function(self, texture, horWrapMode, verWrapMode)
local needToClear = (self.horWrapMode and self.horWrapMode ~= horWrapMode) or (self.verWrapMode and self.verWrapMode ~= verWrapMode);
self.horWrapMode = horWrapMode;
self.verWrapMode = verWrapMode;
if (needToClear) then
OrgSetTexture(self, nil);
end
OrgSetTexture(self, texture, horWrapMode, verWrapMode);
end
background.SetTexture = foreground.SetTexture;
borderframe.backgroundSpinner = WeakAuras.createSpinner(region, "BACKGROUND", 1);
borderframe.foregroundSpinner = WeakAuras.createSpinner(region, "ARTWORK", 1);
return borderframe;
end
local function modifyThumbnail(parent, borderframe, data, fullModify, size)
local region, background, foreground = borderframe.region, borderframe.background, borderframe.foreground;
local foregroundSpinner, backgroundSpinner = borderframe.foregroundSpinner, borderframe.backgroundSpinner;
size = size or 30;
local scale;
if(data.height > data.width) then
scale = size/data.height;
region:SetWidth(scale * data.width);
region:SetHeight(size);
foreground:SetWidth(scale * data.width);
foreground:SetHeight(size);
foregroundSpinner:SetWidth(scale * data.width);
foregroundSpinner:SetHeight(size);
backgroundSpinner:SetWidth(scale * data.width)
backgroundSpinner:SetHeight(size);
region.width = scale * data.width;
region.height = size;
else
scale = size/data.width;
region:SetWidth(size);
region:SetHeight(scale * data.height);
foreground:SetWidth(size);
foreground:SetHeight(scale * data.height);
foregroundSpinner:SetWidth(size);
foregroundSpinner:SetHeight(scale * data.height);
backgroundSpinner:SetWidth(size)
backgroundSpinner:SetHeight(scale * data.height);
region.width = size;
region.height = scale * data.height;
end
region:ClearAllPoints();
region:SetPoint("CENTER", borderframe, "CENTER");
background:SetTexture(data.sameTexture and data.foregroundTexture or data.backgroundTexture);
background:SetDesaturated(data.desaturateBackground)
background:SetVertexColor(data.backgroundColor[1], data.backgroundColor[2], data.backgroundColor[3], data.backgroundColor[4]);
background:SetBlendMode(data.blendMode);
backgroundSpinner:SetTexture(data.sameTexture and data.foregroundTexture or data.backgroundTexture);
backgroundSpinner:SetDesaturated(data.desaturateBackground)
backgroundSpinner:Color(data.backgroundColor[1], data.backgroundColor[2], data.backgroundColor[3], data.backgroundColor[4]);
backgroundSpinner:SetBlendMode(data.blendMode);
foreground:SetTexture(data.foregroundTexture);
foreground:SetVertexColor(data.foregroundColor[1], data.foregroundColor[2], data.foregroundColor[3], data.foregroundColor[4]);
foreground:SetBlendMode(data.blendMode);
foregroundSpinner:SetTexture(data.foregroundTexture);
foregroundSpinner:SetDesaturated(data.desaturateForeground);
foregroundSpinner:Color(data.foregroundColor[1], data.foregroundColor[2], data.foregroundColor[3], data.foregroundColor[4])
foregroundSpinner:SetBlendMode(data.blendMode);
background:ClearAllPoints();
foreground:ClearAllPoints();
background:SetPoint("BOTTOMLEFT", region, "BOTTOMLEFT");
background:SetPoint("TOPRIGHT", region, "TOPRIGHT");
region.mirror_h = data.mirror;
region.scale_x = 1 + (data.crop_x or 0.41);
region.scale_y = 1 + (data.crop_y or 0.41);
region.rotation = data.rotation or 0;
region.cos_rotation = cos(region.rotation);
region.sin_rotation = sin(region.rotation);
region.user_x = -1 * (data.user_x or 0);
region.user_y = data.user_y or 0;
region.aspect = 1;
local function orientHorizontal()
foreground:ClearAllPoints();
foreground:SetPoint("LEFT", region, "LEFT");
region.orientation = "HORIZONTAL_INVERSE";
if(data.compress) then
function region:SetValue(progress)
region.progress = progress;
local ULx, ULy = ApplyTransform(0, 0, region)
local LLx, LLy = ApplyTransform(0, 1, region)
local URx, URy = ApplyTransform(1, 0, region)
local LRx, LRy = ApplyTransform(1, 1, region)
foreground:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy);
foreground:SetWidth(region:GetWidth() * progress);
background:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy);
end
else
function region:SetValue(progress)
region.progress = progress;
local ULx , ULy = ApplyTransform(0, 0, region)
local LLx , LLy = ApplyTransform(0, 1, region)
local URx , URy = ApplyTransform(progress, 0, region)
local URx_, URy_ = ApplyTransform(1, 0, region)
local LRx , LRy = ApplyTransform(progress, 1, region)
local LRx_, LRy_ = ApplyTransform(1, 1, region)
foreground:SetTexCoord(ULx, ULy, LLx, LLy, URx , URy , LRx , LRy );
foreground:SetWidth(region:GetWidth() * progress);
background:SetTexCoord(ULx, ULy, LLx, LLy, URx_, URy_, LRx_, LRy_);
end
end
end
local function orientHorizontalInverse()
foreground:ClearAllPoints();
foreground:SetPoint("RIGHT", region, "RIGHT");
region.orientation = "HORIZONTAL";
if(data.compress) then
function region:SetValue(progress)
region.progress = progress;
local ULx, ULy = ApplyTransform(0, 0, region)
local LLx, LLy = ApplyTransform(0, 1, region)
local URx, URy = ApplyTransform(1, 0, region)
local LRx, LRy = ApplyTransform(1, 1, region)
foreground:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy);
foreground:SetWidth(region:GetWidth() * progress);
background:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy);
end
else
function region:SetValue(progress)
region.progress = progress;
local ULx , ULy = ApplyTransform(1-progress, 0, region)
local ULx_, ULy_ = ApplyTransform(0, 0, region)
local LLx , LLy = ApplyTransform(1-progress, 1, region)
local LLx_, LLy_ = ApplyTransform(0, 1, region)
local URx , URy = ApplyTransform(1, 0, region)
local LRx , LRy = ApplyTransform(1, 1, region)
foreground:SetTexCoord(ULx , ULy , LLx , LLy , URx, URy, LRx, LRy);
foreground:SetWidth(region:GetWidth() * progress);
background:SetTexCoord(ULx_, ULy_, LLx_, LLy_, URx, URy, LRx, LRy);
end
end
end
local function orientVertical()
foreground:ClearAllPoints();
foreground:SetPoint("BOTTOM", region, "BOTTOM");
region.orientation = "VERTICAL_INVERSE";
if(data.compress) then
function region:SetValue(progress)
region.progress = progress;
local ULx, ULy = ApplyTransform(0, 0, region)
local LLx, LLy = ApplyTransform(0, 1, region)
local URx, URy = ApplyTransform(1, 0, region)
local LRx, LRy = ApplyTransform(1, 1, region)
foreground:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy);
foreground:SetHeight(region:GetHeight() * progress);
background:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy);
end
else
function region:SetValue(progress)
region.progress = progress;
local ULx , ULy = ApplyTransform(0, 1-progress, region)
local ULx_, ULy_ = ApplyTransform(0, 0, region)
local LLx , LLy = ApplyTransform(0, 1, region)
local URx , URy = ApplyTransform(1, 1-progress, region)
local URx_, URy_ = ApplyTransform(1, 0, region)
local LRx , LRy = ApplyTransform(1, 1, region)
foreground:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy);
foreground:SetHeight(region:GetHeight() * progress);
background:SetTexCoord(ULx_, ULy_, LLx, LLy, URx_, URy_, LRx, LRy);
end
end
end
local function orientVerticalInverse()
foreground:ClearAllPoints();
foreground:SetPoint("TOP", region, "TOP");
region.orientation = "VERTICAL";
if(data.compress) then
function region:SetValue(progress)
region.progress = progress;
local ULx, ULy = ApplyTransform(0, 0, region)
local LLx, LLy = ApplyTransform(0, 1, region)
local URx, URy = ApplyTransform(1, 0, region)
local LRx, LRy = ApplyTransform(1, 1, region)
foreground:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy);
foreground:SetHeight(region:GetHeight() * progress);
background:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy);
end
else
function region:SetValue(progress)
region.progress = progress;
local ULx , ULy = ApplyTransform(0, 0, region)
local LLx , LLy = ApplyTransform(0, progress, region)
local LLx_, LLy_ = ApplyTransform(0, 1, region)
local URx , URy = ApplyTransform(1, 0, region)
local LRx , LRy = ApplyTransform(1, progress, region)
local LRx_, LRy_ = ApplyTransform(1, 1, region)
foreground:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy);
foreground:SetHeight(region:GetHeight() * progress);
background:SetTexCoord(ULx, ULy, LLx_, LLy_, URx, URy, LRx_, LRy_);
end
end
end
local function orientCircular(clockwise)
local startAngle = data.startAngle % 360;
local endAngle = data.endAngle % 360;
if (endAngle <= startAngle) then
endAngle = endAngle + 360;
end
backgroundSpinner:SetProgress(region, startAngle, endAngle);
foregroundSpinner:SetProgress(region, startAngle, endAngle);
function region:SetValue(progress)
region.progress = progress;
if (progress < 0) then
progress = 0;
end
if (progress > 1) then
progress = 1;
end
if (not clockwise) then
progress = 1 - progress;
end
local pAngle = (endAngle - startAngle) * progress + startAngle;
if (clockwise) then
foregroundSpinner:SetProgress(region, startAngle, pAngle);
else
foregroundSpinner:SetProgress(region, pAngle, endAngle);
end
end
end
local function showCircularProgress()
foreground:Hide();
background:Hide();
foregroundSpinner:Show();
backgroundSpinner:Show();
end
local function hideCircularProgress()
foreground:Show();
background:Show();
foregroundSpinner:Hide();
backgroundSpinner:Hide();
end
if(data.orientation == "HORIZONTAL_INVERSE") then
hideCircularProgress();
orientHorizontalInverse();
elseif(data.orientation == "HORIZONTAL") then
hideCircularProgress();
orientHorizontal();
elseif(data.orientation == "VERTICAL_INVERSE") then
hideCircularProgress();
orientVerticalInverse();
elseif(data.orientation == "VERTICAL") then
hideCircularProgress();
orientVertical();
elseif(data.orientation == "CLOCKWISE") then
showCircularProgress();
orientCircular(true);
elseif(data.orientation == "ANTICLOCKWISE") then
showCircularProgress();
orientCircular(false);
end
if (region.SetValue) then
region:SetValue(3/5);
end
end
local function createIcon()
local data = {
foregroundTexture = "Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura3",
backgroundTexture = "Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura3",
sameTexture = true,
backgroundOffset = 2,
blendMode = "BLEND",
width = 200,
height = 200,
orientation = "VERTICAL",
alpha = 1.0,
foregroundColor = {1, 1, 1, 1},
backgroundColor = {0.5, 0.5, 0.5, 0.5}
};
local thumbnail = createThumbnail(UIParent);
modifyThumbnail(UIParent, thumbnail, data, nil, 32);
thumbnail.elapsed = 0;
thumbnail:SetScript("OnUpdate", function(self, elapsed)
thumbnail.elapsed = thumbnail.elapsed + elapsed;
if(thumbnail.elapsed > 4) then
thumbnail.elapsed = thumbnail.elapsed - 4;
end
thumbnail.region:SetValue((4 - thumbnail.elapsed) / 4);
end);
return thumbnail;
end
local templates = {
{
title = L["Default"],
data = {
inverse = true,
};
},
{
title = L["Top HUD position"],
description = L["At the same position as Blizzard's spell alert"],
data = {
width = 200,
height = 100,
xOffset = 0,
yOffset = 150,
mirror = true,
foregroundTexture = "Textures\\SpellActivationOverlays\\Backlash",
orientation = "HORIZONTAL",
inverse = true,
},
},
{
title = L["Left HUD position"],
description = L["At the same position as Blizzard's spell alert"],
data = {
width = 100,
height = 200,
xOffset = -150,
yOffset = 0,
inverse = true,
},
},
{
title = L["Left 2 HUD position"],
description = L["At a position a bit left of Left HUD position."],
data = {
width = 100,
height = 200,
xOffset = -200,
yOffset = 0,
inverse = true,
},
},
{
title = L["Right HUD position"],
description = L["At the same position as Blizzard's spell alert"],
data = {
width = 100,
height = 200,
xOffset = 150,
yOffset = 0,
mirror = true,
inverse = true,
},
},
{
title = L["Right 2 HUD position"],
description = L["At a position a bit left of Right HUD position"],
data = {
width = 100,
height = 200,
xOffset = 200,
yOffset = 0,
mirror = true,
inverse = true,
},
},
}
local function GetAnchors(data)
return WeakAuras.default_types_for_anchor
end
WeakAuras.RegisterRegionOptions("progresstexture", createOptions, createIcon, L["Progress Texture"], createThumbnail, modifyThumbnail, L["Shows a texture that changes based on duration"], templates, GetAnchors);
+387
View File
@@ -0,0 +1,387 @@
if not WeakAuras.IsCorrectVersion() then return end
local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L;
local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20;
local indentWidth = 0.15
local hiddenFontExtra = function()
return WeakAuras.IsCollapsed("text", "text", "fontflags", true)
end
local function createOptions(id, data)
local options = {
__title = L["Text Settings"],
__order = 1,
displayText = {
type = "input",
width = WeakAuras.doubleWidth,
desc = function()
return L["Dynamic text tooltip"] .. WeakAuras.GetAdditionalProperties(data)
end,
multiline = true,
name = L["Display Text"],
order = 10,
get = function()
return data.displayText;
end,
set = function(info, v)
data.displayText = WeakAuras.ReplaceLocalizedRaidMarkers(v);
WeakAuras.Add(data);
WeakAuras.UpdateThumbnail(data);
WeakAuras.SetIconNames(data);
WeakAuras.ResetMoverSizer();
end
},
customTextUpdate = {
type = "select",
width = WeakAuras.doubleWidth,
hidden = function() return not WeakAuras.ContainsCustomPlaceHolder(data.displayText); end,
name = L["Update Custom Text On..."],
values = WeakAuras.text_check_types,
order = 36
},
-- code editor added below
progressPrecision = {
type = "select",
width = WeakAuras.normalWidth,
order = 39,
name = L["Remaining Time Precision"],
values = WeakAuras.precision_types,
get = function() return data.progressPrecision or 1 end,
hidden = function() return not (WeakAuras.ContainsPlaceHolders(data.displayText, "pt"));
end,
disabled = function()
return not WeakAuras.ContainsPlaceHolders(data.displayText, "p");
end
},
totalPrecision = {
type = "select",
width = WeakAuras.normalWidth,
order = 39.5,
name = L["Total Time Precision"],
values = WeakAuras.precision_types,
get = function() return data.totalPrecision or 1 end,
hidden = function()
return not (WeakAuras.ContainsPlaceHolders(data.displayText, "pt"));
end,
disabled = function()
return not WeakAuras.ContainsPlaceHolders(data.displayText, "t");
end
},
font = {
type = "select",
width = WeakAuras.normalWidth,
dialogControl = "LSM30_Font",
name = L["Font"],
order = 45,
values = AceGUIWidgetLSMlists.font
},
fontSize = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Size"],
order = 46,
min = 6,
softMax = 72,
step = 1
},
color = {
type = "color",
width = WeakAuras.normalWidth,
name = L["Text Color"],
hasAlpha = true,
order = 47
},
fontFlagsDescription = {
order = 48,
width = WeakAuras.doubleWidth,
type = "execute",
control = "WeakAurasExpandSmall",
name = function()
local textFlags = WeakAuras.font_flags[data.outline]
local color = format("%02x%02x%02x%02x",
data.shadowColor[4] * 255, data.shadowColor[1] * 255,
data.shadowColor[2] * 255, data.shadowColor[3]*255)
local textJustify = ""
if data.justify == "CENTER" then
elseif data.justify == "LEFT" then
textJustify = " " .. L["and aligned left"]
elseif data.justify == "RIGHT" then
textJustify = " " .. L["and aligned right"]
end
local textWidth = ""
if data.automaticWidth == "Fixed" then
local wordWarp = ""
if data.wordWrap == "WordWrap" then
wordWarp = L["wrapping"]
else
wordWarp = L["eliding"]
end
textWidth = " "..L["and with width |cFFFF0000%s|r and %s"]:format(data.fixedWidth, wordWarp)
end
local secondline = L["|cFFffcc00Font Flags:|r |cFFFF0000%s|r and shadow |c%sColor|r with offset |cFFFF0000%s/%s|r%s%s"]:format(textFlags, color, data.shadowXOffset, data.shadowYOffset, textJustify, textWidth)
return secondline
end,
func = function()
local collapsed = WeakAuras.IsCollapsed("text", "text", "fontflags", true)
WeakAuras.SetCollapsed("text", "text", "fontflags", not collapsed)
end,
image = function()
local collapsed = WeakAuras.IsCollapsed("text", "text", "fontflags", true)
return collapsed and "Interface\\AddOns\\WeakAuras\\Media\\Textures\\edit" or "Interface\\AddOns\\WeakAuras\\Media\\Textures\\editdown"
end,
imageWidth = 24,
imageHeight = 24
},
text_font_space = {
type = "description",
name = "",
order = 48.1,
hidden = hiddenFontExtra,
width = indentWidth
},
outline = {
type = "select",
width = WeakAuras.normalWidth - indentWidth,
name = L["Outline"],
order = 48.2,
values = WeakAuras.font_flags,
hidden = hiddenFontExtra
},
shadowColor = {
type = "color",
hasAlpha = true,
width = WeakAuras.normalWidth,
name = L["Shadow Color"],
order = 48.3,
hidden = hiddenFontExtra
},
text_font_space3 = {
type = "description",
name = "",
order = 48.4,
hidden = hiddenFontExtra,
width = indentWidth
},
shadowXOffset = {
type = "range",
width = WeakAuras.normalWidth - indentWidth,
name = L["Shadow X Offset"],
softMin = -15,
softMax = 15,
bigStep = 1,
order = 48.5,
hidden = hiddenFontExtra
},
shadowYOffset = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Shadow Y Offset"],
softMin = -15,
softMax = 15,
bigStep = 1,
order = 48.6,
hidden = hiddenFontExtra
},
text_font_space4 = {
type = "description",
name = "",
order = 48.7,
hidden = hiddenFontExtra,
width = indentWidth
},
justify = {
type = "select",
width = WeakAuras.normalWidth - indentWidth,
name = L["Justify"],
order = 48.8,
values = WeakAuras.justify_types,
hidden = hiddenFontExtra,
},
text_font_space55 = {
type = "description",
name = "",
order = 48.85,
hidden = hiddenFontExtra,
width = WeakAuras.normalWidth
},
text_font_space5 = {
type = "description",
name = "",
order = 48.9,
hidden = hiddenFontExtra,
width = indentWidth
},
automaticWidth = {
type = "select",
width = WeakAuras.normalWidth - indentWidth,
name = L["Width"],
order = 49,
values = WeakAuras.text_automatic_width,
hidden = hiddenFontExtra,
},
fixedWidth = {
name = L["Width"],
width = WeakAuras.normalWidth,
order = 49.1,
type = "range",
min = 1,
softMax = screenWidth,
bigStep = 1,
hidden = function() return hiddenFontExtra() or data.automaticWidth ~= "Fixed" end
},
text_font_space7 = {
type = "description",
name = "",
order = 49.3,
width = indentWidth,
hidden = function() return hiddenFontExtra() or data.automaticWidth ~= "Fixed" end
},
wordWrap = {
type = "select",
width = WeakAuras.normalWidth - indentWidth,
name = L["Overflow"],
order = 49.4,
values = WeakAuras.text_word_wrap,
hidden = function() return hiddenFontExtra() or data.automaticWidth ~= "Fixed" end
},
endHeader = {
type = "header",
order = 100,
name = "",
},
};
WeakAuras.AddCodeOption(options, data, L["Custom Function"], "customText", "https://github.com/WeakAuras/WeakAuras2/wiki/Text-Replacements",
37, function() return not WeakAuras.ContainsCustomPlaceHolder(data.displayText) end, {"customText"}, false);
return {
text = options;
position = WeakAuras.PositionOptions(id, data, nil, true);
};
end
local function createThumbnail()
local borderframe = CreateFrame("FRAME", nil, UIParent);
borderframe:SetWidth(32);
borderframe:SetHeight(32);
local border = borderframe:CreateTexture(nil, "OVERLAY");
border:SetAllPoints(borderframe);
border:SetTexture("Interface\\BUTTONS\\UI-Quickslot2.blp");
border:SetTexCoord(0.2, 0.8, 0.2, 0.8);
local mask = CreateFrame("ScrollFrame", nil, borderframe);
borderframe.mask = mask;
mask:SetPoint("BOTTOMLEFT", borderframe, "BOTTOMLEFT", 2, 2);
mask:SetPoint("TOPRIGHT", borderframe, "TOPRIGHT", -2, -2);
local content = CreateFrame("Frame", nil, mask);
borderframe.content = content;
content:SetPoint("CENTER", mask, "CENTER");
mask:SetScrollChild(content);
local text = content:CreateFontString(nil, "OVERLAY");
borderframe.text = text;
text:SetNonSpaceWrap(true);
borderframe.values = {};
return borderframe;
end
local function modifyThumbnail(parent, borderframe, data, fullModify, size)
local mask, content, text = borderframe.mask, borderframe.content, borderframe.text;
size = size or 28;
local fontPath = SharedMedia:Fetch("font", data.font) or data.font;
text:SetFont(fontPath, data.fontSize, data.outline and "OUTLINE" or nil);
text:SetTextHeight(data.fontSize);
text:SetText(data.displayText);
text:SetTextColor(data.color[1], data.color[2], data.color[3], data.color[4]);
text:SetJustifyH(data.justify);
text:ClearAllPoints();
text:SetPoint("CENTER", UIParent, "CENTER");
content:SetWidth(math.max(text:GetStringWidth(), size));
content:SetHeight(math.max(text:GetStringHeight(), size));
text:ClearAllPoints();
text:SetPoint("CENTER", content, "CENTER");
local function rescroll()
content:SetWidth(math.max(text:GetStringWidth(), size));
content:SetHeight(math.max(text:GetStringHeight(), size));
local xo = 0;
if(data.justify == "CENTER") then
xo = mask:GetHorizontalScrollRange() / 2;
elseif(data.justify == "RIGHT") then
xo = mask:GetHorizontalScrollRange();
end
mask:SetHorizontalScroll(xo);
mask:SetVerticalScroll(mask:GetVerticalScrollRange() / 2);
end
rescroll();
mask:SetScript("OnScrollRangeChanged", rescroll);
local function UpdateText()
local textStr = data.displayText;
textStr = WeakAuras.ReplacePlaceHolders(textStr, borderframe);
text:SetText(textStr);
rescroll();
end
function borderframe:SetIcon(path)
UpdateText();
end
function borderframe:SetName(name)
UpdateText();
end
UpdateText();
end
local function createIcon()
local data = {
outline = true,
color = {1, 1, 0, 1},
justify = "CENTER",
font = "Friz Quadrata TT",
fontSize = 12,
displayText = "World\nof\nWarcraft";
};
local thumbnail = createThumbnail(UIParent);
modifyThumbnail(UIParent, thumbnail, data);
thumbnail.mask:SetPoint("BOTTOMLEFT", thumbnail, "BOTTOMLEFT", 3, 3);
thumbnail.mask:SetPoint("TOPRIGHT", thumbnail, "TOPRIGHT", -3, -3);
return thumbnail;
end
local templates = {
{
title = L["Default"],
description = L["Displays a text, works best in combination with other displays"],
data = {
};
}
}
WeakAuras.RegisterRegionOptions("text", createOptions, createIcon, L["Text"], createThumbnail, modifyThumbnail, L["Shows one or more lines of text, which can include dynamic information such as progress or stacks"], templates);
+235
View File
@@ -0,0 +1,235 @@
if not WeakAuras.IsCorrectVersion() then return end
local L = WeakAuras.L
local function createOptions(id, data)
local options = {
__title = L["Texture Settings"],
__order = 1,
texture = {
type = "input",
width = WeakAuras.doubleWidth,
name = L["Texture"],
order = 1
},
desaturate = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Desaturate"],
order = 2,
},
space2 = {
type = "execute",
name = "",
width = WeakAuras.halfWidth,
order = 5,
image = function() return "", 0, 0 end,
},
chooseTexture = {
type = "execute",
name = L["Choose"],
width = WeakAuras.halfWidth,
order = 7,
func = function()
WeakAuras.OpenTexturePicker(data, "texture", WeakAuras.texture_types);
end
},
color = {
type = "color",
width = WeakAuras.normalWidth,
name = L["Color"],
hasAlpha = true,
order = 10
},
blendMode = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Blend Mode"],
order = 12,
values = WeakAuras.blend_types
},
mirror = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Mirror"],
order = 20
},
alpha = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Alpha"],
order = 25,
min = 0,
max = 1,
bigStep = 0.01,
isPercent = true
},
rotate = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Allow Full Rotation"],
order = 30
},
rotation = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Rotation"],
min = 0,
max = 360,
step = 1,
bigStep = 3,
order = 35,
hidden = function() return not data.rotate end
},
discrete_rotation = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Discrete Rotation"],
min = 0,
max = 360,
step = 90,
order = 35,
hidden = function() return data.rotate end
},
endHeader = {
type = "header",
order = 100,
name = "",
},
};
return {
texture = options,
position = WeakAuras.PositionOptions(id, data),
};
end
local function createThumbnail()
local borderframe = CreateFrame("FRAME", nil, UIParent);
borderframe:SetWidth(32);
borderframe:SetHeight(32);
local border = borderframe:CreateTexture(nil, "OVERLAY");
border:SetAllPoints(borderframe);
border:SetTexture("Interface\\BUTTONS\\UI-Quickslot2.blp");
border:SetTexCoord(0.2, 0.8, 0.2, 0.8);
local texture = borderframe:CreateTexture();
borderframe.texture = texture;
texture:SetPoint("CENTER", borderframe, "CENTER");
return borderframe;
end
local function modifyThumbnail(parent, region, data, fullModify, size)
size = size or 30;
local scale;
if(data.height > data.width) then
scale = size/data.height;
region.texture:SetWidth(scale * data.width);
region.texture:SetHeight(size);
else
scale = size/data.width;
region.texture:SetWidth(size);
region.texture:SetHeight(scale * data.height);
end
WeakAuras.SetTexture(region.texture, data.texture);
region.texture:SetVertexColor(data.color[1], data.color[2], data.color[3], data.color[4]);
region.texture:SetBlendMode(data.blendMode);
local ulx,uly , llx,lly , urx,ury , lrx,lry;
if(data.rotate) then
local angle = rad(135 - data.rotation);
local vx = math.cos(angle);
local vy = math.sin(angle);
ulx,uly , llx,lly , urx,ury , lrx,lry = 0.5+vx,0.5-vy , 0.5-vy,0.5-vx , 0.5+vy,0.5+vx , 0.5-vx,0.5+vy;
else
if(data.discrete_rotation == 0 or data.discrete_rotation == 360) then
ulx,uly , llx,lly , urx,ury , lrx,lry = 0,0 , 0,1 , 1,0 , 1,1;
elseif(data.discrete_rotation == 90) then
ulx,uly , llx,lly , urx,ury , lrx,lry = 1,0 , 0,0 , 1,1 , 0,1;
elseif(data.discrete_rotation == 180) then
ulx,uly , llx,lly , urx,ury , lrx,lry = 1,1 , 1,0 , 0,1 , 0,0;
elseif(data.discrete_rotation == 270) then
ulx,uly , llx,lly , urx,ury , lrx,lry = 0,1 , 1,1 , 0,0 , 1,0;
end
end
if(data.mirror) then
region.texture:SetTexCoord(urx,ury , lrx,lry , ulx,uly , llx,lly);
else
region.texture:SetTexCoord(ulx,uly , llx,lly , urx,ury , lrx,lry);
end
end
local function createIcon()
local data = {
height = 40,
width = 40,
texture = "Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura3",
color = {1, 1, 1, 1},
blendMode = "ADD",
rotate = true;
rotation = 0;
};
local thumbnail = createThumbnail(UIParent);
modifyThumbnail(UIParent, thumbnail, data, nil, 50);
return thumbnail;
end
local templates = {
{
title = L["Default"],
data = {
};
},
{
title = L["Star"],
data = {
texture = "Spells\\T_Star3",
blendMode = "ADD",
width = 200,
height = 200,
discrete_rotation = 0,
}
},
{
title = L["Leaf"],
data = {
texture = "Spells\\Nature_Rune_128",
blendMode = "ADD",
width = 200,
height = 200,
discrete_rotation = 0,
}
},
{
title = L["Hawk"],
data = {
texture = "Spells\\Aspect_Hawk",
blendMode = "ADD",
width = 200,
height = 200,
discrete_rotation = 0,
}
},
{
title = L["Low Mana"],
data = {
texture = "Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura70",
blendMode = "ADD",
width = 200,
height = 200,
discrete_rotation = 0,
}
},
}
local function GetAnchors(data)
return WeakAuras.default_types_for_anchor
end
WeakAuras.RegisterRegionOptions("texture", createOptions, createIcon, L["Texture"], createThumbnail, modifyThumbnail, L["Shows a custom texture"], templates, GetAnchors);
@@ -0,0 +1,111 @@
if not WeakAuras.IsCorrectVersion() then return end
local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L;
local function createOptions(parentData, data, index, subIndex)
local options = {
__title = L["Model %s"]:format(subIndex),
__order = 1,
__up = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionUp, index, "subbarmodel")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
__down = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionDown, index, "subbarmodel")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
__duplicate = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DuplicateSubRegion, index, "subbarmodel")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
__delete = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DeleteSubRegion, index, "subbarmodel")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
bar_model_visible = {
type = "toggle",
width = WeakAuras.doubleWidth,
name = L["Show Model"],
order = 9,
},
model_path = {
type = "input",
width = WeakAuras.normalWidth,
name = L["Model"],
order = 10
},
chooseModel = {
type = "execute",
width = WeakAuras.normalWidth,
name = L["Choose"],
order = 11,
func = function()
WeakAuras.OpenModelPicker(data, parentData);
end,
},
bar_model_clip = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Clipped by Progress"],
order = 12,
hidden = function() return parentData.regionType ~= "aurabar" end
},
bar_model_alpha = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Alpha"],
order = 13,
min = 0,
max = 1,
bigStep = 0.1
},
model_z = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Z Offset"],
softMin = -20,
softMax = 20,
step = .001,
bigStep = 0.05,
order = 20,
},
model_x = {
type = "range",
width = WeakAuras.normalWidth,
name = L["X Offset"],
softMin = -20,
softMax = 20,
step = .001,
bigStep = 0.05,
order = 30,
},
model_y = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Y Offset"],
softMin = -20,
softMax = 20,
step = .001,
bigStep = 0.05,
order = 40,
},
rotation = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Rotation"],
min = 0,
max = 360,
step = 1,
bigStep = 3,
order = 45,
},
}
return options
end
WeakAuras.RegisterSubRegionOptions("subbarmodel", createOptions, L["Shows a model"]);
@@ -0,0 +1,84 @@
if not WeakAuras.IsCorrectVersion() then return end
local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L;
local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20;
local function createOptions(parentData, data, index, subIndex)
local options = {
__title = L["Border %s"]:format(subIndex),
__order = 1,
__up = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionUp, index, "subborder")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
__down = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionDown, index, "subborder")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
__duplicate = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DuplicateSubRegion, index, "subtext")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
__delete = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DeleteSubRegion, index, "subborder")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
border_visible = {
type = "toggle",
width = WeakAuras.doubleWidth,
name = L["Show Border"],
order = 2,
},
border_edge = {
type = "select",
width = WeakAuras.normalWidth,
dialogControl = "LSM30_Border",
name = L["Border Style"],
order = 3,
values = AceGUIWidgetLSMlists.border,
},
border_color = {
type = "color",
width = WeakAuras.normalWidth,
name = L["Border Color"],
hasAlpha = true,
order = 4,
},
border_offset = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Border Offset"],
order = 5,
softMin = 0,
softMax = 32,
bigStep = 1,
},
border_size = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Border Size"],
order = 6,
softMin = 1,
softMax = 64,
bigStep = 1,
},
border_anchor = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Border Anchor"],
order = 7,
values = WeakAuras.aurabar_anchor_areas,
hidden = function() return parentData.regionType ~= "aurabar" end
}
}
return options
end
WeakAuras.RegisterSubRegionOptions("subborder", createOptions, L["Shows a border"]);
+253
View File
@@ -0,0 +1,253 @@
if not WeakAuras.IsCorrectVersion() then return end
local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L;
local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20;
local indentWidth = 0.15
local function createOptions(parentData, data, index, subIndex)
local hiddenGlowExtra = function()
return WeakAuras.IsCollapsed("glow", "glow", "glowextra" .. index, true);
end
local options = {
__title = L["Glow %s"]:format(subIndex),
__order = 1,
__up = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionUp, index, "subglow")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
__down = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionDown, index, "subglow")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
__duplicate = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DuplicateSubRegion, index, "subglow")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
__delete = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DeleteSubRegion, index, "subglow")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
glow = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Show Glow"],
order = 2,
},
glowType = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Type"],
order = 2,
values = WeakAuras.glow_types,
},
glow_anchor = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Glow Anchor"],
order = 3,
values = WeakAuras.aurabar_anchor_areas,
hidden = function() return parentData.regionType ~= "aurabar" end
},
glowExtraDescription = {
type = "execute",
control = "WeakAurasExpandSmall",
name = function()
local line = L["|cFFffcc00Extra Options:|r"]
local color = L["Default Color"]
if data.useGlowColor then
color = L["|c%02x%02x%02x%02xCustom Color|r"]:format(
data.glowColor[4] * 255,
data.glowColor[1] * 255,
data.glowColor[2] * 255,
data.glowColor[3] * 255
)
end
if data.glowType == "buttonOverlay" then
line = ("%s %s"):format(line, color)
elseif data.glowType == "ACShine" then
line = L["%s %s, Particles: %d, Frequency: %0.2f, Scale: %0.2f"]:format(
line,
color,
data.glowLines,
data.glowFrequency,
data.glowScale
)
if data.glowXOffset ~= 0 or data.glowYOffset ~= 0 then
line = L["%s, offset: %0.2f;%0.2f"]:format(line, data.glowXOffset, data.glowYOffset)
end
elseif data.glowType == "Pixel" then
line = L["%s %s, Lines: %d, Frequency: %0.2f, Length: %d, Thickness: %d"]:format(
line,
color,
data.glowLines,
data.glowFrequency,
data.glowLength,
data.glowThickness
)
if data.glowXOffset ~= 0 or data.glowYOffset ~= 0 then
line = L["%s, Offset: %0.2f;%0.2f"]:format(line, data.glowXOffset, data.glowYOffset)
end
if data.glowBorder then
line = L["%s, Border"]:format(line)
end
end
return line
end,
width = WeakAuras.doubleWidth,
order = 4,
image = function()
local collapsed = WeakAuras.IsCollapsed("glow", "glow", "glowextra" .. index, true);
return collapsed and "Interface\\AddOns\\WeakAuras\\Media\\Textures\\edit" or "Interface\\AddOns\\WeakAuras\\Media\\Textures\\editdown"
end,
imageWidth = 24,
imageHeight = 24,
func = function()
local collapsed = WeakAuras.IsCollapsed("glow", "glow", "glowextra" .. index, true);
WeakAuras.SetCollapsed("glow", "glow", "glowextra" .. index, not collapsed);
end,
},
glow_space1 = {
type = "description",
name = "",
width = indentWidth,
order = 5,
hidden = hiddenGlowExtra,
},
useGlowColor = {
type = "toggle",
width = WeakAuras.normalWidth - indentWidth,
name = L["Use Custom Color"],
desc = L["If unchecked, then a default color will be used (usually yellow)"],
order = 6,
hidden = hiddenGlowExtra
},
glowColor = {
type = "color",
width = WeakAuras.normalWidth,
name = L["Custom Color"],
order = 7,
disabled = function() return not data.useGlowColor end,
hidden = hiddenGlowExtra
},
glow_space2 = {
type = "description",
name = "",
width = indentWidth,
order = 8,
hidden = hiddenGlowExtra,
},
glowLines = {
type = "range",
width = WeakAuras.normalWidth - indentWidth,
name = L["Lines & Particles"],
order = 9,
min = 1,
softMax = 30,
step = 1,
hidden = function() return hiddenGlowExtra() or data.glowType == "buttonOverlay" end,
},
glowFrequency = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Frequency"],
order = 10,
softMin = -2,
softMax = 2,
step = 0.05,
hidden = function() return hiddenGlowExtra() or data.glowType == "buttonOverlay" end,
},
glow_space3 = {
type = "description",
name = "",
width = indentWidth,
order = 11,
hidden = function() return hiddenGlowExtra() or data.glowType ~= "Pixel" end,
},
glowLength = {
type = "range",
width = WeakAuras.normalWidth - indentWidth,
name = L["Length"],
order = 12,
min = 1,
softMax = 20,
step = 0.05,
hidden = function() return hiddenGlowExtra() or data.glowType ~= "Pixel" end,
},
glowThickness = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Thickness"],
order = 13,
min = 0.05,
softMax = 20,
step = 0.05,
hidden = function() return hiddenGlowExtra() or data.glowType ~= "Pixel" end,
},
glow_space4 = {
type = "description",
name = "",
width = indentWidth,
order = 14,
hidden = hiddenGlowExtra,
},
glowXOffset = {
type = "range",
width = WeakAuras.normalWidth - indentWidth,
name = L["X-Offset"],
order = 15,
softMin = -100,
softMax = 100,
step = 0.5,
hidden = function() return hiddenGlowExtra() or data.glowType == "buttonOverlay" end,
},
glowYOffset = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Y-Offset"],
order = 16,
softMin = -100,
softMax = 100,
step = 0.5,
hidden = function() return hiddenGlowExtra() or data.glowType == "buttonOverlay" end,
},
glow_space5 = {
type = "description",
name = "",
width = indentWidth,
order = 17,
hidden = hiddenGlowExtra,
},
glowScale = {
type = "range",
width = WeakAuras.normalWidth - indentWidth,
name = L["Scale"],
order = 18,
min = 0.05,
softMax = 10,
step = 0.05,
isPercent = true,
hidden = function() return hiddenGlowExtra() or data.glowType ~= "ACShine" end,
},
glowBorder = {
type = "toggle",
width = WeakAuras.normalWidth - indentWidth,
name = L["Border"],
order = 19,
hidden = function() return hiddenGlowExtra() or data.glowType ~= "Pixel" end,
}
}
return options
end
WeakAuras.RegisterSubRegionOptions("subglow", createOptions, L["Shows a glow"]);
@@ -0,0 +1,97 @@
if not WeakAuras.IsCorrectVersion() then return end
-- Magic constant
local deleteCondition = {}
local function AdjustConditions(data, replacements)
if (data.conditions) then
for conditionIndex, condition in ipairs(data.conditions) do
for changeIndex, change in ipairs(condition.changes) do
if change.property then
local sub, rest = string.match(change.property, "^(sub.%d+%.)(.+)$")
if sub and replacements[sub] then
if replacements[sub] == deleteCondition then
change.property = nil
else
change.property = replacements[sub] .. rest
end
end
end
end
end
end
end
function WeakAuras.DeleteSubRegion(data, index, regionType)
if not data.subRegions then
return
end
if data.subRegions[index] and data.subRegions[index].type == regionType then
tremove(data.subRegions, index)
WeakAuras.Add(data)
WeakAuras.ReloadOptions2(data.id, data)
local replacements = {
["sub." .. index .. "."] = deleteCondition
}
for i = index + 1, #data.subRegions + 1 do
replacements["sub." .. i .. "."] = "sub." .. (i - 1) .. "."
end
AdjustConditions(data, replacements);
end
end
function WeakAuras.MoveSubRegionUp(data, index, regionType)
if not data.subRegions or index <= 1 then
return
end
if data.subRegions[index] and data.subRegions[index].type == regionType then
data.subRegions[index - 1], data.subRegions[index] = data.subRegions[index], data.subRegions[index - 1]
WeakAuras.Add(data)
WeakAuras.ReloadOptions2(data.id, data)
local replacements = {
["sub." .. (index -1) .. "."] = "sub." .. index .. ".",
["sub." .. index .. "."] = "sub." .. (index - 1) .. ".",
}
AdjustConditions(data, replacements);
end
end
function WeakAuras.MoveSubRegionDown(data, index, regionType)
if not data.subRegions then
return
end
if data.subRegions[index] and data.subRegions[index].type == regionType and data.subRegions[index + 1] then
data.subRegions[index], data.subRegions[index + 1] = data.subRegions[index + 1], data.subRegions[index]
WeakAuras.Add(data)
WeakAuras.ReloadOptions2(data.id, data)
local replacements = {
["sub." .. index .. "."] = "sub." .. (index + 1) .. ".",
["sub." .. (index + 1) .. "."] = "sub." .. index .. ".",
}
AdjustConditions(data, replacements);
end
end
function WeakAuras.DuplicateSubRegion(data, index, regionType)
if not data.subRegions then
return
end
if data.subRegions[index] and data.subRegions[index].type == regionType then
tinsert(data.subRegions, index, CopyTable(data.subRegions[index]))
WeakAuras.Add(data)
WeakAuras.ReloadOptions2(data.id, data)
local replacements = {}
for i = index + 1, #data.subRegions do
replacements["sub." .. i .. "."] = "sub." .. (i + 1) .. "."
end
AdjustConditions(data, replacements);
end
end
@@ -0,0 +1,484 @@
if not WeakAuras.IsCorrectVersion() then return end
local SharedMedia = LibStub("LibSharedMedia-3.0")
local L = WeakAuras.L
local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20
local self_point_types = {
BOTTOMLEFT = L["Bottom Left"],
BOTTOM = L["Bottom"],
BOTTOMRIGHT = L["Bottom Right"],
RIGHT = L["Right"],
TOPRIGHT = L["Top Right"],
TOP = L["Top"],
TOPLEFT = L["Top Left"],
LEFT = L["Left"],
CENTER = L["Center"],
AUTO = L["Automatic"]
}
local function createOptions(parentData, data, index, subIndex)
-- The toggles for font flags is intentionally not keyed on the id
-- So that all auras share the state of that toggle
local hiddenFontExtra = function()
return WeakAuras.IsCollapsed("subtext", "subtext", "fontflags" .. index, true)
end
local indentWidth = 0.15
local options = {
__title = L["Text %s"]:format(subIndex),
__order = 1,
__up = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionUp, index, "subtext")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
__down = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionDown, index, "subtext")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
__duplicate = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DuplicateSubRegion, index, "subtext")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
__delete = function()
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DeleteSubRegion, index, "subtext")) then
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
end,
text_visible = {
type = "toggle",
width = WeakAuras.halfWidth,
order = 9,
name = L["Show Text"],
},
text_color = {
type = "color",
width = WeakAuras.halfWidth,
name = L["Color"],
hasAlpha = true,
order = 10,
},
text_text = {
type = "input",
width = WeakAuras.normalWidth,
desc = function()
return L["Dynamic text tooltip"] .. WeakAuras.GetAdditionalProperties(parentData)
end,
name = L["Display Text"],
order = 11,
set = function(info, v)
data.text_text = WeakAuras.ReplaceLocalizedRaidMarkers(v)
WeakAuras.Add(parentData)
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
},
text_font = {
type = "select",
width = WeakAuras.normalWidth,
dialogControl = "LSM30_Font",
name = L["Font"],
order = 12,
values = AceGUIWidgetLSMlists.font,
},
text_fontSize = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Size"],
order = 13,
min = 6,
softMax = 72,
step = 1,
},
text_fontFlagsDescription = {
type = "execute",
control = "WeakAurasExpandSmall",
name = function()
local textFlags = WeakAuras.font_flags[data.text_fontType]
local color = format("%02x%02x%02x%02x",
data.text_shadowColor[4] * 255, data.text_shadowColor[1] * 255,
data.text_shadowColor[2] * 255, data.text_shadowColor[3]*255)
local textJustify = ""
if data.text_justify == "CENTER" then
elseif data.text_justify == "LEFT" then
textJustify = " " .. L["and aligned left"]
elseif data.text_justify == "RIGHT" then
textJustify = " " .. L["and aligned right"]
end
local textRotate = ""
if data.rotateText == "LEFT" then
textRotate = " " .. L["and rotated left"]
elseif data.rotateText == "RIGHT" then
textRotate = " " .. L["and rotated right"]
end
local textWidth = ""
if data.text_automaticWidth == "Fixed" then
local wordWarp = ""
if data.text_wordWrap == "WordWrap" then
wordWarp = L["wrapping"]
else
wordWarp = L["eliding"]
end
textWidth = " "..L["and with width |cFFFF0000%s|r and %s"]:format(data.text_fixedWidth, wordWarp)
end
local secondline = L["|cFFffcc00Font Flags:|r |cFFFF0000%s|r and shadow |c%sColor|r with offset |cFFFF0000%s/%s|r%s%s%s"]:format(textFlags, color, data.text_shadowXOffset, data.text_shadowYOffset, textRotate, textJustify, textWidth)
return secondline
end,
width = WeakAuras.doubleWidth,
order = 44,
func = function()
local collapsed = WeakAuras.IsCollapsed("subtext", "subtext", "fontflags" .. index, true)
WeakAuras.SetCollapsed("subtext", "subtext", "fontflags" .. index, not collapsed)
end,
image = function()
local collapsed = WeakAuras.IsCollapsed("subtext", "subtext", "fontflags" .. index, true)
return collapsed and "Interface\\AddOns\\WeakAuras\\Media\\Textures\\edit" or "Interface\\AddOns\\WeakAuras\\Media\\Textures\\editdown"
end,
imageWidth = 24,
imageHeight = 24
},
text_font_space = {
type = "description",
name = "",
order = 45,
hidden = hiddenFontExtra,
width = indentWidth
},
text_fontType = {
type = "select",
width = WeakAuras.normalWidth - indentWidth,
name = L["Outline"],
order = 46,
values = WeakAuras.font_flags,
hidden = hiddenFontExtra
},
text_shadowColor = {
type = "color",
hasAlpha = true,
width = WeakAuras.normalWidth,
name = L["Shadow Color"],
order = 47,
hidden = hiddenFontExtra
},
text_font_space3 = {
type = "description",
name = "",
order = 47.5,
hidden = hiddenFontExtra,
width = indentWidth
},
text_shadowXOffset = {
type = "range",
width = WeakAuras.normalWidth - indentWidth,
name = L["Shadow X Offset"],
softMin = -15,
softMax = 15,
bigStep = 1,
order = 48,
hidden = hiddenFontExtra
},
text_shadowYOffset = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Shadow Y Offset"],
softMin = -15,
softMax = 15,
bigStep = 1,
order = 49,
hidden = hiddenFontExtra
},
text_font_space4 = {
type = "description",
name = "",
order = 49.5,
hidden = hiddenFontExtra,
width = indentWidth
},
rotateText = {
type = "select",
width = WeakAuras.normalWidth - indentWidth,
name = L["Rotate Text"],
values = WeakAuras.text_rotate_types,
order = 50,
hidden = hiddenFontExtra
},
text_justify = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Alignment"],
values = WeakAuras.justify_types,
order = 50.5,
hidden = hiddenFontExtra
},
text_font_space5 = {
type = "description",
name = "",
order = 51,
hidden = hiddenFontExtra,
width = indentWidth
},
text_automaticWidth = {
type = "select",
width = WeakAuras.normalWidth - indentWidth,
name = L["Width"],
order = 51.5,
values = WeakAuras.text_automatic_width,
hidden = hiddenFontExtra
},
text_font_space6 = {
type = "description",
name = "",
order = 52,
hidden = hiddenFontExtra,
width = WeakAuras.normalWidth
},
text_font_space7 = {
type = "description",
name = "",
order = 52.5,
width = indentWidth,
hidden = function() return hiddenFontExtra() or data.text_automaticWidth ~= "Fixed" end
},
text_fixedWidth = {
name = L["Width"],
width = WeakAuras.normalWidth - indentWidth,
order = 53,
type = "range",
min = 1,
softMax = 200,
bigStep = 1,
hidden = function() return hiddenFontExtra() or data.text_automaticWidth ~= "Fixed" end
},
text_wordWrap = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Overflow"],
order = 54,
values = WeakAuras.text_word_wrap,
hidden = function() return hiddenFontExtra() or data.text_automaticWidth ~= "Fixed" end
},
}
-- Note: Anchor Options need to be generalized once there are multiple sub regions
-- While every sub region will have anchor options, the initial
-- design I had for anchor options proved to be not general enough for
-- what SubText needed. So, I removed it, and postponed making it work for unknown future
-- sub regions
local anchors
if parentData.controlledChildren then
anchors = {}
for index, childId in ipairs(parentData.controlledChildren) do
local childData = WeakAuras.GetData(childId)
WeakAuras:Mixin(anchors, WeakAuras.GetAnchorsForData(childData, "point"))
end
else
anchors = WeakAuras.GetAnchorsForData(parentData, "point")
end
-- Anchor Options
options.text_anchorsDescription = {
type = "execute",
control = "WeakAurasExpandSmall",
name = function()
local selfPoint = data.text_selfPoint ~= "AUTO" and self_point_types[data.text_selfPoint]
local anchorPoint = anchors[data.text_anchorPoint or "CENTER"] or anchors["CENTER"]
local xOffset = data.text_anchorXOffset or 0
local yOffset = data.text_anchorYOffset or 0
if (type(anchorPoint) == "table") then
anchorPoint = anchorPoint[1] .. "/" .. anchorPoint[2]
end
if selfPoint then
if xOffset == 0 and yOffset == 0 then
return L["|cFFffcc00Anchors:|r Anchored |cFFFF0000%s|r to frame's |cFFFF0000%s|r"]:format(selfPoint, anchorPoint)
else
return L["|cFFffcc00Anchors:|r Anchored |cFFFF0000%s|r to frame's |cFFFF0000%s|r with offset |cFFFF0000%s/%s|r"]:format(selfPoint, anchorPoint, xOffset, yOffset)
end
else
if xOffset == 0 and yOffset == 0 then
return L["|cFFffcc00Anchors:|r Anchored to frame's |cFFFF0000%s|r"]:format(anchorPoint)
else
return L["|cFFffcc00Anchors:|r Anchored to frame's |cFFFF0000%s|r with offset |cFFFF0000%s/%s|r"]:format(anchorPoint, xOffset, yOffset)
end
end
end,
width = WeakAuras.doubleWidth,
order = 60,
image = function()
local collapsed = WeakAuras.IsCollapsed("subregion", "text_anchors", tostring(index), true)
return collapsed and "Interface\\AddOns\\WeakAuras\\Media\\Textures\\edit" or "Interface\\AddOns\\WeakAuras\\Media\\Textures\\editdown"
end,
imageWidth = 24,
imageHeight = 24,
func = function()
local collapsed = WeakAuras.IsCollapsed("subregion", "text_anchors", tostring(index), true)
WeakAuras.SetCollapsed("subregion", "text_anchors", tostring(index), not collapsed)
end
}
local hiddenFunction = function()
return WeakAuras.IsCollapsed("subregion", "text_anchors", tostring(index), true)
end
options.text_anchor_space = {
type = "description",
name = "",
order = 60.15,
hidden = hiddenFunction,
width = indentWidth
}
options.text_selfPoint = {
type = "select",
width = WeakAuras.normalWidth - indentWidth,
name = L["Anchor"],
order = 60.2,
values = self_point_types,
hidden = hiddenFunction
}
options.text_anchorPoint = {
type = "select",
width = WeakAuras.normalWidth,
name = function()
return L["To Frame's"]
end,
order = 60.3,
values = anchors,
hidden = hiddenFunction,
control = "WeakAurasTwoColumnDropdown"
}
options.text_anchor_space2 = {
type = "description",
name = "",
order = 60.35,
hidden = hiddenFunction,
width = indentWidth
}
options.text_anchorXOffset = {
type = "range",
width = WeakAuras.normalWidth - indentWidth,
name = L["X Offset"],
order = 60.4,
softMin = (-1 * screenWidth),
softMax = screenWidth,
bigStep = 10,
hidden = hiddenFunction
}
options.text_anchorYOffset = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Y Offset"],
order = 60.5,
softMin = (-1 * screenHeight),
softMax = screenHeight,
bigStep = 10,
hidden = hiddenFunction
}
local function hideCustomTextOption()
if not parentData.subRegions then
return true
end
for index, subRegion in ipairs(parentData.subRegions) do
if subRegion.type == "subtext" and WeakAuras.ContainsCustomPlaceHolder(subRegion.text_text) then
return false
end
end
return true
end
local function CheckTextOptions(placeholders)
return function()
if not parentData.subRegions then
return true
end
for index, subRegion in ipairs(parentData.subRegions) do
if subRegion.type == "subtext" and WeakAuras.ContainsPlaceHolders(subRegion.text_text, placeholders) then
return false
end
end
return true
end
end
local CheckForTimePlaceHolders = CheckTextOptions("pt")
local commonTextOptions = {
__title = L["Common Text"],
__hidden = function() return hideCustomTextOption() and CheckForTimePlaceHolders() end,
text_customTextUpdate = {
type = "select",
width = WeakAuras.doubleWidth,
hidden = hideCustomTextOption,
name = L["Update Custom Text On..."],
values = WeakAuras.text_check_types,
order = 3,
get = function() return parentData.customTextUpdate or "event" end,
set = function(info, v)
parentData.customTextUpdate = v
WeakAuras.Add(parentData)
WeakAuras.ReloadOptions2(parentData.id, parentData)
end
},
-- Code Editor added below
text_progressPrecision = {
type = "select",
width = WeakAuras.normalWidth,
hidden = CheckForTimePlaceHolders,
disabled = CheckTextOptions("p"),
order = 5,
name = L["Remaining Time Precision"],
values = WeakAuras.precision_types,
get = function() return parentData.progressPrecision or 1 end,
set = function(info, v)
parentData.progressPrecision = v
WeakAuras.Add(parentData)
WeakAuras.ReloadOptions2(parentData.id, parentData)
end,
},
text_totalPrecision = {
type = "select",
width = WeakAuras.normalWidth,
hidden = CheckForTimePlaceHolders,
disabled = CheckTextOptions("t"),
order = 6,
name = L["Total Time Precision"],
values = WeakAuras.precision_types,
get = function() return parentData.totalPrecision or 1 end,
set = function(info, v)
parentData.totalPrecision = v
WeakAuras.Add(parentData)
WeakAuras.ReloadOptions2(parentData.id, parentData)
end,
},
}
WeakAuras.AddCodeOption(commonTextOptions, parentData, L["Custom Function"], "customText", "https://github.com/WeakAuras/WeakAuras2/wiki/Text-Replacements",
4, hideCustomTextOption, {"customText"}, false)
return options, commonTextOptions
end
WeakAuras.RegisterSubRegionOptions("subtext", createOptions, L["Shows one or more lines of text, which can include dynamic information such as progress or stacks"])
File diff suppressed because it is too large Load Diff
+76
View File
@@ -0,0 +1,76 @@
## Interface: 80300
## Title: WeakAuras Options
## Author: Mirrored and the WeakAuras Team
## Version: 2.17.4
## Notes: Options for WeakAuras
## Notes-esES: Opciones para WeakAuras
## Notes-deDE: Optionen für WeakAuras
## Notes-ruRU: Опции WeakAuras
## Notes-zhTW: WeakAuras的設定
## X-Category: Interface Enhancements
## Globe-Main: WeakAuras
## DefaultState: Enabled
## LoadOnDemand: 1
## Dependencies: WeakAuras
## SavedVariables: WeakAurasOptionsSaved
locales.xml
ForAllIndentsAndPurposes.lua
RegionOptions\AuraBar.lua
RegionOptions\Texture.lua
RegionOptions\Icon.lua
RegionOptions\Text.lua
RegionOptions\Group.lua
RegionOptions\DynamicGroup.lua
RegionOptions\Model.lua
RegionOptions\ProgressTexture.lua
SubRegionOptions\SubRegionCommon.lua
SubRegionOptions\SubText.lua
SubRegionOptions\Border.lua
SubRegionOptions\Glow.lua
SubRegionOptions\BarModel.lua
Cache.lua
ActionOptions.lua
AnimationOptions.lua
BuffTrigger.lua
BuffTrigger2.lua
GenericTrigger.lua
WeakAurasOptions.lua
ExternalAddons.lua
ConditionOptions.lua
AuthorOptions.lua
OptionsFrames\OptionsFrame.lua
# -- Groups
OptionsFrames\CodeReview.lua
OptionsFrames\IconPicker.lua
OptionsFrames\ImportExport.lua
OptionsFrames\ModelPicker.lua
OptionsFrames\TextEditor.lua
OptionsFrames\TexturePicker.lua
# -- misc Frames
OptionsFrames\MoverSizer.lua
OptionsFrames\FrameChooser.lua
AceGUI-Widgets\AceGUIWidget-WeakAurasExpand.lua
AceGUI-Widgets\AceGUIWidget-WeakAurasExpandSmall.lua
AceGUI-Widgets\AceGUIWidget-WeakAurasIcon.lua
AceGUI-Widgets\AceGUIWidget-WeakAurasNewHeaderButton.lua
AceGUI-Widgets\AceGUIWidget-WeakAurasLoadedHeaderButton.lua
AceGUI-Widgets\AceGUIWidget-WeakAurasDisplayButton.lua
AceGUI-Widgets\AceGUIWidget-WeakAurasTextureButton.lua
AceGUI-Widgets\AceGUIWidget-WeakAurasIconButton.lua
AceGUI-Widgets\AceGUIWidget-WeakAurasMultiLineEditBox.lua
AceGUI-Widgets\AceGUIWidget-WeakAurasNewButton.lua
AceGUI-Widgets\AceGUIWidget-WeakAurasImportButton.lua
AceGUI-Widgets\AceGUIWidget-WeakAurasSortedDropDown.lua
AceGUI-Widgets\AceGUIWidget-WeakAurasToolbarButton.lua
AceGUI-Widgets\AceGUIWidget-WeakAurasTwoColumnDropDown.lua
AceGUI-Widgets\AceGUIContainer-WeakAurasTreeGroup.lua
AceGUI-Widgets\AceGUIWidget-WeakAurasSnippetButton.lua
+16
View File
@@ -0,0 +1,16 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="Locales\enUS.lua"/>
<Script file="Locales\deDE.lua"/>
<Script file="Locales\frFR.lua"/>
<Script file="Locales\koKR.lua"/>
<Script file="Locales\zhCN.lua"/>
<Script file="Locales\zhTW.lua"/>
<Script file="Locales\esES.lua"/>
<Script file="Locales\esMX.lua"/>
<Script file="Locales\ruRU.lua"/>
<Script file="Locales\ptBR.lua"/>
<Script file="Locales\itIT.lua"/>
</Ui>