Commit 07580977 authored by Simpy's avatar Simpy 🐹
Browse files

here we go again

parent d877fbb5
--[[
* Collection of functions that can be used in multiple places
]]
------------------------------------------------------------------------
-- Collection of functions that can be used in multiple places
------------------------------------------------------------------------
local E, L, V, P, G = unpack(select(2, ...))
local _G = _G
......
......@@ -5,7 +5,6 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
--Lua functions
local random, next, unpack, strsub = random, next, unpack, strsub
--WoW API / Variables
E.AnimShake = {{-9,7,-7,12}, {-5,9,-9,5}, {-5,7,-7,5}, {-9,9,-9,9}, {-5,7,-7,5}, {-9,7,-9,5}}
E.AnimShakeH = {-5,5,-2,5,-2,5}
......
--[[
Collection of previous april fools pranks
Harlem Shake: Try it out with the command /harlemshake
Hello Kitty: Try it out with the command /hellokitty (pay attention to the popups, read what it says)
]]
------------------------------------------------------------------------
-- Collection of previous april fools pranks
-- Harlem Shake: Try it out with the command /harlemshake
-- Hello Kitty: Try it out with the command /hellokitty (pay attention to the popups, read what it says)
------------------------------------------------------------------------
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames')
local AB = E:GetModule('ActionBars')
......@@ -42,7 +40,7 @@ do
E:CancelTimer(E.massiveShakeTimer)
end
E.global.aprilFools = true;
E.global.aprilFools = true
E:StaticPopup_Hide("HARLEM_SHAKE")
twipe(self.massiveShakeObjects)
DoEmote("Dance")
......@@ -109,7 +107,7 @@ do
end
function E:HarlemShakeToggle()
self:StaticPopup_Show("HARLEM_SHAKE");
self:StaticPopup_Show("HARLEM_SHAKE")
end
end
......
......@@ -181,20 +181,20 @@ end
local function ConfigMode_OnClick(self)
selectedValue = self.value
E:ToggleMoveMode(false, self.value)
_G.UIDropDownMenu_SetSelectedValue(ElvUIMoverPopupWindowDropDown, self.value);
_G.UIDropDownMenu_SetSelectedValue(ElvUIMoverPopupWindowDropDown, self.value)
end
local function ConfigMode_Initialize()
local info = _G.UIDropDownMenu_CreateInfo();
info.func = ConfigMode_OnClick;
local info = _G.UIDropDownMenu_CreateInfo()
info.func = ConfigMode_OnClick
for _, configMode in ipairs(E.ConfigModeLayouts) do
info.text = E.ConfigModeLocalizedStrings[configMode];
info.value = configMode;
_G.UIDropDownMenu_AddButton(info);
info.text = E.ConfigModeLocalizedStrings[configMode]
info.value = configMode
_G.UIDropDownMenu_AddButton(info)
end
_G.UIDropDownMenu_SetSelectedValue(ElvUIMoverPopupWindowDropDown, selectedValue);
_G.UIDropDownMenu_SetSelectedValue(ElvUIMoverPopupWindowDropDown, selectedValue)
end
function E:NudgeMover(nudgeX, nudgeY)
......@@ -226,7 +226,7 @@ function E:UpdateNudgeFrame(mover, x, y)
end
function E:AssignFrameToNudge()
ElvUIMoverNudgeWindow.child = self;
ElvUIMoverNudgeWindow.child = self
E:UpdateNudgeFrame(self)
end
......@@ -244,7 +244,7 @@ function E:CreateMoverPopup()
f:Point("BOTTOM", _G.UIParent, 'CENTER', 0, 100)
f:SetScript('OnHide', function()
if ElvUIMoverPopupWindowDropDown then
_G.UIDropDownMenu_SetSelectedValue(ElvUIMoverPopupWindowDropDown, 'ALL');
_G.UIDropDownMenu_SetSelectedValue(ElvUIMoverPopupWindowDropDown, 'ALL')
end
end)
f:SetBackdropBorderColor(unpack(E.media.rgbvaluecolor))
......@@ -297,7 +297,7 @@ function E:CreateMoverPopup()
end
selectedValue = 'ALL'
_G.UIDropDownMenu_SetSelectedValue(ElvUIMoverPopupWindowDropDown, selectedValue);
_G.UIDropDownMenu_SetSelectedValue(ElvUIMoverPopupWindowDropDown, selectedValue)
end)
local align = CreateFrame('EditBox', f:GetName()..'EditBox', f, 'InputBoxTemplate')
......@@ -360,7 +360,7 @@ function E:CreateMoverPopup()
configMode.text:Point('RIGHT', configMode.backdrop, 'LEFT', -2, 0)
configMode.text:SetText(L["Config Mode:"])
_G.UIDropDownMenu_Initialize(configMode, ConfigMode_Initialize);
_G.UIDropDownMenu_Initialize(configMode, ConfigMode_Initialize)
local nudgeFrame = CreateFrame('Frame', 'ElvUIMoverNudgeWindow', E.UIParent)
nudgeFrame:SetFrameStrata("DIALOG")
......
......@@ -78,8 +78,8 @@ function E:DropDown(list, frame, xOffset, yOffset)
frame:Height((#list * BUTTON_HEIGHT) + PADDING * 2)
frame:Width(BUTTON_WIDTH + PADDING * 2)
local UIScale = _G.UIParent:GetScale();
local x, y = GetCursorPosition();
local UIScale = _G.UIParent:GetScale()
local x, y = GetCursorPosition()
x = x/UIScale
y = y/UIScale
frame:ClearAllPoints()
......
......@@ -4,7 +4,6 @@ local MC = E:GetModule('ModuleCopy')
--Lua functions
local pairs, next, type = pairs, next, type
local format, error = format, error
--WoW API / Variables
-- GLOBALS: ElvDB
--This table to reserve settings names in E.global.profileCopy. Used in export/imports functions
......@@ -168,25 +167,24 @@ function MC:CopyTable(CopyFrom, CopyTo, CopyDefault, module)
end
--[[
* Valid copy templates should be as follows
G.profileCopy[YourOptionGroupName] = {
[SubGroupName1] = true,
[SubGroupName2] = true,
...
}
* For example
G.profileCopy.auras = {
["general"] = true,
["buffs"] = true,
["debuffs"] = true,
["cooldown"] = true,
}
* "general" key can refer to a similar named subtable or all non-table variables inside your group
* If you leave the table as G.profileCopy[YourOptionGroupName] = {}, this will result in no valid copy template error.
* If set to G.profileCopy[YourOptionGroupName] = true, then this will copy everything without selecting
any particular subcategory from your settings table.
* Plugins can use "pluginSection" argument to determain their own table if they keep settings apart from core ElvUI settings.
Examples S&L uses "sle" table, MerathilisUI uses "mui" table, BenikUI uses "benikui" and core table
* Valid copy templates should be as follows:
G.profileCopy[YourOptionGroupName] = {
[SubGroupName1] = true,
[SubGroupName2] = true,
...
}
* For example:
G.profileCopy.auras = {
["general"] = true,
["buffs"] = true,
["debuffs"] = true,
["cooldown"] = true,
}
* "general" key can refer to a similar named subtable or all non-table variables inside your group
* If you leave the table as G.profileCopy[YourOptionGroupName] = {}, this will result in no valid copy template error.
* If set to G.profileCopy[YourOptionGroupName] = true, then this will copy everything without selecting any particular subcategory from your settings table.
* Plugins can use "pluginSection" argument to determain their own table if they keep settings apart from core ElvUI settings.
-- Examples S&L uses "sle" table, MerathilisUI uses "mui" table, BenikUI uses "benikui" and core table
]]
function MC:TablesExist(CopyFrom, CopyTo, CopyDefault)
......
......@@ -17,7 +17,7 @@ E.CreatedMovers = {}
E.DisabledMovers = {}
local function SizeChanged(frame)
if InCombatLockdown() then return; end
if InCombatLockdown() then return end
if frame.dirtyWidth and frame.dirtyHeight then
frame.mover:Size(frame.dirtyWidth, frame.dirtyHeight)
......
--Plugins pass their info using the table like:
--[[
--[[--------------------------------------------------------------------
* Plugins pass their info using the table like:
addon = {
Title = "Your Own Title",
Name = "AddOnName",
tutorialImage = "TexturePath",
Pages = {
[1] = function1,
[2] = function2,
[3] = function3,
function1,
function2,
function3,
},
StepTitles = {
[1] = "Title 1",
[2] = "Title 2",
[3] = "Title 3",
"Title 1",
"Title 2",
"Title 3",
},
StepTitlesColor = {r,g,b},
StepTitlesColorSelected = {r,g,b},
StepTitlesColor = {r, g, b},
StepTitlesColorSelected = {r, g, b},
StepTitleWidth = 140,
StepTitleButtonWidth = 130,
StepTitleTextJustification = "CENTER",
StepTitleTextJustification = "CENTER"
}
E:GetModule("PluginInstaller"):Queue(addon)
Title is wat displayed on top of the window. By default it's ""ElvUI Plugin Installation""
Name is how your installation will be showin in "pending list", Default is "Unknown"
tutorialImage is a path to your own texture to use in frame. if not specified, then it will use ElvUI's one
Pages is a table to set up pages of your install where numbers are representing actual pages' order and function is what previously was used to set layout. For example
function function1()
PluginInstallFrame.SubTitle:SetText("Title Text")
PluginInstallFrame.Desc1:SetText("Desc 1 Tet")
PluginInstallFrame.Desc2:SetText("Desc 2 Tet")
PluginInstallFrame.Desc3:SetText("Desc 3 Tet")
PluginInstallFrame.Option1:Show()
PluginInstallFrame.Option1:SetScript('OnClick', function() <Do Some Stuff> end)
PluginInstallFrame.Option1:SetText("Text 1")
PluginInstallFrame.Option2:Show()
PluginInstallFrame.Option2:SetScript('OnClick', function() <Do Some Other Stuff> end)
PluginInstallFrame.Option2:SetText("Text 2")
end
StepTitles - a table to specify "titles" for your install steps. If specified and number of lines here = number of pages then you'll get an additional frame to the right of main frame
with a list of steps (current one being highlighted), clicking on those will open respective step. BenikUI style of doing stuff.
StepTitlesColor - a table with color values to color "titles" when they are not active
StepTitlesColorSelected - a table with color values to color "titles" when they are active
StepTitleWidth - Width of the steps frame on the right side
StepTitleButtonWidth - Width of each step button in the steps frame
StepTitleTextJustification - The justification of the text on each step button ("LEFT", "RIGHT", "CENTER"). Default: "CENTER"
]]
* Title is wat displayed on top of the window. By default it's ""ElvUI Plugin Installation""
* Name is how your installation will be showin in "pending list", Default is "Unknown"
* tutorialImage is a path to your own texture to use in frame. if not specified, then it will use ElvUI's one
* Pages is a table to set up pages of your install where numbers are representing actual pages' order and function is what previously was used to set layout. For example
function function1()
PluginInstallFrame.SubTitle:SetText("Title Text")
PluginInstallFrame.Desc1:SetText("Desc 1 Tet")
PluginInstallFrame.Desc2:SetText("Desc 2 Tet")
PluginInstallFrame.Desc3:SetText("Desc 3 Tet")
PluginInstallFrame.Option1:Show()
PluginInstallFrame.Option1:SetScript('OnClick', function() <Do Some Stuff> end)
PluginInstallFrame.Option1:SetText("Text 1")
PluginInstallFrame.Option2:Show()
PluginInstallFrame.Option2:SetScript('OnClick', function() <Do Some Other Stuff> end)
PluginInstallFrame.Option2:SetText("Text 2")
end
StepTitles - a table to specify "titles" for your install steps.
* If specified and number of lines here = number of pages then you'll get an additional frame to the right of main frame
* with a list of steps (current one being highlighted), clicking on those will open respective step. BenikUI style of doing stuff.
StepTitlesColor - a table with color values to color "titles" when they are not active
StepTitlesColorSelected - a table with color values to color "titles" when they are active
StepTitleWidth - Width of the steps frame on the right side
StepTitleButtonWidth - Width of each step button in the steps frame
StepTitleTextJustification - The justification of the text on each step button ("LEFT", "RIGHT", "CENTER"). Default: "CENTER"
--------------------------------------------------------------------]]--
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB, Localize Underscore
local PI = E:GetModule('PluginInstaller')
......@@ -279,9 +283,9 @@ function PI:CreateFrame()
f.Option1:Width(100)
f.Option2:Width(100)
f.Option1:ClearAllPoints();
f.Option1:Point('RIGHT', f.Option2, 'LEFT', -4, 0);
f.Option2:ClearAllPoints();
f.Option1:ClearAllPoints()
f.Option1:Point('RIGHT', f.Option2, 'LEFT', -4, 0)
f.Option2:ClearAllPoints()
f.Option2:Point('BOTTOMRIGHT', f, 'BOTTOM', -4, 45)
end)
f.Option4:SetScript('OnHide', function() f.Option1:SetWidth(160); f.Option1:ClearAllPoints(); f.Option1:Point("BOTTOM", 0, 45); f.Option2:SetWidth(110); f.Option2:ClearAllPoints(); f.Option2:Point('BOTTOMLEFT', f, 'BOTTOM', 4, 45) end)
......@@ -325,7 +329,7 @@ function PI:CreateFrame()
f.pending.tex:SetTexture([[Interface\OptionsFrame\UI-OptionsFrame-NewFeatureIcon]])
f.pending:CreateBackdrop("Transparent")
f.pending:SetScript("OnEnter", function(self)
_G.GameTooltip:SetOwner(self, "ANCHOR_BOTTOMLEFT", E.PixelMode and -7 or -9);
_G.GameTooltip:SetOwner(self, "ANCHOR_BOTTOMLEFT", E.PixelMode and -7 or -9)
_G.GameTooltip:AddLine(L["List of installations in queue:"], 1, 1, 1)
_G.GameTooltip:AddLine(" ")
for i = 1, #PI.Installs do
......
This diff is collapsed.
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local Skins = E:GetModule("Skins")
--Lua functions
--WoW API / Variables
local CreateFrame = CreateFrame
local GetAddOnEnableState = GetAddOnEnableState
......
......@@ -56,15 +56,15 @@ SlashCmdList.FRAMELIST = function(msg)
local isPreviouslyShown = _G.FrameStackTooltip:IsShown()
if not isPreviouslyShown then
if msg == tostring(true) then
_G.FrameStackTooltip_Toggle(true);
_G.FrameStackTooltip_Toggle(true)
else
_G.FrameStackTooltip_Toggle();
_G.FrameStackTooltip_Toggle()
end
end
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
for i = 2, _G.FrameStackTooltip:NumLines() do
local text = _G["FrameStackTooltipTextLeft"..i]:GetText();
local text = _G["FrameStackTooltipTextLeft"..i]:GetText()
if(text and text ~= "") then
print(text)
end
......@@ -77,7 +77,7 @@ SlashCmdList.FRAMELIST = function(msg)
ElvUI[1]:GetModule("Chat"):CopyChat(_G.ChatFrame1)
if not isPreviouslyShown then
_G.FrameStackTooltip_Toggle();
_G.FrameStackTooltip_Toggle()
end
end
......
--Lua functions
--WoW API / Variables
local SlashCmdList = SlashCmdList
-- GLOBALS: SLASH_RELOADUI1, SLASH_RELOADUI2
......
--Lua functions
local pairs, type, table = pairs, type, table
local setmetatable, getmetatable = setmetatable, getmetatable
--WoW API / Variables
function table.copy(t, deep, seen)
seen = seen or {}
......@@ -16,6 +15,7 @@ function table.copy(t, deep, seen)
nt[k] = v
end
end
setmetatable(nt, table.copy(getmetatable(t), deep, seen))
seen[t] = nt
return nt
......
--[[
Going to leave this as my bullshit lua file.
So I can test stuff.
]]
------------------------------------------------------------------------
-- Going to leave this as my bullshit lua file.
-- So I can test stuff.
------------------------------------------------------------------------
......@@ -30,7 +30,7 @@ function LO:Initialize()
self.BottomPanel:Point('BOTTOMRIGHT', E.UIParent, 'BOTTOMRIGHT', 1, -1)
self.BottomPanel:Height(PANEL_HEIGHT)
self.BottomPanel:SetScript('OnShow', Panel_OnShow)
E.FrameLocks.ElvUI_BottomPanel = true;
E.FrameLocks.ElvUI_BottomPanel = true
Panel_OnShow(self.BottomPanel)
self:BottomPanelVisibility()
......@@ -41,7 +41,7 @@ function LO:Initialize()
self.TopPanel:Height(PANEL_HEIGHT)
self.TopPanel:SetScript('OnShow', Panel_OnShow)
Panel_OnShow(self.TopPanel)
E.FrameLocks.ElvUI_TopPanel = true;
E.FrameLocks.ElvUI_TopPanel = true
self:TopPanelVisibility()
end
......
......@@ -101,17 +101,17 @@ AB.customExitButton = {
}
function AB:PositionAndSizeBar(barName)
local buttonSpacing = E:Scale(self.db[barName].buttonspacing);
local buttonSpacing = E:Scale(self.db[barName].buttonspacing)
local backdropSpacing = E:Scale((self.db[barName].backdropSpacing or self.db[barName].buttonspacing))
local buttonsPerRow = self.db[barName].buttonsPerRow;
local numButtons = self.db[barName].buttons;
local size = E:Scale(self.db[barName].buttonsize);
local point = self.db[barName].point;
local numColumns = ceil(numButtons / buttonsPerRow);
local widthMult = self.db[barName].widthMult;
local heightMult = self.db[barName].heightMult;
local visibility = self.db[barName].visibility;
local bar = self.handledBars[barName];
local buttonsPerRow = self.db[barName].buttonsPerRow
local numButtons = self.db[barName].buttons
local size = E:Scale(self.db[barName].buttonsize)
local point = self.db[barName].point
local numColumns = ceil(numButtons / buttonsPerRow)
local widthMult = self.db[barName].widthMult
local heightMult = self.db[barName].heightMult
local visibility = self.db[barName].visibility
local bar = self.handledBars[barName]
bar.db = self.db[barName]
bar.db.position = nil; --Depreciated
......@@ -121,17 +121,17 @@ function AB:PositionAndSizeBar(barName)
end
if numButtons < buttonsPerRow then
buttonsPerRow = numButtons;
buttonsPerRow = numButtons
end
if numColumns < 1 then
numColumns = 1;
numColumns = 1
end
if bar.db.backdrop == true then
bar.backdrop:Show();
bar.backdrop:Show()
else
bar.backdrop:Hide();
bar.backdrop:Hide()
--Set size multipliers to 1 when backdrop is disabled
widthMult = 1
heightMult = 1
......@@ -141,28 +141,28 @@ function AB:PositionAndSizeBar(barName)
--Size of all buttons + Spacing between all buttons + Spacing between additional rows of buttons + Spacing between backdrop and buttons + Spacing on end borders with non-thin borders
local barWidth = (size * (buttonsPerRow * widthMult)) + ((buttonSpacing * (buttonsPerRow - 1)) * widthMult) + (buttonSpacing * (widthMult - 1)) + (sideSpacing*2)
local barHeight = (size * (numColumns * heightMult)) + ((buttonSpacing * (numColumns - 1)) * heightMult) + (buttonSpacing * (heightMult - 1)) + (sideSpacing*2)
bar:Width(barWidth);
bar:Height(barHeight);
bar:Width(barWidth)
bar:Height(barHeight)
bar.mouseover = bar.db.mouseover
local horizontalGrowth, verticalGrowth;
local horizontalGrowth, verticalGrowth
if point == "TOPLEFT" or point == "TOPRIGHT" then
verticalGrowth = "DOWN";
verticalGrowth = "DOWN"
else
verticalGrowth = "UP";
verticalGrowth = "UP"
end
if point == "BOTTOMLEFT" or point == "TOPLEFT" then
horizontalGrowth = "RIGHT";
horizontalGrowth = "RIGHT"
else
horizontalGrowth = "LEFT";
horizontalGrowth = "LEFT"
end
if bar.db.mouseover then
bar:SetAlpha(0);
bar:SetAlpha(0)
else
bar:SetAlpha(bar.db.alpha);
bar:SetAlpha(bar.db.alpha)
end
if bar.db.inheritGlobalFade then
......@@ -171,48 +171,48 @@ function AB:PositionAndSizeBar(barName)
bar:SetParent(E.UIParent)
end
local button, lastButton, lastColumnButton;
local button, lastButton, lastColumnButton
for i=1, NUM_ACTIONBAR_BUTTONS do
button = bar.buttons[i];
lastButton = bar.buttons[i-1];
lastColumnButton = bar.buttons[i-buttonsPerRow];
button:SetParent(bar);
button:ClearAllPoints();
button:SetAttribute("showgrid", 1);
button:Size(size);
button = bar.buttons[i]
lastButton = bar.buttons[i-1]
lastColumnButton = bar.buttons[i-buttonsPerRow]
button:SetParent(bar)
button:ClearAllPoints()
button:SetAttribute("showgrid", 1)
button:Size(size)
if i == 1 then
local x, y;
local x, y
if point == "BOTTOMLEFT" then
x, y = sideSpacing, sideSpacing;
x, y = sideSpacing, sideSpacing
elseif point == "TOPRIGHT" then
x, y = -sideSpacing, -sideSpacing;
x, y = -sideSpacing, -sideSpacing
elseif point == "TOPLEFT" then
x, y = sideSpacing, -sideSpacing;
x, y = sideSpacing, -sideSpacing
else
x, y = -sideSpacing, sideSpacing;
x, y = -sideSpacing, sideSpacing
end
button:Point(point, bar, point, x, y);
button:Point(point, bar, point, x, y)
elseif (i - 1) % buttonsPerRow == 0 then
local y = -buttonSpacing;
local buttonPoint, anchorPoint = "TOP", "BOTTOM";
local y = -buttonSpacing
local buttonPoint, anchorPoint = "TOP", "BOTTOM"
if verticalGrowth == 'UP' then
y = buttonSpacing;
buttonPoint = "BOTTOM";
anchorPoint = "TOP";
y = buttonSpacing
buttonPoint = "BOTTOM"
anchorPoint = "TOP"
end
button:Point(buttonPoint, lastColumnButton, anchorPoint, 0, y);
button:Point(buttonPoint, lastColumnButton, anchorPoint, 0, y)
else
local x = buttonSpacing;
local buttonPoint, anchorPoint = "LEFT", "RIGHT";
local x = buttonSpacing
local buttonPoint, anchorPoint = "LEFT", "RIGHT"
if horizontalGrowth == 'LEFT' then
x = -buttonSpacing;
buttonPoint = "RIGHT";
anchorPoint = "LEFT";
x = -buttonSpacing
buttonPoint = "RIGHT"
anchorPoint = "LEFT"
end
button:Point(buttonPoint, lastButton, anchorPoint, x, 0);
button:Point(buttonPoint, lastButton, anchorPoint, x, 0)
end
if i > numButtons then
......@@ -221,12 +221,12 @@ function AB:PositionAndSizeBar(barName)
button:Show()
end
self:StyleButton(button, nil, (MasqueGroup and E.private.actionbar.masque.actionbars and true) or nil);
self:StyleButton(button, nil, (MasqueGroup and E.private.actionbar.masque.actionbars and true) or nil)
end
if bar.db.enabled or not bar.initialized then
if not bar.db.mouseover then
bar:SetAlpha(bar.db.alpha);
bar:SetAlpha(bar.db.alpha)
end
local page = self:GetPage(barName, self.barDefaults[barName].page, self.barDefaults[barName].conditions)
......@@ -241,11 +241,11 @@ function AB:PositionAndSizeBar(barName)
bar:Show()
RegisterStateDriver(bar, "visibility", visibility); -- this is ghetto
RegisterStateDriver(bar, "page", page);
RegisterStateDriver(bar, "page", page)
bar:SetAttribute("page", page)
if not bar.initialized then
bar.initialized = true;
bar.initialized = true
AB:PositionAndSizeBar(barName)
return
end
......@@ -253,7 +253,7 @@ function AB:PositionAndSizeBar(barName)
else
E:DisableMover(bar.mover:GetName())
bar:Hide()
UnregisterStateDriver(bar, "visibility");
UnregisterStateDriver(bar, "visibility")
end
E:SetMoverSnapOffset('ElvAB_'..bar.id, bar.db.buttonspacing / 2)
......@@ -264,13 +264,13 @@ function AB:PositionAndSizeBar(barName)
end
function AB:CreateBar(id)
local bar = CreateFrame('Frame', 'ElvUI_Bar'..id, E.UIParent, 'SecureHandlerStateTemplate');
local bar = CreateFrame('Frame', 'ElvUI_Bar'..id, E.UIParent, 'SecureHandlerStateTemplate')
bar:SetFrameRef("MainMenuBarArtFrame", _G.MainMenuBarArtFrame)
local point, anchor, attachTo, x, y = strsplit(',', self.barDefaults['bar'..id].position)
bar:Point(point, anchor, attachTo, x, y)
bar.id = id
bar:CreateBackdrop();
bar:CreateBackdrop()