From d52da42f776d0d163b891bf938bb46385f0bacd6 Mon Sep 17 00:00:00 2001 From: Crum Date: Wed, 16 May 2018 23:20:04 -0500 Subject: [PATCH] E:Point, E:Size, E:Width, E:Height, & cleanup --- ElvUI/Core/Commands.lua | 3 +- ElvUI/Core/Config.lua | 118 +++++++------- ElvUI/Core/Cooldowns.lua | 2 +- ElvUI/Core/Movers.lua | 38 +++-- ElvUI/Core/distributor.lua | 5 +- ElvUI/Core/dropdown.lua | 14 +- ElvUI/Core/fonts.lua | 2 +- ElvUI/Core/install.lua | 104 ++++++------- ElvUI/Core/pixelperfect.lua | 90 ++++++----- ElvUI/Core/pluginInstaller.lua | 147 ++++++++---------- ElvUI/Modules/ActionBars/ActionBars.lua | 22 ++- ElvUI/Modules/ActionBars/BarPet.lua | 19 +-- ElvUI/Modules/ActionBars/BarShapeShift.lua | 16 +- ElvUI/Modules/ActionBars/Bind.lua | 30 ++-- ElvUI/Modules/ActionBars/Microbar.lua | 15 +- ElvUI/Modules/Bags/BagBar.lua | 32 ++-- ElvUI/Modules/Bags/Bags.lua | 131 +++++++--------- ElvUI/Modules/Misc/AFK.lua | 31 ++-- ElvUI/Modules/Misc/ChatBubbles.lua | 48 +++--- ElvUI/Modules/Misc/Loot.lua | 67 ++++---- ElvUI/Modules/Misc/LootRoll.lua | 4 +- ElvUI/Modules/Misc/Misc.lua | 2 +- ElvUI/Modules/Misc/RaidMarker.lua | 16 +- ElvUI/Modules/NamePlates/NamePlates.lua | 82 +++++----- ElvUI/Modules/Skins/Addons/Ace3.lua | 105 ++++++------- ElvUI/Modules/Skins/Blizzard/AuctionHouse.lua | 90 +++++------ ElvUI/Modules/Skins/Blizzard/BGScore.lua | 4 +- ElvUI/Modules/Skins/Blizzard/Bags.lua | 16 +- ElvUI/Modules/Skins/Blizzard/Battlefield.lua | 4 +- ElvUI/Modules/Skins/Blizzard/Binding.lua | 10 +- ElvUI/Modules/Skins/Blizzard/Character.lua | 65 ++++---- ElvUI/Modules/Skins/Blizzard/Craft.lua | 9 +- ElvUI/Modules/Skins/Blizzard/Debug.lua | 8 +- ElvUI/Modules/Skins/Blizzard/DressingRoom.lua | 14 +- ElvUI/Modules/Skins/Blizzard/Friends.lua | 124 +++++++-------- ElvUI/Modules/Skins/Blizzard/Gossip.lua | 14 +- .../Modules/Skins/Blizzard/GuildRegistrar.lua | 4 +- ElvUI/Modules/Skins/Blizzard/Help.lua | 12 +- ElvUI/Modules/Skins/Blizzard/Inspect.lua | 8 +- ElvUI/Modules/Skins/Blizzard/Loot.lua | 15 +- ElvUI/Modules/Skins/Blizzard/Macro.lua | 30 ++-- ElvUI/Modules/Skins/Blizzard/Mail.lua | 28 ++-- ElvUI/Modules/Skins/Blizzard/Merchant.lua | 12 +- ElvUI/Modules/Skins/Blizzard/MirrorTimers.lua | 6 +- ElvUI/Modules/Skins/Blizzard/Misc.lua | 70 ++++----- ElvUI/Modules/Skins/Blizzard/Petition.lua | 8 +- ElvUI/Modules/Skins/Blizzard/Quest.lua | 73 ++++----- ElvUI/Modules/Skins/Blizzard/QuestTimers.lua | 9 +- ElvUI/Modules/Skins/Blizzard/Raid.lua | 22 +-- ElvUI/Modules/Skins/Blizzard/SpellBook.lua | 8 +- ElvUI/Modules/Skins/Blizzard/Stable.lua | 7 +- ElvUI/Modules/Skins/Blizzard/Tabard.lua | 20 +-- ElvUI/Modules/Skins/Blizzard/Talent.lua | 14 +- ElvUI/Modules/Skins/Blizzard/Taxi.lua | 4 +- ElvUI/Modules/Skins/Blizzard/Tooltip.lua | 4 +- ElvUI/Modules/Skins/Blizzard/Trade.lua | 18 +-- ElvUI/Modules/Skins/Blizzard/TradeSkill.lua | 24 ++- ElvUI/Modules/Skins/Blizzard/Trainer.lua | 10 +- ElvUI/Modules/Skins/Blizzard/Tutorial.lua | 3 +- ElvUI/Modules/Skins/Blizzard/WorldMap.lua | 4 +- ElvUI/Modules/Skins/Skins.lua | 73 ++++----- ElvUI/Modules/Tooltip/Tooltip.lua | 18 +-- ElvUI/Modules/UnitFrames/UnitFrames.lua | 39 +++-- ElvUI/Modules/UnitFrames/Units/Target.lua | 8 +- .../Modules/UnitFrames/Units/TargetTarget.lua | 8 +- 65 files changed, 958 insertions(+), 1102 deletions(-) diff --git a/ElvUI/Core/Commands.lua b/ElvUI/Core/Commands.lua index 25a7409..88303c2 100644 --- a/ElvUI/Core/Commands.lua +++ b/ElvUI/Core/Commands.lua @@ -52,8 +52,7 @@ function E:FarmMode(msg) if E.private.general.minimap.enable ~= true then return end if msg and type(tonumber(msg)) == "number" and tonumber(msg) <= 500 and tonumber(msg) >= 20 then E.db.farmSize = tonumber(msg) - FarmModeMap:SetWidth(tonumber(msg)) - FarmModeMap:SetHeight(tonumber(msg)) + E:Size(FarmModeMap, tonumber(msg)) end FarmMode() diff --git a/ElvUI/Core/Config.lua b/ElvUI/Core/Config.lua index 8e1c7f3..23aa9c1 100644 --- a/ElvUI/Core/Config.lua +++ b/ElvUI/Core/Config.lua @@ -114,30 +114,30 @@ function E:Grid_Create() else tx:SetTexture(0, 0, 0) end - tx:SetPoint("TOPLEFT", grid, "TOPLEFT", i*wStep - (size/2), 0) - tx:SetPoint("BOTTOMRIGHT", grid, "BOTTOMLEFT", i*wStep + (size/2), 0) + E:Point(tx, "TOPLEFT", grid, "TOPLEFT", i*wStep - (size/2), 0) + E:Point(tx, "BOTTOMRIGHT", grid, "BOTTOMLEFT", i*wStep + (size/2), 0) end height = GetScreenHeight() do local tx = grid:CreateTexture(nil, "BACKGROUND") tx:SetTexture(1, 0, 0) - tx:SetPoint("TOPLEFT", grid, "TOPLEFT", 0, -(height/2) + (size/2)) - tx:SetPoint("BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2 + size/2)) + E:Point(tx, "TOPLEFT", grid, "TOPLEFT", 0, -(height/2) + (size/2)) + E:Point(tx, "BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2 + size/2)) end for i = 1, floor((height/2)/hStep) do local tx = grid:CreateTexture(nil, "BACKGROUND") tx:SetTexture(0, 0, 0) - tx:SetPoint("TOPLEFT", grid, "TOPLEFT", 0, -(height/2+i*hStep) + (size/2)) - tx:SetPoint("BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2+i*hStep + size/2)) + E:Point(tx, "TOPLEFT", grid, "TOPLEFT", 0, -(height/2+i*hStep) + (size/2)) + E:Point(tx, "BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2+i*hStep + size/2)) tx = grid:CreateTexture(nil, "BACKGROUND") tx:SetTexture(0, 0, 0) - tx:SetPoint("TOPLEFT", grid, "TOPLEFT", 0, -(height/2-i*hStep) + (size/2)) - tx:SetPoint("BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2-i*hStep + size/2)) + E:Point(tx, "TOPLEFT", grid, "TOPLEFT", 0, -(height/2-i*hStep) + (size/2)) + E:Point(tx, "BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2-i*hStep + size/2)) end end @@ -166,7 +166,7 @@ function E:NudgeMover(nudgeX, nudgeY) local x, y, point = E:CalculateMoverPoints(mover, nudgeX, nudgeY) mover:ClearAllPoints() - mover:SetPoint(mover.positionOverride or point, E.UIParent, mover.positionOverride and "BOTTOMLEFT" or point, x, y) + E:Point(mover, mover.positionOverride or point, E.UIParent, mover.positionOverride and "BOTTOMLEFT" or point, x, y) E:SaveMoverPosition(mover.name) E:UpdateNudgeFrame(mover, x, y) @@ -200,10 +200,9 @@ function E:CreateMoverPopup() f:SetMovable(true) f:SetFrameLevel(99) f:SetClampedToScreen(true) - f:SetWidth(360) - f:SetHeight(170) + E:Size(f, 360, 170) E:SetTemplate(f, "Transparent") - f:SetPoint("BOTTOM", UIParent, "CENTER", 0, 100) + E:Point(f, "BOTTOM", UIParent, "CENTER", 0, 100) f:SetScript("OnHide", function() if ElvUIMoverPopupWindowDropDown then UIDropDownMenu_SetSelectedValue(ElvUIMoverPopupWindowDropDown, "ALL") @@ -215,8 +214,8 @@ function E:CreateMoverPopup() local header = CreateFrame("Button", nil, f) E:SetTemplate(header, "Default", true) - header:SetWidth(100) header:SetHeight(25) - header:SetPoint("CENTER", f, "TOP") + E:Size(header, 100, 25) + E:Point(header, "CENTER", f, "TOP") header:SetFrameLevel(header:GetFrameLevel() + 2) header:EnableMouse(true) header:RegisterForClicks("AnyUp", "AnyDown") @@ -225,15 +224,15 @@ function E:CreateMoverPopup() local title = header:CreateFontString("OVERLAY") E:FontTemplate(title) - title:SetPoint("CENTER", header, "CENTER") + E:Point(title, "CENTER", header, "CENTER") title:SetText("ElvUI") local desc = f:CreateFontString("ARTWORK") desc:SetFontObject("GameFontHighlight") desc:SetJustifyV("TOP") desc:SetJustifyH("LEFT") - desc:SetPoint("TOPLEFT", 18, -32) - desc:SetPoint("BOTTOMRIGHT", -18, 48) + E:Point(desc, "TOPLEFT", 18, -32) + E:Point(desc, "BOTTOMRIGHT", -18, 48) desc:SetText(L["DESC_MOVERCONFIG"]) local snapping = CreateFrame("CheckButton", f:GetName().."CheckButton", f, "OptionsCheckButtonTemplate") @@ -262,8 +261,7 @@ function E:CreateMoverPopup() end) local align = CreateFrame("EditBox", f:GetName().."EditBox", f, "InputBoxTemplate") - align:SetWidth(32) - align:SetHeight(17) + E:Size(align, 32, 17) align:SetAutoFocus(false) align:SetScript("OnEscapePressed", function() this:SetText(E.db.gridSize) @@ -292,13 +290,13 @@ function E:CreateMoverPopup() end) align.text = align:CreateFontString(nil, "OVERLAY", "GameFontNormal") - align.text:SetPoint("RIGHT", align, "LEFT", -4, 0) + E:Point(align.text, "RIGHT", align, "LEFT", -4, 0) align.text:SetText(L["Grid Size:"]) --position buttons - snapping:SetPoint("BOTTOMLEFT", 14, 10) - lock:SetPoint("BOTTOMRIGHT", -14, 14) - align:SetPoint("TOPRIGHT", lock, "TOPLEFT", -4, -2) + E:Point(snapping, "BOTTOMLEFT", 14, 10) + E:Point(lock, "BOTTOMRIGHT", -14, 14) + E:Point(align, "TOPRIGHT", lock, "TOPLEFT", -4, -2) S:HandleCheckBox(snapping) S:HandleButton(lock) @@ -314,20 +312,19 @@ function E:CreateMoverPopup() end) local configMode = CreateFrame("Frame", f:GetName().."DropDown", f, "UIDropDownMenuTemplate") - configMode:SetPoint("BOTTOMRIGHT", lock, "TOPRIGHT", 8, -5) + E:Point(configMode, "BOTTOMRIGHT", lock, "TOPRIGHT", 8, -5) S:HandleDropDownBox(configMode, 148) configMode.text = configMode:CreateFontString(nil, "OVERLAY", "GameFontNormal") - configMode.text:SetPoint("RIGHT", configMode.backdrop, "LEFT", -2, 0) + E:Point(configMode.text, "RIGHT", configMode.backdrop, "LEFT", -2, 0) configMode.text:SetText(L["Config Mode:"]) UIDropDownMenu_Initialize(configMode, ConfigMode_Initialize) local nudgeFrame = CreateFrame("Frame", "ElvUIMoverNudgeWindow", E.UIParent) nudgeFrame:SetFrameStrata("DIALOG") - nudgeFrame:SetWidth(200) - nudgeFrame:SetHeight(110) + E:Size(nudgeFrame, 200, 110) E:SetTemplate(nudgeFrame, "Transparent") - nudgeFrame:SetPoint("TOP", ElvUIMoverPopupWindow, "BOTTOM", 0, -15) + E:Point(nudgeFrame, "TOP", ElvUIMoverPopupWindow, "BOTTOM", 0, -15) nudgeFrame:SetFrameLevel(100) nudgeFrame:Hide() nudgeFrame:EnableMouse(true) @@ -336,19 +333,18 @@ function E:CreateMoverPopup() header = CreateFrame("Button", "ElvUIMoverNudgeWindowHeader", nudgeFrame) E:SetTemplate(header, "Default", true) - header:SetWidth(100) header:SetHeight(25) - header:SetPoint("CENTER", nudgeFrame, "TOP") + E:Size(header, 100, 25) + E:Point(header, "CENTER", nudgeFrame, "TOP") header:SetFrameLevel(header:GetFrameLevel() + 2) title = header:CreateFontString("OVERLAY") E:FontTemplate(title) - title:SetPoint("CENTER", header, "CENTER") + E:Point(title, "CENTER", header, "CENTER") title:SetText(L["Nudge"]) header.title = title local xOffset = CreateFrame("EditBox", nudgeFrame:GetName().."XEditBox", nudgeFrame, "InputBoxTemplate") - xOffset:SetWidth(50) - xOffset:SetHeight(17) + E:Size(xOffset, 50, 17) xOffset:SetAutoFocus(false) xOffset.currentValue = 0 xOffset:SetScript("OnEscapePressed", function() @@ -374,15 +370,14 @@ function E:CreateMoverPopup() end) xOffset.text = xOffset:CreateFontString(nil, "OVERLAY", "GameFontNormal") - xOffset.text:SetPoint("RIGHT", xOffset, "LEFT", -4, 0) + E:Point(xOffset.text, "RIGHT", xOffset, "LEFT", -4, 0) xOffset.text:SetText("X:") - xOffset:SetPoint("BOTTOMRIGHT", nudgeFrame, "CENTER", -6, 8) + E:Point(xOffset, "BOTTOMRIGHT", nudgeFrame, "CENTER", -6, 8) nudgeFrame.xOffset = xOffset S:HandleEditBox(xOffset) local yOffset = CreateFrame("EditBox", nudgeFrame:GetName().."YEditBox", nudgeFrame, "InputBoxTemplate") - yOffset:SetWidth(50) - yOffset:SetHeight(17) + E:Size(yOffset, 50, 17) yOffset:SetAutoFocus(false) yOffset.currentValue = 0 yOffset:SetScript("OnEscapePressed", function() @@ -408,17 +403,16 @@ function E:CreateMoverPopup() end) yOffset.text = yOffset:CreateFontString(nil, "OVERLAY", "GameFontNormal") - yOffset.text:SetPoint("RIGHT", yOffset, "LEFT", -4, 0) + E:Point(yOffset.text, "RIGHT", yOffset, "LEFT", -4, 0) yOffset.text:SetText("Y:") - yOffset:SetPoint("BOTTOMLEFT", nudgeFrame, "CENTER", 16, 8) + E:Point(yOffset, "BOTTOMLEFT", nudgeFrame, "CENTER", 16, 8) nudgeFrame.yOffset = yOffset S:HandleEditBox(yOffset) local resetButton = CreateFrame("Button", nudgeFrame:GetName().."ResetButton", nudgeFrame, "UIPanelButtonTemplate") resetButton:SetText(RESET) - resetButton:SetPoint("TOP", nudgeFrame, "CENTER", 0, 2) - resetButton:SetWidth(100) - resetButton:SetHeight(25) + E:Point(resetButton, "TOP", nudgeFrame, "CENTER", 0, 2) + E:Size(resetButton, 100, 25) resetButton:SetScript("OnClick", function() if(ElvUIMoverNudgeWindow.child.textString) then E:ResetMovers(ElvUIMoverNudgeWindow.child.textString) @@ -428,16 +422,14 @@ function E:CreateMoverPopup() S:HandleButton(resetButton) -- Up Button local upButton = CreateFrame("Button", nudgeFrame:GetName().."PrevButton", nudgeFrame) - upButton:SetWidth(26) - upButton:SetHeight(26) - upButton:SetPoint("BOTTOMRIGHT", nudgeFrame, "BOTTOM", -6, 4) + E:Size(upButton, 26) + E:Point(upButton, "BOTTOMRIGHT", nudgeFrame, "BOTTOM", -6, 4) upButton:SetScript("OnClick", function() E:NudgeMover(nil, 1) end) upButton.icon = upButton:CreateTexture(nil, "ARTWORK") - upButton.icon:SetWidth(13) - upButton.icon:SetHeight(13) - upButton.icon:SetPoint("CENTER", 0, 0) + E:Size(upButton.icon, 13) + E:Point(upButton.icon, "CENTER", 0, 0) upButton.icon:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]]) upButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500) @@ -445,16 +437,14 @@ function E:CreateMoverPopup() S:HandleButton(upButton) -- Down Button local downButton = CreateFrame("Button", nudgeFrame:GetName().."DownButton", nudgeFrame) - downButton:SetWidth(26) - downButton:SetHeight(26) - downButton:SetPoint("BOTTOMLEFT", nudgeFrame, "BOTTOM", 6, 4) + E:Size(downButton, 26) + E:Point(downButton, "BOTTOMLEFT", nudgeFrame, "BOTTOM", 6, 4) downButton:SetScript("OnClick", function() E:NudgeMover(nil, -1) end) downButton.icon = downButton:CreateTexture(nil, "ARTWORK") - downButton.icon:SetWidth(13) - downButton.icon:SetHeight(13) - downButton.icon:SetPoint("CENTER", 0, 0) + E:Size(downButton.icon, 13) + E:Point(downButton.icon, "CENTER", 0, 0) downButton.icon:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]]) downButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500) @@ -462,16 +452,14 @@ function E:CreateMoverPopup() S:HandleButton(downButton) -- Left Button local leftButton = CreateFrame("Button", nudgeFrame:GetName().."LeftButton", nudgeFrame) - leftButton:SetWidth(26) - leftButton:SetHeight(26) - leftButton:SetPoint("RIGHT", upButton, "LEFT", -6, 0) + E:Size(leftButton, 26) + E:Point(leftButton, "RIGHT", upButton, "LEFT", -6, 0) leftButton:SetScript("OnClick", function() E:NudgeMover(-1) end) leftButton.icon = leftButton:CreateTexture(nil, "ARTWORK") - leftButton.icon:SetWidth(13) - leftButton.icon:SetHeight(13) - leftButton.icon:SetPoint("CENTER", 0, 0) + E:Size(leftButton.icon, 13) + E:Point(leftButton.icon, "CENTER", 0, 0) leftButton.icon:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]]) leftButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500) @@ -479,16 +467,14 @@ function E:CreateMoverPopup() S:HandleButton(leftButton) -- Right Button local rightButton = CreateFrame("Button", nudgeFrame:GetName().."RightButton", nudgeFrame) - rightButton:SetWidth(26) - rightButton:SetHeight(26) - rightButton:SetPoint("LEFT", downButton, "RIGHT", 6, 0) + E:Size(rightButton, 26) + E:Point(rightButton, "LEFT", downButton, "RIGHT", 6, 0) rightButton:SetScript("OnClick", function() E:NudgeMover(1) end) rightButton.icon = rightButton:CreateTexture(nil, "ARTWORK") - rightButton.icon:SetWidth(13) - rightButton.icon:SetHeight(13) - rightButton.icon:SetPoint("CENTER", 0, 0) + E:Size(rightButton.icon, 13) + E:Point(rightButton.icon, "CENTER", 0, 0) rightButton.icon:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]]) rightButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500) diff --git a/ElvUI/Core/Cooldowns.lua b/ElvUI/Core/Cooldowns.lua index 5a59366..2945a4e 100644 --- a/ElvUI/Core/Cooldowns.lua +++ b/ElvUI/Core/Cooldowns.lua @@ -86,7 +86,7 @@ function E:CreateCooldownTimer(parent) timer:SetScript("OnUpdate", function() Cooldown_OnUpdate(this, arg1) end) local text = timer:CreateFontString(nil, "OVERLAY") - text:SetPoint("CENTER", 1, 1) + E:Point(text, "CENTER", 1, 1) text:SetJustifyH("CENTER") timer.text = text diff --git a/ElvUI/Core/Movers.lua b/ElvUI/Core/Movers.lua index ae442aa..59181ca 100644 --- a/ElvUI/Core/Movers.lua +++ b/ElvUI/Core/Movers.lua @@ -13,8 +13,7 @@ E.CreatedMovers = {} E.DisabledMovers = {} local function SizeChanged(self) - self.mover:SetWidth(self.dirtyWidth and self.dirtyWidth or self:GetWidth()) - self.mover:SetHeight(self.dirtyHeight and self.dirtyHeight or self:GetHeight()) + E:Size(self.mover, self.dirtyWidth and self.dirtyWidth or self:GetWidth(), self.dirtyHeight and self.dirtyHeight or self:GetHeight()) end local function GetPoint(obj) @@ -30,7 +29,7 @@ local function UpdateCoords(self) local coordX, coordY = E:GetXYOffset(nudgeInversePoint, 1) ElvUIMoverNudgeWindow:ClearAllPoints() - ElvUIMoverNudgeWindow:SetPoint(nudgePoint, mover, nudgeInversePoint, coordX, coordY) + E:Point(ElvUIMoverNudgeWindow, nudgePoint, mover, nudgeInversePoint, coordX, coordY) E:UpdateNudgeFrame(mover, x, y) end @@ -54,8 +53,7 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh f:RegisterForDrag("LeftButton", "RightButton") f:EnableMouseWheel(true) f:SetMovable(true) - f:SetWidth(width) - f:SetHeight(height) + E:Size(f, width) E:SetTemplate(f, "Transparent", nil, nil, true) f:Hide() f.parent = parent @@ -67,7 +65,7 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh f.shouldDisable = shouldDisable f:SetFrameLevel(parent:GetFrameLevel() + 1) - if(overlay == true) then + if overlay == true then f:SetFrameStrata("DIALOG") else f:SetFrameStrata("BACKGROUND") @@ -79,7 +77,7 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh local fs = f:CreateFontString(nil, "OVERLAY") E:FontTemplate(fs) fs:SetJustifyH("CENTER") - fs:SetPoint("CENTER", f) + E:Point(fs, "CENTER", f) fs:SetText(text or name) fs:SetTextColor(unpack(E["media"].rgbvaluecolor)) f:SetFontString(fs) @@ -87,7 +85,7 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh if E.db["movers"] and E.db["movers"][name] then if type(E.db["movers"][name]) == "table" then - f:SetPoint(E.db["movers"][name]["p"], E.UIParent, E.db["movers"][name]["p2"], E.db["movers"][name]["p3"], E.db["movers"][name]["p4"]) + E:Point(f, E.db["movers"][name]["p"], E.UIParent, E.db["movers"][name]["p2"], E.db["movers"][name]["p3"], E.db["movers"][name]["p4"]) E.db["movers"][name] = GetPoint(f) f:ClearAllPoints() end @@ -100,10 +98,10 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh delim = "," end local point, anchor, secondaryPoint, x, y = split(delim, anchorString) - f:SetPoint(point, anchor, secondaryPoint, x, y) + E:Point(f, point, anchor, secondaryPoint, x, y) else - f:SetPoint(point, anchor, secondaryPoint, x, y) + E:Point(f, point, anchor, secondaryPoint, x, y) end local function OnDragStart(self) @@ -128,18 +126,18 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh local x, y, point = E:CalculateMoverPoints(self) self:ClearAllPoints() local overridePoint - if(self.positionOverride) then - if(self.positionOverride == "BOTTOM" or self.positionOverride == "TOP") then + if self.positionOverride then + if (self.positionOverride == "BOTTOM" or self.positionOverride == "TOP") then overridePoint = "BOTTOM" else overridePoint = "BOTTOMLEFT" end end - self:SetPoint(self.positionOverride or point, E.UIParent, overridePoint and overridePoint or point, x, y) - if(self.positionOverride) then + E:Point(self, self.positionOverride or point, E.UIParent, overridePoint and overridePoint or point, x, y) + if self.positionOverride then self.parent:ClearAllPoints() - self.parent:SetPoint(self.positionOverride, self, self.positionOverride) + E:Point(self.parent, self.positionOverride, self, self.positionOverride) end E:SaveMoverPosition(name) @@ -214,7 +212,7 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh parent.mover = f parent:ClearAllPoints() - parent:SetPoint(point, f, 0, 0) + E:Point(parent, point, f, 0, 0) if postdrag ~= nil and type(postdrag) == "function" then f:RegisterEvent("PLAYER_ENTERING_WORLD") @@ -413,7 +411,7 @@ function E:ResetMovers(arg) local f = _G[name] local point, anchor, secondaryPoint, x, y = split(",", E.CreatedMovers[name]["point"]) f:ClearAllPoints() - f:SetPoint(point, anchor, secondaryPoint, x, y) + E:Point(f, point, anchor, secondaryPoint, x, y) for key, value in pairs(E.CreatedMovers[name]) do if key == "postdrag" and type(value) == "function" then @@ -430,7 +428,7 @@ function E:ResetMovers(arg) local f = _G[name] local point, anchor, secondaryPoint, x, y = split(",", E.CreatedMovers[name]["point"]) f:ClearAllPoints() - f:SetPoint(point, anchor, secondaryPoint, x, y) + E:Point(f, point, anchor, secondaryPoint, x, y) if self.db.movers then self.db.movers[name] = nil @@ -468,11 +466,11 @@ function E:SetMoversPositions() end point, anchor, secondaryPoint, x, y = split(delim, anchorString) f:ClearAllPoints() - f:SetPoint(point, anchor, secondaryPoint, x, y) + E:Point(f, point, anchor, secondaryPoint, x, y) elseif f then point, anchor, secondaryPoint, x, y = split(",", E.CreatedMovers[name]["point"]) f:ClearAllPoints() - f:SetPoint(point, anchor, secondaryPoint, x, y) + E:Point(f, point, anchor, secondaryPoint, x, y) end end end diff --git a/ElvUI/Core/distributor.lua b/ElvUI/Core/distributor.lua index 4d8ca89..f58f6f1 100644 --- a/ElvUI/Core/distributor.lua +++ b/ElvUI/Core/distributor.lua @@ -35,11 +35,10 @@ function D:Initialize() E:CreateBackdrop(self.statusBar, "Default") self.statusBar:SetStatusBarTexture(E.media.normTex) self.statusBar:SetStatusBarColor(0.95, 0.15, 0.15) - self.statusBar:SetWidth(250) - self.statusBar:SetWidth(18) + E:Size(self.statusBar, 250, 18) self.statusBar.text = self.statusBar:CreateFontString(nil, "OVERLAY") E:FontTemplate(self.statusBar.text) - self.statusBar.text:SetPoint("CENTER", 0, 0) + E:Point(self.statusBar.text, "CENTER", 0, 0) self.statusBar:Hide() end diff --git a/ElvUI/Core/dropdown.lua b/ElvUI/Core/dropdown.lua index 062b1ad..a68eef9 100644 --- a/ElvUI/Core/dropdown.lua +++ b/ElvUI/Core/dropdown.lua @@ -54,7 +54,7 @@ function E:DropDown(list, frame, xOffset, yOffset) frame.buttons[i].text = frame.buttons[i]:CreateFontString(nil, "BORDER") frame.buttons[i].text:SetAllPoints() - frame.buttons[i].text:FontTemplate() + E:FontTemplate(frame.buttons[i].text) frame.buttons[i].text:SetJustifyH("LEFT") frame.buttons[i]:SetScript("OnEnter", OnEnter) @@ -62,28 +62,26 @@ function E:DropDown(list, frame, xOffset, yOffset) end frame.buttons[i]:Show() - frame.buttons[i]:SetHeight(BUTTON_HEIGHT) - frame.buttons[i]:SetWidth(BUTTON_WIDTH) + E:Size(frame.buttons[i], BUTTON_WIDTH, BUTTON_HEIGHT) frame.buttons[i].text:SetText(list[i].text) frame.buttons[i].func = list[i].func frame.buttons[i]:SetScript("OnClick", OnClick) if i == 1 then - frame.buttons[i]:SetPoint("TOPLEFT", frame, "TOPLEFT", PADDING, -PADDING) + E:Point(frame.buttons[i], "TOPLEFT", frame, "TOPLEFT", PADDING, -PADDING) else - frame.buttons[i]:SetPoint("TOPLEFT", frame.buttons[i-1], "BOTTOMLEFT") + E:Point(frame.buttons[i], "TOPLEFT", frame.buttons[i-1], "BOTTOMLEFT") end end - frame:SetHeight((getn(list) * BUTTON_HEIGHT) + PADDING * 2) - frame:SetWidth(BUTTON_WIDTH + PADDING * 2) + E:Size(frame, BUTTON_WIDTH + PADDING * 2, (getn(list) * BUTTON_HEIGHT) + PADDING * 2) local UIScale = UIParent:GetScale() local x, y = GetCursorPosition() x = x/UIScale y = y/UIScale frame:ClearAllPoints() - frame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", x + xOffset, y + yOffset) + E:Point(frame, "TOPLEFT", UIParent, "BOTTOMLEFT", x + xOffset, y + yOffset) ToggleFrame(frame) end \ No newline at end of file diff --git a/ElvUI/Core/fonts.lua b/ElvUI/Core/fonts.lua index fb9dbde..a9c9fae 100644 --- a/ElvUI/Core/fonts.lua +++ b/ElvUI/Core/fonts.lua @@ -8,7 +8,7 @@ local LSM = LibStub("LibSharedMedia-3.0"); local SetCVar = SetCVar local function SetFont(obj, font, size, style, r, g, b, sr, sg, sb, sox, soy) - if(not obj) then return end + if not obj then return end obj:SetFont(font, size, style) if sr and sg and sb then obj:SetShadowColor(sr, sg, sb) end diff --git a/ElvUI/Core/install.lua b/ElvUI/Core/install.lua index 449c2f7..9b36938 100644 --- a/ElvUI/Core/install.lua +++ b/ElvUI/Core/install.lua @@ -34,9 +34,8 @@ local MAX_PAGE = 8 local function FCF_ResetChatWindows() ChatFrame1:ClearAllPoints() - ChatFrame1:SetPoint("BOTTOMLEFT", "UIParent", "BOTTOMLEFT", 32, 95) - ChatFrame1:SetWidth(430) - ChatFrame1:SetHeight(120) + E:Point(ChatFrame1, "BOTTOMLEFT", "UIParent", "BOTTOMLEFT", 32, 95) + E:Size(ChatFrame1, 430, 120) ChatFrame1.isInitialized = 0 FCF_SetButtonSide(ChatFrame1, "left") FCF_SetChatWindowFontSize(ChatFrame1, 14) @@ -119,10 +118,10 @@ local function SetupChat() -- move general bottom left if i == 1 then frame:ClearAllPoints() - frame:SetPoint("BOTTOMLEFT", LeftChatToggleButton, "TOPLEFT", 1, 3) + E:Point(frame, "BOTTOMLEFT", LeftChatToggleButton, "TOPLEFT", 1, 3) elseif i == 3 then frame:ClearAllPoints() - frame:SetPoint("BOTTOMLEFT", RightChatDataPanel, "TOPLEFT", 1, 3) + E:Point(frame, "BOTTOMLEFT", RightChatDataPanel, "TOPLEFT", 1, 3) end FCF_StopDragging(frame) @@ -722,8 +721,7 @@ local function ResetAll() ElvUIInstallFrame.Desc1:SetText("") ElvUIInstallFrame.Desc2:SetText("") ElvUIInstallFrame.Desc3:SetText("") - ElvUIInstallFrame:SetWidth(550) - ElvUIInstallFrame:SetHeight(400) + E:Size(ElvUIInstallFrame, 550, 400) end local function SetPage(PageNum) @@ -842,8 +840,7 @@ local function SetPage(PageNum) InstallOption1Button:Show() InstallOption1Button:SetScript("OnClick", InstallComplete) InstallOption1Button:SetText(L["Finished"]) - ElvUIInstallFrame:SetWidth(550) - ElvUIInstallFrame:SetHeight(350) + E:Size(ElvUIInstallFrame, 550, 350) end end @@ -865,9 +862,8 @@ end function E:Install() if not InstallStepComplete then local imsg = CreateFrame("Frame", "InstallStepComplete", E.UIParent) - imsg:SetWidth(418) - imsg:SetHeight(72) - imsg:SetPoint("TOP", 0, -190) + E:Size(imsg, 418, 72) + E:Point(imsg, "TOP", 0, -190) imsg:Hide() imsg:SetScript("OnShow", function() if this.message then @@ -885,7 +881,7 @@ function E:Install() imsg.text = imsg:CreateFontString(nil, "OVERLAY") E:FontTemplate(imsg.text, E["media"].normFont, 32, "OUTLINE") - imsg.text:SetPoint("BOTTOM", 0, 16) + E:Point(imsg.text, "BOTTOM", 0, 16) imsg.text:SetTextColor(1, 0.82, 0) imsg.text:SetJustifyH("CENTER") end @@ -893,23 +889,21 @@ function E:Install() if not ElvUIInstallFrame then local f = CreateFrame("Button", "ElvUIInstallFrame", E.UIParent) f.SetPage = SetPage - f:SetWidth(550) - f:SetHeight(400) + E:Size(f, 550, 400) E:SetTemplate(f, "Transparent") - f:SetPoint("CENTER", 0, 0) + E:Point(f, "CENTER", 0, 0) f:SetFrameStrata("TOOLTIP") f.Title = f:CreateFontString(nil, "OVERLAY") E:FontTemplate(f.Title, nil, 17, nil) - f.Title:SetPoint("TOP", 0, -5) + E:Point(f.Title, "TOP", 0, -5) f.Title:SetText(L["ElvUI Installation"]) f.Next = CreateFrame("Button", "InstallNextButton", f, "UIPanelButtonTemplate") E:StripTextures(f.Next) E:SetTemplate(f.Next, "Default", true) - f.Next:SetWidth(110) - f.Next:SetHeight(25) - f.Next:SetPoint("BOTTOMRIGHT", -5, 5) + E:Size(f.Next, 110, 25) + E:Point(f.Next, "BOTTOMRIGHT", -5, 5) f.Next:SetText(CONTINUE) f.Next:Disable() f.Next:SetScript("OnClick", NextPage) @@ -918,9 +912,8 @@ function E:Install() f.Prev = CreateFrame("Button", "InstallPrevButton", f, "UIPanelButtonTemplate") E:StripTextures(f.Prev) E:SetTemplate(f.Prev, "Default", true) - f.Prev:SetWidth(110) - f.Prev:SetHeight(25) - f.Prev:SetPoint("BOTTOMLEFT", 5, 5) + E:Size(f.Prev, 110, 25) + E:Point(f.Prev, "BOTTOMLEFT", 5, 5) f.Prev:SetText(PREV) f.Prev:Disable() f.Prev:SetScript("OnClick", PreviousPage) @@ -932,8 +925,8 @@ function E:Install() f.Status:SetStatusBarTexture(E["media"].normTex) E:RegisterStatusBar(f.Status) f.Status:SetMinMaxValues(0, MAX_PAGE) - f.Status:SetPoint("TOPLEFT", f.Prev, "TOPRIGHT", 6, -2) - f.Status:SetPoint("BOTTOMRIGHT", f.Next, "BOTTOMLEFT", -6, 2) + E:Point(f.Status, "TOPLEFT", f.Prev, "TOPRIGHT", 6, -2) + E:Point(f.Status, "BOTTOMRIGHT", f.Next, "BOTTOMLEFT", -6, 2) f.Status.anim = CreateAnimationGroup(f.Status) f.Status.anim.progress = f.Status.anim:CreateAnimation("Progress") @@ -942,90 +935,85 @@ function E:Install() f.Status.text = f.Status:CreateFontString(nil, "OVERLAY") E:FontTemplate(f.Status.text) - f.Status.text:SetPoint("CENTER", 0, 0) + E:Point(f.Status.text, "CENTER", 0, 0) f.Status.text:SetText(format("%d / %d", CURRENT_PAGE, MAX_PAGE)) f.Option1 = CreateFrame("Button", "InstallOption1Button", f, "UIPanelButtonTemplate") E:StripTextures(f.Option1) - f.Option1:SetWidth(160) - f.Option1:SetHeight(30) - f.Option1:SetPoint("BOTTOM", 0, 45) + E:Size(f.Option1, 160, 30) + E:Point(f.Option1, "BOTTOM", 0, 45) f.Option1:SetText("") f.Option1:Hide() E.Skins:HandleButton(f.Option1, true) f.Option2 = CreateFrame("Button", "InstallOption2Button", f, "UIPanelButtonTemplate") E:StripTextures(f.Option2) - f.Option2:SetWidth(110) - f.Option2:SetHeight(30) - f.Option2:SetPoint("BOTTOMLEFT", f, "BOTTOM", 4, 45) + E:Size(f.Option2, 110, 30) + E:Point(f.Option2, "BOTTOMLEFT", f, "BOTTOM", 4, 45) f.Option2:SetText("") f.Option2:Hide() - f.Option2:SetScript("OnShow", function() f.Option1:SetWidth(110) f.Option1:ClearAllPoints() f.Option1:SetPoint("BOTTOMRIGHT", f, "BOTTOM", -4, 45) end) - f.Option2:SetScript("OnHide", function() f.Option1:SetWidth(160) f.Option1:ClearAllPoints() f.Option1:SetPoint("BOTTOM", 0, 45) end) + f.Option2:SetScript("OnShow", function() E:Width(f.Option1, 110) f.Option1:ClearAllPoints() E:Point(f.Option1, "BOTTOMRIGHT", f, "BOTTOM", -4, 45) end) + f.Option2:SetScript("OnHide", function() E:Width(f.Option1, 160) f.Option1:ClearAllPoints() E:Point(f.Option1, "BOTTOM", 0, 45) end) E.Skins:HandleButton(f.Option2, true) f.Option3 = CreateFrame("Button", "InstallOption3Button", f, "UIPanelButtonTemplate") E:StripTextures(f.Option3) - f.Option3:SetWidth(110) - f.Option3:SetHeight(30) - f.Option3:SetPoint("LEFT", f.Option2, "RIGHT", 4, 0) + E:Size(f.Option3, 110, 30) + E:Point(f.Option3, "LEFT", f.Option2, "RIGHT", 4, 0) f.Option3:SetText("") f.Option3:Hide() - f.Option3:SetScript("OnShow", function() f.Option1:SetWidth(100) f.Option1:ClearAllPoints() f.Option1:SetPoint("RIGHT", f.Option2, "LEFT", -4, 0) f.Option2:SetWidth(100) f.Option2:ClearAllPoints() f.Option2:SetPoint("BOTTOM", f, "BOTTOM", 0, 45) end) - f.Option3:SetScript("OnHide", function() f.Option1:SetWidth(160) f.Option1:ClearAllPoints() f.Option1:SetPoint("BOTTOM", 0, 45) f.Option2:SetWidth(110) f.Option2:ClearAllPoints() f.Option2:SetPoint("BOTTOMLEFT", f, "BOTTOM", 4, 45) end) + f.Option3:SetScript("OnShow", function() E:Width(f.Option1, 100) f.Option1:ClearAllPoints() E:Point(f.Option1, "RIGHT", f.Option2, "LEFT", -4, 0) E:Width(f.Option2, 100) f.Option2:ClearAllPoints() E:Point(f.Option2, "BOTTOM", f, "BOTTOM", 0, 45) end) + f.Option3:SetScript("OnHide", function() E:Width(f.Option1, 160) f.Option1:ClearAllPoints() E:Point(f.Option1, "BOTTOM", 0, 45) E:Width(f.Option2, 110) f.Option2:ClearAllPoints() E:Point(f.Option2, "BOTTOMLEFT", f, "BOTTOM", 4, 45) end) E.Skins:HandleButton(f.Option3, true) f.Option4 = CreateFrame("Button", "InstallOption4Button", f, "UIPanelButtonTemplate") E:StripTextures(f.Option4) - f.Option4:SetWidth(110) - f.Option4:SetHeight(30) - f.Option4:SetPoint("LEFT", f.Option3, "RIGHT", 4, 0) + E:Size(f.Option4, 110, 30) + E:Point(f.Option4, "LEFT", f.Option3, "RIGHT", 4, 0) f.Option4:SetText("") f.Option4:Hide() f.Option4:SetScript("OnShow", function() - f.Option1:SetWidth(100) - f.Option2:SetWidth(100) + E:Width(f.Option1, 100) + E:Width(f.Option2, 100) f.Option1:ClearAllPoints() - f.Option1:SetPoint("RIGHT", f.Option2, "LEFT", -4, 0) + E:Point(f.Option1, "RIGHT", f.Option2, "LEFT", -4, 0) f.Option2:ClearAllPoints() - f.Option2:SetPoint("BOTTOMRIGHT", f, "BOTTOM", -4, 45) + E:Point(f.Option2, "BOTTOMRIGHT", f, "BOTTOM", -4, 45) end) - f.Option4:SetScript("OnHide", function() f.Option1:SetWidth(160) f.Option1:ClearAllPoints() f.Option1:SetPoint("BOTTOM", 0, 45) f.Option2:SetWidth(110) f.Option2:ClearAllPoints() f.Option2:SetPoint("BOTTOMLEFT", f, "BOTTOM", 4, 45) end) + f.Option4:SetScript("OnHide", function() E:Width(f.Option1, 160) f.Option1:ClearAllPoints() E:Point(f.Option1, "BOTTOM", 0, 45) E:Width(f.Option2, 110) f.Option2:ClearAllPoints() E:Point(f.Option2, "BOTTOMLEFT", f, "BOTTOM", 4, 45) end) E.Skins:HandleButton(f.Option4, true) f.SubTitle = f:CreateFontString(nil, "OVERLAY") E:FontTemplate(f.SubTitle, nil, 15, nil) - f.SubTitle:SetPoint("TOP", 0, -40) + E:Point(f.SubTitle, "TOP", 0, -40) f.Desc1 = f:CreateFontString(nil, "OVERLAY") E:FontTemplate(f.Desc1) - f.Desc1:SetPoint("TOPLEFT", 20, -75) - f.Desc1:SetWidth(f:GetWidth() - 40) + E:Point(f.Desc1, "TOPLEFT", 20, -75) + E:Width(f.Desc1, f:GetWidth() - 40) f.Desc2 = f:CreateFontString(nil, "OVERLAY") E:FontTemplate(f.Desc2) - f.Desc2:SetPoint("TOPLEFT", 20, -125) - f.Desc2:SetWidth(f:GetWidth() - 40) + E:Point(f.Desc2, "TOPLEFT", 20, -125) + E:Width(f.Desc2, f:GetWidth() - 40) f.Desc3 = f:CreateFontString(nil, "OVERLAY") E:FontTemplate(f.Desc3) - f.Desc3:SetPoint("TOPLEFT", 20, -175) - f.Desc3:SetWidth(f:GetWidth() - 40) + E:Point(f.Desc3, "TOPLEFT", 20, -175) + E:Width(f.Desc3, f:GetWidth() - 40) local close = CreateFrame("Button", "InstallCloseButton", f, "UIPanelCloseButton") - close:SetPoint("TOPRIGHT", f, "TOPRIGHT") + E:Point(close, "TOPRIGHT", f, "TOPRIGHT") close:SetScript("OnClick", function() f:Hide() end) E.Skins:HandleCloseButton(close) f.tutorialImage = f:CreateTexture("InstallTutorialImage", "OVERLAY") - f.tutorialImage:SetWidth(256) - f.tutorialImage:SetHeight(128) + E:Size(f.tutorialImage, 256, 128) f.tutorialImage:SetTexture("Interface\\AddOns\\ElvUI\\media\\textures\\logo.tga") - f.tutorialImage:SetPoint("BOTTOM", 0, 70) + E:Point(f.tutorialImage, "BOTTOM", 0, 70) end diff --git a/ElvUI/Core/pixelperfect.lua b/ElvUI/Core/pixelperfect.lua index 3ba9519..5bb37d0 100644 --- a/ElvUI/Core/pixelperfect.lua +++ b/ElvUI/Core/pixelperfect.lua @@ -2,12 +2,12 @@ local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, Profi --Cache global variables --Lua functions -local abs, floor, min, max = math.abs, math.floor, math.min, math.max; -local match = string.match; +local abs, floor, min, max = math.abs, math.floor, math.min, math.max +local match = string.match --WoW API / Variables -local IsMacClient = IsMacClient; -local GetCVar, SetCVar = GetCVar, SetCVar; -local GetScreenHeight, GetScreenWidth = GetScreenHeight, GetScreenWidth; +local IsMacClient = IsMacClient +local GetCVar, SetCVar = GetCVar, SetCVar +local GetScreenHeight, GetScreenWidth = GetScreenHeight, GetScreenWidth local scale @@ -17,56 +17,56 @@ function E:UIScale(event) self.screenwidth = self.global.screenwidth end - if(GetCVar("UIScale")) then - self.global.uiScale = GetCVar("UIScale"); + if GetCVar("UIScale") then + self.global.uiScale = GetCVar("UIScale") end - local minScale = self.global.general.minUiScale or 0.64; - if(self.global.general.autoScale) then - scale = max(minScale, min(1.00, 768/self.screenheight)); + local minScale = self.global.general.minUiScale or 0.64 + if self.global.general.autoScale then + scale = max(minScale, min(1.00, 768/self.screenheight)) else - scale = max(minScale, min(1.00, self.global.uiScale or UIParent:GetScale() or 768/self.screenheight)); + scale = max(minScale, min(1.00, self.global.uiScale or UIParent:GetScale() or 768/self.screenheight)) end if self.screenwidth < 1600 then - self.lowversion = true; + self.lowversion = true elseif self.screenwidth >= 3840 and self.global.general.eyefinity then - local width = self.screenwidth; - local height = self.screenheight; + local width = self.screenwidth + local height = self.screenheight -- because some user enable bezel compensation, we need to find the real width of a single monitor. -- I don't know how it really work, but i'm assuming they add pixel to width to compensate the bezel. :P -- HQ resolution if width >= 9840 then width = 3280; end -- WQSXGA - if width >= 7680 and width < 9840 then width = 2560; end -- WQXGA - if width >= 5760 and width < 7680 then width = 1920; end -- WUXGA & HDTV - if width >= 5040 and width < 5760 then width = 1680; end -- WSXGA+ + if width >= 7680 and width < 9840 then width = 2560 end -- WQXGA + if width >= 5760 and width < 7680 then width = 1920 end -- WUXGA & HDTV + if width >= 5040 and width < 5760 then width = 1680 end -- WSXGA+ -- adding height condition here to be sure it work with bezel compensation because WSXGA+ and UXGA/HD+ got approx same width - if width >= 4800 and width < 5760 and height == 900 then width = 1600; end -- UXGA & HD+ + if width >= 4800 and width < 5760 and height == 900 then width = 1600 end -- UXGA & HD+ -- low resolution screen - if width >= 4320 and width < 4800 then width = 1440; end -- WSXGA - if width >= 4080 and width < 4320 then width = 1360; end -- WXGA - if width >= 3840 and width < 4080 then width = 1224; end -- SXGA & SXGA (UVGA) & WXGA & HDTV + if width >= 4320 and width < 4800 then width = 1440 end -- WSXGA + if width >= 4080 and width < 4320 then width = 1360 end -- WXGA + if width >= 3840 and width < 4080 then width = 1224 end -- SXGA & SXGA (UVGA) & WXGA & HDTV -- yep, now set ElvUI to lower resolution if screen #1 width < 1600 if width < 1600 then - self.lowversion = true; + self.lowversion = true end -- register a constant, we will need it later for launch.lua - self.eyefinity = width; + self.eyefinity = width end - self.mult = 768/match(GetCVar("gxResolution"), "%d+x(%d+)")/scale; - self.Spacing = self.PixelMode and 0 or self.mult; - self.Border = (self.PixelMode and self.mult or self.mult*2); + self.mult = 768/match(GetCVar("gxResolution"), "%d+x(%d+)")/scale + self.Spacing = self.PixelMode and 0 or self.mult + self.Border = (self.PixelMode and self.mult or self.mult*2) --Set UIScale, NOTE: SetCVar for UIScale can cause taints so only do this when we need to.. if E.Round and E:Round(UIParent:GetScale(), 5) ~= E:Round(scale, 5) and (event == "PLAYER_LOGIN") then - SetCVar("UseUIScale", 1); - SetCVar("UIScale", scale); + SetCVar("UseUIScale", 1) + SetCVar("UIScale", scale) WorldMapFrame.hasTaint = true; end @@ -78,21 +78,20 @@ function E:UIScale(event) --Resize self.UIParent if Eyefinity is on. if self.eyefinity then - local width = self.eyefinity; - local height = self.screenheight; + local width = self.eyefinity + local height = self.screenheight -- if autoscale is off, find a new width value of self.UIParent for screen #1. if not self.global.general.autoScale or height > 1200 then - local h = UIParent:GetHeight(); - local ratio = self.screenheight / h; - local w = self.eyefinity / ratio; + local h = UIParent:GetHeight() + local ratio = self.screenheight / h + local w = self.eyefinity / ratio - width = w; - height = h; + width = w + height = h end - self.UIParent:SetWidth(width); - self.UIParent:SetHeight(height); + E:Size(self.UIParent, width, height) else --[[Eyefinity Test mode Resize the E.UIParent to be smaller than it should be, all objects inside should relocate. @@ -100,17 +99,16 @@ function E:UIScale(event) ]] --self.UIParent:SetSize(UIParent:GetWidth() - 250, UIParent:GetHeight() - 250); - self.UIParent:SetWidth(GetScreenWidth()); - self.UIParent:SetHeight(GetScreenHeight()); + E:Size(self.UIParent, GetScreenWidth(), GetScreenHeight()) end - self.UIParent:ClearAllPoints(); - self.UIParent:SetPoint("CENTER", UIParent); + self.UIParent:ClearAllPoints() + E:Point(self.UIParent, "CENTER", UIParent) - self.diffGetLeft = E:Round(abs(UIParent:GetLeft() - self.UIParent:GetLeft())); - self.diffGetRight = E:Round(abs(UIParent:GetRight() - self.UIParent:GetRight())); - self.diffGetTop = E:Round(abs(UIParent:GetTop() - self.UIParent:GetTop())); - self.diffGetBottom = E:Round(abs(UIParent:GetBottom() - self.UIParent:GetBottom())); + self.diffGetLeft = E:Round(abs(UIParent:GetLeft() - self.UIParent:GetLeft())) + self.diffGetRight = E:Round(abs(UIParent:GetRight() - self.UIParent:GetRight())) + self.diffGetTop = E:Round(abs(UIParent:GetTop() - self.UIParent:GetTop())) + self.diffGetBottom = E:Round(abs(UIParent:GetBottom() - self.UIParent:GetBottom())) local change if E.Round then @@ -129,5 +127,5 @@ end -- pixel perfect script of custom ui scale. function E:Scale(x) - return self.mult*floor(x/self.mult+.5); + return self.mult*floor(x/self.mult+.5) end \ No newline at end of file diff --git a/ElvUI/Core/pluginInstaller.lua b/ElvUI/Core/pluginInstaller.lua index 0318585..96ae8c9 100644 --- a/ElvUI/Core/pluginInstaller.lua +++ b/ElvUI/Core/pluginInstaller.lua @@ -93,8 +93,7 @@ local function ResetAll() f.Desc2:SetText("") f.Desc3:SetText("") f.Desc4:SetText("") - f:SetWidth(550) - f:SetHeight(400) + E:Size(f, 550, 400) if f.StepTitles then for i = 1, getn(f.side.Lines) do f.side.Lines[i].text:SetText("") end end @@ -155,9 +154,8 @@ end function PI:CreateStepComplete() local imsg = CreateFrame("Frame", "PluginInstallStepComplete", E.UIParent) - imsg:SetWidth(418) - imsg:SetHeight(72) - imsg:SetPoint("TOP", 0, -190) + E:Size(imsg, 418, 72) + E:Point(imsg, "TOP", 0, -190) imsg:Hide() imsg:SetScript("OnShow", function(self) if self.message then @@ -175,31 +173,28 @@ function PI:CreateStepComplete() imsg.bg = imsg:CreateTexture(nil, "BACKGROUND") imsg.bg:SetTexture([[Interface\LevelUp\LevelUpTex]]) - imsg.bg:SetPoint("BOTTOM", 0, 0) - imsg.bg:SetWidth(326) - imsg.bg:SetHeight(103) + E:Point(imsg.bg, "BOTTOM", 0, 0) + E:Size(imsg.bg, 326, 103) imsg.bg:SetTexCoord(0.00195313, 0.63867188, 0.03710938, 0.23828125) imsg.bg:SetVertexColor(1, 1, 1, 0.6) imsg.lineTop = imsg:CreateTexture(nil, "BACKGROUND") imsg.lineTop:SetDrawLayer("BACKGROUND", 2) imsg.lineTop:SetTexture([[Interface\LevelUp\LevelUpTex]]) - imsg.lineTop:SetPoint("TOP", 0, 0) - imsg.lineTop:SetWidth(418) - imsg.lineTop:SetHeight(7) + E:Point(imsg.lineTop, "TOP", 0, 0) + E:Size(imsg.lineTop, 418, 7) imsg.lineTop:SetTexCoord(0.00195313, 0.81835938, 0.01953125, 0.03320313) imsg.lineBottom = imsg:CreateTexture(nil, "BACKGROUND") imsg.lineBottom:SetDrawLayer("BACKGROUND", 2) imsg.lineBottom:SetTexture([[Interface\LevelUp\LevelUpTex]]) - imsg.lineBottom:SetPoint("BOTTOM", 0, 0) - imsg.lineBottom:SetWidth(418) - imsg.lineBottom:SetHeight(7) + E:Point(imsg.lineBottom, "BOTTOM", 0, 0) + E:Size(imsg.lineBottom, 418, 7) imsg.lineBottom:SetTexCoord(0.00195313, 0.81835938, 0.01953125, 0.03320313) imsg.text = imsg:CreateFontString(nil, "ARTWORK") E:FontTemplate(imsg.text, E["media"].normFont, 32, "OUTLINE") - imsg.text:SetPoint("BOTTOM", 0, 12) + E:Point(imsg.text, "BOTTOM", 0, 12) imsg.text:SetTextColor(1, 0.82, 0) imsg.text:SetJustifyH("CENTER") end @@ -207,22 +202,20 @@ end function PI:CreateFrame() f = CreateFrame("Button", "PluginInstallFrame", E.UIParent) f.SetPage = SetPage - f:SetWidth(550) - f:SetHeight(400) + E:Size(f, 550, 400) E:SetTemplate(f, "Transparent") - f:SetPoint("CENTER", 0, 0) + E:Point(f, "CENTER", 0, 0) f:SetFrameStrata("TOOLTIP") f.Title = f:CreateFontString(nil, "OVERLAY") E:FontTemplate(f.Title, nil, 17, nil) - f.Title:SetPoint("TOP", 0, -5) + E:Point(f.Title, "TOP", 0, -5) f.Next = CreateFrame("Button", "PluginInstallNextButton", f, "UIPanelButtonTemplate") E:StripTextures(f.Next) E:SetTemplate(f.Next, "Default", true) - f.Next:SetWidth(110) - f.Next:SetHeight(25) - f.Next:SetPoint("BOTTOMRIGHT", -5, 5) + E:Size(f.Next, 110, 25) + E:Point(f.Next, "BOTTOMRIGHT", -5, 5) f.Next:SetText(CONTINUE) f.Next:Disable() f.Next:SetScript("OnClick", NextPage) @@ -231,9 +224,8 @@ function PI:CreateFrame() f.Prev = CreateFrame("Button", "PluginInstallPrevButton", f, "UIPanelButtonTemplate") E:StripTextures(f.Prev) E:SetTemplate(f.Prev, "Default", true) - f.Prev:SetWidth(110) - f.Prev:SetHeight(25) - f.Prev:SetPoint("BOTTOMLEFT", 5, 5) + E:Size(f.Prev, 110, 25) + E:Point(f.Prev, "BOTTOMLEFT", 5, 5) f.Prev:SetText(PREV) f.Prev:Disable() f.Prev:SetScript("OnClick", PreviousPage) @@ -244,8 +236,8 @@ function PI:CreateFrame() E:CreateBackdrop(f.Status, "Default", true) f.Status:SetStatusBarTexture(E["media"].normTex) f.Status:SetStatusBarColor(unpack(E["media"].rgbvaluecolor)) - f.Status:SetPoint("TOPLEFT", f.Prev, "TOPRIGHT", 6, -2) - f.Status:SetPoint("BOTTOMRIGHT", f.Next, "BOTTOMLEFT", -6, 2) + E:Point(f.Status, "TOPLEFT", f.Prev, "TOPRIGHT", 6, -2) + E:Point(f.Status, "BOTTOMRIGHT", f.Next, "BOTTOMLEFT", -6, 2) -- Setup StatusBar Animation f.Status.anim = CreateAnimationGroup(f.Status) f.Status.anim.progress = f.Status.anim:CreateAnimation("Progress") @@ -254,94 +246,89 @@ function PI:CreateFrame() f.Status.text = f.Status:CreateFontString(nil, "OVERLAY") E:FontTemplate(f.Status.text) - f.Status.text:SetPoint("CENTER", 0, 0) + E:Point(f.Status.text, "CENTER", 0, 0) f.Option1 = CreateFrame("Button", "PluginInstallOption1Button", f, "UIPanelButtonTemplate") E:StripTextures(f.Option1) - f.Option1:SetWidth(160) - f.Option1:SetHeight(30) - f.Option1:SetPoint("BOTTOM", 0, 45) + E:Size(f.Option1, 160, 30) + E:Point(f.Option1, "BOTTOM", 0, 45) f.Option1:SetText("") f.Option1:Hide() E.Skins:HandleButton(f.Option1, true) f.Option2 = CreateFrame("Button", "PluginInstallOption2Button", f, "UIPanelButtonTemplate") E:StripTextures(f.Option2) - f.Option2:SetWidth(160) - f.Option2:SetHeight(30) - f.Option2:SetPoint("BOTTOMLEFT", f, "BOTTOM", 4, 45) + E:Size(f.Option2, 160, 30) + E:Point(f.Option2, "BOTTOMLEFT", f, "BOTTOM", 4, 45) f.Option2:SetText("") f.Option2:Hide() - f.Option2:SetScript("OnShow", function() f.Option1:SetWidth(110); f.Option1:ClearAllPoints(); f.Option1:SetPoint("BOTTOMRIGHT", f, "BOTTOM", -4, 45) end) - f.Option2:SetScript("OnHide", function() f.Option1:SetWidth(160); f.Option1:ClearAllPoints(); f.Option1:SetPoint("BOTTOM", 0, 45) end) + f.Option2:SetScript("OnShow", function() E:Width(f.Option1, 110); f.Option1:ClearAllPoints(); E:Point(f.Option1, "BOTTOMRIGHT", f, "BOTTOM", -4, 45) end) + f.Option2:SetScript("OnHide", function() E:Width(f.Option1, 160); f.Option1:ClearAllPoints(); E:Point(f.Option1, "BOTTOM", 0, 45) end) E.Skins:HandleButton(f.Option2, true) f.Option3 = CreateFrame("Button", "PluginInstallOption3Button", f, "UIPanelButtonTemplate") E:StripTextures(f.Option3) - f.Option3:SetWidth(100) - f.Option3:SetHeight(30) - f.Option3:SetPoint("LEFT", f.Option2, "RIGHT", 4, 0) + E:Size(f.Option3, 100, 30) + E:Point(f.Option3, "LEFT", f.Option2, "RIGHT", 4, 0) f.Option3:SetText("") f.Option3:Hide() - f.Option3:SetScript("OnShow", function() f.Option1:SetWidth(100); f.Option1:ClearAllPoints(); f.Option1:SetPoint("RIGHT", f.Option2, "LEFT", -4, 0); f.Option2:SetWidth(100); f.Option2:ClearAllPoints(); f.Option2:SetPoint("BOTTOM", f, "BOTTOM", 0, 45) end) - f.Option3:SetScript("OnHide", function() f.Option1:SetWidth(160); f.Option1:ClearAllPoints(); f.Option1:SetPoint("BOTTOM", 0, 45); f.Option2:SetWidth(110); f.Option2:ClearAllPoints(); f.Option2:SetPoint("BOTTOMLEFT", f, "BOTTOM", 4, 45) end) + f.Option3:SetScript("OnShow", function() E:Width(f.Option1, 100); f.Option1:ClearAllPoints(); E:Point(f.Option1, "RIGHT", f.Option2, "LEFT", -4, 0); E:Width(f.Option2, 100); f.Option2:ClearAllPoints(); E:Point(f.Option2, "BOTTOM", f, "BOTTOM", 0, 45) end) + f.Option3:SetScript("OnHide", function() E:Width(f.Option1, 160); f.Option1:ClearAllPoints(); E:Point(f.Option1, "BOTTOM", 0, 45); E:Width(f.Option2, 110); f.Option2:ClearAllPoints(); E:Point(f.Option2, "BOTTOMLEFT", f, "BOTTOM", 4, 45) end) E.Skins:HandleButton(f.Option3, true) f.Option4 = CreateFrame("Button", "PluginInstallOption4Button", f, "UIPanelButtonTemplate") E:StripTextures(f.Option4) - f.Option4:SetWidth(100) - f.Option4:SetHeight(30) - f.Option4:SetPoint("LEFT", f.Option3, "RIGHT", 4, 0) + E:Size(f.Option4, 100, 30) + E:Point(f.Option4, "LEFT", f.Option3, "RIGHT", 4, 0) f.Option4:SetText("") f.Option4:Hide() f.Option4:SetScript("OnShow", function() - f.Option1:SetWidth(100) - f.Option2:SetWidth(100) + E:Width(f.Option1, 100) + E:Width(f.Option2, 100) f.Option1:ClearAllPoints(); - f.Option1:SetPoint("RIGHT", f.Option2, "LEFT", -4, 0); + E:Point(f.Option1, "RIGHT", f.Option2, "LEFT", -4, 0); f.Option2:ClearAllPoints(); - f.Option2:SetPoint("BOTTOMRIGHT", f, "BOTTOM", -4, 45) + E:Point(f.Option2, "BOTTOMRIGHT", f, "BOTTOM", -4, 45) end) - f.Option4:SetScript("OnHide", function() f.Option1:SetWidth(160); f.Option1:ClearAllPoints(); f.Option1:SetPoint("BOTTOM", 0, 45); f.Option2:SetWidth(110); f.Option2:ClearAllPoints(); f.Option2:SetPoint("BOTTOMLEFT", f, "BOTTOM", 4, 45) end) + f.Option4:SetScript("OnHide", function() E:Width(f.Option1, 160); f.Option1:ClearAllPoints(); E:Point(f.Option1, "BOTTOM", 0, 45); E:Width(f.Option2, 110); f.Option2:ClearAllPoints(); E:Point(f.Option2, "BOTTOMLEFT", f, "BOTTOM", 4, 45) end) E.Skins:HandleButton(f.Option4, true) f.SubTitle = f:CreateFontString(nil, "OVERLAY") E:FontTemplate(f.SubTitle, nil, 15, nil) - f.SubTitle:SetPoint("TOP", 0, -40) + E:Point(f.SubTitle, "TOP", 0, -40) f.Desc1 = f:CreateFontString(nil, "OVERLAY") E:FontTemplate(f.Desc1) - f.Desc1:SetPoint("TOPLEFT", 20, -75) - f.Desc1:SetWidth(f:GetWidth() - 40) + E:Point(f.Desc1, "TOPLEFT", 20, -75) + E:Width(f.Desc1, f:GetWidth() - 40) f.Desc2 = f:CreateFontString(nil, "OVERLAY") E:FontTemplate(f.Desc2) - f.Desc2:SetPoint("TOP", f.Desc1, "BOTTOM", 0, -20) - f.Desc2:SetWidth(f:GetWidth() - 40) + E:Point(f.Desc2, "TOP", f.Desc1, "BOTTOM", 0, -20) + E:Width(f.Desc2, f:GetWidth() - 40) f.Desc3 = f:CreateFontString(nil, "OVERLAY") E:FontTemplate(f.Desc3) - f.Desc3:SetPoint("TOP", f.Desc2, "BOTTOM", 0, -20) - f.Desc3:SetWidth(f:GetWidth() - 40) + E:Point(f.Desc3, "TOP", f.Desc2, "BOTTOM", 0, -20) + E:Width(f.Desc3, f:GetWidth() - 40) f.Desc4 = f:CreateFontString(nil, "OVERLAY") E:FontTemplate(f.Desc4) - f.Desc4:SetPoint("TOP", f.Desc3, "BOTTOM", 0, -20) - f.Desc4:SetWidth(f:GetWidth() - 40) + E:Point(f.Desc4, "TOP", f.Desc3, "BOTTOM", 0, -20) + E:Width(f.Desc4, f:GetWidth() - 40) local close = CreateFrame("Button", "PluginInstallCloseButton", f, "UIPanelCloseButton") - close:SetPoint("TOPRIGHT", f, "TOPRIGHT") + E:Point(close, "TOPRIGHT", f, "TOPRIGHT") close:SetScript("OnClick", function() f:Hide() end) E.Skins:HandleCloseButton(close) f.pending = CreateFrame("Frame", "PluginInstallPendingButton", f) - f.pending:SetWidth(20) - f.pending:SetHeight(20) - f.pending:SetPoint("TOPLEFT", f, "TOPLEFT", 8, -8) + E:Size(f.pending, 20) + E:Point(f.pending, "TOPLEFT", f, "TOPLEFT", 8, -8) f.pending.tex = f.pending:CreateTexture(nil, "OVERLAY") - f.pending.tex:SetPoint("TOPLEFT", f.pending, "TOPLEFT", 2, -2) - f.pending.tex:SetPoint("BOTTOMRIGHT", f.pending, "BOTTOMRIGHT", -2, 2) + E:Point(f.pending.tex, "TOPLEFT", f.pending, "TOPLEFT", 2, -2) + E:Point(f.pending.tex, "BOTTOMRIGHT", f.pending, "BOTTOMRIGHT", -2, 2) f.pending.tex:SetTexture([[Interface\OptionsFrame\UI-OptionsFrame-NewFeatureIcon]]) E:CreateBackdrop(f.pending, "Transparent") f.pending:SetScript("OnEnter", function(self) @@ -358,17 +345,16 @@ function PI:CreateFrame() end) f.tutorialImage = f:CreateTexture("PluginInstallTutorialImage", "OVERLAY") - f.tutorialImage:SetWidth(256) - f.tutorialImage:SetHeight(128) - f.tutorialImage:SetPoint("BOTTOM", 0, 70) + E:Size(f.tutorialImage, 256, 128) + E:Point(f.tutorialImage, "BOTTOM", 0, 70) f.side = CreateFrame("Frame", "PluginInstallTitleFrame", f) E:SetTemplate(f.side, "Transparent") - f.side:SetPoint("TOPLEFT", f, "TOPRIGHT", E.PixelMode and 1 or 3, 0) - f.side:SetPoint("BOTTOMLEFT", f, "BOTTOMRIGHT", E.PixelMode and 1 or 3, 0) - f.side:SetWidth(140) + E:Point(f.side, "TOPLEFT", f, "TOPRIGHT", E.PixelMode and 1 or 3, 0) + E:Point(f.side, "BOTTOMLEFT", f, "BOTTOMRIGHT", E.PixelMode and 1 or 3, 0) + E:Width(f.side, 140) f.side.text = f.side:CreateFontString(nil, "OVERLAY") - f.side.text:SetPoint("TOP", f.side, "TOP", 0, -4) + E:Point(f.side.text, "TOP", f.side, "TOP", 0, -4) f.side.text:SetFont(E["media"].normFont, 18, "OUTLINE") f.side.text:SetText(L["Steps"]) f.side.Lines = {} --Table to keep shown lines @@ -376,15 +362,14 @@ function PI:CreateFrame() for i = 1, 18 do local button = CreateFrame("Button", nil, f) if i == 1 then - button:SetPoint("TOP", f.side.text, "BOTTOM", 0, -6) + E:Point(button, "TOP", f.side.text, "BOTTOM", 0, -6) else - button:SetPoint("TOP", f.side.Lines[i - 1], "BOTTOM") + E:Point(button, "TOP", f.side.Lines[i - 1], "BOTTOM") end - button:SetWidth(130) - button:SetHeight(BUTTON_HEIGHT) + E:Size(button, 130, BUTTON_HEIGHT) button.text = button:CreateFontString(nil, "OVERLAY") - button.text:SetPoint("TOPLEFT", button, "TOPLEFT", 2, -2) - button.text:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 2) + E:Point(button.text, "TOPLEFT", button, "TOPLEFT", 2, -2) + E:Point(button.text, "BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 2) button.text:SetFont(E["media"].normFont, 14, "OUTLINE") button:SetScript("OnClick", function() if i <= f.MaxPage then SetPage(i, f.CurrentPage) end end) button.text:SetText("") @@ -439,15 +424,15 @@ function PI:RunInstall() f.Pages = db.Pages PluginInstallFrame:Show() - f:SetPoint("CENTER") + E:Point(f, "CENTER") if db.StepTitles and getn(db.StepTitles) == f.MaxPage then - f:SetPoint("CENTER", E.UIParent, "CENTER", -((db.StepTitleWidth or 140)/2), 0) - f.side:SetWidth(db.StepTitleWidth or 140) + E:Point(f, "CENTER", E.UIParent, "CENTER", -((db.StepTitleWidth or 140)/2), 0) + E:Width(f.side, db.StepTitleWidth or 140) f.side:Show() for i = 1, getn(f.side.Lines) do if db.StepTitles[i] then - f.side.Lines[i]:SetWidth(db.StepTitleButtonWidth or 130) + E:Width(f.side.Lines[i], db.StepTitleButtonWidth or 130) f.side.Lines[i].text:SetJustifyH(db.StepTitleTextJustification or "CENTER") f.side.Lines[i]:Show() end diff --git a/ElvUI/Modules/ActionBars/ActionBars.lua b/ElvUI/Modules/ActionBars/ActionBars.lua index 9f69647..5a545d8 100644 --- a/ElvUI/Modules/ActionBars/ActionBars.lua +++ b/ElvUI/Modules/ActionBars/ActionBars.lua @@ -73,8 +73,7 @@ function AB:PositionAndSizeBar(barName) local barWidth = (size * (buttonsPerRow * widthMult)) + ((buttonSpacing * (buttonsPerRow - 1)) * widthMult) + (buttonSpacing * (widthMult-1)) + ((self.db[barName].backdrop and (E.Border + backdropSpacing) or E.Spacing)*2) local barHeight = (size * (numColumns * heightMult)) + ((buttonSpacing * (numColumns - 1)) * heightMult) + (buttonSpacing * (heightMult-1)) + ((self.db[barName].backdrop and (E.Border + backdropSpacing) or E.Spacing)*2) - bar:SetWidth(barWidth) - bar:SetHeight(barHeight) + E:Size(bar, barWidth, barHeight) bar.mouseover = self.db[barName].mouseover @@ -107,8 +106,7 @@ function AB:PositionAndSizeBar(barName) button:SetParent(bar) - button:SetWidth(size) - button:SetHeight(size) + E:Size(button, size) ActionButton_ShowGrid(button) if i == 1 then @@ -121,7 +119,7 @@ function AB:PositionAndSizeBar(barName) else x, y = -firstButtonSpacing, firstButtonSpacing end - button:SetPoint(point, bar, point, x, y) + E:Point(button, point, bar, point, x, y) elseif mod((i - 1), buttonsPerRow) == 0 then x = 0 y = -buttonSpacing @@ -131,7 +129,7 @@ function AB:PositionAndSizeBar(barName) buttonPoint = "BOTTOM" anchorPoint = "TOP" end - button:SetPoint(buttonPoint, lastColumnButton, anchorPoint, x, y) + E:Point(button, buttonPoint, lastColumnButton, anchorPoint, x, y) else x = buttonSpacing y = 0 @@ -141,7 +139,7 @@ function AB:PositionAndSizeBar(barName) buttonPoint = "RIGHT" anchorPoint = "LEFT" end - button:SetPoint(buttonPoint, lastButton, anchorPoint, x, y) + E:Point(button, buttonPoint, lastButton, anchorPoint, x, y) end if i > numButtons then @@ -181,13 +179,13 @@ end function AB:CreateBar(id) local bar = CreateFrame("Button", "ElvUI_Bar"..id, E.UIParent) local point, anchor, attachTo, x, y = split(",", self["barDefaults"]["bar"..id].position) - bar:SetPoint(point, anchor, attachTo, x, y) + E:Point(bar, point, anchor, attachTo, x, y) bar.id = id E:CreateBackdrop(bar, "Default") bar:SetFrameStrata("LOW") local offset = E.Spacing - bar.backdrop:SetPoint("TOPLEFT", bar, "TOPLEFT", offset, -offset) - bar.backdrop:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT", -offset, offset) + E:Point(bar.backdrop, "TOPLEFT", bar, "TOPLEFT", offset, -offset) + E:Point(bar.backdrop, "BOTTOMRIGHT", bar, "BOTTOMRIGHT", -offset, offset) bar.buttons = {} self:HookScript(bar, "OnEnter", "Bar_OnEnter") self:HookScript(bar, "OnLeave", "Bar_OnLeave") @@ -289,7 +287,7 @@ function AB:StyleButton(button, noBackdrop) if count then count:ClearAllPoints() - count:SetPoint("BOTTOMRIGHT", 0, 2) + E:Point(count, "BOTTOMRIGHT", 0, 2) E:FontTemplate(count, LSM:Fetch("font", self.db.font), self.db.fontSize, self.db.fontOutline) count:SetTextColor(color.r, color.g, color.b) end @@ -440,7 +438,7 @@ function AB:FixKeybindText(button) end hotkey:ClearAllPoints() - hotkey:SetPoint("TOPRIGHT", 0, -3) + E:Point(hotkey, "TOPRIGHT", 0, -3) end function AB:ActionButton_Update() diff --git a/ElvUI/Modules/ActionBars/BarPet.lua b/ElvUI/Modules/ActionBars/BarPet.lua index f6f10c5..7ae09a6 100644 --- a/ElvUI/Modules/ActionBars/BarPet.lua +++ b/ElvUI/Modules/ActionBars/BarPet.lua @@ -121,11 +121,9 @@ function AB:PositionAndSizeBarPet() local barWidth = (size * (buttonsPerRow * widthMult)) + ((buttonSpacing * (buttonsPerRow - 1)) * widthMult) + (buttonSpacing * (widthMult-1)) + (backdropSpacing*2) + ((self.db["barPet"].backdrop and E.Border or E.Spacing)*2) local barHeight = (size * (numColumns * heightMult)) + ((buttonSpacing * (numColumns - 1)) * heightMult) + (buttonSpacing * (heightMult-1)) + (backdropSpacing*2) + ((self.db["barPet"].backdrop and E.Border or E.Spacing)*2) - bar:SetWidth(barWidth) - bar:SetHeight(barHeight) + E:Size(bar, barWidth, barHeight) - bar.mover:SetWidth(bar:GetWidth()) - bar.mover:SetHeight(bar:GetHeight()) + E:Size(bar.mover, bar:GetWidth(), bar:GetHeight()) if self.db["barPet"].enabled then bar:SetScale(1) @@ -171,8 +169,7 @@ function AB:PositionAndSizeBarPet() lastColumnButton = _G["PetActionButton"..i - buttonsPerRow] button:SetParent(bar) button:ClearAllPoints() - button:SetWidth(size) - button:SetHeight(size) + E:Size(button, size) button:Show() if i == 1 then @@ -187,7 +184,7 @@ function AB:PositionAndSizeBarPet() x, y = -firstButtonSpacing, firstButtonSpacing end - button:SetPoint(point, bar, point, x, y) + E:Point(button, point, bar, point, x, y) elseif mod((i - 1), buttonsPerRow) == 0 then local x = 0 local y = -buttonSpacing @@ -197,7 +194,7 @@ function AB:PositionAndSizeBarPet() buttonPoint = "BOTTOM" anchorPoint = "TOP" end - button:SetPoint(buttonPoint, lastColumnButton, anchorPoint, x, y) + E:Point(button, buttonPoint, lastColumnButton, anchorPoint, x, y) else local x = buttonSpacing local y = 0 @@ -208,7 +205,7 @@ function AB:PositionAndSizeBarPet() anchorPoint = "LEFT" end - button:SetPoint(buttonPoint, lastButton, anchorPoint, x, y) + E:Point(button, buttonPoint, lastButton, anchorPoint, x, y) end if i > numButtons then @@ -242,9 +239,9 @@ function AB:CreateBarPet() E:CreateBackdrop(bar, "Default") bar.backdrop:SetAllPoints() if self.db["bar4"].enabled then - bar:SetPoint("RIGHT", ElvUI_Bar4, "LEFT", -4, 0) + E:Point(bar, "RIGHT", ElvUI_Bar4, "LEFT", -4, 0) else - bar:SetPoint("RIGHT", E.UIParent, "RIGHT", -4, 0) + E:Point(bar, "RIGHT", E.UIParent, "RIGHT", -4, 0) end PetActionBarFrame.showgrid = 1 diff --git a/ElvUI/Modules/ActionBars/BarShapeShift.lua b/ElvUI/Modules/ActionBars/BarShapeShift.lua index 9f40794..2e294dc 100644 --- a/ElvUI/Modules/ActionBars/BarShapeShift.lua +++ b/ElvUI/Modules/ActionBars/BarShapeShift.lua @@ -141,14 +141,13 @@ function AB:PositionAndSizeBarShapeShift() local barWidth = (size * (buttonsPerRow * widthMult)) + ((buttonSpacing * (buttonsPerRow - 1)) * widthMult) + (buttonSpacing * (widthMult-1)) + ((self.db["barShapeShift"].backdrop == true and (E.Border + backdropSpacing) or E.Spacing)*2) local barHeight = (size * (numColumns * heightMult)) + ((buttonSpacing * (numColumns - 1)) * heightMult) + (buttonSpacing * (heightMult-1)) + ((self.db["barShapeShift"].backdrop == true and (E.Border + backdropSpacing) or E.Spacing)*2) - bar:SetWidth(barWidth) - bar:SetHeight(barHeight) + E:Size(bar, barWidth, barHeight) if self.db["barShapeShift"].enabled then bar:SetScale(1) bar:SetAlpha(bar.db.alpha) E:EnableMover(bar.mover:GetName()) - bar:SetPoint("CENTER", 0, 0) + E:Point(bar, "CENTER", 0, 0) else bar:SetScale(0.0001) bar:SetAlpha(0) @@ -182,8 +181,7 @@ function AB:PositionAndSizeBarShapeShift() lastColumnButton = _G["ElvUI_StanceBarButton"..i-buttonsPerRow] button:SetParent(bar) button:ClearAllPoints() - button:SetWidth(size) - button:SetHeight(size) + E:Size(button, size) if self.db["barShapeShift"].mouseover == true then bar:SetAlpha(0) @@ -203,7 +201,7 @@ function AB:PositionAndSizeBarShapeShift() x, y = -firstButtonSpacing, firstButtonSpacing end - button:SetPoint(point, bar, point, x, y) + E:Point(button, point, bar, point, x, y) elseif mod((i - 1), buttonsPerRow) == 0 then local x = 0 local y = -buttonSpacing @@ -213,7 +211,7 @@ function AB:PositionAndSizeBarShapeShift() buttonPoint = "BOTTOM" anchorPoint = "TOP" end - button:SetPoint(buttonPoint, lastColumnButton, anchorPoint, x, y) + E:Point(button, buttonPoint, lastColumnButton, anchorPoint, x, y) else local x = buttonSpacing local y = 0 @@ -224,7 +222,7 @@ function AB:PositionAndSizeBarShapeShift() anchorPoint = "LEFT" end - button:SetPoint(buttonPoint, lastButton, anchorPoint, x, y) + E:Point(button, buttonPoint, lastButton, anchorPoint, x, y) end if i > numButtons then @@ -289,7 +287,7 @@ end function AB:CreateBarShapeShift() E:CreateBackdrop(bar, "Default") bar.backdrop:SetAllPoints() - bar:SetPoint("TOPLEFT", E.UIParent, "TOPLEFT", 4, -4) + E:Point(bar, "TOPLEFT", E.UIParent, "TOPLEFT", 4, -4) bar.buttons = {} self:HookScript(bar, "OnEnter", "Bar_OnEnter") diff --git a/ElvUI/Modules/ActionBars/Bind.lua b/ElvUI/Modules/ActionBars/Bind.lua index 1dddba0..dedcd4f 100644 --- a/ElvUI/Modules/ActionBars/Bind.lua +++ b/ElvUI/Modules/ActionBars/Bind.lua @@ -119,7 +119,7 @@ function AB:BindUpdate(button, spellmacro) bind.button.name = GetMacroInfo(bind.button.id) GameTooltip:SetOwner(bind, "ANCHOR_TOP") - GameTooltip:SetPoint("BOTTOM", bind, "TOP", 0, 1) + E:Point(GameTooltip, "BOTTOM", bind, "TOP", 0, 1) GameTooltip:AddLine(bind.button.name, 1, 1, 1) bind.button.bindings = {GetBindingKey(spellmacro.." "..bind.button.name)} @@ -148,7 +148,7 @@ function AB:BindUpdate(button, spellmacro) GameTooltip:Show() GameTooltip:SetScript("OnHide", function() this:SetOwner(bind, "ANCHOR_NONE") - this:SetPoint("BOTTOM", bind, "TOP", 0, 1) + E:Point(this, "BOTTOM", bind, "TOP", 0, 1) this:AddLine(bind.button.name, 1, 1, 1) bind.button.bindings = {GetBindingKey(bind.button.bindstring)} if getn(bind.button.bindings) == 0 then @@ -180,7 +180,7 @@ function AB:BindUpdate(button, spellmacro) GameTooltip:Show() GameTooltip:SetScript("OnHide", function() this:SetOwner(bind, "ANCHOR_TOP") - this:SetPoint("BOTTOM", bind, "TOP", 0, 4) + E:Point(this, "BOTTOM", bind, "TOP", 0, 4) this:AddLine(bind.button.name, 1, 1, 1) bind.button.bindings = {GetBindingKey(bind.button.bindstring)} if getn(bind.button.bindings) == 0 then @@ -281,16 +281,14 @@ function AB:LoadKeyBinder() f:SetMovable(true) f:SetFrameLevel(99) f:SetClampedToScreen(true) - f:SetWidth(360) - f:SetHeight(130) + E:Size(f, 360, 130) E:SetTemplate(f, "Transparent") f:Hide() local header = CreateFrame("Button", nil, f) E:SetTemplate(header, "Default", true) - header:SetWidth(100) - header:SetHeight(25) - header:SetPoint("CENTER", f, "TOP") + E:Size(header, 100, 25) + E:Point(header, "CENTER", f, "TOP") header:SetFrameLevel(header:GetFrameLevel() + 2) header:EnableMouse(true) header:RegisterForClicks("AnyUp", "AnyDown") @@ -299,15 +297,15 @@ function AB:LoadKeyBinder() local title = header:CreateFontString("OVERLAY") E:FontTemplate(title) - title:SetPoint("CENTER", header, "CENTER") + E:Point(title, "CENTER", header, "CENTER") title:SetText("Key Binds") local desc = f:CreateFontString("ARTWORK") desc:SetFontObject("GameFontHighlight") desc:SetJustifyV("TOP") desc:SetJustifyH("LEFT") - desc:SetPoint("TOPLEFT", 18, -32) - desc:SetPoint("BOTTOMRIGHT", -18, 48) + E:Point(desc, "TOPLEFT", 18, -32) + E:Point(desc, "BOTTOMRIGHT", -18, 48) desc:SetText(L["Hover your mouse over any actionbutton or spellbook button to bind it. Press the escape key or right click to clear the current actionbutton's keybinding."]) local perCharCheck = CreateFrame("CheckButton", f:GetName().."CheckButton", f, "OptionsCheckButtonTemplate") @@ -334,13 +332,13 @@ function AB:LoadKeyBinder() local save = CreateFrame("Button", f:GetName().."SaveButton", f, "OptionsButtonTemplate") _G[save:GetName() .. "Text"]:SetText(L["Save"]) - save:SetWidth(150) + E:Width(save, 150) save:SetScript("OnClick", function() AB:DeactivateBindMode(true) end) local discard = CreateFrame("Button", f:GetName().."DiscardButton", f, "OptionsButtonTemplate") - discard:SetWidth(150) + E:Width(discard, 150) _G[discard:GetName() .. "Text"]:SetText(L["Discard"]) discard:SetScript("OnClick", function() @@ -348,9 +346,9 @@ function AB:LoadKeyBinder() end) --position buttons - perCharCheck:SetPoint("BOTTOMLEFT", discard, "TOPLEFT", 0, 2) - save:SetPoint("BOTTOMRIGHT", -14, 10) - discard:SetPoint("BOTTOMLEFT", 14, 10) + E:Point(perCharCheck, "BOTTOMLEFT", discard, "TOPLEFT", 0, 2) + E:Point(save, "BOTTOMRIGHT", -14, 10) + E:Point(discard, "BOTTOMLEFT", 14, 10) local S = E:GetModule("Skins") S:HandleCheckBox(perCharCheck) diff --git a/ElvUI/Modules/ActionBars/Microbar.lua b/ElvUI/Modules/ActionBars/Microbar.lua index d8a9737..d409f0c 100644 --- a/ElvUI/Modules/ActionBars/Microbar.lua +++ b/ElvUI/Modules/ActionBars/Microbar.lua @@ -50,8 +50,8 @@ function AB:HandleMicroButton(button) local f = CreateFrame("Frame", nil, button) f:SetFrameLevel(1) - f:SetPoint("BOTTOMLEFT", button, "BOTTOMLEFT", 2, 0) - f:SetPoint("TOPRIGHT", button, "TOPRIGHT", -2, -28) + E:Point(f, "BOTTOMLEFT", button, "BOTTOMLEFT", 2, 0) + E:Point(f, "TOPRIGHT", button, "TOPRIGHT", -2, -28) E:SetTemplate(f, "Default", true) button.backdrop = f @@ -80,12 +80,12 @@ function AB:UpdateMicroPositionDimensions() button:ClearAllPoints() if prevButton == microBar then - button:SetPoint("TOPLEFT", prevButton, "TOPLEFT", -2 + E.Border, 28 - E.Border) + E:Point(button, "TOPLEFT", prevButton, "TOPLEFT", -2 + E.Border, 28 - E.Border) elseif mod((i - 1), self.db.microbar.buttonsPerRow) == 0 then - button:SetPoint("TOP", lastColumnButton, "BOTTOM", 0, 28 - self.db.microbar.yOffset) + E:Point(button, "TOP", lastColumnButton, "BOTTOM", 0, 28 - self.db.microbar.yOffset) numRows = numRows + 1 else - button:SetPoint("LEFT", prevButton, "RIGHT", - 4 + self.db.microbar.xOffset, 0) + E:Point(button, "LEFT", prevButton, "RIGHT", - 4 + self.db.microbar.xOffset, 0) end end @@ -95,8 +95,7 @@ function AB:UpdateMicroPositionDimensions() microBar:SetAlpha(self.db.microbar.alpha) end - microBar:SetWidth(((CharacterMicroButton:GetWidth() - 4) * self.db.microbar.buttonsPerRow) + (self.db.microbar.xOffset * (self.db.microbar.buttonsPerRow - 1)) + E.Border * 2) - microBar:SetHeight(((CharacterMicroButton:GetHeight() - 28) * numRows) + (self.db.microbar.yOffset * (numRows - 1)) + E.Border * 2) + E:Size(microBar, ((CharacterMicroButton:GetWidth() - 4) * self.db.microbar.buttonsPerRow) + (self.db.microbar.xOffset * (self.db.microbar.buttonsPerRow - 1)) + E.Border * 2, ((CharacterMicroButton:GetHeight() - 28) * numRows) + (self.db.microbar.yOffset * (numRows - 1)) + E.Border * 2) if self.db.microbar.enabled then microBar:Show() @@ -112,7 +111,7 @@ function AB:UpdateMicroPositionDimensions() end function AB:SetupMicroBar() - microBar:SetPoint("TOPLEFT", 4, -48) + E:Point(microBar, "TOPLEFT", 4, -48) for i = 1, getn(MICRO_BUTTONS) do self:HandleMicroButton(_G[MICRO_BUTTONS[i]]) diff --git a/ElvUI/Modules/Bags/BagBar.lua b/ElvUI/Modules/Bags/BagBar.lua index c153da5..e567a3f 100644 --- a/ElvUI/Modules/Bags/BagBar.lua +++ b/ElvUI/Modules/Bags/BagBar.lua @@ -68,50 +68,46 @@ function B:SizeAndPositionBagBar() ElvUIBags.backdrop:Hide() end - ElvUIKeyRingButton:SetWidth(bagBarSize) - ElvUIKeyRingButton:SetHeight(bagBarSize) + E:Size(ElvUIKeyRingButton, bagBarSize) ElvUIKeyRingButton:ClearAllPoints() for i = 1, getn(ElvUIBags.buttons) do local button = ElvUIBags.buttons[i] local prevButton = ElvUIBags.buttons[i-1] - button:SetWidth(E.db.bags.bagBar.size) - button:SetHeight(E.db.bags.bagBar.size) + E:Size(button, E.db.bags.bagBar.size) button:ClearAllPoints() if growthDirection == "HORIZONTAL" and sortDirection == "ASCENDING" then if i == 1 then - button:SetPoint("LEFT", ElvUIBags, "LEFT", (showBackdrop and (backdropSpacing + E.Border) or 0), 0) + E:Point(button, "LEFT", ElvUIBags, "LEFT", (showBackdrop and (backdropSpacing + E.Border) or 0), 0) elseif prevButton then - button:SetPoint("LEFT", prevButton, "RIGHT", buttonSpacing, 0) + E:Point(button, "LEFT", prevButton, "RIGHT", buttonSpacing, 0) end elseif growthDirection == "VERTICAL" and sortDirection == "ASCENDING" then if i == 1 then - button:SetPoint("TOP", ElvUIBags, "TOP", 0, -(showBackdrop and (backdropSpacing + E.Border) or 0)) + E:Point(button, "TOP", ElvUIBags, "TOP", 0, -(showBackdrop and (backdropSpacing + E.Border) or 0)) elseif prevButton then - button:SetPoint("TOP", prevButton, "BOTTOM", 0, -buttonSpacing) + E:Point(button, "TOP", prevButton, "BOTTOM", 0, -buttonSpacing) end elseif growthDirection == "HORIZONTAL" and sortDirection == "DESCENDING" then if i == 1 then - button:SetPoint("RIGHT", ElvUIBags, "RIGHT", -(showBackdrop and (backdropSpacing + E.Border) or 0), 0) + E:Point(button, "RIGHT", ElvUIBags, "RIGHT", -(showBackdrop and (backdropSpacing + E.Border) or 0), 0) elseif prevButton then - button:SetPoint("RIGHT", prevButton, "LEFT", -buttonSpacing, 0) + E:Point(button, "RIGHT", prevButton, "LEFT", -buttonSpacing, 0) end else if i == 1 then - button:SetPoint("BOTTOM", ElvUIBags, "BOTTOM", 0, (showBackdrop and (backdropSpacing + E.Border) or 0)) + E:Point(button, "BOTTOM", ElvUIBags, "BOTTOM", 0, (showBackdrop and (backdropSpacing + E.Border) or 0)) elseif prevButton then - button:SetPoint("BOTTOM", prevButton, "TOP", 0, buttonSpacing) + E:Point(button, "BOTTOM", prevButton, "TOP", 0, buttonSpacing) end end end if growthDirection == "HORIZONTAL" then - ElvUIBags:SetWidth(bagBarSize*(TOTAL_BAGS) + buttonSpacing*(TOTAL_BAGS-1) + ((showBackdrop == true and (E.Border + backdropSpacing) or E.Spacing)*2)) - ElvUIBags:SetHeight(bagBarSize + ((showBackdrop and (E.Border + backdropSpacing) or E.Spacing)*2)) + E:Size(ElvUIBags, bagBarSize*(TOTAL_BAGS) + buttonSpacing*(TOTAL_BAGS-1) + ((showBackdrop == true and (E.Border + backdropSpacing) or E.Spacing)*2), bagBarSize + ((showBackdrop and (E.Border + backdropSpacing) or E.Spacing)*2)) else - ElvUIBags:SetHeight(bagBarSize*(TOTAL_BAGS) + buttonSpacing*(TOTAL_BAGS-1) + ((showBackdrop == true and (E.Border + backdropSpacing) or E.Spacing)*2)) - ElvUIBags:SetWidth(bagBarSize + ((showBackdrop and (E.Border + backdropSpacing) or E.Spacing)*2)) + E:Size(ElvUIBags, bagBarSize + ((showBackdrop and (E.Border + backdropSpacing) or E.Spacing)*2), bagBarSize*(TOTAL_BAGS) + buttonSpacing*(TOTAL_BAGS-1) + ((showBackdrop == true and (E.Border + backdropSpacing) or E.Spacing)*2)) end end @@ -119,7 +115,7 @@ function B:LoadBagBar() if not E.private.bags.bagBar then return end local ElvUIBags = CreateFrame("Frame", "ElvUIBags", E.UIParent) - ElvUIBags:SetPoint("TOPRIGHT", RightChatPanel, "TOPLEFT", -4, 0) + E:Point(ElvUIBags, "TOPRIGHT", RightChatPanel, "TOPLEFT", -4, 0) ElvUIBags.buttons = {} E:CreateBackdrop(ElvUIBags) ElvUIBags.backdrop:SetAllPoints() @@ -132,7 +128,7 @@ function B:LoadBagBar() MainMenuBarBackpackButton:ClearAllPoints() E:FontTemplate(MainMenuBarBackpackButtonCount, nil, 10) MainMenuBarBackpackButtonCount:ClearAllPoints() - MainMenuBarBackpackButtonCount:SetPoint("BOTTOMRIGHT", MainMenuBarBackpackButton, "BOTTOMRIGHT", -1, 4) + E:Point(MainMenuBarBackpackButtonCount, "BOTTOMRIGHT", MainMenuBarBackpackButton, "BOTTOMRIGHT", -1, 4) MainMenuBarBackpackButton:Show() MainMenuBarBackpackButton:SetAlpha(1) HookScript(MainMenuBarBackpackButton, "OnEnter", OnEnter) diff --git a/ElvUI/Modules/Bags/Bags.lua b/ElvUI/Modules/Bags/Bags.lua index 7998c7b..47dca4e 100644 --- a/ElvUI/Modules/Bags/Bags.lua +++ b/ElvUI/Modules/Bags/Bags.lua @@ -376,7 +376,7 @@ function B:Layout(isBank) local holderWidth = ((buttonSize + buttonSpacing) * numContainerColumns) - buttonSpacing local numContainerRows = 0 local countColor = E.db.bags.countFontColor - f.holderFrame:SetWidth(holderWidth) + E:Width(f.holderFrame, holderWidth) f.totalSlots = 0 local lastButton @@ -423,20 +423,18 @@ function B:Layout(isBank) f.ContainerHolder[i].iconTexture:SetTexCoord(unpack(E.TexCoords)) end - f.ContainerHolder:SetWidth(((buttonSize + buttonSpacing) * (isBank and i - 1 or i)) + buttonSpacing) - f.ContainerHolder:SetHeight(buttonSize + (buttonSpacing * 2)) + E:Size(f.ContainerHolder, ((buttonSize + buttonSpacing) * (isBank and i - 1 or i)) + buttonSpacing, buttonSize + (buttonSpacing * 2)) --[[if isBank then BankFrameItemButton_OnUpdate() end--]] - f.ContainerHolder[i]:SetWidth(buttonSize) - f.ContainerHolder[i]:SetHeight(buttonSize) + E:Size(f.ContainerHolder[i], buttonSize) f.ContainerHolder[i]:ClearAllPoints() if (isBank and i == 2) or (not isBank and i == 1) then - f.ContainerHolder[i]:SetPoint("BOTTOMLEFT", f.ContainerHolder, "BOTTOMLEFT", buttonSpacing, buttonSpacing) + E:Point(f.ContainerHolder[i], "BOTTOMLEFT", f.ContainerHolder, "BOTTOMLEFT", buttonSpacing, buttonSpacing) else - f.ContainerHolder[i]:SetPoint("LEFT", lastContainerButton, "RIGHT", buttonSpacing, 0) + E:Point(f.ContainerHolder[i], "LEFT", lastContainerButton, "RIGHT", buttonSpacing, 0) end lastContainerButton = f.ContainerHolder[i] @@ -473,7 +471,7 @@ function B:Layout(isBank) f.Bags[bagID][slotID].Count = _G[f.Bags[bagID][slotID]:GetName().."Count"] f.Bags[bagID][slotID].Count:ClearAllPoints() - f.Bags[bagID][slotID].Count:SetPoint("BOTTOMRIGHT", 0, 2) + E:Point(f.Bags[bagID][slotID].Count, "BOTTOMRIGHT", 0, 2) E:FontTemplate(f.Bags[bagID][slotID].Count, E.LSM:Fetch("font", E.db.bags.countFont), E.db.bags.countFontSize, E.db.bags.countFontOutline) f.Bags[bagID][slotID].Count:SetTextColor(countColor.r, countColor.g, countColor.b) @@ -489,13 +487,12 @@ function B:Layout(isBank) end f.Bags[bagID][slotID].itemLevel = f.Bags[bagID][slotID]:CreateFontString(nil, "OVERLAY") - f.Bags[bagID][slotID].itemLevel:SetPoint("BOTTOMRIGHT", 0, 2) + E:Point(f.Bags[bagID][slotID].itemLevel, "BOTTOMRIGHT", 0, 2) E:FontTemplate(f.Bags[bagID][slotID].itemLevel, E.LSM:Fetch("font", E.db.bags.itemLevelFont), E.db.bags.itemLevelFontSize, E.db.bags.itemLevelFontOutline) end f.Bags[bagID][slotID]:SetID(slotID) - f.Bags[bagID][slotID]:SetWidth(buttonSize) - f.Bags[bagID][slotID]:SetHeight(buttonSize) + E:Size(f.Bags[bagID][slotID], buttonSize) f:UpdateSlot(bagID, slotID) @@ -505,14 +502,14 @@ function B:Layout(isBank) if lastButton then if mod(f.totalSlots - 1, numContainerColumns) == 0 then - f.Bags[bagID][slotID]:SetPoint("TOP", lastRowButton, "BOTTOM", 0, -buttonSpacing) + E:Point(f.Bags[bagID][slotID], "TOP", lastRowButton, "BOTTOM", 0, -buttonSpacing) lastRowButton = f.Bags[bagID][slotID] numContainerRows = numContainerRows + 1 else - f.Bags[bagID][slotID]:SetPoint("LEFT", lastButton, "RIGHT", buttonSpacing, 0) + E:Point(f.Bags[bagID][slotID], "LEFT", lastButton, "RIGHT", buttonSpacing, 0) end else - f.Bags[bagID][slotID]:SetPoint("TOPLEFT", f.holderFrame, "TOPLEFT") + E:Point(f.Bags[bagID][slotID], "TOPLEFT", f.holderFrame, "TOPLEFT") lastRowButton = f.Bags[bagID][slotID] numContainerRows = numContainerRows + 1 end @@ -564,18 +561,17 @@ function B:Layout(isBank) end f.keyFrame.slots[i]:ClearAllPoints() - f.keyFrame.slots[i]:SetWidth(buttonSize) - f.keyFrame.slots[i]:SetHeight(buttonSize) + E:Size(f.keyFrame.slots[i], buttonSize) if f.keyFrame.slots[i-1] then if mod(totalSlots - 1, numKeyColumns) == 0 then - f.keyFrame.slots[i]:SetPoint("TOP", lastRowButton, "BOTTOM", 0, -buttonSpacing) + E:Point(f.keyFrame.slots[i], "TOP", lastRowButton, "BOTTOM", 0, -buttonSpacing) lastRowButton = f.keyFrame.slots[i] numKeyRows = numKeyRows + 1 else - f.keyFrame.slots[i]:SetPoint("RIGHT", f.keyFrame.slots[i-1], "LEFT", -buttonSpacing, 0) + E:Point(f.keyFrame.slots[i], "RIGHT", f.keyFrame.slots[i-1], "LEFT", -buttonSpacing, 0) end else - f.keyFrame.slots[i]:SetPoint("TOPRIGHT", f.keyFrame, "TOPRIGHT", -buttonSpacing, -buttonSpacing) + E:Point(f.keyFrame.slots[i], "TOPRIGHT", f.keyFrame, "TOPRIGHT", -buttonSpacing, -buttonSpacing) lastRowButton = f.keyFrame.slots[i] end @@ -585,12 +581,10 @@ function B:Layout(isBank) if numKey < numKeyColumns then numKeyColumns = numKey end - f.keyFrame:SetWidth(((buttonSize + buttonSpacing) * numKeyColumns) + buttonSpacing) - f.keyFrame:SetHeight(((buttonSize + buttonSpacing) * numKeyRows) + buttonSpacing) + E:Size(f.keyFrame, ((buttonSize + buttonSpacing) * numKeyColumns) + buttonSpacing, ((buttonSize + buttonSpacing) * numKeyRows) + buttonSpacing) end - f:SetWidth(containerWidth) - f:SetHeight((((buttonSize + buttonSpacing) * numContainerRows) - buttonSpacing) + f.topOffset + f.bottomOffset) -- 8 is the cussion of the f.holderFrame + E:Size(f, containerWidth, (((buttonSize + buttonSpacing) * numContainerRows) - buttonSpacing) + f.topOffset + f.bottomOffset) end function B:UpdateKeySlot(slotID) @@ -790,7 +784,7 @@ function B:ContructContainerFrame(name, isBank) local mover = (isBank and ElvUIBankMover or ElvUIBagMover) if mover then - f:SetPoint(mover.POINT, mover) + E:Point(f, mover.POINT, mover) f.mover = mover end @@ -811,31 +805,30 @@ function B:ContructContainerFrame(name, isBank) f:SetScript("OnLeave", function() GameTooltip:Hide() end) f.closeButton = CreateFrame("Button", name.."CloseButton", f, "UIPanelCloseButton") - f.closeButton:SetPoint("TOPRIGHT", -4, -4) + E:Point(f.closeButton, "TOPRIGHT", -4, -4) E:GetModule("Skins"):HandleCloseButton(f.closeButton) f.holderFrame = CreateFrame("Frame", nil, f) - f.holderFrame:SetPoint("TOP", f, "TOP", 0, -f.topOffset) - f.holderFrame:SetPoint("BOTTOM", f, "BOTTOM", 0, 8) + E:Point(f.holderFrame, "TOP", f, "TOP", 0, -f.topOffset) + E:Point(f.holderFrame, "BOTTOM", f, "BOTTOM", 0, 8) f.ContainerHolder = CreateFrame("Button", name.."ContainerHolder", f) - f.ContainerHolder:SetPoint("BOTTOMLEFT", f, "TOPLEFT", 0, 1) + E:Point(f.ContainerHolder, "BOTTOMLEFT", f, "TOPLEFT", 0, 1) E:SetTemplate(f.ContainerHolder, "Transparent") f.ContainerHolder:Hide() if isBank then f.bagText = f:CreateFontString(nil, "OVERLAY") E:FontTemplate(f.bagText) - f.bagText:SetPoint("BOTTOMRIGHT", f.holderFrame, "TOPRIGHT", -2, 4) + E:Point(f.bagText, "BOTTOMRIGHT", f.holderFrame, "TOPRIGHT", -2, 4) f.bagText:SetJustifyH("RIGHT") f.bagText:SetText(L["Bank"]) f.sortButton = CreateFrame("Button", name.."SortButton", f) - f.sortButton:SetWidth(16 + E.Border) - f.sortButton:SetHeight(16 + E.Border) + E:Size(f.sortButton, 16 + E.Border) E:SetTemplate(f.sortButton) - f.sortButton:SetPoint("RIGHT", f.bagText, "LEFT", -5, E.Border * 2) + E:Point(f.sortButton, "RIGHT", f.bagText, "LEFT", -5, E.Border * 2) f.sortButton:SetNormalTexture("Interface\\AddOns\\ElvUI\\media\\textures\\INV_Pet_RatCage") f.sortButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords)) E:SetInside(f.sortButton:GetNormalTexture()) @@ -856,10 +849,9 @@ function B:ContructContainerFrame(name, isBank) end f.bagsButton = CreateFrame("Button", name.."BagsButton", f.holderFrame) - f.bagsButton:SetWidth(16 + E.Border) - f.bagsButton:SetHeight(16 + E.Border) + E:Size(f.bagsButton, 16 + E.Border) E:SetTemplate(f.bagsButton) - f.bagsButton:SetPoint("RIGHT", f.sortButton, "LEFT", -5, 0) + E:Point(f.bagsButton, "RIGHT", f.sortButton, "LEFT", -5, 0) f.bagsButton:SetNormalTexture("Interface\\Buttons\\Button-Backpack-Up") f.bagsButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords)) E:SetInside(f.bagsButton:GetNormalTexture()) @@ -881,10 +873,9 @@ function B:ContructContainerFrame(name, isBank) end) f.purchaseBagButton = CreateFrame("Button", nil, f.holderFrame) - f.purchaseBagButton:SetWidth(16 + E.Border) - f.purchaseBagButton:SetHeight(16 + E.Border) + E:Size(f.purchaseBagButton, 16 + E.Border) E:SetTemplate(f.purchaseBagButton) - f.purchaseBagButton:SetPoint("RIGHT", f.bagsButton, "LEFT", -5, 0) + E:Point(f.purchaseBagButton, "RIGHT", f.bagsButton, "LEFT", -5, 0) f.purchaseBagButton:SetNormalTexture("Interface\\ICONS\\INV_Misc_Coin_01") f.purchaseBagButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords)) E:SetInside(f.purchaseBagButton:GetNormalTexture()) @@ -915,10 +906,10 @@ function B:ContructContainerFrame(name, isBank) f.editBox = CreateFrame("EditBox", name.."EditBox", f) f.editBox:SetFrameLevel(f.editBox:GetFrameLevel() + 2) E:CreateBackdrop(f.editBox, "Default") - f.editBox.backdrop:SetPoint("TOPLEFT", f.editBox, "TOPLEFT", -20, 2) - f.editBox:SetHeight(15) - f.editBox:SetPoint("BOTTOMLEFT", f.holderFrame, "TOPLEFT", (E.Border * 2) + 18, E.Border * 2 + 2) - f.editBox:SetPoint("RIGHT", f.purchaseBagButton, "LEFT", -5, 0) + E:Point(f.editBox.backdrop, "TOPLEFT", f.editBox, "TOPLEFT", -20, 2) + E:Height(f.editBox, 15) + E:Point(f.editBox, "BOTTOMLEFT", f.holderFrame, "TOPLEFT", (E.Border * 2) + 18, E.Border * 2 + 2) + E:Point(f.editBox, "RIGHT", f.purchaseBagButton, "LEFT", -5, 0) f.editBox:SetAutoFocus(false) f.editBox:SetScript("OnEscapePressed", self.ResetAndClear) f.editBox:SetScript("OnEnterPressed", function() this:ClearFocus() end) @@ -930,12 +921,11 @@ function B:ContructContainerFrame(name, isBank) f.editBox.searchIcon = f.editBox:CreateTexture(nil, "OVERLAY") f.editBox.searchIcon:SetTexture("Interface\\AddOns\\ElvUI\\media\\textures\\UI-Searchbox-Icon") - f.editBox.searchIcon:SetPoint("LEFT", f.editBox.backdrop, "LEFT", E.Border + 1, -1) - f.editBox.searchIcon:SetWidth(15) - f.editBox.searchIcon:SetHeight(15) + E:Point(f.editBox.searchIcon, "LEFT", f.editBox.backdrop, "LEFT", E.Border + 1, -1) + E:Size(f.editBox.searchIcon, 15) else f.keyFrame = CreateFrame("Frame", name.."KeyFrame", f) - f.keyFrame:SetPoint("TOPRIGHT", f, "TOPLEFT", -(E.PixelMode and 1 or 3), 0) + E:Point(f.keyFrame, "TOPRIGHT", f, "TOPLEFT", -(E.PixelMode and 1 or 3), 0) E:SetTemplate(f.keyFrame, "Transparent") f.keyFrame:SetID(KEYRING_CONTAINER) f.keyFrame.slots = {} @@ -943,14 +933,13 @@ function B:ContructContainerFrame(name, isBank) f.goldText = f:CreateFontString(nil, "OVERLAY") E:FontTemplate(f.goldText) - f.goldText:SetPoint("BOTTOMRIGHT", f.holderFrame, "TOPRIGHT", -2, 4) + E:Point(f.goldText, "BOTTOMRIGHT", f.holderFrame, "TOPRIGHT", -2, 4) f.goldText:SetJustifyH("RIGHT") f.sortButton = CreateFrame("Button", name.."SortButton", f) - f.sortButton:SetWidth(16 + E.Border) - f.sortButton:SetHeight(16 + E.Border) + E:Size(f.sortButton, 16 + E.Border) E:SetTemplate(f.sortButton) - f.sortButton:SetPoint("RIGHT", f.goldText, "LEFT", -5, E.Border * 2) + E:Point(f.sortButton, "RIGHT", f.goldText, "LEFT", -5, E.Border * 2) f.sortButton:SetNormalTexture("Interface\\AddOns\\ElvUI\\media\\textures\\INV_Pet_RatCage") f.sortButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords)) E:SetInside(f.sortButton:GetNormalTexture()) @@ -971,10 +960,9 @@ function B:ContructContainerFrame(name, isBank) end f.keyButton = CreateFrame("Button", name.."KeyButton", f) - f.keyButton:SetWidth(16 + E.Border) - f.keyButton:SetHeight(16 + E.Border) + E:Size(f.keyButton, 16 + E.Border) E:SetTemplate(f.keyButton) - f.keyButton:SetPoint("RIGHT", f.sortButton, "LEFT", -5, 0) + E:Point(f.keyButton, "RIGHT", f.sortButton, "LEFT", -5, 0) f.keyButton:SetNormalTexture("Interface\\ICONS\\INV_Misc_Key_14") f.keyButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords)) E:SetInside(f.keyButton:GetNormalTexture()) @@ -988,10 +976,9 @@ function B:ContructContainerFrame(name, isBank) f.keyButton:SetScript("OnClick", function() ToggleFrame(f.keyFrame) end) f.bagsButton = CreateFrame("Button", name.."BagsButton", f) - f.bagsButton:SetWidth(16 + E.Border) - f.bagsButton:SetHeight(16 + E.Border) + E:Size(f.bagsButton, 16 + E.Border) E:SetTemplate(f.bagsButton) - f.bagsButton:SetPoint("RIGHT", f.keyButton, "LEFT", -5, 0) + E:Point(f.bagsButton, "RIGHT", f.keyButton, "LEFT", -5, 0) f.bagsButton:SetNormalTexture("Interface\\Buttons\\Button-Backpack-Up") f.bagsButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords)) E:SetInside(f.bagsButton:GetNormalTexture()) @@ -1005,10 +992,9 @@ function B:ContructContainerFrame(name, isBank) f.bagsButton:SetScript("OnClick", function() ToggleFrame(f.ContainerHolder) end) f.vendorGraysButton = CreateFrame("Button", nil, f.holderFrame) - f.vendorGraysButton:SetWidth(16 + E.Border) - f.vendorGraysButton:SetHeight(16 + E.Border) + E:Size(f.vendorGraysButton, 16 + E.Border) E:SetTemplate(f.vendorGraysButton) - f.vendorGraysButton:SetPoint("RIGHT", f.bagsButton, "LEFT", -5, 0) + E:Point(f.vendorGraysButton, "RIGHT", f.bagsButton, "LEFT", -5, 0) f.vendorGraysButton:SetNormalTexture("Interface\\ICONS\\INV_Misc_Coin_01") f.vendorGraysButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords)) E:SetInside(f.vendorGraysButton:GetNormalTexture()) @@ -1024,10 +1010,10 @@ function B:ContructContainerFrame(name, isBank) f.editBox = CreateFrame("EditBox", name.."EditBox", f) f.editBox:SetFrameLevel(f.editBox:GetFrameLevel() + 2) E:CreateBackdrop(f.editBox, "Default") - f.editBox.backdrop:SetPoint("TOPLEFT", f.editBox, "TOPLEFT", -20, 2) - f.editBox:SetHeight(15) - f.editBox:SetPoint("BOTTOMLEFT", f.holderFrame, "TOPLEFT", (E.Border * 2) + 18, E.Border * 2 + 2) - f.editBox:SetPoint("RIGHT", f.vendorGraysButton, "LEFT", -5, 0) + E:Point(f.editBox.backdrop, "TOPLEFT", f.editBox, "TOPLEFT", -20, 2) + E:Height(f.editBox, 15) + E:Point(f.editBox, "BOTTOMLEFT", f.holderFrame, "TOPLEFT", (E.Border * 2) + 18, E.Border * 2 + 2) + E:Point(f.editBox, "RIGHT", f.vendorGraysButton, "LEFT", -5, 0) f.editBox:SetAutoFocus(false) f.editBox:SetScript("OnEscapePressed", self.ResetAndClear) f.editBox:SetScript("OnEnterPressed", function() this:ClearFocus() end) @@ -1039,9 +1025,8 @@ function B:ContructContainerFrame(name, isBank) f.editBox.searchIcon = f.editBox:CreateTexture(nil, "OVERLAY") f.editBox.searchIcon:SetTexture("Interface\\AddOns\\ElvUI\\media\\textures\\UI-Searchbox-Icon") - f.editBox.searchIcon:SetPoint("LEFT", f.editBox.backdrop, "LEFT", E.Border + 1, -1) - f.editBox.searchIcon:SetWidth(15) - f.editBox.searchIcon:SetHeight(15) + E:Point(f.editBox.searchIcon, "LEFT", f.editBox.backdrop, "LEFT", E.Border + 1, -1) + E:Size(f.editBox.searchIcon, 15) f:SetScript("OnHide", function() CloseBackpack() @@ -1183,7 +1168,7 @@ function B:PostBagMove() if bagFrame then bagFrame:ClearAllPoints() - bagFrame:SetPoint(self.POINT, self) + E:Point(bagFrame, self.POINT, self) end end @@ -1191,12 +1176,11 @@ function B:Initialize() self:LoadBagBar() local BagFrameHolder = CreateFrame("Frame", nil, E.UIParent) - BagFrameHolder:SetWidth(200) - BagFrameHolder:SetHeight(22) + E:Size(BagFrameHolder, 200, 22) BagFrameHolder:SetFrameLevel(BagFrameHolder:GetFrameLevel() + 400) if not E.private.bags.enable then - BagFrameHolder:SetPoint("BOTTOMRIGHT", RightChatPanel, "BOTTOMRIGHT", -(E.Border*2), 22 + E.Border*4 - E.Spacing*2) + E:Point(BagFrameHolder, "BOTTOMRIGHT", RightChatPanel, "BOTTOMRIGHT", -(E.Border*2), 22 + E.Border*4 - E.Spacing*2) E:CreateMover(BagFrameHolder, "ElvUIBagMover", L["Bag Mover"], nil, nil, B.PostBagMove) -- self:SecureHook("UpdateContainerFrameAnchors") @@ -1207,13 +1191,12 @@ function B:Initialize() self.db = E.db.bags self.BagFrames = {} - BagFrameHolder:SetPoint("BOTTOMRIGHT", RightChatPanel, "BOTTOMRIGHT", 0, 22 + E.Border*4 - E.Spacing*2) + E:Point(BagFrameHolder, "BOTTOMRIGHT", RightChatPanel, "BOTTOMRIGHT", 0, 22 + E.Border*4 - E.Spacing*2) E:CreateMover(BagFrameHolder, "ElvUIBagMover", L["Bag Mover (Grow Up)"], nil, nil, B.PostBagMove) local BankFrameHolder = CreateFrame("Frame", nil, E.UIParent) - BankFrameHolder:SetWidth(200) - BankFrameHolder:SetHeight(22) - BankFrameHolder:SetPoint("BOTTOMLEFT", LeftChatPanel, "BOTTOMLEFT", 0, 22 + E.Border*4 - E.Spacing*2) + E:Size(BankFrameHolder, 200, 22) + E:Point(BankFrameHolder, "BOTTOMLEFT", LeftChatPanel, "BOTTOMLEFT", 0, 22 + E.Border*4 - E.Spacing*2) BankFrameHolder:SetFrameLevel(BankFrameHolder:GetFrameLevel() + 400) E:CreateMover(BankFrameHolder, "ElvUIBankMover", L["Bank Mover (Grow Up)"], nil, nil, B.PostBagMove) diff --git a/ElvUI/Modules/Misc/AFK.lua b/ElvUI/Modules/Misc/AFK.lua index 13c4da5..b19ab0f 100644 --- a/ElvUI/Modules/Misc/AFK.lua +++ b/ElvUI/Modules/Misc/AFK.lua @@ -257,9 +257,8 @@ function AFK:Initialize() self.AFKMode:SetScript("OnKeyDown", OnKeyDown) self.AFKMode.chat = CreateFrame("ScrollingMessageFrame", "AFKChat", self.AFKMode) - self.AFKMode.chat:SetWidth(500) - self.AFKMode.chat:SetHeight(200) - self.AFKMode.chat:SetPoint("TOPLEFT", self.AFKMode, "TOPLEFT", 4, -3) + E:Size(self.AFKMode.chat, 500, 200) + E:Point(self.AFKMode.chat, "TOPLEFT", self.AFKMode, "TOPLEFT", 4, -3) E:FontTemplate(self.AFKMode.chat) self.AFKMode.chat:SetJustifyH("LEFT") self.AFKMode.chat:SetMaxLines(500) @@ -278,45 +277,41 @@ function AFK:Initialize() self.AFKMode.bottom = CreateFrame("Frame", nil, self.AFKMode) self.AFKMode.bottom:SetFrameLevel(0) E:SetTemplate(self.AFKMode.bottom, "Transparent") - self.AFKMode.bottom:SetPoint("BOTTOM", self.AFKMode, "BOTTOM", 0, -E.Border) - self.AFKMode.bottom:SetWidth(GetScreenWidth() + (E.Border*2)) - self.AFKMode.bottom:SetHeight(GetScreenHeight() * 0.1) + E:Point(self.AFKMode.bottom, "BOTTOM", self.AFKMode, "BOTTOM", 0, -E.Border) + E:Size(self.AFKMode.bottom, GetScreenWidth() + (E.Border*2), GetScreenHeight() * 0.1) self.AFKMode.bottom.logo = self.AFKMode:CreateTexture(nil, "OVERLAY") - self.AFKMode.bottom.logo:SetWidth(320) - self.AFKMode.bottom.logo:SetHeight(150) - self.AFKMode.bottom.logo:SetPoint("CENTER", self.AFKMode.bottom, "CENTER", 0, 50) + E:Size(self.AFKMode.bottom.logo, 320, 150) + E:Point(self.AFKMode.bottom.logo, "CENTER", self.AFKMode.bottom, "CENTER", 0, 50) self.AFKMode.bottom.logo:SetTexture("Interface\\AddOns\\ElvUI\\media\\textures\\logo") local factionGroup = UnitFactionGroup("player") self.AFKMode.bottom.faction = self.AFKMode.bottom:CreateTexture(nil, "OVERLAY") - self.AFKMode.bottom.faction:SetPoint("BOTTOMLEFT", self.AFKMode.bottom, "BOTTOMLEFT", -20, -16) + E:Point(self.AFKMode.bottom.faction, "BOTTOMLEFT", self.AFKMode.bottom, "BOTTOMLEFT", -20, -16) self.AFKMode.bottom.faction:SetTexture("Interface\\AddOns\\ElvUI\\media\\textures\\"..factionGroup.."-Logo") - self.AFKMode.bottom.faction:SetWidth(140) - self.AFKMode.bottom.faction:SetHeight(140) + E:Size(self.AFKMode.bottom.faction, 140) self.AFKMode.bottom.name = self.AFKMode.bottom:CreateFontString(nil, "OVERLAY") E:FontTemplate(self.AFKMode.bottom.name, nil, 20) self.AFKMode.bottom.name:SetText(format("%s - %s", E.myname, E.myrealm)) - self.AFKMode.bottom.name:SetPoint("TOPLEFT", self.AFKMode.bottom.faction, "TOPRIGHT", -10, -28) + E:Point(self.AFKMode.bottom.name, "TOPLEFT", self.AFKMode.bottom.faction, "TOPRIGHT", -10, -28) self.AFKMode.bottom.name:SetTextColor(classColor.r, classColor.g, classColor.b) self.AFKMode.bottom.guild = self.AFKMode.bottom:CreateFontString(nil, "OVERLAY") E:FontTemplate(self.AFKMode.bottom.guild, nil, 20) self.AFKMode.bottom.guild:SetText(L["No Guild"]) - self.AFKMode.bottom.guild:SetPoint("TOPLEFT", self.AFKMode.bottom.name, "BOTTOMLEFT", 0, -6) + E:Point(self.AFKMode.bottom.guild, "TOPLEFT", self.AFKMode.bottom.name, "BOTTOMLEFT", 0, -6) self.AFKMode.bottom.guild:SetTextColor(0.7, 0.7, 0.7) self.AFKMode.bottom.time = self.AFKMode.bottom:CreateFontString(nil, "OVERLAY") E:FontTemplate(self.AFKMode.bottom.time, nil, 20) self.AFKMode.bottom.time:SetText("00:00") - self.AFKMode.bottom.time:SetPoint("TOPLEFT", self.AFKMode.bottom.guild, "BOTTOMLEFT", 0, -6) + E:Point(self.AFKMode.bottom.time, "TOPLEFT", self.AFKMode.bottom.guild, "BOTTOMLEFT", 0, -6) self.AFKMode.bottom.time:SetTextColor(0.7, 0.7, 0.7) self.AFKMode.bottom.model = CreateFrame("PlayerModel", "ElvUIAFKPlayerModel", self.AFKMode.bottom) - self.AFKMode.bottom.model:SetPoint("BOTTOMRIGHT", self.AFKMode.bottom, "BOTTOMRIGHT", 120, -100) - self.AFKMode.bottom.model:SetWidth(800) - self.AFKMode.bottom.model:SetHeight(800) + E:Point(self.AFKMode.bottom.model, "BOTTOMRIGHT", self.AFKMode.bottom, "BOTTOMRIGHT", 120, -100) + E:Size(self.AFKMode.bottom.model, 800) self.AFKMode.bottom.model:SetFacing(6) self.AFKMode.bottom.model:SetUnit("player") diff --git a/ElvUI/Modules/Misc/ChatBubbles.lua b/ElvUI/Modules/Misc/ChatBubbles.lua index 0a86ef3..efbd9e1 100644 --- a/ElvUI/Modules/Misc/ChatBubbles.lua +++ b/ElvUI/Modules/Misc/ChatBubbles.lua @@ -86,51 +86,51 @@ function M:SkinBubble(frame) frame.backdrop:SetTexture(unpack(E.media.backdropfadecolor)) frame.bordertop = frame:CreateTexture(nil, "OVERLAY") - frame.bordertop:SetPoint("TOPLEFT", frame, "TOPLEFT", -mult*2, mult*2) - frame.bordertop:SetPoint("TOPRIGHT", frame, "TOPRIGHT", mult*2, mult*2) - frame.bordertop:SetHeight(mult) + E:Point(frame.bordertop, "TOPLEFT", frame, "TOPLEFT", -mult*2, mult*2) + E:Point(frame.bordertop, "TOPRIGHT", frame, "TOPRIGHT", mult*2, mult*2) + E:Height(frame.bordertop, mult) frame.bordertop:SetTexture(r, g, b) frame.bordertop.backdrop = frame:CreateTexture(nil, "BORDER") - frame.bordertop.backdrop:SetPoint("TOPLEFT", frame.bordertop, "TOPLEFT", -mult, mult) - frame.bordertop.backdrop:SetPoint("TOPRIGHT", frame.bordertop, "TOPRIGHT", mult, mult) - frame.bordertop.backdrop:SetHeight(mult * 3) + E:Point(frame.bordertop.backdrop, "TOPLEFT", frame.bordertop, "TOPLEFT", -mult, mult) + E:Point(frame.bordertop.backdrop, "TOPRIGHT", frame.bordertop, "TOPRIGHT", mult, mult) + E:Height(frame.bordertop.backdrop, mult * 3) frame.bordertop.backdrop:SetTexture(0, 0, 0) frame.borderbottom = frame:CreateTexture(nil, "OVERLAY") - frame.borderbottom:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", -mult*2, -mult*2) - frame.borderbottom:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", mult*2, -mult*2) - frame.borderbottom:SetHeight(mult) + E:Point(frame.borderbottom, "BOTTOMLEFT", frame, "BOTTOMLEFT", -mult*2, -mult*2) + E:Point(frame.borderbottom, "BOTTOMRIGHT", frame, "BOTTOMRIGHT", mult*2, -mult*2) + E:Height(frame.borderbottom, mult) frame.borderbottom:SetTexture(r, g, b) frame.borderbottom.backdrop = frame:CreateTexture(nil, "BORDER") - frame.borderbottom.backdrop:SetPoint("BOTTOMLEFT", frame.borderbottom, "BOTTOMLEFT", -mult, -mult) - frame.borderbottom.backdrop:SetPoint("BOTTOMRIGHT", frame.borderbottom, "BOTTOMRIGHT", mult, -mult) - frame.borderbottom.backdrop:SetHeight(mult * 3) + E:Point(frame.borderbottom.backdrop, "BOTTOMLEFT", frame.borderbottom, "BOTTOMLEFT", -mult, -mult) + E:Point(frame.borderbottom.backdrop, "BOTTOMRIGHT", frame.borderbottom, "BOTTOMRIGHT", mult, -mult) + E:Height(frame.borderbottom.backdrop, mult * 3) frame.borderbottom.backdrop:SetTexture(0, 0, 0) frame.borderleft = frame:CreateTexture(nil, "OVERLAY") - frame.borderleft:SetPoint("TOPLEFT", frame, "TOPLEFT", -mult*2, mult*2) - frame.borderleft:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", mult*2, -mult*2) - frame.borderleft:SetWidth(mult) + E:Point(frame.borderleft, "TOPLEFT", frame, "TOPLEFT", -mult*2, mult*2) + E:Point(frame.borderleft, "BOTTOMLEFT", frame, "BOTTOMLEFT", mult*2, -mult*2) + E:Width(frame.borderleft, mult) frame.borderleft:SetTexture(r, g, b) frame.borderleft.backdrop = frame:CreateTexture(nil, "BORDER") - frame.borderleft.backdrop:SetPoint("TOPLEFT", frame.borderleft, "TOPLEFT", -mult, mult) - frame.borderleft.backdrop:SetPoint("BOTTOMLEFT", frame.borderleft, "BOTTOMLEFT", -mult, -mult) - frame.borderleft.backdrop:SetWidth(mult * 3) + E:Point(frame.borderleft.backdrop, "TOPLEFT", frame.borderleft, "TOPLEFT", -mult, mult) + E:Point(frame.borderleft.backdrop, "BOTTOMLEFT", frame.borderleft, "BOTTOMLEFT", -mult, -mult) + E:Width(frame.borderleft.backdrop, mult * 3) frame.borderleft.backdrop:SetTexture(0, 0, 0) frame.borderright = frame:CreateTexture(nil, "OVERLAY") - frame.borderright:SetPoint("TOPRIGHT", frame, "TOPRIGHT", mult*2, mult*2) - frame.borderright:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -mult*2, -mult*2) - frame.borderright:SetWidth(mult) + E:Point(frame.borderright, "TOPRIGHT", frame, "TOPRIGHT", mult*2, mult*2) + E:Point(frame.borderright, "BOTTOMRIGHT", frame, "BOTTOMRIGHT", -mult*2, -mult*2) + E:Width(frame.borderright, mult) frame.borderright:SetTexture(r, g, b) frame.borderright.backdrop = frame:CreateTexture(nil, "BORDER") - frame.borderright.backdrop:SetPoint("TOPRIGHT", frame.borderright, "TOPRIGHT", mult, mult) - frame.borderright.backdrop:SetPoint("BOTTOMRIGHT", frame.borderright, "BOTTOMRIGHT", mult, -mult) - frame.borderright.backdrop:SetWidth(mult * 3) + E:Point(frame.borderright.backdrop, "TOPRIGHT", frame.borderright, "TOPRIGHT", mult, mult) + E:Point(frame.borderright.backdrop, "BOTTOMRIGHT", frame.borderright, "BOTTOMRIGHT", mult, -mult) + E:Width(frame.borderright.backdrop, mult * 3) frame.borderright.backdrop:SetTexture(0, 0, 0) end else diff --git a/ElvUI/Modules/Misc/Loot.lua b/ElvUI/Modules/Misc/Loot.lua index b98087c..483caab 100644 --- a/ElvUI/Modules/Misc/Loot.lua +++ b/ElvUI/Modules/Misc/Loot.lua @@ -35,7 +35,7 @@ local iconSize = 30 local sq, ss, sn local OnEnter = function() local slot = this:GetID() - if(LootSlotIsItem(slot)) then + if LootSlotIsItem(slot) then GameTooltip:SetOwner(this, "ANCHOR_RIGHT") GameTooltip:SetLootItem(slot) CursorUpdate(this) @@ -46,7 +46,7 @@ local OnEnter = function() end local OnLeave = function() - if this.quality and (this.quality > 1) then + if this.quality and this.quality > 1 then local color = ITEM_QUALITY_COLORS[this.quality] this.drop:SetVertexColor(color.r, color.g, color.b) else @@ -82,21 +82,21 @@ local function anchorSlots(self) local shownSlots = 0 for i = 1, getn(self.slots) do local frame = self.slots[i] - if(frame:IsShown()) then + if frame:IsShown() then shownSlots = shownSlots + 1 - frame:SetPoint("TOP", lootFrame, 4, (-8 + iconSize) - (shownSlots * iconSize)) + E:Point(frame, "TOP", lootFrame, 4, (-8 + iconSize) - (shownSlots * iconSize)) end end - self:SetHeight(max(shownSlots * iconSize + 16, 20)) + E:Height(self, max(shownSlots * iconSize + 16, 20)) end local function createSlot(id) local frame = CreateFrame("LootButton", "ElvLootSlot"..id, lootFrame) - frame:SetPoint("LEFT", 8, 0) - frame:SetPoint("RIGHT", -8, 0) - frame:SetHeight(iconSize - 2) + E:Point(frame, "LEFT", 8, 0) + E:Point(frame, "RIGHT", -8, 0) + E:Height(frame, iconSize - 2) frame:SetID(id) frame:SetScript("OnEnter", OnEnter) @@ -105,9 +105,8 @@ local function createSlot(id) frame:SetScript("OnShow", OnShow) local iconFrame = CreateFrame("Frame", nil, frame) - iconFrame:SetWidth(iconSize - 2) - iconFrame:SetHeight(iconSize - 2) - iconFrame:SetPoint("RIGHT", frame) + E:Size(iconFrame, iconSize - 2) + E:Point(iconFrame, "RIGHT", frame) E:SetTemplate(iconFrame, "Default") frame.iconFrame = iconFrame E["frames"][iconFrame] = nil @@ -119,23 +118,23 @@ local function createSlot(id) local count = iconFrame:CreateFontString(nil, "OVERLAY") count:SetJustifyH("RIGHT") - count:SetPoint("BOTTOMRIGHT", iconFrame, -2, 2) + E:Point(count, "BOTTOMRIGHT", iconFrame, -2, 2) E:FontTemplate(count, nil, nil, "OUTLINE") count:SetText(1) frame.count = count local name = frame:CreateFontString(nil, "OVERLAY") name:SetJustifyH("LEFT") - name:SetPoint("LEFT", frame) - name:SetPoint("RIGHT", icon, "LEFT") + E:Point(name, "LEFT", frame) + E:Point(name, "RIGHT", icon, "LEFT") name:SetNonSpaceWrap(true) E:FontTemplate(name, nil, nil, "OUTLINE") frame.name = name local drop = frame:CreateTexture(nil, "ARTWORK") drop:SetTexture("Interface\\QuestFrame\\UI-QuestLogTitleHighlight") - drop:SetPoint("LEFT", icon, "RIGHT", 0, 0) - drop:SetPoint("RIGHT", frame) + E:Point(drop, "LEFT", icon, "RIGHT", 0, 0) + E:Point(drop, "RIGHT", frame) drop:SetAllPoints(frame) drop:SetAlpha(.3) frame.drop = drop @@ -171,15 +170,15 @@ end function M:LOOT_OPENED(_, autoLoot) lootFrame:Show() - if(not lootFrame:IsShown()) then + if not lootFrame:IsShown() then CloseLoot(autoLoot == 0) end local items = GetNumLootItems() - if(IsFishingLoot()) then + if IsFishingLoot() then lootFrame.title:SetText(L["Fishy Loot"]) - elseif(not UnitIsFriend("player", "target") and UnitIsDead("target")) then + elseif not UnitIsFriend("player", "target") and UnitIsDead("target") then lootFrame.title:SetText(UnitName("target")) else lootFrame.title:SetText(LOOT) @@ -192,33 +191,33 @@ function M:LOOT_OPENED(_, autoLoot) y = y / lootFrame:GetEffectiveScale() lootFrame:ClearAllPoints() - lootFrame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", x - 40, y + 20) + E:Point(lootFrame, "TOPLEFT", UIParent, "BOTTOMLEFT", x - 40, y + 20) lootFrame:GetCenter() lootFrame:Raise() else lootFrame:ClearAllPoints() - lootFrame:SetPoint("TOPLEFT", lootFrameHolder, "TOPLEFT") + E:Point(lootFrame, "TOPLEFT", lootFrameHolder, "TOPLEFT") end local m, w, t = 0, 0, lootFrame.title:GetStringWidth() - if(items > 0) then + if items > 0 then for i = 1, items do local slot = lootFrame.slots[i] or createSlot(i) local texture, item, quantity, quality = GetLootSlotInfo(i) local color = ITEM_QUALITY_COLORS[quality] - if(LootSlotIsCoin(i)) then + if LootSlotIsCoin(i) then item = gsub(item, "\n", ", ") end - if quantity and (quantity > 1) then + if quantity and quantity > 1 then slot.count:SetText(quantity) slot.count:Show() else slot.count:Hide() end - if quality and (quality > 1) then + if quality and quality > 1 then slot.drop:SetVertexColor(color.r, color.g, color.b) slot.drop:Show() else @@ -268,28 +267,26 @@ function M:LOOT_OPENED(_, autoLoot) local color = ITEM_QUALITY_COLORS[m] lootFrame:SetBackdropBorderColor(color.r, color.g, color.b, .8) - lootFrame:SetWidth(max(w, t)) + E:Width(lootFrame, max(w, t)) end function M:LoadLoot() if not E.private.general.loot then return end lootFrameHolder = CreateFrame("Frame", "ElvLootFrameHolder", E.UIParent) - lootFrameHolder:SetPoint("TOPLEFT", 36, -195) - lootFrameHolder:SetWidth(150) - lootFrameHolder:SetHeight(22) + E:Point(lootFrameHolder, "TOPLEFT", 36, -195) + E:Size(lootFrameHolder, 150, 22) lootFrame = CreateFrame("Button", "ElvLootFrame", lootFrameHolder) lootFrame:SetClampedToScreen(true) - lootFrame:SetPoint("TOPLEFT", 0, 0) - lootFrame:SetWidth(256) - lootFrame:SetHeight(64) + E:Point(lootFrame, "TOPLEFT", 0, 0) + E:Size(lootFrame, 256, 64) E:SetTemplate(lootFrame, "Transparent") lootFrame:SetFrameStrata("FULLSCREEN") lootFrame:SetToplevel(true) lootFrame.title = lootFrame:CreateFontString(nil, "OVERLAY") E:FontTemplate(lootFrame.title, nil, nil, "OUTLINE") - lootFrame.title:SetPoint("BOTTOMLEFT", lootFrame, "TOPLEFT", 0, 1) + E:Point(lootFrame.title, "BOTTOMLEFT", lootFrame, "TOPLEFT", 0, 1) lootFrame.slots = {} lootFrame:SetScript("OnHide", function() StaticPopup_Hide("CONFIRM_LOOT_DISTRIBUTION") @@ -311,9 +308,9 @@ function M:LoadLoot() tinsert(UISpecialFrames, "ElvLootFrame") function _G.GroupLootDropDown_GiveLoot() - if(sq >= MASTER_LOOT_THREHOLD) then + if sq >= MASTER_LOOT_THREHOLD then local dialog = StaticPopup_Show("CONFIRM_LOOT_DISTRIBUTION", ITEM_QUALITY_COLORS[sq].hex..sn..FONT_COLOR_CODE_CLOSE, this:GetText()) - if (dialog) then + if dialog then dialog.data = this.value end else diff --git a/ElvUI/Modules/Misc/LootRoll.lua b/ElvUI/Modules/Misc/LootRoll.lua index 32592e2..955f3ba 100644 --- a/ElvUI/Modules/Misc/LootRoll.lua +++ b/ElvUI/Modules/Misc/LootRoll.lua @@ -142,7 +142,7 @@ local function CreateRollButton(parent, ntex, ptex, htex, rolltype, tiptext, poi E:Point(f, point, relativeFrame, relativePoint, ofsx, ofsy) E:Size(f, FRAME_HEIGHT - 4) f:SetNormalTexture(ntex) - if(ptex) then f:SetPushedTexture(ptex) end + if ptex then f:SetPushedTexture(ptex) end f:SetHighlightTexture(htex) f.rolltype = rolltype f.parent = parent @@ -280,7 +280,7 @@ function M:START_LOOT_ROLL(_, rollID, time) f.status:SetMinMaxValues(0, time) f.status:SetValue(time) - f:SetPoint("CENTER", WorldFrame, "CENTER") + E:Point(f, "CENTER", WorldFrame, "CENTER") f:Show() if E.db.general.autoRoll and UnitLevel("player") == MAX_PLAYER_LEVEL and quality == 2 and not bindOnPickUp then diff --git a/ElvUI/Modules/Misc/Misc.lua b/ElvUI/Modules/Misc/Misc.lua index 0fe35cf..a2cfce4 100644 --- a/ElvUI/Modules/Misc/Misc.lua +++ b/ElvUI/Modules/Misc/Misc.lua @@ -39,7 +39,7 @@ end function M:COMBAT_LOG_EVENT_UNFILTERED(_, _, event, _, sourceName, _, _, destName, _, _, _, _, spellID, spellName) if E.db.general.interruptAnnounce == "NONE" then return end - if not (event == "SPELL_INTERRUPT" and sourceName == UnitName("player")) then return end + if not event == "SPELL_INTERRUPT" and sourceName == UnitName("player") then return end local party = GetNumPartyMembers() diff --git a/ElvUI/Modules/Misc/RaidMarker.lua b/ElvUI/Modules/Misc/RaidMarker.lua index 9e4ce23..193ee1c 100644 --- a/ElvUI/Modules/Misc/RaidMarker.lua +++ b/ElvUI/Modules/Misc/RaidMarker.lua @@ -39,7 +39,7 @@ function M:RaidMarkShowIcons() end local x, y = GetCursorPosition() local scale = E.UIParent:GetEffectiveScale() - self.RaidMarkFrame:SetPoint("CENTER", E.UIParent, "BOTTOMLEFT", x / scale, y / scale) + E:Point(self.RaidMarkFrame, "CENTER", E.UIParent, "BOTTOMLEFT", x / scale, y / scale) self.RaidMarkFrame:Show() end @@ -61,8 +61,8 @@ M:RegisterEvent("PLAYER_TARGET_CHANGED", "RaidMark_OnEvent") function M:RaidMarkButton_OnEnter() this.Texture:ClearAllPoints() - this.Texture:SetPoint("TOPLEFT", -10, 10) - this.Texture:SetPoint("BOTTOMRIGHT", 10, -10) + E:Point(this.Texture, "TOPLEFT", -10, 10) + E:Point(this.Texture, "BOTTOMRIGHT", 10, -10) end function M:RaidMarkButton_OnLeave() @@ -78,14 +78,12 @@ end function M:LoadRaidMarker() local marker = CreateFrame("Frame", nil, E.UIParent) marker:EnableMouse(true) - marker:SetWidth(100) - marker:SetHeight(100) + E:Size(marker, 100) marker:SetFrameStrata("DIALOG") for i = 1, 8 do local button = CreateFrame("Button", "RaidMarkIconButton" .. i, marker) - button:SetWidth(40) - button:SetHeight(40) + E:Size(button, 40) button:SetID(i) button.Texture = button:CreateTexture(button:GetName() .. "NormalTexture", "ARTWORK") button.Texture:SetTexture("Interface\\TargetingFrame\\UI-RaidTargetingIcons") @@ -96,10 +94,10 @@ function M:LoadRaidMarker() button:SetScript("OnEnter", M.RaidMarkButton_OnEnter) button:SetScript("OnLeave", M.RaidMarkButton_OnLeave) if i == 8 then - button:SetPoint("CENTER", 0, 0) + E:Point(button, "CENTER", 0, 0) else local angle = pi / 0.7 * i - button:SetPoint("CENTER", sin(angle) * 60, cos(angle) * 60) + E:Point(button, "CENTER", sin(angle) * 60, cos(angle) * 60) end end diff --git a/ElvUI/Modules/NamePlates/NamePlates.lua b/ElvUI/Modules/NamePlates/NamePlates.lua index 7eef647..4db13a2 100644 --- a/ElvUI/Modules/NamePlates/NamePlates.lua +++ b/ElvUI/Modules/NamePlates/NamePlates.lua @@ -193,75 +193,75 @@ function mod:StyleFrame(parent, noBackdrop, point) if E.PixelMode then point.bordertop = parent:CreateTexture() - point.bordertop:SetPoint("TOPLEFT", point, "TOPLEFT", -noscalemult, noscalemult) - point.bordertop:SetPoint("TOPRIGHT", point, "TOPRIGHT", noscalemult, noscalemult) - point.bordertop:SetHeight(noscalemult) + E:Point(point.bordertop, "TOPLEFT", point, "TOPLEFT", -noscalemult, noscalemult) + E:Point(point.bordertop, "TOPRIGHT", point, "TOPRIGHT", noscalemult, noscalemult) + E:Height(point.bordertop, noscalemult) point.bordertop:SetTexture(unpack(E["media"].bordercolor)) point.borderbottom = parent:CreateTexture() - point.borderbottom:SetPoint("BOTTOMLEFT", point, "BOTTOMLEFT", -noscalemult, -noscalemult) - point.borderbottom:SetPoint("BOTTOMRIGHT", point, "BOTTOMRIGHT", noscalemult, -noscalemult) - point.borderbottom:SetHeight(noscalemult) + E:Point(point.borderbottom, "BOTTOMLEFT", point, "BOTTOMLEFT", -noscalemult, -noscalemult) + E:Point(point.borderbottom, "BOTTOMRIGHT", point, "BOTTOMRIGHT", noscalemult, -noscalemult) + E:Height(point.borderbottom, noscalemult) point.borderbottom:SetTexture(unpack(E["media"].bordercolor)) point.borderleft = parent:CreateTexture() - point.borderleft:SetPoint("TOPLEFT", point, "TOPLEFT", -noscalemult, noscalemult) - point.borderleft:SetPoint("BOTTOMLEFT", point, "BOTTOMLEFT", noscalemult, -noscalemult) - point.borderleft:SetWidth(noscalemult) + E:Point(point.borderleft, "TOPLEFT", point, "TOPLEFT", -noscalemult, noscalemult) + E:Point(point.borderleft, "BOTTOMLEFT", point, "BOTTOMLEFT", noscalemult, -noscalemult) + E:Width(point.borderleft, noscalemult) point.borderleft:SetTexture(unpack(E["media"].bordercolor)) point.borderright = parent:CreateTexture() - point.borderright:SetPoint("TOPRIGHT", point, "TOPRIGHT", noscalemult, noscalemult) - point.borderright:SetPoint("BOTTOMRIGHT", point, "BOTTOMRIGHT", -noscalemult, -noscalemult) - point.borderright:SetWidth(noscalemult) + E:Point(point.borderright, "TOPRIGHT", point, "TOPRIGHT", noscalemult, noscalemult) + E:Point(point.borderright, "BOTTOMRIGHT", point, "BOTTOMRIGHT", -noscalemult, -noscalemult) + E:Width(point.borderright, noscalemult) point.borderright:SetTexture(unpack(E["media"].bordercolor)) else point.bordertop = parent:CreateTexture(nil, "OVERLAY") - point.bordertop:SetPoint("TOPLEFT", point, "TOPLEFT", -noscalemult, noscalemult*2) - point.bordertop:SetPoint("TOPRIGHT", point, "TOPRIGHT", noscalemult, noscalemult*2) - point.bordertop:SetHeight(noscalemult) + E:Point(point.bordertop, "TOPLEFT", point, "TOPLEFT", -noscalemult, noscalemult*2) + E:Point(point.bordertop, "TOPRIGHT", point, "TOPRIGHT", noscalemult, noscalemult*2) + E:Height(point.bordertop, noscalemult) point.bordertop:SetTexture(unpack(E.media.bordercolor)) point.bordertop.backdrop = parent:CreateTexture() - point.bordertop.backdrop:SetPoint("TOPLEFT", point.bordertop, "TOPLEFT", noscalemult, noscalemult) - point.bordertop.backdrop:SetPoint("TOPRIGHT", point.bordertop, "TOPRIGHT", -noscalemult, noscalemult) - point.bordertop.backdrop:SetHeight(noscalemult * 3) + E:Point(point.bordertop.backdrop, "TOPLEFT", point.bordertop, "TOPLEFT", noscalemult, noscalemult) + E:Point(point.bordertop.backdrop, "TOPRIGHT", point.bordertop, "TOPRIGHT", -noscalemult, noscalemult) + E:Height(point.bordertop.backdrop, noscalemult * 3) point.bordertop.backdrop:SetTexture(0, 0, 0) point.borderbottom = parent:CreateTexture(nil, "OVERLAY") - point.borderbottom:SetPoint("BOTTOMLEFT", point, "BOTTOMLEFT", -noscalemult, -noscalemult*2) - point.borderbottom:SetPoint("BOTTOMRIGHT", point, "BOTTOMRIGHT", noscalemult, -noscalemult*2) - point.borderbottom:SetHeight(noscalemult) + E:Point(point.borderbottom, "BOTTOMLEFT", point, "BOTTOMLEFT", -noscalemult, -noscalemult*2) + E:Point(point.borderbottom, "BOTTOMRIGHT", point, "BOTTOMRIGHT", noscalemult, -noscalemult*2) + E:Height(point.borderbottom, noscalemult) point.borderbottom:SetTexture(unpack(E.media.bordercolor)) point.borderbottom.backdrop = parent:CreateTexture() - point.borderbottom.backdrop:SetPoint("BOTTOMLEFT", point.borderbottom, "BOTTOMLEFT", noscalemult, -noscalemult) - point.borderbottom.backdrop:SetPoint("BOTTOMRIGHT", point.borderbottom, "BOTTOMRIGHT", -noscalemult, -noscalemult) - point.borderbottom.backdrop:SetHeight(noscalemult * 3) + E:Point(point.borderbottom.backdrop, "BOTTOMLEFT", point.borderbottom, "BOTTOMLEFT", noscalemult, -noscalemult) + E:Point(point.borderbottom.backdrop, "BOTTOMRIGHT", point.borderbottom, "BOTTOMRIGHT", -noscalemult, -noscalemult) + E:Height(point.borderbottom.backdrop, noscalemult * 3) point.borderbottom.backdrop:SetTexture(0, 0, 0) point.borderleft = parent:CreateTexture(nil, "OVERLAY") - point.borderleft:SetPoint("TOPLEFT", point, "TOPLEFT", -noscalemult*2, noscalemult*2) - point.borderleft:SetPoint("BOTTOMLEFT", point, "BOTTOMLEFT", noscalemult*2, -noscalemult*2) - point.borderleft:SetWidth(noscalemult) + E:Point(point.borderleft, "TOPLEFT", point, "TOPLEFT", -noscalemult*2, noscalemult*2) + E:Point(point.borderleft, "BOTTOMLEFT", point, "BOTTOMLEFT", noscalemult*2, -noscalemult*2) + E:Width(point.borderleft, noscalemult) point.borderleft:SetTexture(unpack(E.media.bordercolor)) point.borderleft.backdrop = parent:CreateTexture() - point.borderleft.backdrop:SetPoint("TOPLEFT", point.borderleft, "TOPLEFT", -noscalemult, noscalemult) - point.borderleft.backdrop:SetPoint("BOTTOMLEFT", point.borderleft, "BOTTOMLEFT", -noscalemult, -noscalemult) - point.borderleft.backdrop:SetWidth(noscalemult * 3) + E:Point(point.borderleft.backdrop, "TOPLEFT", point.borderleft, "TOPLEFT", -noscalemult, noscalemult) + E:Point(point.borderleft.backdrop, "BOTTOMLEFT", point.borderleft, "BOTTOMLEFT", -noscalemult, -noscalemult) + E:Width(point.borderleft.backdrop, noscalemult * 3) point.borderleft.backdrop:SetTexture(0, 0, 0) point.borderright = parent:CreateTexture(nil, "OVERLAY") - point.borderright:SetPoint("TOPRIGHT", point, "TOPRIGHT", noscalemult*2, noscalemult*2) - point.borderright:SetPoint("BOTTOMRIGHT", point, "BOTTOMRIGHT", -noscalemult*2, -noscalemult*2) - point.borderright:SetWidth(noscalemult) + E:Point(point.borderright, "TOPRIGHT", point, "TOPRIGHT", noscalemult*2, noscalemult*2) + E:Point(point.borderright, "BOTTOMRIGHT", point, "BOTTOMRIGHT", -noscalemult*2, -noscalemult*2) + E:Width(point.borderright, noscalemult) point.borderright:SetTexture(unpack(E.media.bordercolor)) point.borderright.backdrop = parent:CreateTexture() - point.borderright.backdrop:SetPoint("TOPRIGHT", point.borderright, "TOPRIGHT", noscalemult, noscalemult) - point.borderright.backdrop:SetPoint("BOTTOMRIGHT", point.borderright, "BOTTOMRIGHT", noscalemult, -noscalemult) - point.borderright.backdrop:SetWidth(noscalemult * 3) + E:Point(point.borderright.backdrop, "TOPRIGHT", point.borderright, "TOPRIGHT", noscalemult, noscalemult) + E:Point(point.borderright.backdrop, "BOTTOMRIGHT", point.borderright, "BOTTOMRIGHT", noscalemult, -noscalemult) + E:Width(point.borderright.backdrop, noscalemult * 3) point.borderright.backdrop:SetTexture(0, 0, 0) end end @@ -335,8 +335,7 @@ end function mod:OnShow(self) isTarget = false - self:SetWidth(0.01) - self:SetHeight(0.01) + E:Size(self, 0.01) mod.VisiblePlates[self.UnitFrame] = true @@ -479,9 +478,8 @@ function mod:OnCreated(frame) local Border, Highlight, Name, Level, BossIcon, RaidIcon = frame:GetRegions() frame.UnitFrame = CreateFrame("Button", nil, frame) - frame.UnitFrame:SetWidth(100) - frame.UnitFrame:SetHeight(20) - frame.UnitFrame:SetPoint("CENTER", 0, 0) + E:Size(frame.UnitFrame, 100, 20) + E:Point(frame.UnitFrame, "CENTER", 0, 0) frame.UnitFrame:SetScript("OnEvent", self.OnEvent) frame.UnitFrame:SetScript("OnClick", function() frame:Click() @@ -544,7 +542,7 @@ function mod:QueueObject(object) object:SetTexture("") object:SetTexCoord(0, 0, 0, 0) elseif objectType == "FontString" then - object:SetWidth(0.001) + E:Width(object, 0.001) elseif objectType == "StatusBar" then object:SetStatusBarTexture("") end diff --git a/ElvUI/Modules/Skins/Addons/Ace3.lua b/ElvUI/Modules/Skins/Addons/Ace3.lua index 92763c7..0bb6fa5 100644 --- a/ElvUI/Modules/Skins/Addons/Ace3.lua +++ b/ElvUI/Modules/Skins/Addons/Ace3.lua @@ -35,34 +35,31 @@ local function SkinScrollBar(frame, thumbTrim) if not _G[frame:GetName().."ScrollUpButton"].icon then S:HandleNextPrevButton(_G[frame:GetName().."ScrollUpButton"]) S:SquareButton_SetIcon(_G[frame:GetName().."ScrollUpButton"], "UP") - _G[frame:GetName().."ScrollUpButton"]:SetWidth(_G[frame:GetName().."ScrollUpButton"]:GetWidth() + 7) - _G[frame:GetName().."ScrollUpButton"]:SetHeight(_G[frame:GetName().."ScrollUpButton"]:GetHeight() + 7) + E:Size(_G[frame:GetName().."ScrollUpButton"], _G[frame:GetName().."ScrollUpButton"]:GetWidth() + 7, _G[frame:GetName().."ScrollUpButton"]:GetHeight() + 7) end E:StripTextures(_G[frame:GetName().."ScrollDownButton"]) if not _G[frame:GetName().."ScrollDownButton"].icon then S:HandleNextPrevButton(_G[frame:GetName().."ScrollDownButton"]) S:SquareButton_SetIcon(_G[frame:GetName().."ScrollDownButton"], "DOWN") - _G[frame:GetName().."ScrollDownButton"]:SetWidth(_G[frame:GetName().."ScrollDownButton"]:GetWidth() + 7) - _G[frame:GetName().."ScrollDownButton"]:SetHeight(_G[frame:GetName().."ScrollDownButton"]:GetHeight() + 7) + E:Size(_G[frame:GetName().."ScrollDownButton"], _G[frame:GetName().."ScrollDownButton"]:GetWidth() + 7, _G[frame:GetName().."ScrollDownButton"]:GetHeight() + 7) end if not frame.trackbg then frame.trackbg = CreateFrame("Frame", nil, frame) - frame.trackbg:SetPoint("TOPLEFT", _G[frame:GetName().."ScrollUpButton"], "BOTTOMLEFT", 0, -1) - frame.trackbg:SetPoint("BOTTOMRIGHT", _G[frame:GetName().."ScrollDownButton"], "TOPRIGHT", 0, 1) + E:Point(frame.trackbg, "TOPLEFT", _G[frame:GetName().."ScrollUpButton"], "BOTTOMLEFT", 0, -1) + E:Point(frame.trackbg, "BOTTOMRIGHT", _G[frame:GetName().."ScrollDownButton"], "TOPRIGHT", 0, 1) E:SetTemplate(frame.trackbg, "Transparent") end if frame:GetThumbTexture() then if not thumbTrim then thumbTrim = 3 end frame:GetThumbTexture():SetTexture(nil) - frame:GetThumbTexture():SetHeight(24) + E:Height(frame:GetThumbTexture(), 24) if not frame.thumbbg then frame.thumbbg = CreateFrame("Frame", nil, frame) - frame.thumbbg:SetPoint("TOPLEFT", frame:GetThumbTexture(), "TOPLEFT", 2, -thumbTrim) - frame.thumbbg:SetPoint("TOPLEFT", frame:GetThumbTexture(), "TOPLEFT", 2, -thumbTrim) - frame.thumbbg:SetPoint("BOTTOMRIGHT", frame:GetThumbTexture(), "BOTTOMRIGHT", -2, thumbTrim) + E:Point(frame.thumbbg, "TOPLEFT", frame:GetThumbTexture(), "TOPLEFT", 2, -thumbTrim) + E:Point(frame.thumbbg, "BOTTOMRIGHT", frame:GetThumbTexture(), "BOTTOMRIGHT", -2, thumbTrim) E:SetTemplate(frame.thumbbg, "Default", true, true) frame.thumbbg:SetBackdropColor(0.3, 0.3, 0.3) if frame.trackbg then @@ -124,10 +121,10 @@ function S:SkinAce3() SkinButton(widget.button) SkinScrollBar(widget.scrollBar) - widget.scrollBar:SetPoint("RIGHT", frame, "RIGHT", 0 -4) - widget.scrollBG:SetPoint("TOPRIGHT", widget.scrollBar, "TOPLEFT", -2, 19) - widget.scrollBG:SetPoint("BOTTOMLEFT", widget.button, "TOPLEFT") - widget.scrollFrame:SetPoint("BOTTOMRIGHT", widget.scrollBG, "BOTTOMRIGHT", -4, 8) + E:Point(widget.scrollBar, "RIGHT", frame, "RIGHT", 0 -4) + E:Point(widget.scrollBG, "TOPRIGHT", widget.scrollBar, "TOPLEFT", -2, 19) + E:Point(widget.scrollBG, "BOTTOMLEFT", widget.button, "TOPLEFT") + E:Point(widget.scrollFrame, "BOTTOMRIGHT", widget.scrollBG, "BOTTOMRIGHT", -4, 8) elseif TYPE == "CheckBox" then E:Kill(widget.checkbg) E:Kill(widget.highlight) @@ -135,8 +132,8 @@ function S:SkinAce3() if not widget.skinnedCheckBG then widget.skinnedCheckBG = CreateFrame("Frame", nil, widget.frame) E:SetTemplate(widget.skinnedCheckBG, "Default") - widget.skinnedCheckBG:SetPoint("TOPLEFT", widget.checkbg, "TOPLEFT", 4, -4) - widget.skinnedCheckBG:SetPoint("BOTTOMRIGHT", widget.checkbg, "BOTTOMRIGHT", -4, 4) + E:Point(widget.skinnedCheckBG, "TOPLEFT", widget.checkbg, "TOPLEFT", 4, -4) + E:Point(widget.skinnedCheckBG, "BOTTOMRIGHT", widget.checkbg, "BOTTOMRIGHT", -4, 4) end widget.check:SetParent(widget.skinnedCheckBG) @@ -147,14 +144,14 @@ function S:SkinAce3() E:StripTextures(frame) button:ClearAllPoints() - button:SetPoint("RIGHT", frame, "RIGHT", -20, 0) + E:Point(button, "RIGHT", frame, "RIGHT", -20, 0) S:HandleNextPrevButton(button, true) if not frame.backdrop then E:CreateBackdrop(frame, "Default") - frame.backdrop:SetPoint("TOPLEFT", 20, -2) - frame.backdrop:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", 2, -2) + E:Point(frame.backdrop, "TOPLEFT", 20, -2) + E:Point(frame.backdrop, "BOTTOMRIGHT", button, "BOTTOMRIGHT", 2, -2) end button:SetParent(frame.backdrop) text:SetParent(frame.backdrop) @@ -164,15 +161,13 @@ function S:SkinAce3() E:SetTemplate(dropdown.frame, "Default", true) if dropdown.slider then E:SetTemplate(dropdown.slider, "Default") - dropdown.slider:SetPoint("TOPRIGHT", dropdown.frame, "TOPRIGHT", -10, -10) - dropdown.slider:SetPoint("BOTTOMRIGHT", dropdown.frame, "BOTTOMRIGHT", -10, 10) + E:Point(dropdown.slider, "TOPRIGHT", dropdown.frame, "TOPRIGHT", -10, -10) + E:Point(dropdown.slider, "BOTTOMRIGHT", dropdown.frame, "BOTTOMRIGHT", -10, 10) if dropdown.slider:GetThumbTexture() then dropdown.slider:SetThumbTexture(E["media"].blankTex) dropdown.slider:GetThumbTexture():SetVertexColor(0.3, 0.3, 0.3) - -- dropdown.slider:GetThumbTexture():Size(10, 12) - dropdown.slider:GetThumbTexture():SetWidth(10) - dropdown.slider:GetThumbTexture():SetHeight(12) + E:Size(dropdown.slider:GetThumbTexture(), 10, 12) end end end @@ -185,29 +180,29 @@ function S:SkinAce3() S:HandleNextPrevButton(button, true) frame.text:ClearAllPoints() - frame.text:SetPoint("RIGHT", button, "LEFT", -2, 0) + E:Point(frame.text, "RIGHT", button, "LEFT", -2, 0) button:ClearAllPoints() - button:SetPoint("RIGHT", frame, "RIGHT", -10, -6) + E:Point(button, "RIGHT", frame, "RIGHT", -10, -6) if not frame.backdrop then E:CreateBackdrop(frame, "Default") if TYPE == "LSM30_Font" then - frame.backdrop:SetPoint("TOPLEFT", 20, -17) + E:Point(frame.backdrop, "TOPLEFT", 20, -17) elseif TYPE == "LSM30_Sound" then - frame.backdrop:SetPoint("TOPLEFT", 20, -17) + E:Point(frame.backdrop, "TOPLEFT", 20, -17) widget.soundbutton:SetParent(frame.backdrop) widget.soundbutton:ClearAllPoints() - widget.soundbutton:SetPoint("LEFT", frame.backdrop, "LEFT", 2, 0) + E:Point(widget.soundbutton, "LEFT", frame.backdrop, "LEFT", 2, 0) elseif TYPE == "LSM30_Statusbar" then - frame.backdrop:SetPoint("TOPLEFT", 20, -17) + E:Point(frame.backdrop, "TOPLEFT", 20, -17) widget.bar:SetParent(frame.backdrop) E:SetInside(widget.bar) elseif TYPE == "LSM30_Border" or TYPE == "LSM30_Background" then - frame.backdrop:SetPoint("TOPLEFT", 42, -16) + E:Point(frame.backdrop, "TOPLEFT", 42, -16) end - frame.backdrop:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", 2, -2) + E:Point(frame.backdrop, "BOTTOMRIGHT", button, "BOTTOMRIGHT", 2, -2) end button:SetParent(frame.backdrop) text:SetParent(frame.backdrop) @@ -217,23 +212,21 @@ function S:SkinAce3() E:SetTemplate(dropdown, "Default", true) if dropdown.slider then E:SetTemplate(dropdown.slider, "Transparent") - dropdown.slider:SetPoint("TOPRIGHT", dropdown, "TOPRIGHT", -10, -10) - dropdown.slider:SetPoint("BOTTOMRIGHT", dropdown, "BOTTOMRIGHT", -10, 10) + E:Point(dropdown.slider, "TOPRIGHT", dropdown, "TOPRIGHT", -10, -10) + E:Point(dropdown.slider, "BOTTOMRIGHT", dropdown, "BOTTOMRIGHT", -10, 10) if dropdown.slider:GetThumbTexture() then dropdown.slider:SetThumbTexture(E["media"].blankTex) dropdown.slider:GetThumbTexture():SetVertexColor(0.3, 0.3, 0.3) - -- dropdown.slider:GetThumbTexture():Size(10, 12) - dropdown.slider:GetThumbTexture():SetWidth(10) - dropdown.slider:GetThumbTexture():SetHeight(12) + E:Size(dropdown.slider:GetThumbTexture(), 10, 12) end end if TYPE == "LSM30_Sound" then local frame = this.obj.frame local width = frame:GetWidth() - dropdown:SetPoint("TOPLEFT", frame, "BOTTOMLEFT") - dropdown:SetPoint("TOPRIGHT", frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 30, 0) + E:Point(dropdown, "TOPLEFT", frame, "BOTTOMLEFT") + E:Point(dropdown, "TOPRIGHT", frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 30, 0) end end end) @@ -243,10 +236,10 @@ function S:SkinAce3() E:Kill(_G[frame:GetName().."Left"]) E:Kill(_G[frame:GetName().."Middle"]) E:Kill(_G[frame:GetName().."Right"]) - frame:SetHeight(17) + E:Height(frame, 17) E:CreateBackdrop(frame, "Default") - frame.backdrop:SetPoint("TOPLEFT", -2, 0) - frame.backdrop:SetPoint("BOTTOMRIGHT", 2, 0) + E:Point(frame.backdrop, "TOPLEFT", -2, 0) + E:Point(frame.backdrop, "BOTTOMRIGHT", 2, 0) frame.backdrop:SetParent(widget.frame) frame:SetParent(frame.backdrop) SkinButton(button) @@ -275,10 +268,10 @@ function S:SkinAce3() msgframe:SetToplevel(true) msg:ClearAllPoints() - msg:SetPoint("LEFT", 10, 0) - msg:SetPoint("RIGHT", -10, 0) + E:Point(msg, "LEFT", 10, 0) + E:Point(msg, "RIGHT", -10, 0) msg:SetJustifyV("MIDDLE") - msg:SetWidth(msg:GetWidth() + 10) + E:Width(msg, msg:GetWidth() + 10) elseif TYPE == "Slider" then local frame = widget.slider local editbox = widget.editbox @@ -288,19 +281,17 @@ function S:SkinAce3() E:StripTextures(frame) E:SetTemplate(frame, "Default") - frame:SetHeight(HEIGHT) + E:Height(frame, HEIGHT) frame:SetThumbTexture(E["media"].blankTex) frame:GetThumbTexture():SetVertexColor(0.3, 0.3, 0.3) - -- frame:GetThumbTexture():Size(HEIGHT-2,HEIGHT+2) - frame:GetThumbTexture():SetWidth(HEIGHT-2) - frame:GetThumbTexture():SetHeight(HEIGHT+2) + E:Size(frame:GetThumbTexture(), HEIGHT-2, HEIGHT+2) E:SetTemplate(editbox, "Default") - editbox:SetHeight(15) - editbox:SetPoint("TOP", frame, "BOTTOM", 0, -1) + E:Height(editbox, 15) + E:Point(editbox, "TOP", frame, "BOTTOM", 0, -1) - lowtext:SetPoint("TOPLEFT", frame, "BOTTOMLEFT", 2, -2) - hightext:SetPoint("TOPRIGHT", frame, "BOTTOMRIGHT", -2, -2) + E:Point(lowtext, "TOPLEFT", frame, "BOTTOMLEFT", 2, -2) + E:Point(hightext, "TOPRIGHT", frame, "BOTTOMRIGHT", -2, -2) --[[elseif TYPE == "ColorPicker" then local frame = widget.frame @@ -352,7 +343,7 @@ function S:SkinAce3() if widget.treeframe then E:SetTemplate(widget.treeframe, "Transparent") - frame:SetPoint("TOPLEFT", widget.treeframe, "TOPRIGHT", 1, 0) + E:Point(frame, "TOPLEFT", widget.treeframe, "TOPRIGHT", 1, 0) local oldCreateButton = widget.CreateButton widget.CreateButton = function(self) @@ -362,7 +353,7 @@ function S:SkinAce3() button.toggle.SetPushedTexture = E.noop button.toggleText = button.toggle:CreateFontString(nil, "OVERLAY") E:FontTemplate(button.toggleText, nil, 19) - button.toggleText:SetPoint("CENTER", 0, 0) + E:Point(button.toggleText, "CENTER", 0, 0) button.toggleText:SetText("+") return button end @@ -395,8 +386,8 @@ function S:SkinAce3() tab.backdrop = CreateFrame("Frame", nil, tab) E:SetTemplate(tab.backdrop, "Transparent") tab.backdrop:SetFrameLevel(tab:GetFrameLevel() - 1) - tab.backdrop:SetPoint("TOPLEFT", 10, -3) - tab.backdrop:SetPoint("BOTTOMRIGHT", -10, 0) + E:Point(tab.backdrop, "TOPLEFT", 10, -3) + E:Point(tab.backdrop, "BOTTOMRIGHT", -10, 0) return tab end end diff --git a/ElvUI/Modules/Skins/Blizzard/AuctionHouse.lua b/ElvUI/Modules/Skins/Blizzard/AuctionHouse.lua index 1d0b3b3..e61f622 100644 --- a/ElvUI/Modules/Skins/Blizzard/AuctionHouse.lua +++ b/ElvUI/Modules/Skins/Blizzard/AuctionHouse.lua @@ -14,8 +14,8 @@ local function LoadSkin() E:StripTextures(AuctionFrame, true) E:CreateBackdrop(AuctionFrame, "Transparent") - AuctionFrame.backdrop:SetPoint("TOPLEFT", 10, -11) - AuctionFrame.backdrop:SetPoint("BOTTOMRIGHT", 0, 4) + E:Point(AuctionFrame.backdrop, "TOPLEFT", 10, -11) + E:Point(AuctionFrame.backdrop, "BOTTOMRIGHT", 0, 4) E:StripTextures(BrowseFilterScrollFrame) E:StripTextures(BrowseScrollFrame) @@ -41,9 +41,9 @@ local function LoadSkin() E:SetOutside(AuctionDressUpFrame.backdrop, AuctionDressUpBackgroundTop, nil, nil, AuctionDressUpBackgroundBot) S:HandleRotateButton(AuctionDressUpModelRotateLeftButton) - AuctionDressUpModelRotateLeftButton:SetPoint("TOPLEFT", AuctionDressUpFrame, 8, -17) + E:Point(AuctionDressUpModelRotateLeftButton, "TOPLEFT", AuctionDressUpFrame, 8, -17) S:HandleRotateButton(AuctionDressUpModelRotateRightButton) - AuctionDressUpModelRotateRightButton:SetPoint("TOPLEFT", AuctionDressUpModelRotateLeftButton, "TOPRIGHT", 3, 0) + E:Point(AuctionDressUpModelRotateRightButton, "TOPLEFT", AuctionDressUpModelRotateLeftButton, "TOPRIGHT", 3, 0) S:HandleButton(AuctionDressUpFrameResetButton) S:HandleCloseButton(AuctionDressUpFrameCloseButton, AuctionDressUpFrame.backdrop) @@ -66,24 +66,24 @@ local function LoadSkin() end --Fix Button Positions - AuctionsCloseButton:SetPoint("BOTTOMRIGHT", AuctionFrameAuctions, "BOTTOMRIGHT", 66, 14) - AuctionsCancelAuctionButton:SetPoint("RIGHT", AuctionsCloseButton, "LEFT", -4, 0) - BidBuyoutButton:SetPoint("RIGHT", BidCloseButton, "LEFT", -4, 0) - BidBidButton:SetPoint("RIGHT", BidBuyoutButton, "LEFT", -4, 0) - BrowseBuyoutButton:SetPoint("RIGHT", BrowseCloseButton, "LEFT", -4, 0) - BrowseBidButton:SetPoint("RIGHT", BrowseBuyoutButton, "LEFT", -4, 0) - AuctionsCreateAuctionButton:SetPoint("BOTTOMLEFT", 18, 44) + E:Point(AuctionsCloseButton, "BOTTOMRIGHT", AuctionFrameAuctions, "BOTTOMRIGHT", 66, 14) + E:Point(AuctionsCancelAuctionButton, "RIGHT", AuctionsCloseButton, "LEFT", -4, 0) + E:Point(BidBuyoutButton, "RIGHT", BidCloseButton, "LEFT", -4, 0) + E:Point(BidBidButton, "RIGHT", BidBuyoutButton, "LEFT", -4, 0) + E:Point(BrowseBuyoutButton, "RIGHT", BrowseCloseButton, "LEFT", -4, 0) + E:Point(BrowseBidButton, "RIGHT", BrowseBuyoutButton, "LEFT", -4, 0) + E:Point(AuctionsCreateAuctionButton, "BOTTOMLEFT", 18, 44) BrowseSearchButton:ClearAllPoints() - BrowseSearchButton:SetPoint("TOPRIGHT", AuctionFrameBrowse, "TOPRIGHT", 25, -30) + E:Point(BrowseSearchButton, "TOPRIGHT", AuctionFrameBrowse, "TOPRIGHT", 25, -30) S:HandleNextPrevButton(BrowseNextPageButton) BrowseNextPageButton:ClearAllPoints() - BrowseNextPageButton:SetPoint("BOTTOMLEFT", BrowseSearchButton, "BOTTOMRIGHT", 10, -27) + E:Point(BrowseNextPageButton, "BOTTOMLEFT", BrowseSearchButton, "BOTTOMRIGHT", 10, -27) S:HandleNextPrevButton(BrowsePrevPageButton) BrowsePrevPageButton:ClearAllPoints() - BrowsePrevPageButton:SetPoint("BOTTOMRIGHT", BrowseSearchButton, "BOTTOMLEFT", -10, -27) + E:Point(BrowsePrevPageButton, "BOTTOMRIGHT", BrowseSearchButton, "BOTTOMLEFT", -10, -27) E:StripTextures(AuctionsItemButton) E:SetTemplate(AuctionsItemButton, "Default", true) @@ -139,7 +139,7 @@ local function LoadSkin() end AuctionFrameTab1:ClearAllPoints() - AuctionFrameTab1:SetPoint("BOTTOMLEFT", AuctionFrame, "BOTTOMLEFT", 25, -26) + E:Point(AuctionFrameTab1, "BOTTOMLEFT", AuctionFrame, "BOTTOMLEFT", 25, -26) AuctionFrameTab1.SetPoint = E.noop for i = 1, NUM_FILTERS_TO_DISPLAY do @@ -172,31 +172,31 @@ local function LoadSkin() _G[editbox]:SetTextInsets(1, 1, -1, 1) end - BrowseBidPrice:SetPoint("BOTTOM", -15, 18) - BrowseBidText:SetPoint("BOTTOMRIGHT", AuctionFrameBrowse, "BOTTOM", -116, 21) + E:Point(BrowseBidPrice, "BOTTOM", -15, 18) + E:Point(BrowseBidText, "BOTTOMRIGHT", AuctionFrameBrowse, "BOTTOM", -116, 21) - BrowseMinLevel:SetWidth(32) + E:Width(BrowseMinLevel, 32) - BrowseLevelHyphen:SetPoint("LEFT", BrowseMinLevel, "RIGHT", -7, 1) + E:Point(BrowseLevelHyphen, "LEFT", BrowseMinLevel, "RIGHT", -7, 1) - BrowseMaxLevel:SetPoint("LEFT", BrowseMinLevel, "RIGHT", 8, 0) - BrowseMaxLevel:SetWidth(32) - BrowseLevelText:SetPoint("BOTTOMLEFT", AuctionFrameBrowse, "TOPLEFT", 195, -48) + E:Point(BrowseMaxLevel, "LEFT", BrowseMinLevel, "RIGHT", 8, 0) + E:Width(BrowseMaxLevel, 32) + E:Point(BrowseLevelText, "BOTTOMLEFT", AuctionFrameBrowse, "TOPLEFT", 195, -48) - BrowseName:SetWidth(164) - BrowseName:SetPoint("TOPLEFT", AuctionFrameBrowse, "TOPLEFT", 20, -54) - BrowseNameText:SetPoint("TOPLEFT", BrowseName, "TOPLEFT", 0, 16) + E:Width(BrowseName, 164) + E:Point(BrowseName, "TOPLEFT", AuctionFrameBrowse, "TOPLEFT", 20, -54) + E:Point(BrowseNameText, "TOPLEFT", BrowseName, "TOPLEFT", 0, 16) S:HandleCheckBox(IsUsableCheckButton) IsUsableCheckButton:ClearAllPoints() - IsUsableCheckButton:SetPoint("RIGHT", BrowseIsUsableText, "LEFT", 2, 0) - BrowseIsUsableText:SetPoint("TOPLEFT", 440, -40) + E:Point(IsUsableCheckButton, "RIGHT", BrowseIsUsableText, "LEFT", 2, 0) + E:Point(BrowseIsUsableText, "TOPLEFT", 440, -40) S:HandleCheckBox(ShowOnPlayerCheckButton) ShowOnPlayerCheckButton:ClearAllPoints() - ShowOnPlayerCheckButton:SetPoint("RIGHT", BrowseShowOnCharacterText, "LEFT", 2, 0) + E:Point(ShowOnPlayerCheckButton, "RIGHT", BrowseShowOnCharacterText, "LEFT", 2, 0) - BrowseShowOnCharacterText:SetPoint("TOPLEFT", 440, -60) + E:Point(BrowseShowOnCharacterText, "TOPLEFT", 440, -60) for i = 1, NUM_BROWSE_TO_DISPLAY do local button = _G["BrowseButton"..i] @@ -228,8 +228,8 @@ local function LoadSkin() E:StyleButton(button, false, true) _G["BrowseButton"..i.."Highlight"] = button:GetHighlightTexture() button:GetHighlightTexture():ClearAllPoints() - button:GetHighlightTexture():SetPoint("TOPLEFT", icon, "TOPRIGHT", 2, 0) - button:GetHighlightTexture():SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) + E:Point(button:GetHighlightTexture(), "TOPLEFT", icon, "TOPRIGHT", 2, 0) + E:Point(button:GetHighlightTexture(), "BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) -- button:GetPushedTexture():SetAllPoints(button:GetHighlightTexture()) end @@ -263,8 +263,8 @@ local function LoadSkin() E:StyleButton(button, false, true) _G["AuctionsButton"..i.."Highlight"] = button:GetHighlightTexture() button:GetHighlightTexture():ClearAllPoints() - button:GetHighlightTexture():SetPoint("TOPLEFT", icon, "TOPRIGHT", 2, 0) - button:GetHighlightTexture():SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) + E:Point(button:GetHighlightTexture(), "TOPLEFT", icon, "TOPRIGHT", 2, 0) + E:Point(button:GetHighlightTexture(), "BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) -- button:GetPushedTexture():SetAllPoints(button:GetHighlightTexture()) end @@ -298,42 +298,42 @@ local function LoadSkin() E:StyleButton(button, false, true) _G["BidButton"..i.."Highlight"] = button:GetHighlightTexture() button:GetHighlightTexture():ClearAllPoints() - button:GetHighlightTexture():SetPoint("TOPLEFT", icon, "TOPRIGHT", 2, 0) - button:GetHighlightTexture():SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) + E:Point(button:GetHighlightTexture(), "TOPLEFT", icon, "TOPRIGHT", 2, 0) + E:Point(button:GetHighlightTexture(), "BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) -- button:GetPushedTexture():SetAllPoints(button:GetHighlightTexture()) end --Custom Backdrops AuctionFrameBrowse.bg1 = CreateFrame("Frame", nil, AuctionFrameBrowse) E:SetTemplate(AuctionFrameBrowse.bg1, "Default") - AuctionFrameBrowse.bg1:SetPoint("TOPLEFT", 20, -103) - AuctionFrameBrowse.bg1:SetPoint("BOTTOMRIGHT", -575, 40) + E:Point(AuctionFrameBrowse.bg1, "TOPLEFT", 20, -103) + E:Point(AuctionFrameBrowse.bg1, "BOTTOMRIGHT", -575, 40) BrowseNoResultsText:SetParent(AuctionFrameBrowse.bg1) BrowseSearchCountText:SetParent(AuctionFrameBrowse.bg1) AuctionFrameBrowse.bg1:SetFrameLevel(AuctionFrameBrowse.bg1:GetFrameLevel() - 1) AuctionFrameBrowse.bg2 = CreateFrame("Frame", nil, AuctionFrameBrowse) E:SetTemplate(AuctionFrameBrowse.bg2, "Default") - AuctionFrameBrowse.bg2:SetPoint("TOPLEFT", AuctionFrameBrowse.bg1, "TOPRIGHT", 4, 0) - AuctionFrameBrowse.bg2:SetPoint("BOTTOMRIGHT", AuctionFrame, "BOTTOMRIGHT", -8, 40) + E:Point(AuctionFrameBrowse.bg2, "TOPLEFT", AuctionFrameBrowse.bg1, "TOPRIGHT", 4, 0) + E:Point(AuctionFrameBrowse.bg2, "BOTTOMRIGHT", AuctionFrame, "BOTTOMRIGHT", -8, 40) AuctionFrameBrowse.bg2:SetFrameLevel(AuctionFrameBrowse.bg2:GetFrameLevel() - 1) AuctionFrameBid.bg = CreateFrame("Frame", nil, AuctionFrameBid) E:SetTemplate(AuctionFrameBid.bg, "Default") - AuctionFrameBid.bg:SetPoint("TOPLEFT", 20, -72) - AuctionFrameBid.bg:SetPoint("BOTTOMRIGHT", 66, 40) + E:Point(AuctionFrameBid.bg, "TOPLEFT", 20, -72) + E:Point(AuctionFrameBid.bg, "BOTTOMRIGHT", 66, 40) AuctionFrameBid.bg:SetFrameLevel(AuctionFrameBid.bg:GetFrameLevel() - 1) AuctionFrameAuctions.bg1 = CreateFrame("Frame", nil, AuctionFrameAuctions) E:SetTemplate(AuctionFrameAuctions.bg1, "Default") - AuctionFrameAuctions.bg1:SetPoint("TOPLEFT", 15, -72) - AuctionFrameAuctions.bg1:SetPoint("BOTTOMRIGHT", -545, 40) + E:Point(AuctionFrameAuctions.bg1, "TOPLEFT", 15, -72) + E:Point(AuctionFrameAuctions.bg1, "BOTTOMRIGHT", -545, 40) AuctionFrameAuctions.bg1:SetFrameLevel(AuctionFrameAuctions.bg1:GetFrameLevel() - 1) AuctionFrameAuctions.bg2 = CreateFrame("Frame", nil, AuctionFrameAuctions) E:SetTemplate(AuctionFrameAuctions.bg2, "Default") - AuctionFrameAuctions.bg2:SetPoint("TOPLEFT", AuctionFrameAuctions.bg1, "TOPRIGHT", 3, 0) - AuctionFrameAuctions.bg2:SetPoint("BOTTOMRIGHT", AuctionFrame, -8, 40) + E:Point(AuctionFrameAuctions.bg2, "TOPLEFT", AuctionFrameAuctions.bg1, "TOPRIGHT", 3, 0) + E:Point(AuctionFrameAuctions.bg2, "BOTTOMRIGHT", AuctionFrame, -8, 40) AuctionFrameAuctions.bg2:SetFrameLevel(AuctionFrameAuctions.bg2:GetFrameLevel() - 1) end diff --git a/ElvUI/Modules/Skins/Blizzard/BGScore.lua b/ElvUI/Modules/Skins/Blizzard/BGScore.lua index 54df65b..9860b76 100644 --- a/ElvUI/Modules/Skins/Blizzard/BGScore.lua +++ b/ElvUI/Modules/Skins/Blizzard/BGScore.lua @@ -12,8 +12,8 @@ local function LoadSkin() if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.bgscore ~= true then return end E:CreateBackdrop(WorldStateScoreFrame, "Transparent") - WorldStateScoreFrame.backdrop:SetPoint("TOPLEFT", 10, -15) - WorldStateScoreFrame.backdrop:SetPoint("BOTTOMRIGHT", -113, 67) + E:Point(WorldStateScoreFrame.backdrop, "TOPLEFT", 10, -15) + E:Point(WorldStateScoreFrame.backdrop, "BOTTOMRIGHT", -113, 67) E:StripTextures(WorldStateScoreFrame) diff --git a/ElvUI/Modules/Skins/Blizzard/Bags.lua b/ElvUI/Modules/Skins/Blizzard/Bags.lua index 405817b..844b62a 100644 --- a/ElvUI/Modules/Skins/Blizzard/Bags.lua +++ b/ElvUI/Modules/Skins/Blizzard/Bags.lua @@ -61,8 +61,8 @@ local function LoadSkin() E:StripTextures(containerFrame, true) E:CreateBackdrop(containerFrame, "Transparent") - containerFrame.backdrop:SetPoint("TOPLEFT", 9, -4) - containerFrame.backdrop:SetPoint("BOTTOMRIGHT", -4, 2) + E:Point(containerFrame.backdrop, "TOPLEFT", 9, -4) + E:Point(containerFrame.backdrop, "BOTTOMRIGHT", -4, 2) S:HandleCloseButton(containerFrameClose) @@ -92,8 +92,8 @@ local function LoadSkin() -- BankFrame E:CreateBackdrop(BankFrame, "Transparent") - BankFrame.backdrop:SetPoint("TOPLEFT", 10, -11) - BankFrame.backdrop:SetPoint("BOTTOMRIGHT", -26, 93) + E:Point(BankFrame.backdrop, "TOPLEFT", 10, -11) + E:Point(BankFrame.backdrop, "BOTTOMRIGHT", -26, 93) E:StripTextures(BankFrame, true) @@ -115,8 +115,8 @@ local function LoadSkin() BankFrame.itemBackdrop = CreateFrame("Frame", "BankFrameItemBackdrop", BankFrame) E:SetTemplate(BankFrame.itemBackdrop, "Default") - BankFrame.itemBackdrop:SetPoint("TOPLEFT", BankFrameItem1, "TOPLEFT", -6, 6) - BankFrame.itemBackdrop:SetPoint("BOTTOMRIGHT", BankFrameItem24, "BOTTOMRIGHT", 6, -6) + E:Point(BankFrame.itemBackdrop, "TOPLEFT", BankFrameItem1, "TOPLEFT", -6, 6) + E:Point(BankFrame.itemBackdrop, "BOTTOMRIGHT", BankFrameItem24, "BOTTOMRIGHT", 6, -6) BankFrame.itemBackdrop:SetFrameLevel(BankFrame:GetFrameLevel()) for i = 1, NUM_BANKBAGSLOTS, 1 do @@ -137,8 +137,8 @@ local function LoadSkin() BankFrame.bagBackdrop = CreateFrame("Frame", "BankFrameBagBackdrop", BankFrame) E:SetTemplate(BankFrame.bagBackdrop, "Default") - BankFrame.bagBackdrop:SetPoint("TOPLEFT", BankFrameBag1, "TOPLEFT", -6, 6) - BankFrame.bagBackdrop:SetPoint("BOTTOMRIGHT", BankFrameBag6, "BOTTOMRIGHT", 6, -6) + E:Point(BankFrame.bagBackdrop, "TOPLEFT", BankFrameBag1, "TOPLEFT", -6, 6) + E:Point(BankFrame.bagBackdrop, "BOTTOMRIGHT", BankFrameBag6, "BOTTOMRIGHT", 6, -6) BankFrame.bagBackdrop:SetFrameLevel(BankFrame:GetFrameLevel()) S:HandleButton(BankFramePurchaseButton) diff --git a/ElvUI/Modules/Skins/Blizzard/Battlefield.lua b/ElvUI/Modules/Skins/Blizzard/Battlefield.lua index eff731f..4f70279 100644 --- a/ElvUI/Modules/Skins/Blizzard/Battlefield.lua +++ b/ElvUI/Modules/Skins/Blizzard/Battlefield.lua @@ -12,8 +12,8 @@ local function LoadSkin() E:StripTextures(BattlefieldFrame) E:CreateBackdrop(BattlefieldFrame, "Transparent") - BattlefieldFrame.backdrop:SetPoint("TOPLEFT", 11, -12) - BattlefieldFrame.backdrop:SetPoint("BOTTOMRIGHT", -34, 74) + E:Point(BattlefieldFrame.backdrop, "TOPLEFT", 11, -12) + E:Point(BattlefieldFrame.backdrop, "BOTTOMRIGHT", -34, 74) E:StripTextures(BattlefieldListScrollFrame) S:HandleScrollBar(BattlefieldListScrollFrameScrollBar) diff --git a/ElvUI/Modules/Skins/Blizzard/Binding.lua b/ElvUI/Modules/Skins/Blizzard/Binding.lua index fd99d0b..81cb4f7 100644 --- a/ElvUI/Modules/Skins/Blizzard/Binding.lua +++ b/ElvUI/Modules/Skins/Blizzard/Binding.lua @@ -11,8 +11,8 @@ local function LoadSkin() E:StripTextures(KeyBindingFrame) E:CreateBackdrop(KeyBindingFrame, "Transparent") - KeyBindingFrame.backdrop:SetPoint("TOPLEFT", 2, 0) - KeyBindingFrame.backdrop:SetPoint("BOTTOMRIGHT", -42, 12) + E:Point(KeyBindingFrame.backdrop, "TOPLEFT", 2, 0) + E:Point(KeyBindingFrame.backdrop, "BOTTOMRIGHT", -42, 12) local bindingKey1, bindingKey2 for i = 1, KEY_BINDINGS_DISPLAYED do @@ -21,7 +21,7 @@ local function LoadSkin() S:HandleButton(bindingKey1) S:HandleButton(bindingKey2) - bindingKey2:SetPoint("LEFT", bindingKey1, "RIGHT", 1, 0) + E:Point(bindingKey2, "LEFT", bindingKey1, "RIGHT", 1, 0) end S:HandleScrollBar(KeyBindingFrameScrollFrameScrollBar) @@ -31,9 +31,9 @@ local function LoadSkin() S:HandleButton(KeyBindingFrameDefaultButton) S:HandleButton(KeyBindingFrameCancelButton) S:HandleButton(KeyBindingFrameOkayButton) - KeyBindingFrameOkayButton:SetPoint("RIGHT", KeyBindingFrameCancelButton, "LEFT", -3, 0) + E:Point(KeyBindingFrameOkayButton, "RIGHT", KeyBindingFrameCancelButton, "LEFT", -3, 0) S:HandleButton(KeyBindingFrameUnbindButton) - KeyBindingFrameUnbindButton:SetPoint("RIGHT", KeyBindingFrameOkayButton, "LEFT", -3, 0) + E:Point(KeyBindingFrameUnbindButton, "RIGHT", KeyBindingFrameOkayButton, "LEFT", -3, 0) end S:AddCallbackForAddon("Blizzard_BindingUI", "Binding", LoadSkin) \ No newline at end of file diff --git a/ElvUI/Modules/Skins/Blizzard/Character.lua b/ElvUI/Modules/Skins/Blizzard/Character.lua index 3b3142b..2e0f053 100644 --- a/ElvUI/Modules/Skins/Blizzard/Character.lua +++ b/ElvUI/Modules/Skins/Blizzard/Character.lua @@ -22,8 +22,8 @@ local function LoadSkin() E:StripTextures(CharacterFrame, true) E:CreateBackdrop(CharacterFrame, "Transparent") - CharacterFrame.backdrop:SetPoint("TOPLEFT", 11, -12) - CharacterFrame.backdrop:SetPoint("BOTTOMRIGHT", -32, 76) + E:Point(CharacterFrame.backdrop, "TOPLEFT", 11, -12) + E:Point(CharacterFrame.backdrop, "BOTTOMRIGHT", -32, 76) S:HandleCloseButton(CharacterFrameCloseButton) @@ -35,17 +35,16 @@ local function LoadSkin() E:StripTextures(PaperDollFrame) S:HandleRotateButton(CharacterModelFrameRotateLeftButton) - CharacterModelFrameRotateLeftButton:SetPoint("TOPLEFT", 3, -3) + E:Point(CharacterModelFrameRotateLeftButton, "TOPLEFT", 3, -3) S:HandleRotateButton(CharacterModelFrameRotateRightButton) - CharacterModelFrameRotateRightButton:SetPoint("TOPLEFT", CharacterModelFrameRotateLeftButton, "TOPRIGHT", 3, 0) + E:Point(CharacterModelFrameRotateRightButton, "TOPLEFT", CharacterModelFrameRotateLeftButton, "TOPRIGHT", 3, 0) E:StripTextures(CharacterAttributesFrame) local function HandleResistanceFrame(frameName) for i = 1, 5 do local frame = _G[frameName..i] - frame:SetWidth(24) - frame:SetHeight(24) + E:Size(frame, 24) local icon, text = _G[frameName..i]:GetRegions() E:SetInside(icon) @@ -56,7 +55,7 @@ local function LoadSkin() if i ~= 1 then frame:ClearAllPoints() - frame:SetPoint("TOP", _G[frameName..i-1], "BOTTOM", 0, -(E.Border + E.Spacing)) + E:Point(frame, "TOP", _G[frameName..i-1], "BOTTOM", 0, -(E.Border + E.Spacing)) end end end @@ -116,35 +115,33 @@ local function LoadSkin() E:StripTextures(factionBar) E:CreateBackdrop(factionBar, "Default") factionBar:SetStatusBarTexture(E.media.normTex) - factionBar:SetWidth(108) - factionBar:SetHeight(13) + E:Size(factionBar, 108, 13) E:RegisterStatusBar(factionBar) if i == 1 then - factionBar:SetPoint("TOPLEFT", 190, -86) + E:Point(factionBar, "TOPLEFT", 190, -86) end - factionName:SetPoint("LEFT", factionBar, "LEFT", -150, 0) - factionName:SetWidth(140) + E:Point(factionName, "LEFT", factionBar, "LEFT", -150, 0) + E:Width(factionName, 140) factionName.SetWidth = E.noop E:StripTextures(factionAtWarCheck) - factionAtWarCheck:SetPoint("LEFT", factionBar, "RIGHT", 0, 0) + E:Point(factionAtWarCheck, "LEFT", factionBar, "RIGHT", 0, 0) factionAtWarCheck.Icon = factionAtWarCheck:CreateTexture(nil, "OVERLAY") - factionAtWarCheck.Icon:SetPoint("LEFT", 6, -8) - factionAtWarCheck.Icon:SetWidth(32) - factionAtWarCheck.Icon:SetHeight(32) + E:Point(factionAtWarCheck.Icon, "LEFT", 6, -8) + E:Size(factionAtWarCheck.Icon, 32) factionAtWarCheck.Icon:SetTexture("Interface\\Buttons\\UI-CheckBox-SwordCheck") E:StripTextures(factionHeader) factionHeader:SetNormalTexture(nil) factionHeader.SetNormalTexture = E.noop - factionHeader:SetPoint("TOPLEFT", factionBar, "TOPLEFT", -175, 0) + E:Point(factionHeader, "TOPLEFT", factionBar, "TOPLEFT", -175, 0) factionHeader.Text = factionHeader:CreateFontString(nil, "OVERLAY") E:FontTemplate(factionHeader.Text, nil, 22) - factionHeader.Text:SetPoint("LEFT", 3, 0) + E:Point(factionHeader.Text, "LEFT", 3, 0) factionHeader.Text:SetText("+") end @@ -156,10 +153,10 @@ local function LoadSkin() S:HandleRotateButton(PetModelFrameRotateLeftButton) PetModelFrameRotateLeftButton:ClearAllPoints() - PetModelFrameRotateLeftButton:SetPoint("TOPLEFT", 3, -3) + E:Point(PetModelFrameRotateLeftButton, "TOPLEFT", 3, -3) S:HandleRotateButton(PetModelFrameRotateRightButton) PetModelFrameRotateRightButton:ClearAllPoints() - PetModelFrameRotateRightButton:SetPoint("TOPLEFT", PetModelFrameRotateLeftButton, "TOPRIGHT", 3, 0) + E:Point(PetModelFrameRotateRightButton, "TOPLEFT", PetModelFrameRotateLeftButton, "TOPRIGHT", 3, 0) E:StripTextures(PetAttributesFrame) @@ -168,8 +165,7 @@ local function LoadSkin() for i = 1, 5 do local frame = _G["PetMagicResFrame"..i] - frame:SetWidth(24) - frame:SetHeight(24) + E:Size(frame, 24) end PetMagicResFrame1:GetRegions():SetTexCoord(0.21875, 0.78125, 0.25, 0.3203125) @@ -199,12 +195,11 @@ local function LoadSkin() end end - PetPaperDollPetInfo:SetPoint("TOPLEFT", PetModelFrameRotateLeftButton, "BOTTOMLEFT", 9, -3) + E:Point(PetPaperDollPetInfo, "TOPLEFT", PetModelFrameRotateLeftButton, "BOTTOMLEFT", 9, -3) PetPaperDollPetInfo:GetRegions():SetTexCoord(0.04, 0.15, 0.06, 0.30) PetPaperDollPetInfo:SetFrameLevel(PetModelFrame:GetFrameLevel() + 2) E:CreateBackdrop(PetPaperDollPetInfo, "Default") - PetPaperDollPetInfo:SetWidth(24) - PetPaperDollPetInfo:SetHeight(24) + E:Size(PetPaperDollPetInfo, 24) PetPaperDollPetInfo:RegisterEvent("UNIT_HAPPINESS") PetPaperDollPetInfo:SetScript("OnEvent", updHappiness) @@ -234,10 +229,10 @@ local function LoadSkin() E:StripTextures(ReputationDetailFrame) E:SetTemplate(ReputationDetailFrame, "Transparent") - ReputationDetailFrame:SetPoint("TOPLEFT", ReputationFrame, "TOPRIGHT", -31, -12) + E:Point(ReputationDetailFrame, "TOPLEFT", ReputationFrame, "TOPRIGHT", -31, -12) S:HandleCloseButton(ReputationDetailCloseButton) - ReputationDetailCloseButton:SetPoint("TOPRIGHT", 2, 2) + E:Point(ReputationDetailCloseButton, "TOPRIGHT", 2, 2) S:HandleCheckBox(ReputationDetailAtWarCheckBox) S:HandleCheckBox(ReputationDetailInactiveCheckBox) @@ -249,14 +244,14 @@ local function LoadSkin() SkillFrameExpandButtonFrame:DisableDrawLayer("BACKGROUND") - SkillFrameCollapseAllButton:SetPoint("LEFT", SkillFrameExpandTabLeft, "RIGHT", -40, -3) + E:Point(SkillFrameCollapseAllButton, "LEFT", SkillFrameExpandTabLeft, "RIGHT", -40, -3) SkillFrameCollapseAllButton:SetNormalTexture("") SkillFrameCollapseAllButton.SetNormalTexture = E.noop SkillFrameCollapseAllButton:SetHighlightTexture(nil) SkillFrameCollapseAllButton.Text = SkillFrameCollapseAllButton:CreateFontString(nil, "OVERLAY") E:FontTemplate(SkillFrameCollapseAllButton.Text, nil, 22) - SkillFrameCollapseAllButton.Text:SetPoint("CENTER", -10, 0) + E:Point(SkillFrameCollapseAllButton.Text, "CENTER", -10, 0) SkillFrameCollapseAllButton.Text:SetText("+") hooksecurefunc(SkillFrameCollapseAllButton, "SetNormalTexture", function(self, texture) @@ -285,7 +280,7 @@ local function LoadSkin() label.Text = label:CreateFontString(nil, "OVERLAY") E:FontTemplate(label.Text, nil, 22) - label.Text:SetPoint("LEFT", 3, 0) + E:Point(label.Text, "LEFT", 3, 0) label.Text:SetText("+") hooksecurefunc(label, "SetNormalTexture", function(self, texture) @@ -310,14 +305,12 @@ local function LoadSkin() E:RegisterStatusBar(SkillDetailStatusBar) E:StripTextures(SkillDetailStatusBarUnlearnButton) - SkillDetailStatusBarUnlearnButton:SetPoint("LEFT", SkillDetailStatusBarBorder, "RIGHT", -2, -5) - SkillDetailStatusBarUnlearnButton:SetWidth(36) - SkillDetailStatusBarUnlearnButton:SetHeight(36) + E:Point(SkillDetailStatusBarUnlearnButton, "LEFT", SkillDetailStatusBarBorder, "RIGHT", -2, -5) + E:Size(SkillDetailStatusBarUnlearnButton, 36) SkillDetailStatusBarUnlearnButton.Icon = SkillDetailStatusBarUnlearnButton:CreateTexture(nil, "OVERLAY") - SkillDetailStatusBarUnlearnButton.Icon:SetPoint("LEFT", 7, 5) - SkillDetailStatusBarUnlearnButton.Icon:SetWidth(18) - SkillDetailStatusBarUnlearnButton.Icon:SetHeight(18) + E:Point(SkillDetailStatusBarUnlearnButton.Icon, "LEFT", 7, 5) + E:Size(SkillDetailStatusBarUnlearnButton.Icon, 18) SkillDetailStatusBarUnlearnButton.Icon:SetTexture("Interface\\Buttons\\UI-GroupLoot-Pass-Up") diff --git a/ElvUI/Modules/Skins/Blizzard/Craft.lua b/ElvUI/Modules/Skins/Blizzard/Craft.lua index e8512b3..df8c754 100644 --- a/ElvUI/Modules/Skins/Blizzard/Craft.lua +++ b/ElvUI/Modules/Skins/Blizzard/Craft.lua @@ -18,14 +18,13 @@ local function LoadSkin() E:StripTextures(CraftFrame, true) E:CreateBackdrop(CraftFrame, "Transparent") - CraftFrame.backdrop:SetPoint("TOPLEFT", 10, -11) - CraftFrame.backdrop:SetPoint("BOTTOMRIGHT", -32, 74) + E:Point(CraftFrame.backdrop, "TOPLEFT", 10, -11) + E:Point(CraftFrame.backdrop, "BOTTOMRIGHT", -32, 74) E:StripTextures(CraftRankFrameBorder) - CraftRankFrame:SetWidth(322) - CraftRankFrame:SetHeight(16) + E:Size(CraftRankFrame, 322, 16) CraftRankFrame:ClearAllPoints() - CraftRankFrame:SetPoint("TOP", -10, -45) + E:Point(CraftRankFrame, "TOP", -10, -45) E:CreateBackdrop(CraftRankFrame) CraftRankFrame:SetStatusBarTexture(E["media"].normTex) CraftRankFrame:SetStatusBarColor(0.13, 0.35, 0.80) diff --git a/ElvUI/Modules/Skins/Blizzard/Debug.lua b/ElvUI/Modules/Skins/Blizzard/Debug.lua index a3ecc29..ffdfba4 100644 --- a/ElvUI/Modules/Skins/Blizzard/Debug.lua +++ b/ElvUI/Modules/Skins/Blizzard/Debug.lua @@ -49,10 +49,10 @@ local function LoadSkin() S:HandleButton(ScriptErrorsFrame.close) - ScriptErrorsFrame.reload:SetPoint("BOTTOMLEFT", 12, 8) - ScriptErrorsFrame.previous:SetPoint("BOTTOM", ScriptErrorsFrame, "BOTTOM", -50, 7) - ScriptErrorsFrame.next:SetPoint("BOTTOM", ScriptErrorsFrame, "BOTTOM", 50, 7) - ScriptErrorsFrame.close:SetPoint("BOTTOMRIGHT", -12, 8) + E:Point(ScriptErrorsFrame.reload, "BOTTOMLEFT", 12, 8) + E:Point(ScriptErrorsFrame.previous, "BOTTOM", ScriptErrorsFrame, "BOTTOM", -50, 7) + E:Point(ScriptErrorsFrame.next, "BOTTOM", ScriptErrorsFrame, "BOTTOM", 50, 7) + E:Point(ScriptErrorsFrame.close, "BOTTOMRIGHT", -12, 8) local noscalemult = E.mult * GetCVar("uiScale") HookScript(FrameStackTooltip, "OnShow", function() diff --git a/ElvUI/Modules/Skins/Blizzard/DressingRoom.lua b/ElvUI/Modules/Skins/Blizzard/DressingRoom.lua index ff718a9..edcd816 100644 --- a/ElvUI/Modules/Skins/Blizzard/DressingRoom.lua +++ b/ElvUI/Modules/Skins/Blizzard/DressingRoom.lua @@ -11,8 +11,8 @@ local function LoadSkin() E:StripTextures(DressUpFrame) E:CreateBackdrop(DressUpFrame, "Transparent") - DressUpFrame.backdrop:SetPoint("TOPLEFT", 10, -12) - DressUpFrame.backdrop:SetPoint("BOTTOMRIGHT", -33, 73) + E:Point(DressUpFrame.backdrop, "TOPLEFT", 10, -12) + E:Point(DressUpFrame.backdrop, "BOTTOMRIGHT", -33, 73) E:Kill(DressUpFramePortrait) @@ -22,19 +22,19 @@ local function LoadSkin() DressUpBackgroundBotLeft:SetDesaturated(true) DressUpBackgroundBotRight:SetDesaturated(true) - DressUpFrameDescriptionText:SetPoint("CENTER", DressUpFrameTitleText, "BOTTOM", -5, -22) + E:Point(DressUpFrameDescriptionText, "CENTER", DressUpFrameTitleText, "BOTTOM", -5, -22) S:HandleCloseButton(DressUpFrameCloseButton) S:HandleRotateButton(DressUpModelRotateLeftButton) - DressUpModelRotateLeftButton:SetPoint("TOPLEFT", DressUpFrame, 25, -79) + E:Point(DressUpModelRotateLeftButton, "TOPLEFT", DressUpFrame, 25, -79) S:HandleRotateButton(DressUpModelRotateRightButton) - DressUpModelRotateRightButton:SetPoint("TOPLEFT", DressUpModelRotateLeftButton, "TOPRIGHT", 3, 0) + E:Point(DressUpModelRotateRightButton, "TOPLEFT", DressUpModelRotateLeftButton, "TOPRIGHT", 3, 0) S:HandleButton(DressUpFrameCancelButton) - DressUpFrameCancelButton:SetPoint("CENTER", DressUpFrame, "TOPLEFT", 306, -423) + E:Point(DressUpFrameCancelButton, "CENTER", DressUpFrame, "TOPLEFT", 306, -423) S:HandleButton(DressUpFrameResetButton) - DressUpFrameResetButton:SetPoint("RIGHT", DressUpFrameCancelButton, "LEFT", -3, 0) + E:Point(DressUpFrameResetButton, "RIGHT", DressUpFrameCancelButton, "LEFT", -3, 0) E:CreateBackdrop(DressUpModel, "Default") E:SetOutside(DressUpModel.backdrop, DressUpBackgroundTopLeft, nil, nil, DressUpModel) diff --git a/ElvUI/Modules/Skins/Blizzard/Friends.lua b/ElvUI/Modules/Skins/Blizzard/Friends.lua index 54abd87..e406986 100644 --- a/ElvUI/Modules/Skins/Blizzard/Friends.lua +++ b/ElvUI/Modules/Skins/Blizzard/Friends.lua @@ -20,8 +20,8 @@ function LoadSkin() -- Friends Frame E:StripTextures(FriendsFrame, true) E:CreateBackdrop(FriendsFrame, "Transparent") - FriendsFrame.backdrop:SetPoint("TOPLEFT", 10, -12) - FriendsFrame.backdrop:SetPoint("BOTTOMRIGHT", -33, 76) + E:Point(FriendsFrame.backdrop, "TOPLEFT", 10, -12) + E:Point(FriendsFrame.backdrop, "BOTTOMRIGHT", -33, 76) S:HandleCloseButton(FriendsFrameCloseButton) @@ -34,8 +34,8 @@ function LoadSkin() local tab = _G["FriendsFrameToggleTab"..i] E:StripTextures(tab) E:CreateBackdrop(tab, "Default", true) - tab.backdrop:SetPoint("TOPLEFT", 3, -7) - tab.backdrop:SetPoint("BOTTOMRIGHT", -2, -1) + E:Point(tab.backdrop, "TOPLEFT", 3, -7) + E:Point(tab.backdrop, "BOTTOMRIGHT", -2, -1) tab:SetScript("OnEnter", S.SetModifiedBackdrop) tab:SetScript("OnLeave", S.SetOriginalBackdrop) @@ -48,16 +48,16 @@ function LoadSkin() local width, height = (f:GetWidth() * (scale or 0.5)), f:GetHeight() local leftGrad = f:CreateTexture(nil, "HIGHLIGHT") - leftGrad:SetWidth(width) + E:Width(leftGrad, width) leftGrad:SetHeight(height) - leftGrad:SetPoint("LEFT", f, "CENTER") + E:Point(leftGrad, "LEFT", f, "CENTER") leftGrad:SetTexture(E.media.blankTex) leftGrad:SetGradientAlpha("Horizontal", r, g, b, 0.35, r, g, b, 0) local rightGrad = f:CreateTexture(nil, "HIGHLIGHT") - rightGrad:SetWidth(width) + E:Width(rightGrad, width) rightGrad:SetHeight(height) - rightGrad:SetPoint("RIGHT", f, "CENTER") + E:Point(rightGrad, "RIGHT", f, "CENTER") rightGrad:SetTexture(E.media.blankTex) rightGrad:SetGradientAlpha("Horizontal", r, g, b, 0, r, g, b, 0.35) end @@ -71,23 +71,23 @@ function LoadSkin() S:HandleScrollBar(FriendsFrameFriendsScrollFrameScrollBar) S:HandleButton(FriendsFrameAddFriendButton) - FriendsFrameAddFriendButton:SetPoint("BOTTOMLEFT", 17, 102) + E:Point(FriendsFrameAddFriendButton, "BOTTOMLEFT", 17, 102) S:HandleButton(FriendsFrameSendMessageButton) S:HandleButton(FriendsFrameRemoveFriendButton) - FriendsFrameRemoveFriendButton:SetPoint("TOP", FriendsFrameAddFriendButton, "BOTTOM", 0, -2) + E:Point(FriendsFrameRemoveFriendButton, "TOP", FriendsFrameAddFriendButton, "BOTTOM", 0, -2) S:HandleButton(FriendsFrameGroupInviteButton) - FriendsFrameGroupInviteButton:SetPoint("TOP", FriendsFrameSendMessageButton, "BOTTOM", 0, -2) + E:Point(FriendsFrameGroupInviteButton, "TOP", FriendsFrameSendMessageButton, "BOTTOM", 0, -2) -- Ignore List Frame for i = 1, 2 do local tab = _G["IgnoreFrameToggleTab"..i] E:StripTextures(tab) E:CreateBackdrop(tab, "Default", true) - tab.backdrop:SetPoint("TOPLEFT", 3, -7) - tab.backdrop:SetPoint("BOTTOMRIGHT", -2, -1) + E:Point(tab.backdrop, "TOPLEFT", 3, -7) + E:Point(tab.backdrop, "BOTTOMRIGHT", -2, -1) tab:SetScript("OnEnter", function() S:SetModifiedBackdrop(this) end) tab:SetScript("OnLeave", function() S:SetOriginalBackdrop(this) end) @@ -102,18 +102,18 @@ function LoadSkin() -- Who Frame WhoFrameColumnHeader3:ClearAllPoints() - WhoFrameColumnHeader3:SetPoint("TOPLEFT", 20, -70) + E:Point(WhoFrameColumnHeader3, "TOPLEFT", 20, -70) WhoFrameColumnHeader4:ClearAllPoints() - WhoFrameColumnHeader4:SetPoint("LEFT", WhoFrameColumnHeader3, "RIGHT", -2, -0) - WhoFrameColumnHeader4:SetWidth(48) + E:Point(WhoFrameColumnHeader4, "LEFT", WhoFrameColumnHeader3, "RIGHT", -2, -0) + E:Width(WhoFrameColumnHeader4, 48) WhoFrameColumnHeader1:ClearAllPoints() - WhoFrameColumnHeader1:SetPoint("LEFT", WhoFrameColumnHeader4, "RIGHT", -2, -0) - WhoFrameColumnHeader1:SetWidth(105) + E:Point(WhoFrameColumnHeader1, "LEFT", WhoFrameColumnHeader4, "RIGHT", -2, -0) + E:Width(WhoFrameColumnHeader1, 105) WhoFrameColumnHeader2:ClearAllPoints() - WhoFrameColumnHeader2:SetPoint("LEFT", WhoFrameColumnHeader1, "RIGHT", -2, -0) + E:Point(WhoFrameColumnHeader2, "LEFT", WhoFrameColumnHeader1, "RIGHT", -2, -0) for i = 1, 4 do E:StripTextures(_G["WhoFrameColumnHeader"..i]) @@ -128,9 +128,8 @@ function LoadSkin() local name = _G["WhoFrameButton"..i.."Name"] button.icon = button:CreateTexture("$parentIcon", "ARTWORK") - button.icon:SetPoint("LEFT", 45, 0) - button.icon:SetWidth(15) - button.icon:SetHeight(15) + E:Point(button.icon, "LEFT", 45, 0) + E:Size(button.icon, 15) button.icon:SetTexture("Interface\\AddOns\\ElvUI\\Media\\Textures\\Icons-Classes") E:CreateBackdrop(button, "Default", true) @@ -138,12 +137,11 @@ function LoadSkin() StyleButton(button) level:ClearAllPoints() - level:SetPoint("TOPLEFT", 12, -2) + E:Point(level, "TOPLEFT", 12, -2) - name:SetWidth(100) - name:SetHeight(14) + E:Size(name, 100, 14) name:ClearAllPoints() - name:SetPoint("LEFT", 85, 0) + E:Point(name, "LEFT", 85, 0) _G["WhoFrameButton"..i.."Class"]:Hide() end @@ -152,17 +150,16 @@ function LoadSkin() S:HandleScrollBar(WhoListScrollFrameScrollBar) S:HandleEditBox(WhoFrameEditBox) - WhoFrameEditBox:SetPoint("BOTTOMLEFT", 17, 108) - WhoFrameEditBox:SetWidth(338) - WhoFrameEditBox:SetHeight(18) + E:Point(WhoFrameEditBox, "BOTTOMLEFT", 17, 108) + E:Size(WhoFrameEditBox, 338, 18) S:HandleButton(WhoFrameWhoButton) WhoFrameWhoButton:ClearAllPoints() - WhoFrameWhoButton:SetPoint("BOTTOMLEFT", 16, 82) + E:Point(WhoFrameWhoButton, "BOTTOMLEFT", 16, 82) S:HandleButton(WhoFrameAddFriendButton) - WhoFrameAddFriendButton:SetPoint("LEFT", WhoFrameWhoButton, "RIGHT", 3, 0) - WhoFrameAddFriendButton:SetPoint("RIGHT", WhoFrameGroupInviteButton, "LEFT", -3, 0) + E:Point(WhoFrameAddFriendButton, "LEFT", WhoFrameWhoButton, "RIGHT", 3, 0) + E:Point(WhoFrameAddFriendButton, "RIGHT", WhoFrameGroupInviteButton, "LEFT", -3, 0) S:HandleButton(WhoFrameGroupInviteButton) @@ -218,19 +215,19 @@ function LoadSkin() -- Guild Frame GuildFrameColumnHeader3:ClearAllPoints() - GuildFrameColumnHeader3:SetPoint("TOPLEFT", 20, -70) + E:Point(GuildFrameColumnHeader3, "TOPLEFT", 20, -70) GuildFrameColumnHeader4:ClearAllPoints() - GuildFrameColumnHeader4:SetPoint("LEFT", GuildFrameColumnHeader3, "RIGHT", -2, -0) - GuildFrameColumnHeader4:SetWidth(48) + E:Point(GuildFrameColumnHeader4, "LEFT", GuildFrameColumnHeader3, "RIGHT", -2, -0) + E:Width(GuildFrameColumnHeader4, 48) GuildFrameColumnHeader1:ClearAllPoints() - GuildFrameColumnHeader1:SetPoint("LEFT", GuildFrameColumnHeader4, "RIGHT", -2, -0) - GuildFrameColumnHeader1:SetWidth(105) + E:Point(GuildFrameColumnHeader1, "LEFT", GuildFrameColumnHeader4, "RIGHT", -2, -0) + E:Width(GuildFrameColumnHeader1, 105) GuildFrameColumnHeader2:ClearAllPoints() - GuildFrameColumnHeader2:SetPoint("LEFT", GuildFrameColumnHeader1, "RIGHT", -2, -0) - GuildFrameColumnHeader2:SetWidth(127) + E:Point(GuildFrameColumnHeader2, "LEFT", GuildFrameColumnHeader1, "RIGHT", -2, -0) + E:Width(GuildFrameColumnHeader2, 127) for i = 1, GUILDMEMBERS_TO_DISPLAY do local button = _G["GuildFrameButton"..i] @@ -239,21 +236,19 @@ function LoadSkin() StyleButton(_G["GuildFrameGuildStatusButton"..i]) button.icon = button:CreateTexture("$parentIcon", "ARTWORK") - button.icon:SetPoint("LEFT", 48, -3) - button.icon:SetWidth(15) - button.icon:SetHeight(15) + E:Point(button.icon, "LEFT", 48, -3) + E:Size(button.icon, 15) button.icon:SetTexture("Interface\\AddOns\\ElvUI\\Media\\Textures\\Icons-Classes") E:CreateBackdrop(button, "Default", true) button.backdrop:SetAllPoints(button.icon) _G["GuildFrameButton"..i.."Level"]:ClearAllPoints() - _G["GuildFrameButton"..i.."Level"]:SetPoint("TOPLEFT", 10, -3) + E:Point(_G["GuildFrameButton"..i.."Level"], "TOPLEFT", 10, -3) - _G["GuildFrameButton"..i.."Name"]:SetWidth(100) - _G["GuildFrameButton"..i.."Name"]:SetHeight(14) + E:Size(_G["GuildFrameButton"..i.."Name"], 100, 14) _G["GuildFrameButton"..i.."Name"]:ClearAllPoints() - _G["GuildFrameButton"..i.."Name"]:SetPoint("LEFT", 85, -3) + E:Point(_G["GuildFrameButton"..i.."Name"], "LEFT", 85, -3) _G["GuildFrameButton"..i.."Class"]:Hide() end @@ -327,20 +322,20 @@ function LoadSkin() -- Member Detail Frame E:StripTextures(GuildMemberDetailFrame) E:CreateBackdrop(GuildMemberDetailFrame, "Transparent") - GuildMemberDetailFrame:SetPoint("TOPLEFT", GuildFrame, "TOPRIGHT", -31, -13) + E:Point(GuildMemberDetailFrame, "TOPLEFT", GuildFrame, "TOPRIGHT", -31, -13) S:HandleCloseButton(GuildMemberDetailCloseButton) - GuildMemberDetailCloseButton:SetPoint("TOPRIGHT", 2, 2) + E:Point(GuildMemberDetailCloseButton, "TOPRIGHT", 2, 2) S:HandleButton(GuildFrameControlButton) S:HandleButton(GuildMemberRemoveButton) - GuildMemberRemoveButton:SetPoint("BOTTOMLEFT", 8, 7) + E:Point(GuildMemberRemoveButton, "BOTTOMLEFT", 8, 7) S:HandleButton(GuildMemberGroupInviteButton) - GuildMemberGroupInviteButton:SetPoint("LEFT", GuildMemberRemoveButton, "RIGHT", 3, 0) + E:Point(GuildMemberGroupInviteButton, "LEFT", GuildMemberRemoveButton, "RIGHT", 3, 0) S:HandleNextPrevButton(GuildFramePromoteButton, true) S:HandleNextPrevButton(GuildFrameDemoteButton, true) - GuildFrameDemoteButton:SetPoint("LEFT", GuildFramePromoteButton, "RIGHT", 2, 0) + E:Point(GuildFrameDemoteButton, "LEFT", GuildFramePromoteButton, "RIGHT", 2, 0) E:SetTemplate(GuildMemberNoteBackground, "Default") E:SetTemplate(GuildMemberOfficerNoteBackground, "Default") @@ -348,8 +343,8 @@ function LoadSkin() -- Info Frame E:StripTextures(GuildInfoFrame) E:CreateBackdrop(GuildInfoFrame, "Transparent") - GuildInfoFrame.backdrop:SetPoint("TOPLEFT", 3, -6) - GuildInfoFrame.backdrop:SetPoint("BOTTOMRIGHT", -2, 3) + E:Point(GuildInfoFrame.backdrop, "TOPLEFT", 3, -6) + E:Point(GuildInfoFrame.backdrop, "BOTTOMRIGHT", -2, 3) E:SetTemplate(GuildInfoTextBackground, "Default") S:HandleScrollBar(GuildInfoFrameScrollFrameScrollBar) @@ -357,19 +352,18 @@ function LoadSkin() S:HandleCloseButton(GuildInfoCloseButton) S:HandleButton(GuildInfoSaveButton) - GuildInfoSaveButton:SetPoint("BOTTOMLEFT", 8, 11) + E:Point(GuildInfoSaveButton, "BOTTOMLEFT", 8, 11) S:HandleButton(GuildInfoCancelButton) - GuildInfoCancelButton:SetPoint("LEFT", GuildInfoSaveButton, "RIGHT", 3, 0) + E:Point(GuildInfoCancelButton, "LEFT", GuildInfoSaveButton, "RIGHT", 3, 0) -- Control Frame E:StripTextures(GuildControlPopupFrame) E:CreateBackdrop(GuildControlPopupFrame, "Transparent") - GuildControlPopupFrame.backdrop:SetPoint("TOPLEFT", 3, -6) - GuildControlPopupFrame.backdrop:SetPoint("BOTTOMRIGHT", -27, 27) + E:Point(GuildControlPopupFrame.backdrop, "TOPLEFT", 3, -6) + E:Point(GuildControlPopupFrame.backdrop, "BOTTOMRIGHT", -27, 27) S:HandleDropDownBox(GuildControlPopupFrameDropDown, 185) - GuildControlPopupFrameDropDownButton:SetWidth(16) - GuildControlPopupFrameDropDownButton:SetHeight(16) + E:Size(GuildControlPopupFrameDropDownButton, 16) local function SkinPlusMinus(f, minus) f:SetNormalTexture("") @@ -383,7 +377,7 @@ function LoadSkin() f.Text = f:CreateFontString(nil, "OVERLAY") E:FontTemplate(f.Text, nil, 22) - f.Text:SetPoint("LEFT", 5, 0) + E:Point(f.Text, "LEFT", 5, 0) if minus then f.Text:SetText("-") else @@ -391,13 +385,13 @@ function LoadSkin() end end - GuildControlPopupFrameAddRankButton:SetPoint("LEFT", GuildControlPopupFrameDropDown, "RIGHT", -8, 3) + E:Point(GuildControlPopupFrameAddRankButton, "LEFT", GuildControlPopupFrameDropDown, "RIGHT", -8, 3) SkinPlusMinus(GuildControlPopupFrameAddRankButton) SkinPlusMinus(GuildControlPopupFrameRemoveRankButton, true) S:HandleEditBox(GuildControlPopupFrameEditBox) - GuildControlPopupFrameEditBox.backdrop:SetPoint("TOPLEFT", 0, -5) - GuildControlPopupFrameEditBox.backdrop:SetPoint("BOTTOMRIGHT", 0, 5) + E:Point(GuildControlPopupFrameEditBox.backdrop, "TOPLEFT", 0, -5) + E:Point(GuildControlPopupFrameEditBox.backdrop, "BOTTOMRIGHT", 0, 5) for i = 1, 17 do local Checkbox = _G["GuildControlPopupFrameCheckbox"..i] @@ -419,9 +413,9 @@ function LoadSkin() HookScript(RaidInfoFrame, "OnShow", function() if GetNumRaidMembers() > 0 then - RaidInfoFrame:SetPoint("TOPLEFT", RaidFrame, "TOPRIGHT", -14, -12) + E:Point(RaidInfoFrame, "TOPLEFT", RaidFrame, "TOPRIGHT", -14, -12) else - RaidInfoFrame:SetPoint("TOPLEFT", RaidFrame, "TOPRIGHT", -34, -12) + E:Point(RaidInfoFrame, "TOPLEFT", RaidFrame, "TOPRIGHT", -34, -12) end end) diff --git a/ElvUI/Modules/Skins/Blizzard/Gossip.lua b/ElvUI/Modules/Skins/Blizzard/Gossip.lua index d362362..2dfb9e8 100644 --- a/ElvUI/Modules/Skins/Blizzard/Gossip.lua +++ b/ElvUI/Modules/Skins/Blizzard/Gossip.lua @@ -16,15 +16,15 @@ local function LoadSkin() S:HandleScrollBar(ItemTextScrollFrameScrollBar) E:CreateBackdrop(ItemTextFrame, "Transparent") - ItemTextFrame.backdrop:SetPoint("TOPLEFT", 13, -13) - ItemTextFrame.backdrop:SetPoint("BOTTOMRIGHT", -32, 74) + E:Point(ItemTextFrame.backdrop, "TOPLEFT", 13, -13) + E:Point(ItemTextFrame.backdrop, "BOTTOMRIGHT", -32, 74) S:HandleNextPrevButton(ItemTextPrevPageButton) S:HandleNextPrevButton(ItemTextNextPageButton) ItemTextPrevPageButton:ClearAllPoints() ItemTextNextPageButton:ClearAllPoints() - ItemTextPrevPageButton:SetPoint("TOPLEFT", ItemTextFrame, "TOPLEFT", 30, -50) - ItemTextNextPageButton:SetPoint("TOPRIGHT", ItemTextFrame, "TOPRIGHT", -48, -50) + E:Point(ItemTextPrevPageButton, "TOPLEFT", ItemTextFrame, "TOPLEFT", 30, -50) + E:Point(ItemTextNextPageButton, "TOPRIGHT", ItemTextFrame, "TOPRIGHT", -48, -50) S:HandleCloseButton(ItemTextCloseButton) @@ -39,11 +39,11 @@ local function LoadSkin() E:Kill(GossipFramePortrait) E:CreateBackdrop(GossipFrame, "Transparent") - GossipFrame.backdrop:SetPoint("TOPLEFT", 15, -19) - GossipFrame.backdrop:SetPoint("BOTTOMRIGHT", -30, 67) + E:Point(GossipFrame.backdrop, "TOPLEFT", 15, -19) + E:Point(GossipFrame.backdrop, "BOTTOMRIGHT", -30, 67) S:HandleButton(GossipFrameGreetingGoodbyeButton) - GossipFrameGreetingGoodbyeButton:SetPoint("BOTTOMRIGHT", GossipFrame, -34, 71) + E:Point(GossipFrameGreetingGoodbyeButton, "BOTTOMRIGHT", GossipFrame, -34, 71) S:HandleCloseButton(GossipFrameCloseButton) diff --git a/ElvUI/Modules/Skins/Blizzard/GuildRegistrar.lua b/ElvUI/Modules/Skins/Blizzard/GuildRegistrar.lua index 071c324..7a89463 100644 --- a/ElvUI/Modules/Skins/Blizzard/GuildRegistrar.lua +++ b/ElvUI/Modules/Skins/Blizzard/GuildRegistrar.lua @@ -11,8 +11,8 @@ local function LoadSkin() E:StripTextures(GuildRegistrarFrame, true) E:CreateBackdrop(GuildRegistrarFrame, "Transparent") - GuildRegistrarFrame.backdrop:SetPoint("TOPLEFT", 12, -17) - GuildRegistrarFrame.backdrop:SetPoint("BOTTOMRIGHT", -28, 65) + E:Point(GuildRegistrarFrame.backdrop, "TOPLEFT", 12, -17) + E:Point(GuildRegistrarFrame.backdrop, "BOTTOMRIGHT", -28, 65) E:StripTextures(GuildRegistrarGreetingFrame) S:HandleButton(GuildRegistrarFrameGoodbyeButton) S:HandleButton(GuildRegistrarFrameCancelButton) diff --git a/ElvUI/Modules/Skins/Blizzard/Help.lua b/ElvUI/Modules/Skins/Blizzard/Help.lua index 612d7ca..7776d43 100644 --- a/ElvUI/Modules/Skins/Blizzard/Help.lua +++ b/ElvUI/Modules/Skins/Blizzard/Help.lua @@ -29,11 +29,11 @@ local function LoadSkin() E:StripTextures(HelpFrame) E:CreateBackdrop(HelpFrame, "Transparent") - HelpFrame.backdrop:SetPoint("TOPLEFT", 6, -2) - HelpFrame.backdrop:SetPoint("BOTTOMRIGHT", -45, 14) + E:Point(HelpFrame.backdrop, "TOPLEFT", 6, -2) + E:Point(HelpFrame.backdrop, "BOTTOMRIGHT", -45, 14) S:HandleCloseButton(HelpFrameCloseButton) - HelpFrameCloseButton:SetPoint("TOPRIGHT", -42, 0) + E:Point(HelpFrameCloseButton, "TOPRIGHT", -42, 0) for i = 1, getn(helpFrameButtons) do local helpButton = _G["HelpFrame"..helpFrameButtons[i]] @@ -51,9 +51,9 @@ local function LoadSkin() title:SetTexture("") title:ClearAllPoints() if title == _G["GameMenuFrameHeader"] then - title:SetPoint("TOP", GameMenuFrame, 0, 0) + E:Point(title, "TOP", GameMenuFrame, 0, 0) else - title:SetPoint("TOP", BlizzardHeader[i], -22, -8) + E:Point(title, "TOP", BlizzardHeader[i], -22, -8) end end end @@ -63,7 +63,7 @@ local function LoadSkin() S:HandleScrollBar(HelpFrameOpenTicketScrollFrame) S:HandleScrollBar(HelpFrameOpenTicketScrollFrameScrollBar) - HelpFrameOpenTicketSubmit:SetPoint("RIGHT", HelpFrameOpenTicketCancel, "LEFT", -2, 0) + E:Point(HelpFrameOpenTicketSubmit, "RIGHT", HelpFrameOpenTicketCancel, "LEFT", -2, 0) E:Kill(HelpFrameHarassmentDivider) E:Kill(HelpFrameHarassmentDivider2) diff --git a/ElvUI/Modules/Skins/Blizzard/Inspect.lua b/ElvUI/Modules/Skins/Blizzard/Inspect.lua index 985f924..9f24c2b 100644 --- a/ElvUI/Modules/Skins/Blizzard/Inspect.lua +++ b/ElvUI/Modules/Skins/Blizzard/Inspect.lua @@ -18,8 +18,8 @@ local function LoadSkin() E:StripTextures(InspectFrame, true) E:CreateBackdrop(InspectFrame, "Transparent") - InspectFrame.backdrop:SetPoint("TOPLEFT", 10, -12) - InspectFrame.backdrop:SetPoint("BOTTOMRIGHT", -31, 75) + E:Point(InspectFrame.backdrop, "TOPLEFT", 10, -12) + E:Point(InspectFrame.backdrop, "BOTTOMRIGHT", -31, 75) S:HandleCloseButton(InspectFrameCloseButton) @@ -85,10 +85,10 @@ local function LoadSkin() end) S:HandleRotateButton(InspectModelRotateLeftButton) - InspectModelRotateLeftButton:SetPoint("TOPLEFT", 3, -3) + E:Point(InspectModelRotateLeftButton, "TOPLEFT", 3, -3) S:HandleRotateButton(InspectModelRotateRightButton) - InspectModelRotateRightButton:SetPoint("TOPLEFT", InspectModelRotateLeftButton, "TOPRIGHT", 3, 0) + E:Point(InspectModelRotateRightButton, "TOPLEFT", InspectModelRotateLeftButton, "TOPRIGHT", 3, 0) E:StripTextures(InspectHonorFrame) diff --git a/ElvUI/Modules/Skins/Blizzard/Loot.lua b/ElvUI/Modules/Skins/Blizzard/Loot.lua index a708203..838d903 100644 --- a/ElvUI/Modules/Skins/Blizzard/Loot.lua +++ b/ElvUI/Modules/Skins/Blizzard/Loot.lua @@ -22,8 +22,8 @@ local function LoadSkin() E:StripTextures(LootFrame) E:CreateBackdrop(LootFrame, "Transparent") - LootFrame.backdrop:SetPoint("TOPLEFT", 13, -14) - LootFrame.backdrop:SetPoint("BOTTOMRIGHT", -68, 5) + E:Point(LootFrame.backdrop, "TOPLEFT", 13, -14) + E:Point(LootFrame.backdrop, "BOTTOMRIGHT", -68, 5) LootFramePortraitOverlay:SetParent(E.HiddenFrame) @@ -39,7 +39,7 @@ local function LoadSkin() end]] --[[LootFrame.Title:ClearAllPoints() - LootFrame.Title:SetPoint("TOPLEFT", LootFrame.backdrop, "TOPLEFT", 4, -4) + E:Point(LootFrame.Title, "TOPLEFT", LootFrame.backdrop, "TOPLEFT", 4, -4) LootFrame.Title:SetJustifyH("LEFT")]] S:HandleNextPrevButton(LootFrameDownButton) @@ -48,8 +48,8 @@ local function LoadSkin() S:SquareButton_SetIcon(LootFrameDownButton, "DOWN") LootFrameDownButton:ClearAllPoints() - LootFrameDownButton:SetPoint("RIGHT", LootFrameNext, "RIGHT", 32, 0) - LootFramePrev:SetPoint("BOTTOMLEFT", 57, 22) + E:Point(LootFrameDownButton, "RIGHT", LootFrameNext, "RIGHT", 32, 0) + E:Point(LootFramePrev, "BOTTOMLEFT", 57, 22) hooksecurefunc("LootFrame_Update", function() local numLootItems = LootFrame.numLootItems @@ -127,9 +127,8 @@ local function LoadRollSkin() local decoration = _G[frameName.."Decoration"] decoration:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Gold-Dragon") - decoration:SetWidth(130) - decoration:SetHeight(130) - decoration:SetPoint("TOPLEFT", -37, 20) + E:Size(decoration, 130) + E:Point(decoration, "TOPLEFT", -37, 20) local pass = _G[frameName.."PassButton"] S:HandleCloseButton(pass, frame) diff --git a/ElvUI/Modules/Skins/Blizzard/Macro.lua b/ElvUI/Modules/Skins/Blizzard/Macro.lua index 0f9493f..aa39b58 100644 --- a/ElvUI/Modules/Skins/Blizzard/Macro.lua +++ b/ElvUI/Modules/Skins/Blizzard/Macro.lua @@ -13,18 +13,18 @@ local function LoadSkin() E:StripTextures(MacroFrame) E:CreateBackdrop(MacroFrame, "Transparent") - MacroFrame.backdrop:SetPoint("TOPLEFT", 10, -11) - MacroFrame.backdrop:SetPoint("BOTTOMRIGHT", -32, 71) + E:Point(MacroFrame.backdrop, "TOPLEFT", 10, -11) + E:Point(MacroFrame.backdrop, "BOTTOMRIGHT", -32, 71) MacroFrame.bg = CreateFrame("Frame", nil, MacroFrame) E:SetTemplate(MacroFrame.bg, "Transparent", true) - MacroFrame.bg:SetPoint("TOPLEFT", MacroButton1, -10, 10) - MacroFrame.bg:SetPoint("BOTTOMRIGHT", MacroButton18, 10, -10) + E:Point(MacroFrame.bg, "TOPLEFT", MacroButton1, -10, 10) + E:Point(MacroFrame.bg, "BOTTOMRIGHT", MacroButton18, 10, -10) E:StripTextures(MacroFrameTextBackground) E:CreateBackdrop(MacroFrameTextBackground, "Default") - MacroFrameTextBackground.backdrop:SetPoint("TOPLEFT", 6, -3) - MacroFrameTextBackground.backdrop:SetPoint("BOTTOMRIGHT", -2, 3) + E:Point(MacroFrameTextBackground.backdrop, "TOPLEFT", 6, -3) + E:Point(MacroFrameTextBackground.backdrop, "BOTTOMRIGHT", -2, 3) local Buttons = { "MacroFrameTab1", @@ -45,11 +45,11 @@ local function LoadSkin() for i = 1, 2 do local tab = _G["MacroFrameTab"..i] - tab:SetHeight(22) + E:Height(tab, 22) end - MacroFrameTab1:SetPoint("TOPLEFT", MacroFrame, "TOPLEFT", 85, -39) - MacroFrameTab2:SetPoint("LEFT", MacroFrameTab1, "RIGHT", 4, 0) + E:Point(MacroFrameTab1, "TOPLEFT", MacroFrame, "TOPLEFT", 85, -39) + E:Point(MacroFrameTab2, "LEFT", MacroFrameTab1, "RIGHT", 4, 0) S:HandleCloseButton(MacroFrameCloseButton) @@ -57,9 +57,9 @@ local function LoadSkin() S:HandleScrollBar(MacroPopupScrollFrameScrollBar) MacroEditButton:ClearAllPoints() - MacroEditButton:SetPoint("BOTTOMLEFT", MacroFrameSelectedMacroButton, "BOTTOMRIGHT", 10, 0) + E:Point(MacroEditButton, "BOTTOMLEFT", MacroFrameSelectedMacroButton, "BOTTOMRIGHT", 10, 0) - MacroFrameSelectedMacroName:SetPoint("TOPLEFT", MacroFrameSelectedMacroBackground, "TOPRIGHT", -4, -10) + E:Point(MacroFrameSelectedMacroName, "TOPLEFT", MacroFrameSelectedMacroBackground, "TOPRIGHT", -4, -10) E:StripTextures(MacroFrameSelectedMacroButton) E:SetTemplate(MacroFrameSelectedMacroButton, "Transparent") @@ -70,7 +70,7 @@ local function LoadSkin() E:SetInside(MacroFrameSelectedMacroButtonIcon) MacroFrameCharLimitText:ClearAllPoints() - MacroFrameCharLimitText:SetPoint("BOTTOM", MacroFrameTextBackground, 0, -9) + E:Point(MacroFrameCharLimitText, "BOTTOM", MacroFrameTextBackground, 0, -9) for i = 1, MAX_MACROS do local Button = _G["MacroButton"..i] @@ -91,10 +91,10 @@ local function LoadSkin() S:HandleIconSelectionFrame(MacroPopupFrame, NUM_MACRO_ICONS_SHOWN, "MacroPopupButton", "MacroPopup") E:CreateBackdrop(MacroPopupScrollFrame, "Transparent") - MacroPopupScrollFrame.backdrop:SetPoint("TOPLEFT", 51, 2) - MacroPopupScrollFrame.backdrop:SetPoint("BOTTOMRIGHT", 0, 4) + E:Point(MacroPopupScrollFrame.backdrop, "TOPLEFT", 51, 2) + E:Point(MacroPopupScrollFrame.backdrop, "BOTTOMRIGHT", 0, 4) - MacroPopupFrame:SetPoint("TOPLEFT", MacroFrame, "TOPRIGHT", -41, 1) + E:Point(MacroPopupFrame, "TOPLEFT", MacroFrame, "TOPRIGHT", -41, 1) end S:AddCallbackForAddon("Blizzard_MacroUI", "Macro", LoadSkin) \ No newline at end of file diff --git a/ElvUI/Modules/Skins/Blizzard/Mail.lua b/ElvUI/Modules/Skins/Blizzard/Mail.lua index ab144f3..b0904c1 100644 --- a/ElvUI/Modules/Skins/Blizzard/Mail.lua +++ b/ElvUI/Modules/Skins/Blizzard/Mail.lua @@ -19,8 +19,8 @@ local function LoadSkin() -- Inbox Frame E:StripTextures(MailFrame, true) E:CreateBackdrop(MailFrame, "Transparent") - MailFrame.backdrop:SetPoint("TOPLEFT", 10, -12) - MailFrame.backdrop:SetPoint("BOTTOMRIGHT", -30, 74) + E:Point(MailFrame.backdrop, "TOPLEFT", 10, -12) + E:Point(MailFrame.backdrop, "BOTTOMRIGHT", -30, 74) for i = 1, INBOXITEMS_TO_DISPLAY do local mail = _G["MailItem"..i] @@ -29,8 +29,8 @@ local function LoadSkin() E:StripTextures(mail) E:CreateBackdrop(mail, "Default") - mail.backdrop:SetPoint("TOPLEFT", 2, 1) - mail.backdrop:SetPoint("BOTTOMRIGHT", -2, 2) + E:Point(mail.backdrop, "TOPLEFT", 2, 1) + E:Point(mail.backdrop, "BOTTOMRIGHT", -2, 2) E:StripTextures(button) E:SetTemplate(button, "Default", true) @@ -117,29 +117,29 @@ local function LoadSkin() S:HandleScrollBar(SendMailScrollFrameScrollBar) S:HandleEditBox(SendMailNameEditBox) - SendMailNameEditBox.backdrop:SetPoint("BOTTOMRIGHT", 2, 0) - SendMailNameEditBox:SetPoint("TOPLEFT", 79, -46) + E:Point(SendMailNameEditBox.backdrop, "BOTTOMRIGHT", 2, 0) + E:Point(SendMailNameEditBox, "TOPLEFT", 79, -46) S:HandleEditBox(SendMailSubjectEditBox) - SendMailSubjectEditBox.backdrop:SetPoint("BOTTOMRIGHT", 2, 0) + E:Point(SendMailSubjectEditBox.backdrop, "BOTTOMRIGHT", 2, 0) S:HandleEditBox(SendMailMoneyGold) S:HandleEditBox(SendMailMoneySilver) S:HandleEditBox(SendMailMoneyCopper) S:HandleButton(SendMailMailButton) - SendMailMailButton:SetPoint("RIGHT", SendMailCancelButton, "LEFT", -2, 0) + E:Point(SendMailMailButton, "RIGHT", SendMailCancelButton, "LEFT", -2, 0) S:HandleButton(SendMailCancelButton) - SendMailCancelButton:SetPoint("BOTTOMRIGHT", -45, 80) + E:Point(SendMailCancelButton, "BOTTOMRIGHT", -45, 80) - SendMailMoneyFrame:SetPoint("BOTTOMLEFT", 170, 84) + E:Point(SendMailMoneyFrame, "BOTTOMLEFT", 170, 84) -- Open Mail Frame E:StripTextures(OpenMailFrame, true) E:CreateBackdrop(OpenMailFrame, "Transparent") - OpenMailFrame.backdrop:SetPoint("TOPLEFT", 12, -12) - OpenMailFrame.backdrop:SetPoint("BOTTOMRIGHT", -34, 74) + E:Point(OpenMailFrame.backdrop, "TOPLEFT", 12, -12) + E:Point(OpenMailFrame.backdrop, "BOTTOMRIGHT", -34, 74) E:StripTextures(OpenMailPackageButton) E:StyleButton(OpenMailPackageButton) @@ -187,10 +187,10 @@ local function LoadSkin() S:HandleCloseButton(OpenMailCloseButton) S:HandleButton(OpenMailReplyButton) - OpenMailReplyButton:SetPoint("RIGHT", OpenMailDeleteButton, "LEFT", -2, 0) + E:Point(OpenMailReplyButton, "RIGHT", OpenMailDeleteButton, "LEFT", -2, 0) S:HandleButton(OpenMailDeleteButton) - OpenMailDeleteButton:SetPoint("RIGHT", OpenMailCancelButton, "LEFT", -2, 0) + E:Point(OpenMailDeleteButton, "RIGHT", OpenMailCancelButton, "LEFT", -2, 0) S:HandleButton(OpenMailCancelButton) diff --git a/ElvUI/Modules/Skins/Blizzard/Merchant.lua b/ElvUI/Modules/Skins/Blizzard/Merchant.lua index aae9be9..57274ec 100644 --- a/ElvUI/Modules/Skins/Blizzard/Merchant.lua +++ b/ElvUI/Modules/Skins/Blizzard/Merchant.lua @@ -19,8 +19,8 @@ local function LoadSkin() E:StripTextures(MerchantFrame, true) E:CreateBackdrop(MerchantFrame, "Transparent") - MerchantFrame.backdrop:SetPoint("TOPLEFT", 10, -11) - MerchantFrame.backdrop:SetPoint("BOTTOMRIGHT", -28, 60) + E:Point(MerchantFrame.backdrop, "TOPLEFT", 10, -11) + E:Point(MerchantFrame.backdrop, "BOTTOMRIGHT", -28, 60) S:HandleCloseButton(MerchantFrameCloseButton, MerchantFrame.backdrop) @@ -37,13 +37,13 @@ local function LoadSkin() E:StripTextures(itemButton) E:StyleButton(itemButton) E:SetTemplate(itemButton, "Default", true) - itemButton:SetPoint("TOPLEFT", item, "TOPLEFT", 4, -4) + E:Point(itemButton, "TOPLEFT", item, "TOPLEFT", 4, -4) iconTexture:SetTexCoord(unpack(E.TexCoords)) E:SetInside(iconTexture) _G["MerchantItem"..i.."MoneyFrame"]:ClearAllPoints() - _G["MerchantItem"..i.."MoneyFrame"]:SetPoint("BOTTOMLEFT", itemButton, "BOTTOMRIGHT", 3, 0) + E:Point(_G["MerchantItem"..i.."MoneyFrame"], "BOTTOMLEFT", itemButton, "BOTTOMRIGHT", 3, 0) end S:HandleNextPrevButton(MerchantNextPageButton) @@ -74,8 +74,8 @@ local function LoadSkin() E:StripTextures(MerchantBuyBackItem, true) E:CreateBackdrop(MerchantBuyBackItem, "Transparent") - MerchantBuyBackItem.backdrop:SetPoint("TOPLEFT", -6, 6) - MerchantBuyBackItem.backdrop:SetPoint("BOTTOMRIGHT", 6, -6) + E:Point(MerchantBuyBackItem.backdrop, "TOPLEFT", -6, 6) + E:Point(MerchantBuyBackItem.backdrop, "BOTTOMRIGHT", 6, -6) E:StripTextures(MerchantBuyBackItemItemButton) E:StyleButton(MerchantBuyBackItemItemButton) diff --git a/ElvUI/Modules/Skins/Blizzard/MirrorTimers.lua b/ElvUI/Modules/Skins/Blizzard/MirrorTimers.lua index a69b216..a7fe174 100644 --- a/ElvUI/Modules/Skins/Blizzard/MirrorTimers.lua +++ b/ElvUI/Modules/Skins/Blizzard/MirrorTimers.lua @@ -38,14 +38,12 @@ local function LoadSkin() local text = _G["MirrorTimer"..i.."Text"] E:StripTextures(mirrorTimer) - mirrorTimer:SetWidth(222) - mirrorTimer:SetHeight(18) + E:Size(mirrorTimer, 222, 18) mirrorTimer.label = text statusBar:SetStatusBarTexture(E["media"].normTex) E:RegisterStatusBar(statusBar) E:CreateBackdrop(statusBar) - statusBar:SetWidth(222) - statusBar:SetHeight(18) + E:Size(statusBar, 222, 18) text:Hide() local TimerText = mirrorTimer:CreateFontString(nil, "OVERLAY") diff --git a/ElvUI/Modules/Skins/Blizzard/Misc.lua b/ElvUI/Modules/Skins/Blizzard/Misc.lua index c1e28a6..ec5bde0 100644 --- a/ElvUI/Modules/Skins/Blizzard/Misc.lua +++ b/ElvUI/Modules/Skins/Blizzard/Misc.lua @@ -47,7 +47,7 @@ local function LoadSkin() E:SetTemplate(this, "Transparent", true) this:SetBackdropColor(unpack(E["media"].backdropfadecolor)) this:ClearAllPoints() - this:SetPoint("BOTTOMLEFT", ChatFrame1, "TOPLEFT", 0, 35) + E:Point(this, "BOTTOMLEFT", ChatFrame1, "TOPLEFT", 0, 35) end) else HookScript(_G[ChatMenus[i]], "OnShow", function() @@ -61,18 +61,16 @@ local function LoadSkin() local width, height = (f:GetWidth() * .54), f:GetHeight() local left = f:CreateTexture(nil, "HIGHLIGHT") - left:SetWidth(width) - left:SetHeight(height) - left:SetPoint("LEFT", f, "CENTER") + E:Size(left, width, height) + E:Point(left, "LEFT", f, "CENTER") left:SetTexture(1, 1, 1, 0.3) - left:SetHeight(16) + E:Height(left, 16) local right = f:CreateTexture(nil, "HIGHLIGHT") - right:SetWidth(width) - right:SetHeight(height) - right:SetPoint("RIGHT", f, "CENTER") + E:Size(right, width, height) + E:Point(right, "RIGHT", f, "CENTER") right:SetTexture(1, 1, 1, 0.3) - right:SetHeight(16) + E:Height(right, 16) end for i = 1, UIDROPDOWNMENU_MAXBUTTONS do @@ -100,11 +98,11 @@ local function LoadSkin() buttonHighlight:SetAllPoints(button) if i == 1 then - buttonHighlight:SetPoint("TOPLEFT", button, "TOPLEFT", -8, 0) - buttonHighlight:SetPoint("TOPRIGHT", button, "TOPRIGHT", -8, 0) + E:Point(buttonHighlight, "TOPLEFT", button, "TOPLEFT", -8, 0) + E:Point(buttonHighlight, "TOPRIGHT", button, "TOPRIGHT", -8, 0) else - buttonHighlight:SetPoint("TOPLEFT", button, "TOPLEFT", -4, 0) - buttonHighlight:SetPoint("TOPRIGHT", button, "TOPRIGHT", -4, 0) + E:Point(buttonHighlight, "TOPLEFT", button, "TOPLEFT", -4, 0) + E:Point(buttonHighlight, "TOPRIGHT", button, "TOPRIGHT", -4, 0) end end end @@ -120,7 +118,7 @@ local function LoadSkin() E:SetTemplate(buttonBackdropMenu, "Transparent") if i == 2 then - buttonBackdropMenu:SetPoint("TOPRIGHT", -4, 0) + E:Point(buttonBackdropMenu, "TOPRIGHT", -4, 0) end for j = 1, UIDROPDOWNMENU_MAXBUTTONS do @@ -132,8 +130,8 @@ local function LoadSkin() buttonHighlight:SetAllPoints(button) if i == 2 then - buttonHighlight:SetPoint("TOPLEFT", button, "TOPLEFT", -8, 0) - buttonHighlight:SetPoint("TOPRIGHT", button, "TOPRIGHT", 0, 0) + E:Point(buttonHighlight, "TOPLEFT", button, "TOPLEFT", -8, 0) + E:Point(buttonHighlight, "TOPRIGHT", button, "TOPRIGHT", 0, 0) end end end @@ -157,8 +155,8 @@ local function LoadSkin() itemFrameBox:DisableDrawLayer("BACKGROUND") S:HandleEditBox(itemFrameBox) - itemFrameBox.backdrop:SetPoint("TOPLEFT", -2, -4) - itemFrameBox.backdrop:SetPoint("BOTTOMRIGHT", 2, 4) + E:Point(itemFrameBox.backdrop, "TOPLEFT", -2, -4) + E:Point(itemFrameBox.backdrop, "BOTTOMRIGHT", 2, 4) E:StripTextures(closeButton) S:HandleCloseButton(closeButton) @@ -169,7 +167,7 @@ local function LoadSkin() end --select(8, wideBox:GetRegions()):Hide() S:HandleEditBox(wideBox) - wideBox:SetHeight(22) + E:Height(wideBox, 22) for j = 1, 2 do S:HandleButton(_G["StaticPopup"..i.."Button"..j]) @@ -208,9 +206,9 @@ local function LoadSkin() title:SetTexture("") title:ClearAllPoints() if title == _G["GameMenuFrameHeader"] then - title:SetPoint("TOP", GameMenuFrame, 0, 7) + E:Point(title, "TOP", GameMenuFrame, 0, 7) else - title:SetPoint("TOP", BlizzardHeader[i], 0, 0) + E:Point(title, "TOP", BlizzardHeader[i], 0, 0) end end end @@ -240,17 +238,17 @@ local function LoadSkin() -- if a button position is not really where we want, we move it here OptionsFrameCancel:ClearAllPoints() - OptionsFrameCancel:SetPoint("BOTTOMLEFT",OptionsFrame,"BOTTOMRIGHT",-105,15) + E:Point(OptionsFrameCancel, "BOTTOMLEFT",OptionsFrame,"BOTTOMRIGHT",-105,15) OptionsFrameOkay:ClearAllPoints() - OptionsFrameOkay:SetPoint("RIGHT",OptionsFrameCancel,"LEFT",-4,0) + E:Point(OptionsFrameOkay, "RIGHT",OptionsFrameCancel,"LEFT",-4,0) SoundOptionsFrameOkay:ClearAllPoints() - SoundOptionsFrameOkay:SetPoint("RIGHT",SoundOptionsFrameCancel,"LEFT",-4,0) + E:Point(SoundOptionsFrameOkay, "RIGHT",SoundOptionsFrameCancel,"LEFT",-4,0) UIOptionsFrameOkay:ClearAllPoints() - UIOptionsFrameOkay:SetPoint("RIGHT",UIOptionsFrameCancel,"LEFT", -4,0) + E:Point(UIOptionsFrameOkay, "RIGHT",UIOptionsFrameCancel,"LEFT", -4,0) -- others ZoneTextFrame:ClearAllPoints() - ZoneTextFrame:SetPoint("TOP", UIParent, 0, -128) + E:Point(ZoneTextFrame, "TOP", UIParent, 0, -128) E:StripTextures(CoinPickupFrame) E:SetTemplate(CoinPickupFrame, "Transparent") @@ -263,8 +261,8 @@ local function LoadSkin() StackSplitFrame.bg1 = CreateFrame("Frame", nil, StackSplitFrame) E:SetTemplate(StackSplitFrame.bg1, "Transparent") - StackSplitFrame.bg1:SetPoint("TOPLEFT", 10, -15) - StackSplitFrame.bg1:SetPoint("BOTTOMRIGHT", -10, 55) + E:Point(StackSplitFrame.bg1, "TOPLEFT", 10, -15) + E:Point(StackSplitFrame.bg1, "BOTTOMRIGHT", -10, 55) StackSplitFrame.bg1:SetFrameLevel(StackSplitFrame.bg1:GetFrameLevel() - 1) -- Declension frame @@ -325,13 +323,13 @@ local function LoadSkin() end BasicOptions.backdrop = CreateFrame("Frame", nil, BasicOptions) - BasicOptions.backdrop:SetPoint("TOPLEFT", BasicOptionsGeneral, -20, 35) - BasicOptions.backdrop:SetPoint("BOTTOMRIGHT", BasicOptionsHelp, 20, -130) + E:Point(BasicOptions.backdrop, "TOPLEFT", BasicOptionsGeneral, -20, 35) + E:Point(BasicOptions.backdrop, "BOTTOMRIGHT", BasicOptionsHelp, 20, -130) E:SetTemplate(BasicOptions.backdrop, "Transparent") AdvancedOptions.backdrop = CreateFrame("Frame", nil, AdvancedOptions) - AdvancedOptions.backdrop:SetPoint("TOPLEFT", BasicOptionsGeneral, -20, 35) - AdvancedOptions.backdrop:SetPoint("BOTTOMRIGHT", BasicOptionsHelp, 20, -130) + E:Point(AdvancedOptions.backdrop, "TOPLEFT", BasicOptionsGeneral, -20, 35) + E:Point(AdvancedOptions.backdrop, "BOTTOMRIGHT", BasicOptionsHelp, 20, -130) E:SetTemplate(AdvancedOptions.backdrop, "Transparent") for i = 1, 2 do @@ -342,8 +340,8 @@ local function LoadSkin() tab:SetFrameLevel(tab:GetParent():GetFrameLevel() + 2) tab.backdrop:SetFrameLevel(tab:GetParent():GetFrameLevel() + 1) - tab.backdrop:SetPoint("TOPLEFT", 5, E.PixelMode and -14 or -16) - tab.backdrop:SetPoint("BOTTOMRIGHT", -5, E.PixelMode and -4 or -6) + E:Point(tab.backdrop, "TOPLEFT", 5, E.PixelMode and -14 or -16) + E:Point(tab.backdrop, "BOTTOMRIGHT", -5, E.PixelMode and -4 or -6) tab:SetScript("OnClick", function() PanelTemplates_Tab_OnClick(UIOptionsFrame) @@ -377,11 +375,11 @@ local function LoadSkin() end--]] OptionsFrameDefaults:ClearAllPoints() - OptionsFrameDefaults:SetPoint("TOPLEFT", OptionsFrame, "BOTTOMLEFT", 15, 36) + E:Point(OptionsFrameDefaults, "TOPLEFT", OptionsFrame, "BOTTOMLEFT", 15, 36) S:HandleButton(UIOptionsFrameResetTutorials) - SoundOptionsFrameCheckButton1:SetPoint("TOPLEFT", "SoundOptionsFrame", "TOPLEFT", 16, -15) + E:Point(SoundOptionsFrameCheckButton1, "TOPLEFT", "SoundOptionsFrame", "TOPLEFT", 16, -15) -- Interface Options Frame Dropdown local interfacedropdown ={ diff --git a/ElvUI/Modules/Skins/Blizzard/Petition.lua b/ElvUI/Modules/Skins/Blizzard/Petition.lua index a2781ac..5de43c1 100644 --- a/ElvUI/Modules/Skins/Blizzard/Petition.lua +++ b/ElvUI/Modules/Skins/Blizzard/Petition.lua @@ -11,8 +11,8 @@ local function LoadSkin() E:StripTextures(PetitionFrame, true) E:CreateBackdrop(PetitionFrame, "Transparent") - PetitionFrame.backdrop:SetPoint("TOPLEFT", 12, -17) - PetitionFrame.backdrop:SetPoint("BOTTOMRIGHT", -28, 65) + E:Point(PetitionFrame.backdrop, "TOPLEFT", 12, -17) + E:Point(PetitionFrame.backdrop, "BOTTOMRIGHT", -28, 65) S:HandleButton(PetitionFrameSignButton) S:HandleButton(PetitionFrameRequestButton) @@ -32,8 +32,8 @@ local function LoadSkin() PetitionFrameInstructions:SetTextColor(1, 1, 1) - PetitionFrameRenameButton:SetPoint("LEFT", PetitionFrameRequestButton, "RIGHT", 3, 0) - PetitionFrameRenameButton:SetPoint("RIGHT", PetitionFrameCancelButton, "LEFT", -3, 0) + E:Point(PetitionFrameRenameButton, "LEFT", PetitionFrameRequestButton, "RIGHT", 3, 0) + E:Point(PetitionFrameRenameButton, "RIGHT", PetitionFrameCancelButton, "LEFT", -3, 0) end S:AddCallback("Petition", LoadSkin) \ No newline at end of file diff --git a/ElvUI/Modules/Skins/Blizzard/Quest.lua b/ElvUI/Modules/Skins/Blizzard/Quest.lua index ef7e96d..db52ce5 100644 --- a/ElvUI/Modules/Skins/Blizzard/Quest.lua +++ b/ElvUI/Modules/Skins/Blizzard/Quest.lua @@ -59,13 +59,12 @@ local function LoadSkin() E:StripTextures(item) E:SetTemplate(item, "Default") E:StyleButton(item) - item:SetWidth(item:GetWidth() - 4) + E:Width(item, item:GetWidth() - 4) item:SetFrameLevel(item:GetFrameLevel() + 2) icon:SetDrawLayer("OVERLAY") - icon:SetWidth(icon:GetWidth() -(E.Spacing*2)) - icon:SetHeight(icon:GetHeight() -(E.Spacing*2)) - icon:SetPoint("TOPLEFT", E.Border, -E.Border) + E:Size(icon, icon:GetWidth() -(E.Spacing*2), icon:GetHeight() -(E.Spacing*2)) + E:Point(icon, "TOPLEFT", E.Border, -E.Border) S:HandleIcon(icon) count:SetParent(item.backdrop) @@ -80,13 +79,12 @@ local function LoadSkin() E:StripTextures(item) E:SetTemplate(item, "Default") E:StyleButton(item) - item:SetWidth(item:GetWidth() - 4) + E:Width(item, item:GetWidth() - 4) item:SetFrameLevel(item:GetFrameLevel() + 2) icon:SetDrawLayer("OVERLAY") - icon:SetWidth(icon:GetWidth() -(E.Spacing*2)) - icon:SetHeight(icon:GetHeight() -(E.Spacing*2)) - icon:SetPoint("TOPLEFT", E.Border, -E.Border) + E:Size(icon, icon:GetWidth() -(E.Spacing*2), icon:GetHeight() -(E.Spacing*2)) + E:Point(icon, "TOPLEFT", E.Border, -E.Border) S:HandleIcon(icon) count:SetParent(item.backdrop) @@ -101,13 +99,12 @@ local function LoadSkin() E:StripTextures(item) E:SetTemplate(item, "Default") E:StyleButton(item) - item:SetWidth(item:GetWidth() - 4) + E:Width(item, item:GetWidth() - 4) item:SetFrameLevel(item:GetFrameLevel() + 2) icon:SetDrawLayer("OVERLAY") - icon:SetWidth(icon:GetWidth() -(E.Spacing*2)) - icon:SetHeight(icon:GetHeight() -(E.Spacing*2)) - icon:SetPoint("TOPLEFT", E.Border, -E.Border) + E:Size(icon, icon:GetWidth() -(E.Spacing*2), icon:GetHeight() -(E.Spacing*2)) + E:Point(icon, "TOPLEFT", E.Border, -E.Border) S:HandleIcon(icon) count:SetParent(item.backdrop) @@ -138,8 +135,7 @@ local function LoadSkin() E:SetTemplate(QuestRewardItemHighlight, "Default", nil, true) QuestRewardItemHighlight:SetBackdropBorderColor(1, 1, 0) QuestRewardItemHighlight:SetBackdropColor(0, 0, 0, 0) - QuestRewardItemHighlight:SetWidth(142) - QuestRewardItemHighlight:SetHeight(40) + E:Size(QuestRewardItemHighlight, 142, 40) hooksecurefunc("QuestRewardItem_OnClick", function() QuestRewardItemHighlight:ClearAllPoints(); @@ -254,36 +250,35 @@ local function LoadSkin() end) E:CreateBackdrop(QuestFrame, "Transparent") - QuestFrame.backdrop:SetPoint("TOPLEFT", 15, -19) - QuestFrame.backdrop:SetPoint("BOTTOMRIGHT", -30, 67) + E:Point(QuestFrame.backdrop, "TOPLEFT", 15, -19) + E:Point(QuestFrame.backdrop, "BOTTOMRIGHT", -30, 67) E:CreateBackdrop(QuestLogFrame, "Transparent") - QuestLogFrame.backdrop:SetPoint("TOPLEFT", 10, -12) - QuestLogFrame.backdrop:SetPoint("BOTTOMRIGHT", -1, 8) + E:Point(QuestLogFrame.backdrop, "TOPLEFT", 10, -12) + E:Point(QuestLogFrame.backdrop, "BOTTOMRIGHT", -1, 8) E:StripTextures(QuestLogListScrollFrame) E:CreateBackdrop(QuestLogListScrollFrame, "Default", true) - QuestLogListScrollFrame:SetWidth(334) + E:Width(QuestLogListScrollFrame, 334) E:StripTextures(QuestLogDetailScrollFrame) E:CreateBackdrop(QuestLogDetailScrollFrame, "Default", true) - QuestLogDetailScrollFrame:SetWidth(334) - QuestLogDetailScrollFrame:SetHeight(296) + E:Size(QuestLogDetailScrollFrame, 334, 296) QuestLogDetailScrollFrame:ClearAllPoints() - QuestLogDetailScrollFrame:SetPoint("TOPRIGHT", QuestLogListScrollFrame, "BOTTOMRIGHT", 0, -6) + E:Point(QuestLogDetailScrollFrame, "TOPRIGHT", QuestLogListScrollFrame, "BOTTOMRIGHT", 0, -6) QuestLogNoQuestsText:ClearAllPoints() - QuestLogNoQuestsText:SetPoint("CENTER", EmptyQuestLogFrame, "CENTER", -45, 65) + E:Point(QuestLogNoQuestsText, "CENTER", EmptyQuestLogFrame, "CENTER", -45, 65) - QuestLogFrameAbandonButton:SetPoint("BOTTOMLEFT", 18, 15) - QuestLogFrameAbandonButton:SetWidth(126) + E:Point(QuestLogFrameAbandonButton, "BOTTOMLEFT", 18, 15) + E:Width(QuestLogFrameAbandonButton, 126) QuestFramePushQuestButton:ClearAllPoints() - QuestFramePushQuestButton:SetPoint("BOTTOM", QuestFrame, "BOTTOM", 18, 15) - QuestFramePushQuestButton:SetWidth(118) + E:Point(QuestFramePushQuestButton, "BOTTOM", QuestFrame, "BOTTOM", 18, 15) + E:Width(QuestFramePushQuestButton, 118) - QuestFrameExitButton:SetPoint("BOTTOMRIGHT", -8, 15) - QuestFrameExitButton:SetWidth(100) + E:Point(QuestFrameExitButton, "BOTTOMRIGHT", -8, 15) + E:Width(QuestFrameExitButton, 100) S:HandleScrollBar(QuestLogDetailScrollFrameScrollBar) S:HandleScrollBar(QuestDetailScrollFrameScrollBar) @@ -295,7 +290,7 @@ local function LoadSkin() S:HandleCloseButton(QuestLogFrameCloseButton) QuestLogFrameCloseButton:ClearAllPoints() - QuestLogFrameCloseButton:SetPoint("TOPRIGHT", 2, -9) + E:Point(QuestLogFrameCloseButton, "TOPRIGHT", 2, -9) QuestLogTrack:Hide() @@ -303,9 +298,8 @@ local function LoadSkin() S:HandleButton(QuestTrack) QuestTrack:SetText(TRACK_QUEST) - QuestTrack:SetPoint("TOP", QuestLogFrame, "TOP", -64, -42) - QuestTrack:SetWidth(110) - QuestTrack:SetHeight(21) + E:Point(QuestTrack, "TOP", QuestLogFrame, "TOP", -64, -42) + E:Size(QuestTrack, 110, 21) HookScript(QuestTrack, "OnClick", function() if IsQuestWatched(GetQuestLogSelection()) then @@ -354,13 +348,12 @@ local function LoadSkin() E:StripTextures(item) E:SetTemplate(item, "Default") E:StyleButton(item) - item:SetWidth(item:GetWidth() - 4) + E:Width(item, item:GetWidth() - 4) item:SetFrameLevel(item:GetFrameLevel() + 2) icon:SetDrawLayer("OVERLAY") - icon:SetWidth(icon:GetWidth() -(E.Spacing*2)) - icon:SetHeight(icon:GetHeight() -(E.Spacing*2)) - icon:SetPoint("TOPLEFT", E.Border, -E.Border) + E:Size(icon, icon:GetWidth() -(E.Spacing*2), icon:GetHeight() -(E.Spacing*2)) + E:Point(icon, "TOPLEFT", E.Border, -E.Border) S:HandleIcon(icon) count:SetParent(item.backdrop) @@ -399,7 +392,7 @@ local function LoadSkin() questLogTitle.Text = questLogTitle:CreateFontString(nil, "OVERLAY") E:FontTemplate(questLogTitle.Text, nil, 22) - questLogTitle.Text:SetPoint("LEFT", 3, 0) + E:Point(questLogTitle.Text, "LEFT", 3, 0) questLogTitle.Text:SetText("+") hooksecurefunc(questLogTitle, "SetNormalTexture", function(self, texture) @@ -420,11 +413,11 @@ local function LoadSkin() QuestLogCollapseAllButton.SetHighlightTexture = E.noop QuestLogCollapseAllButton:SetDisabledTexture("") QuestLogCollapseAllButton.SetDisabledTexture = E.noop - QuestLogCollapseAllButton:SetPoint("TOPLEFT", -45, 7) + E:Point(QuestLogCollapseAllButton, "TOPLEFT", -45, 7) QuestLogCollapseAllButton.Text = QuestLogCollapseAllButton:CreateFontString(nil, "OVERLAY") E:FontTemplate(QuestLogCollapseAllButton.Text, nil, 22) - QuestLogCollapseAllButton.Text:SetPoint("LEFT", 3, 0) + E:Point(QuestLogCollapseAllButton.Text, "LEFT", 3, 0) QuestLogCollapseAllButton.Text:SetText("+") hooksecurefunc(QuestLogCollapseAllButton, "SetNormalTexture", function(self, texture) diff --git a/ElvUI/Modules/Skins/Blizzard/QuestTimers.lua b/ElvUI/Modules/Skins/Blizzard/QuestTimers.lua index 8754d59..0f983bf 100644 --- a/ElvUI/Modules/Skins/Blizzard/QuestTimers.lua +++ b/ElvUI/Modules/Skins/Blizzard/QuestTimers.lua @@ -12,7 +12,7 @@ local function LoadSkin() E:StripTextures(QuestTimerFrame) E:SetTemplate(QuestTimerFrame, "Transparent") - QuestTimerHeader:SetPoint("TOP", 1, 8) + E:Point(QuestTimerHeader, "TOP", 1, 8) E:CreateMover(QuestTimerFrame, "QuestTimerFrameMover", QUEST_TIMERS) @@ -20,14 +20,13 @@ local function LoadSkin() QuestTimerFrame:SetAllPoints(QuestTimerFrameMover) local QuestTimerFrameHolder = CreateFrame("Frame", "QuestTimerFrameHolder", E.UIParent) - QuestTimerFrameHolder:SetWidth(150) - QuestTimerFrameHolder:SetHeight(22) - QuestTimerFrameHolder:SetPoint("TOP", QuestTimerFrameMover, "TOP") + E:Size(QuestTimerFrameHolder, 150, 22) + E:Point(QuestTimerFrameHolder, "TOP", QuestTimerFrameMover, "TOP") hooksecurefunc(QuestTimerFrame, "SetPoint", function(_, _, parent) if parent ~= QuestTimerFrameHolder then QuestTimerFrame:ClearAllPoints() - QuestTimerFrame:SetPoint("TOP", QuestTimerFrameHolder, "TOP") + E:Point(QuestTimerFrame, "TOP", QuestTimerFrameHolder, "TOP") end end) end diff --git a/ElvUI/Modules/Skins/Blizzard/Raid.lua b/ElvUI/Modules/Skins/Blizzard/Raid.lua index 5679d03..10d3085 100644 --- a/ElvUI/Modules/Skins/Blizzard/Raid.lua +++ b/ElvUI/Modules/Skins/Blizzard/Raid.lua @@ -51,8 +51,8 @@ function LoadSkin() if not rp.backdrop then _G["RaidPullout"..i.."MenuBackdrop"]:SetBackdrop(nil) E:CreateBackdrop(rp, "Transparent") - rp.backdrop:SetPoint("TOPLEFT", 9, -17) - rp.backdrop:SetPoint("BOTTOMRIGHT", -7, 10) + E:Point(rp.backdrop, "TOPLEFT", 9, -17) + E:Point(rp.backdrop, "BOTTOMRIGHT", -7, 10) end end end @@ -73,19 +73,19 @@ function LoadSkin() _G[sBar]:SetStatusBarTexture(E["media"].normTex) end - _G[pfBName.."ManaBar"]:SetPoint("TOP", "$parentHealthBar", "BOTTOM", 0, 0) - _G[pfBName.."Target"]:SetPoint("TOP", "$parentManaBar", "BOTTOM", 0, -1) + E:Point(_G[pfBName.."ManaBar"], "TOP", "$parentHealthBar", "BOTTOM", 0, 0) + E:Point(_G[pfBName.."Target"], "TOP", "$parentManaBar", "BOTTOM", 0, -1) E:CreateBackdrop(pfBObj, "Default") - pfBObj.backdrop:SetPoint("TOPLEFT", E.PixelMode and 0 or -1, -(E.PixelMode and 10 or 9)) - pfBObj.backdrop:SetPoint("BOTTOMRIGHT", E.PixelMode and 0 or 1, E.PixelMode and 1 or 0) + E:Point(pfBObj.backdrop, "TOPLEFT", E.PixelMode and 0 or -1, -(E.PixelMode and 10 or 9)) + E:Point(pfBObj.backdrop, "BOTTOMRIGHT", E.PixelMode and 0 or 1, E.PixelMode and 1 or 0) end if not _G[pfBName.."TargetTargetFrame"].backdrop then E:StripTextures(_G[pfBName.."TargetTargetFrame"]) E:CreateBackdrop(_G[pfBName.."TargetTargetFrame"], "Default") - _G[pfBName.."TargetTargetFrame"].backdrop:SetPoint("TOPLEFT", E.PixelMode and 10 or 9, -(E.PixelMode and 15 or 14)) - _G[pfBName.."TargetTargetFrame"].backdrop:SetPoint("BOTTOMRIGHT", -(E.PixelMode and 10 or 9), E.PixelMode and 8 or 7) + E:Point(_G[pfBName.."TargetTargetFrame"].backdrop, "TOPLEFT", E.PixelMode and 10 or 9, -(E.PixelMode and 15 or 14)) + E:Point(_G[pfBName.."TargetTargetFrame"].backdrop, "BOTTOMRIGHT", -(E.PixelMode and 10 or 9), E.PixelMode and 8 or 7) end end end)]] @@ -99,9 +99,9 @@ function LoadSkin() S:HandleButton(ReadyCheckFrameYesButton) S:HandleButton(ReadyCheckFrameNoButton) - ReadyCheckFrameYesButton:SetPoint("RIGHT", ReadyCheckFrame, "CENTER", -1, 0) - ReadyCheckFrameNoButton:SetPoint("LEFT", ReadyCheckFrameYesButton, "RIGHT", 3, 0) - ReadyCheckFrameText:SetPoint("TOP", ReadyCheckFrame, "TOP", 0, -18) + E:Point(ReadyCheckFrameYesButton, "RIGHT", ReadyCheckFrame, "CENTER", -1, 0) + E:Point(ReadyCheckFrameNoButton, "LEFT", ReadyCheckFrameYesButton, "RIGHT", 3, 0) + E:Point(ReadyCheckFrameText, "TOP", ReadyCheckFrame, "TOP", 0, -18) end S:AddCallbackForAddon("Blizzard_RaidUI", "RaidUI", LoadSkin) \ No newline at end of file diff --git a/ElvUI/Modules/Skins/Blizzard/SpellBook.lua b/ElvUI/Modules/Skins/Blizzard/SpellBook.lua index cc6ae83..3ed42c8 100644 --- a/ElvUI/Modules/Skins/Blizzard/SpellBook.lua +++ b/ElvUI/Modules/Skins/Blizzard/SpellBook.lua @@ -12,8 +12,8 @@ local function LoadSkin() E:StripTextures(SpellBookFrame, true) E:CreateBackdrop(SpellBookFrame, "Transparent") - SpellBookFrame.backdrop:SetPoint("TOPLEFT", 10, -12) - SpellBookFrame.backdrop:SetPoint("BOTTOMRIGHT", -31, 75) + E:Point(SpellBookFrame.backdrop, "TOPLEFT", 10, -12) + E:Point(SpellBookFrame.backdrop, "BOTTOMRIGHT", -31, 75) for i = 1, 3 do local tab = _G["SpellBookFrameTabButton"..i] @@ -23,8 +23,8 @@ local function LoadSkin() S:HandleTab(tab) - tab.backdrop:SetPoint("TOPLEFT", 14, E.PixelMode and -17 or -19) - tab.backdrop:SetPoint("BOTTOMRIGHT", -14, 19) + E:Point(tab.backdrop, "TOPLEFT", 14, E.PixelMode and -17 or -19) + E:Point(tab.backdrop, "BOTTOMRIGHT", -14, 19) end S:HandleNextPrevButton(SpellBookPrevPageButton) diff --git a/ElvUI/Modules/Skins/Blizzard/Stable.lua b/ElvUI/Modules/Skins/Blizzard/Stable.lua index 381cffd..0e0f15a 100644 --- a/ElvUI/Modules/Skins/Blizzard/Stable.lua +++ b/ElvUI/Modules/Skins/Blizzard/Stable.lua @@ -16,8 +16,8 @@ function LoadSkin() E:StripTextures(PetStableFrame) E:Kill(PetStableFramePortrait) E:CreateBackdrop(PetStableFrame, "Transparent") - PetStableFrame.backdrop:SetPoint("TOPLEFT", 10, -11) - PetStableFrame.backdrop:SetPoint("BOTTOMRIGHT", -32, 71) + E:Point(PetStableFrame.backdrop, "TOPLEFT", 10, -11) + E:Point(PetStableFrame.backdrop, "BOTTOMRIGHT", -32, 71) S:HandleButton(PetStablePurchaseButton) S:HandleCloseButton(PetStableFrameCloseButton) @@ -35,8 +35,7 @@ function LoadSkin() PetStablePetInfo:GetRegions():SetTexCoord(0.04, 0.15, 0.06, 0.30) PetStablePetInfo:SetFrameLevel(PetModelFrame:GetFrameLevel() + 2) E:CreateBackdrop(PetStablePetInfo, "Default") - PetStablePetInfo:SetWidth(24) - PetStablePetInfo:SetHeight(24) + E:Size(PetStablePetInfo, 24) hooksecurefunc("PetStable_Update", function() local happiness = GetPetHappiness() diff --git a/ElvUI/Modules/Skins/Blizzard/Tabard.lua b/ElvUI/Modules/Skins/Blizzard/Tabard.lua index 811c76c..23bd693 100644 --- a/ElvUI/Modules/Skins/Blizzard/Tabard.lua +++ b/ElvUI/Modules/Skins/Blizzard/Tabard.lua @@ -13,8 +13,8 @@ local function LoadSkin() E:StripTextures(TabardFrame) E:Kill(TabardFramePortrait) E:CreateBackdrop(TabardFrame, "Transparent") - TabardFrame.backdrop:SetPoint("TOPLEFT", 10, -12) - TabardFrame.backdrop:SetPoint("BOTTOMRIGHT", -32, 74) + E:Point(TabardFrame.backdrop, "TOPLEFT", 10, -12) + E:Point(TabardFrame.backdrop, "BOTTOMRIGHT", -32, 74) E:CreateBackdrop(TabardModel, "Default") S:HandleButton(TabardFrameCancelButton) S:HandleButton(TabardFrameAcceptButton) @@ -32,24 +32,24 @@ local function LoadSkin() if(i > 1) then _G[custom]:ClearAllPoints() - _G[custom]:SetPoint("TOP", _G["TabardFrameCustomization"..i-1], "BOTTOM", 0, -6) + E:Point(_G[custom], "TOP", _G["TabardFrameCustomization"..i-1], "BOTTOM", 0, -6) else local point, anchor, point2, x, y = _G[custom]:GetPoint() - _G[custom]:SetPoint(point, anchor, point2, x, y+4) + E:Point(_G[custom], point, anchor, point2, x, y+4) end end - TabardCharacterModelRotateLeftButton:SetPoint("BOTTOMLEFT", 4, 4) - TabardCharacterModelRotateRightButton:SetPoint("TOPLEFT", TabardCharacterModelRotateLeftButton, "TOPRIGHT", 4, 0) - hooksecurefunc(TabardCharacterModelRotateLeftButton, "SetPoint", function(self, point, _, _, xOffset, yOffset) + E:Point(TabardCharacterModelRotateLeftButton, "BOTTOMLEFT", 4, 4) + E:Point(TabardCharacterModelRotateRightButton, "TOPLEFT", TabardCharacterModelRotateLeftButton, "TOPRIGHT", 4, 0) + hooksecurefunc(TabardCharacterModelRotateLeftButton, "SetPoint" , function(self, point, _, _, xOffset, yOffset) if point ~= "BOTTOMLEFT" or xOffset ~= 4 or yOffset ~= 4 then - self:SetPoint("BOTTOMLEFT", 4, 4) + E:Point(self, "BOTTOMLEFT", 4, 4) end end) - hooksecurefunc(TabardCharacterModelRotateRightButton, "SetPoint", function(self, point, _, _, xOffset, yOffset) + hooksecurefunc(TabardCharacterModelRotateRightButton, "SetPoint" , function(self, point, _, _, xOffset, yOffset) if point ~= "TOPLEFT" or xOffset ~= 4 or yOffset ~= 0 then - self:SetPoint("TOPLEFT", TabardCharacterModelRotateLeftButton, "TOPRIGHT", 4, 0) + E:Point(self, "TOPLEFT", TabardCharacterModelRotateLeftButton, "TOPRIGHT", 4, 0) end end) end diff --git a/ElvUI/Modules/Skins/Blizzard/Talent.lua b/ElvUI/Modules/Skins/Blizzard/Talent.lua index e477c9a..116b769 100644 --- a/ElvUI/Modules/Skins/Blizzard/Talent.lua +++ b/ElvUI/Modules/Skins/Blizzard/Talent.lua @@ -12,8 +12,8 @@ local function LoadSkin() E:StripTextures(TalentFrame) E:CreateBackdrop(TalentFrame, "Transparent") - TalentFrame.backdrop:SetPoint("TOPLEFT", 13, -12) - TalentFrame.backdrop:SetPoint("BOTTOMRIGHT", -31, 76) + E:Point(TalentFrame.backdrop, "TOPLEFT", 13, -12) + E:Point(TalentFrame.backdrop, "BOTTOMRIGHT", -31, 76) TalentFramePortrait:Hide() @@ -27,14 +27,14 @@ local function LoadSkin() E:StripTextures(TalentFrameScrollFrame) E:CreateBackdrop(TalentFrameScrollFrame, "Default") - TalentFrameScrollFrame.backdrop:SetPoint("TOPLEFT", -1, 2) - TalentFrameScrollFrame.backdrop:SetPoint("BOTTOMRIGHT", 6, -2) + E:Point(TalentFrameScrollFrame.backdrop, "TOPLEFT", -1, 2) + E:Point(TalentFrameScrollFrame.backdrop, "BOTTOMRIGHT", 6, -2) S:HandleScrollBar(TalentFrameScrollFrameScrollBar) - TalentFrameScrollFrameScrollBar:SetPoint("TOPLEFT", TalentFrameScrollFrame, "TOPRIGHT", 10, -16) + E:Point(TalentFrameScrollFrameScrollBar, "TOPLEFT", TalentFrameScrollFrame, "TOPRIGHT", 10, -16) - TalentFrameSpentPoints:SetPoint("TOP", 0, -42) - TalentFrameTalentPointsText:SetPoint("BOTTOMRIGHT", TalentFrame, "BOTTOMLEFT", 220, 84) + E:Point(TalentFrameSpentPoints, "TOP", 0, -42) + E:Point(TalentFrameTalentPointsText, "BOTTOMRIGHT", TalentFrame, "BOTTOMLEFT", 220, 84) for i = 1, MAX_NUM_TALENTS do local talent = _G["TalentFrameTalent"..i] diff --git a/ElvUI/Modules/Skins/Blizzard/Taxi.lua b/ElvUI/Modules/Skins/Blizzard/Taxi.lua index 811f1b8..0088d6c 100644 --- a/ElvUI/Modules/Skins/Blizzard/Taxi.lua +++ b/ElvUI/Modules/Skins/Blizzard/Taxi.lua @@ -5,8 +5,8 @@ local function LoadSkin() if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.taxi ~= true then return end E:CreateBackdrop(TaxiFrame, "Transparent") - TaxiFrame.backdrop:SetPoint("TOPLEFT", 11, -12) - TaxiFrame.backdrop:SetPoint("BOTTOMRIGHT", -34, 75) + E:Point(TaxiFrame.backdrop, "TOPLEFT", 11, -12) + E:Point(TaxiFrame.backdrop, "BOTTOMRIGHT", -34, 75) E:StripTextures(TaxiFrame) diff --git a/ElvUI/Modules/Skins/Blizzard/Tooltip.lua b/ElvUI/Modules/Skins/Blizzard/Tooltip.lua index 43f4bf9..ca54214 100644 --- a/ElvUI/Modules/Skins/Blizzard/Tooltip.lua +++ b/ElvUI/Modules/Skins/Blizzard/Tooltip.lua @@ -40,8 +40,8 @@ local function LoadSkin() E:RegisterStatusBar(GameTooltipStatusBar) E:CreateBackdrop(GameTooltipStatusBar, "Transparent") GameTooltipStatusBar:ClearAllPoints() - GameTooltipStatusBar:SetPoint("TOPLEFT", GameTooltip, "BOTTOMLEFT", E.Border, -(E.Spacing * 3)) - GameTooltipStatusBar:SetPoint("TOPRIGHT", GameTooltip, "BOTTOMRIGHT", -E.Border, -(E.Spacing * 3)) + E:Point(GameTooltipStatusBar, "TOPLEFT", GameTooltip, "BOTTOMLEFT", E.Border, -(E.Spacing * 3)) + E:Point(GameTooltipStatusBar, "TOPRIGHT", GameTooltip, "BOTTOMRIGHT", -E.Border, -(E.Spacing * 3)) TT:SecureHookScript(GameTooltip, "OnSizeChanged", "CheckBackdropColor") TT:SecureHookScript(GameTooltip, "OnUpdate", "CheckBackdropColor") diff --git a/ElvUI/Modules/Skins/Blizzard/Trade.lua b/ElvUI/Modules/Skins/Blizzard/Trade.lua index da66ca7..611b2eb 100644 --- a/ElvUI/Modules/Skins/Blizzard/Trade.lua +++ b/ElvUI/Modules/Skins/Blizzard/Trade.lua @@ -15,10 +15,10 @@ local function LoadSkin() if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.trade ~= true then return end E:StripTextures(TradeFrame, true) - TradeFrame:SetWidth(400) + E:Width(TradeFrame, 400) E:CreateBackdrop(TradeFrame, "Transparent") - TradeFrame.backdrop:SetPoint("TOPLEFT", 10, -11) - TradeFrame.backdrop:SetPoint("BOTTOMRIGHT", -28, 48) + E:Point(TradeFrame.backdrop, "TOPLEFT", 10, -11) + E:Point(TradeFrame.backdrop, "BOTTOMRIGHT", -28, 48) S:HandleCloseButton(TradeFrameCloseButton, TradeFrame.backdrop) @@ -55,18 +55,18 @@ local function LoadSkin() playerButton.bg = CreateFrame("Frame", nil, playerButton) E:SetTemplate(playerButton.bg, "Default") - playerButton.bg:SetPoint("TOPLEFT", playerButton, "TOPRIGHT", 4, 0) - playerButton.bg:SetPoint("BOTTOMRIGHT", playerNameFrame, "BOTTOMRIGHT", -5, 14) + E:Point(playerButton.bg, "TOPLEFT", playerButton, "TOPRIGHT", 4, 0) + E:Point(playerButton.bg, "BOTTOMRIGHT", playerNameFrame, "BOTTOMRIGHT", -5, 14) playerButton.bg:SetFrameLevel(playerButton:GetFrameLevel() - 4) recipientButton.bg = CreateFrame("Frame", nil, recipientButton) E:SetTemplate(recipientButton.bg, "Default") - recipientButton.bg:SetPoint("TOPLEFT", recipientButton, "TOPRIGHT", 4, 0) - recipientButton.bg:SetPoint("BOTTOMRIGHT", recipientNameFrame, "BOTTOMRIGHT", -5, 14) + E:Point(recipientButton.bg, "TOPLEFT", recipientButton, "TOPRIGHT", 4, 0) + E:Point(recipientButton.bg, "BOTTOMRIGHT", recipientNameFrame, "BOTTOMRIGHT", -5, 14) recipientButton.bg:SetFrameLevel(recipientButton:GetFrameLevel() - 4) end - TradePlayerItem1:SetPoint("TOPLEFT", 24, -104) + E:Point(TradePlayerItem1, "TOPLEFT", 24, -104) TradeHighlightPlayerTop:SetTexture(0, 1, 0, 0.2) TradeHighlightPlayerBottom:SetTexture(0, 1, 0, 0.2) @@ -85,7 +85,7 @@ local function LoadSkin() TradeHighlightRecipientEnchantMiddle:SetTexture(0, 1, 0, 0.2) S:HandleButton(TradeFrameTradeButton) - TradeFrameTradeButton:SetPoint("BOTTOMRIGHT", -120, 55) + E:Point(TradeFrameTradeButton, "BOTTOMRIGHT", -120, 55) S:HandleButton(TradeFrameCancelButton) diff --git a/ElvUI/Modules/Skins/Blizzard/TradeSkill.lua b/ElvUI/Modules/Skins/Blizzard/TradeSkill.lua index 7241513..5464611 100644 --- a/ElvUI/Modules/Skins/Blizzard/TradeSkill.lua +++ b/ElvUI/Modules/Skins/Blizzard/TradeSkill.lua @@ -19,14 +19,13 @@ local function LoadSkin() E:StripTextures(TradeSkillFrame, true) E:CreateBackdrop(TradeSkillFrame, "Transparent") - TradeSkillFrame.backdrop:SetPoint("TOPLEFT", 10, -11) - TradeSkillFrame.backdrop:SetPoint("BOTTOMRIGHT", -32, 74) + E:Point(TradeSkillFrame.backdrop, "TOPLEFT", 10, -11) + E:Point(TradeSkillFrame.backdrop, "BOTTOMRIGHT", -32, 74) E:StripTextures(TradeSkillRankFrameBorder) - TradeSkillRankFrame:SetWidth(322) - TradeSkillRankFrame:SetHeight(16) + E:Size(TradeSkillRankFrame, 322, 16) TradeSkillRankFrame:ClearAllPoints() - TradeSkillRankFrame:SetPoint("TOP", -10, -45) + E:Point(TradeSkillRankFrame, "TOP", -10, -45) E:CreateBackdrop(TradeSkillRankFrame) TradeSkillRankFrame:SetStatusBarTexture(E["media"].normTex) TradeSkillRankFrame:SetStatusBarColor(0.13, 0.35, 0.80) @@ -43,7 +42,7 @@ local function LoadSkin() TradeSkillCollapseAllButton.Text = TradeSkillCollapseAllButton:CreateFontString(nil, "OVERLAY") E:FontTemplate(TradeSkillCollapseAllButton.Text, nil, 22) - TradeSkillCollapseAllButton.Text:SetPoint("LEFT", 3, 0) + E:Point(TradeSkillCollapseAllButton.Text, "LEFT", 3, 0) TradeSkillCollapseAllButton.Text:SetText("+") hooksecurefunc(TradeSkillCollapseAllButton, "SetNormalTexture", function(self, texture) @@ -56,14 +55,14 @@ local function LoadSkin() S:HandleDropDownBox(TradeSkillInvSlotDropDown, 140) TradeSkillSubClassDropDown:ClearAllPoints() - TradeSkillInvSlotDropDown:SetPoint("TOPRIGHT", TradeSkillFrame, "TOPRIGHT", -32, -68) + E:Point(TradeSkillInvSlotDropDown, "TOPRIGHT", TradeSkillFrame, "TOPRIGHT", -32, -68) S:HandleDropDownBox(TradeSkillSubClassDropDown, 140) TradeSkillSubClassDropDown:ClearAllPoints() - TradeSkillSubClassDropDown:SetPoint("RIGHT", TradeSkillInvSlotDropDown, "RIGHT", -120, 0) + E:Point(TradeSkillSubClassDropDown, "RIGHT", TradeSkillInvSlotDropDown, "RIGHT", -120, 0) TradeSkillFrameTitleText:ClearAllPoints() - TradeSkillFrameTitleText:SetPoint("TOP", TradeSkillFrame, "TOP", 0, -18) + E:Point(TradeSkillFrameTitleText, "TOP", TradeSkillFrame, "TOP", 0, -18) for i = 1, TRADE_SKILLS_DISPLAYED do local skillButton = _G["TradeSkillSkill"..i] @@ -75,7 +74,7 @@ local function LoadSkin() skillButton.Text = skillButton:CreateFontString(nil, "OVERLAY") E:FontTemplate(skillButton.Text, nil, 22) - skillButton.Text:SetPoint("LEFT", 3, 0) + E:Point(skillButton.Text, "LEFT", 3, 0) skillButton.Text:SetText("+") hooksecurefunc(skillButton, "SetNormalTexture", function(self, texture) @@ -139,9 +138,8 @@ local function LoadSkin() E:SetInside(TradeSkillSkillIcon:GetNormalTexture()) end - TradeSkillSkillIcon:SetWidth(40) - TradeSkillSkillIcon:SetHeight(40) - TradeSkillSkillIcon:SetPoint("TOPLEFT", 2, -3) + E:Size(TradeSkillSkillIcon, 40) + E:Point(TradeSkillSkillIcon, "TOPLEFT", 2, -3) local skillLink = GetTradeSkillItemLink(id) if skillLink then diff --git a/ElvUI/Modules/Skins/Blizzard/Trainer.lua b/ElvUI/Modules/Skins/Blizzard/Trainer.lua index 2f84dbe..25dffc3 100644 --- a/ElvUI/Modules/Skins/Blizzard/Trainer.lua +++ b/ElvUI/Modules/Skins/Blizzard/Trainer.lua @@ -13,15 +13,15 @@ local function LoadSkin() if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.trainer ~= true then return end E:CreateBackdrop(ClassTrainerFrame, "Transparent") - ClassTrainerFrame.backdrop:SetPoint("TOPLEFT", 10, -11) - ClassTrainerFrame.backdrop:SetPoint("BOTTOMRIGHT", -32, 74) + E:Point(ClassTrainerFrame.backdrop, "TOPLEFT", 10, -11) + E:Point(ClassTrainerFrame.backdrop, "BOTTOMRIGHT", -32, 74) E:StripTextures(ClassTrainerFrame, true) E:StripTextures(ClassTrainerExpandButtonFrame) S:HandleDropDownBox(ClassTrainerFrameFilterDropDown) - ClassTrainerFrameFilterDropDown:SetPoint("TOPRIGHT", -40, -64) + E:Point(ClassTrainerFrameFilterDropDown, "TOPRIGHT", -40, -64) E:StripTextures(ClassTrainerListScrollFrame) S:HandleScrollBar(ClassTrainerListScrollFrameScrollBar) @@ -56,7 +56,7 @@ local function LoadSkin() skillButton.Text = skillButton:CreateFontString(nil, "OVERLAY") E:FontTemplate(skillButton.Text, nil, 22) - skillButton.Text:SetPoint("LEFT", 3, 0) + E:Point(skillButton.Text, "LEFT", 3, 0) skillButton.Text:SetText("+") hooksecurefunc(skillButton, "SetNormalTexture", function(self, texture) @@ -79,7 +79,7 @@ local function LoadSkin() ClassTrainerCollapseAllButton.Text = ClassTrainerCollapseAllButton:CreateFontString(nil, "OVERLAY") E:FontTemplate(ClassTrainerCollapseAllButton.Text, nil, 22) - ClassTrainerCollapseAllButton.Text:SetPoint("LEFT", 3, 0) + E:Point(ClassTrainerCollapseAllButton.Text, "LEFT", 3, 0) ClassTrainerCollapseAllButton.Text:SetText("+") hooksecurefunc(ClassTrainerCollapseAllButton, "SetNormalTexture", function(self, texture) diff --git a/ElvUI/Modules/Skins/Blizzard/Tutorial.lua b/ElvUI/Modules/Skins/Blizzard/Tutorial.lua index e164195..1430d51 100644 --- a/ElvUI/Modules/Skins/Blizzard/Tutorial.lua +++ b/ElvUI/Modules/Skins/Blizzard/Tutorial.lua @@ -14,8 +14,7 @@ local function LoadSkin() local button = _G["TutorialFrameAlertButton"..i] local icon = button:GetNormalTexture() - button:SetWidth(35) - button:SetHeight(45) + E:Size(button, 35, 45) E:SetTemplate(button, "Default", true) E:StyleButton(button, nil, true) diff --git a/ElvUI/Modules/Skins/Blizzard/WorldMap.lua b/ElvUI/Modules/Skins/Blizzard/WorldMap.lua index 3884cf4..0db00ec 100644 --- a/ElvUI/Modules/Skins/Blizzard/WorldMap.lua +++ b/ElvUI/Modules/Skins/Blizzard/WorldMap.lua @@ -10,8 +10,8 @@ local function LoadSkin() S:HandleDropDownBox(WorldMapContinentDropDown, 170) S:HandleDropDownBox(WorldMapZoneDropDown, 170) - WorldMapZoneDropDown:SetPoint("LEFT", WorldMapContinentDropDown, "RIGHT", -24, 0) - WorldMapZoomOutButton:SetPoint("LEFT", WorldMapZoneDropDown, "RIGHT", -4, 3) + E:Point(WorldMapZoneDropDown, "LEFT", WorldMapContinentDropDown, "RIGHT", -24, 0) + E:Point(WorldMapZoomOutButton, "LEFT", WorldMapZoneDropDown, "RIGHT", -4, 3) S:HandleButton(WorldMapZoomOutButton) diff --git a/ElvUI/Modules/Skins/Skins.lua b/ElvUI/Modules/Skins/Skins.lua index e163a2b..d3fb6a6 100644 --- a/ElvUI/Modules/Skins/Skins.lua +++ b/ElvUI/Modules/Skins/Skins.lua @@ -87,22 +87,20 @@ function S:HandleScrollBar(frame, thumbTrim) if not _G[name.."ScrollUpButton"].icon then S:HandleNextPrevButton(_G[name.."ScrollUpButton"]) S:SquareButton_SetIcon(_G[name.."ScrollUpButton"], "UP") - _G[name.."ScrollUpButton"]:SetWidth(_G[name.."ScrollUpButton"]:GetWidth() + 7) - _G[name.."ScrollUpButton"]:SetHeight(_G[name.."ScrollUpButton"]:GetHeight() + 7) + E:Size(_G[name.."ScrollUpButton"], _G[name.."ScrollUpButton"]:GetWidth() + 7, _G[name.."ScrollUpButton"]:GetHeight() + 7) end E:StripTextures(_G[name .."ScrollDownButton"]) if not _G[name.."ScrollDownButton"].icon then S:HandleNextPrevButton(_G[name.."ScrollDownButton"]) S:SquareButton_SetIcon(_G[name.."ScrollDownButton"], "DOWN") - _G[name.."ScrollDownButton"]:SetWidth(_G[name.."ScrollDownButton"]:GetWidth() + 7) - _G[name.."ScrollDownButton"]:SetHeight(_G[name.."ScrollDownButton"]:GetHeight() + 7) + E:Size(_G[name.."ScrollDownButton"], _G[name.."ScrollDownButton"]:GetWidth() + 7, _G[name.."ScrollDownButton"]:GetHeight() + 7) end if not frame.trackbg then frame.trackbg = CreateFrame("Frame", nil, frame) - frame.trackbg:SetPoint("TOPLEFT", _G[name .."ScrollUpButton"], "BOTTOMLEFT", 0, -1) - frame.trackbg:SetPoint("BOTTOMRIGHT", _G[name .."ScrollDownButton"], "TOPRIGHT", 0, 1) + E:Point(frame.trackbg, "TOPLEFT", _G[name .."ScrollUpButton"], "BOTTOMLEFT", 0, -1) + E:Point(frame.trackbg, "BOTTOMRIGHT", _G[name .."ScrollDownButton"], "TOPRIGHT", 0, 1) E:SetTemplate(frame.trackbg, "Transparent") end @@ -111,9 +109,9 @@ function S:HandleScrollBar(frame, thumbTrim) frame:GetThumbTexture():SetTexture(nil) if not frame.thumbbg then frame.thumbbg = CreateFrame("Frame", nil, frame) - frame:GetThumbTexture():SetHeight(24) - frame.thumbbg:SetPoint("TOPLEFT", frame:GetThumbTexture(), "TOPLEFT", 1, -thumbTrim) - frame.thumbbg:SetPoint("BOTTOMRIGHT", frame:GetThumbTexture(), "BOTTOMRIGHT", -1, thumbTrim) + E:Height(frame:GetThumbTexture(), 24) + E:Point(frame.thumbbg, "TOPLEFT", frame:GetThumbTexture(), "TOPLEFT", 1, -thumbTrim) + E:Point(frame.thumbbg, "BOTTOMRIGHT", frame:GetThumbTexture(), "BOTTOMRIGHT", -1, thumbTrim) E:SetTemplate(frame.thumbbg, "Default", true, true) frame.thumbbg:SetBackdropColor(0.6, 0.6, 0.6) if frame.trackbg then @@ -151,8 +149,8 @@ function S:HandleTab(tab) tab.backdrop = CreateFrame("Frame", nil, tab) E:SetTemplate(tab.backdrop, "Default") tab.backdrop:SetFrameLevel(tab:GetFrameLevel() - 1) - tab.backdrop:SetPoint("TOPLEFT", 10, E.PixelMode and -1 or -3) - tab.backdrop:SetPoint("BOTTOMRIGHT", -10, 3) + E:Point(tab.backdrop, "TOPLEFT", 10, E.PixelMode and -1 or -3) + E:Point(tab.backdrop, "BOTTOMRIGHT", -10, 3) end function S:HandleNextPrevButton(btn, buttonOverride) @@ -166,19 +164,18 @@ function S:HandleNextPrevButton(btn, buttonOverride) if not btn.icon then btn.icon = btn:CreateTexture(nil, "ARTWORK") - btn.icon:SetWidth(13) - btn.icon:SetHeight(13) - btn.icon:SetPoint("CENTER", 0, 0) + E:Size(btn.icon, 13) + E:Point(btn.icon, "CENTER", 0, 0) btn.icon:SetTexture("Interface\\AddOns\\ElvUI\\Media\\Textures\\SquareButtonTextures.blp") btn.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500) btn:SetScript("OnMouseDown", function() if btn:IsEnabled() == 1 then - this.icon:SetPoint("CENTER", -1, -1) + E:Point(this.icon, "CENTER", -1, -1) end end) btn:SetScript("OnMouseUp", function() - this.icon:SetPoint("CENTER", 0, 0) + E:Point(this.icon, "CENTER", 0, 0) end) hooksecurefunc(btn, "Disable", function(self) @@ -211,14 +208,12 @@ function S:HandleNextPrevButton(btn, buttonOverride) end S:HandleButton(btn) - btn:SetWidth(btn:GetWidth() - 7) - btn:SetHeight(btn:GetHeight() - 7) + E:Size(btn, btn:GetWidth() - 7, btn:GetHeight() - 7) end function S:HandleRotateButton(btn) E:SetTemplate(btn, "Default") - btn:SetWidth(btn:GetWidth() - 14) - btn:SetHeight(btn:GetHeight() - 14) + E:Size(btn, btn:GetWidth() - 14, btn:GetHeight() - 14) btn:GetNormalTexture():SetTexCoord(0.27, 0.73, 0.27, 0.68) btn:GetPushedTexture():SetTexCoord(0.27, 0.73, 0.27, 0.68) @@ -243,7 +238,7 @@ function S:HandleEditBox(frame) if _G[frame:GetName() .."Mid"] then E:Kill(_G[frame:GetName() .."Mid"]) end if gfind(frame:GetName(), "Silver") or gfind(frame:GetName(), "Copper") then - frame.backdrop:SetPoint("BOTTOMRIGHT", -12, -2) + E:Point(frame.backdrop, "BOTTOMRIGHT", -12, -2) end end end @@ -255,22 +250,22 @@ function S:HandleDropDownBox(frame, width) if not width then width = 155 end E:StripTextures(frame) - frame:SetWidth(width) + E:Width(frame, width) if _G[frame:GetName().."Text"] then _G[frame:GetName().."Text"]:ClearAllPoints() - _G[frame:GetName().."Text"]:SetPoint("RIGHT", button, "LEFT", -2, 0) + E:Point(_G[frame:GetName().."Text"], "RIGHT", button, "LEFT", -2, 0) end if button then button:ClearAllPoints() - button:SetPoint("RIGHT", frame, "RIGHT", -10, 3) + E:Point(button, "RIGHT", frame, "RIGHT", -10, 3) self:HandleNextPrevButton(button, true) end E:CreateBackdrop(frame, "Default") - frame.backdrop:SetPoint("TOPLEFT", 20, -2) - frame.backdrop:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", 2, -2) + E:Point(frame.backdrop, "TOPLEFT", 20, -2) + E:Point(frame.backdrop, "BOTTOMRIGHT", button, "BOTTOMRIGHT", 2, -2) frame.backdrop:SetFrameLevel(frame:GetFrameLevel()) end @@ -282,8 +277,7 @@ function S:HandleCheckBox(frame, noBackdrop) if noBackdrop then E:SetTemplate(frame, "Default") - frame:SetWidth(16) - frame:SetHeight(16) + E:Size(frame, 16) else E:CreateBackdrop(frame, "Default") E:SetInside(frame.backdrop, nil, 4, 4) @@ -345,8 +339,8 @@ function S:HandleCloseButton(f, point, text) if not f.backdrop then E:CreateBackdrop(f, "Default", true) - f.backdrop:SetPoint("TOPLEFT", 7, -8) - f.backdrop:SetPoint("BOTTOMRIGHT", -8, 8) + E:Point(f.backdrop, "TOPLEFT", 7, -8) + E:Point(f.backdrop, "BOTTOMRIGHT", -8, 8) HookScript(f, "OnEnter", function() S:SetModifiedBackdrop(this) end) HookScript(f, "OnLeave", function() S:SetOriginalBackdrop(this) end) @@ -357,11 +351,11 @@ function S:HandleCloseButton(f, point, text) f.text:SetFont([[Interface\AddOns\ElvUI\Media\Fonts\PT_Sans_Narrow.ttf]], 16, "OUTLINE") f.text:SetText(text) f.text:SetJustifyH("CENTER") - f.text:SetPoint("CENTER", f, "CENTER", -1, 1) + E:Point(f.text, "CENTER", f, "CENTER", -1, 1) end if point then - f:SetPoint("TOPRIGHT", point, "TOPRIGHT", 2, 2) + E:Point(f, "TOPRIGHT", point, "TOPRIGHT", 2, 2) end end @@ -378,18 +372,17 @@ function S:HandleSliderFrame(frame) end) frame:SetThumbTexture(E["media"].blankTex) frame:GetThumbTexture():SetVertexColor(0.3, 0.3, 0.3) - frame:GetThumbTexture():SetWidth(SIZE-2) - frame:GetThumbTexture():SetHeight(SIZE-2) + E:Size(frame:GetThumbTexture(), SIZE-2) if orientation == "VERTICAL" then - frame:SetWidth(SIZE) + E:Width(frame, SIZE) else - frame:SetHeight(SIZE) + E:Height(frame, SIZE) for _, region in ipairs({frame:GetRegions()}) do if region and region:GetObjectType() == "FontString" then local point, anchor, anchorPoint, x, y = region:GetPoint() if find(anchorPoint, "BOTTOM") then - region:SetPoint(point, anchor, anchorPoint, x, y - 4) + E:Point(region, point, anchor, anchorPoint, x, y - 4) end end end @@ -399,7 +392,7 @@ function S:HandleSliderFrame(frame) if region and region:GetObjectType() == "FontString" then local point, anchor, anchorPoint, x, y = region:GetPoint() if anchorPoint:find("BOTTOM") then - region:SetPoint(point, anchor, anchorPoint, x, y - 4) + E:Point(region, point, anchor, anchorPoint, x, y - 4) end end end]] @@ -422,8 +415,8 @@ function S:HandleIconSelectionFrame(frame, numIcons, buttonNameTemplate, frameNa editBox:DisableDrawLayer("BACKGROUND") --Removes textures around it E:CreateBackdrop(frame, "Transparent") - frame.backdrop:SetPoint("TOPLEFT", frame, "TOPLEFT", 10, -12) - frame.backdrop:SetPoint("BOTTOMRIGHT", cancelButton, "BOTTOMRIGHT", 5, -5) + E:Point(frame.backdrop, "TOPLEFT", frame, "TOPLEFT", 10, -12) + E:Point(frame.backdrop, "BOTTOMRIGHT", cancelButton, "BOTTOMRIGHT", 5, -5) S:HandleButton(okayButton) S:HandleButton(cancelButton) diff --git a/ElvUI/Modules/Tooltip/Tooltip.lua b/ElvUI/Modules/Tooltip/Tooltip.lua index 380feae..5ac8d80 100644 --- a/ElvUI/Modules/Tooltip/Tooltip.lua +++ b/ElvUI/Modules/Tooltip/Tooltip.lua @@ -72,22 +72,22 @@ function TT:GameTooltip_SetDefaultAnchor(tt, parent) if not E:HasMoverBeenMoved("TooltipMover") then if ElvUI_ContainerFrame and ElvUI_ContainerFrame:IsShown() then - tt:SetPoint("BOTTOMRIGHT", ElvUI_ContainerFrame, "TOPRIGHT", 0, 18) + E:Point(tt, "BOTTOMRIGHT", ElvUI_ContainerFrame, "TOPRIGHT", 0, 18) elseif RightChatPanel:GetAlpha() == 1 and RightChatPanel:IsShown() then - tt:SetPoint("BOTTOMRIGHT", RightChatPanel, "TOPRIGHT", 0, 18) + E:Point(tt, "BOTTOMRIGHT", RightChatPanel, "TOPRIGHT", 0, 18) else - tt:SetPoint("BOTTOMRIGHT", RightChatPanel, "BOTTOMRIGHT", 0, 18) + E:Point(tt, "BOTTOMRIGHT", RightChatPanel, "BOTTOMRIGHT", 0, 18) end else local point = E:GetScreenQuadrant(TooltipMover) if point == "TOPLEFT" then - tt:SetPoint("TOPLEFT", TooltipMover) + E:Point(tt, "TOPLEFT", TooltipMover) elseif point == "TOPRIGHT" then - tt:SetPoint("TOPRIGHT", TooltipMover) + E:Point(tt, "TOPRIGHT", TooltipMover) elseif point == "BOTTOMLEFT" or point == "LEFT" then - tt:SetPoint("BOTTOMLEFT", TooltipMover) + E:Point(tt, "BOTTOMLEFT", TooltipMover) else - tt:SetPoint("BOTTOMRIGHT", TooltipMover) + E:Point(tt, "BOTTOMRIGHT", TooltipMover) end end end @@ -304,10 +304,10 @@ function TT:Initialize() if E.private.tooltip.enable ~= true then return end E.Tooltip = TT - GameTooltipStatusBar:SetHeight(self.db.healthBar.height) + E:Height(GameTooltipStatusBar, self.db.healthBar.height) GameTooltipStatusBar:SetScript("OnValueChanged", nil) GameTooltipStatusBar.text = GameTooltipStatusBar:CreateFontString(nil, "OVERLAY") - GameTooltipStatusBar.text:SetPoint("CENTER", GameTooltipStatusBar, 0, -3) + E:Point(GameTooltipStatusBar.text, "CENTER", GameTooltipStatusBar, 0, -3) E:FontTemplate(GameTooltipStatusBar.text, E.LSM:Fetch("font", self.db.healthBar.font), self.db.healthBar.fontSize, self.db.healthBar.fontOutline) if not GameTooltip.hasMoney then diff --git a/ElvUI/Modules/UnitFrames/UnitFrames.lua b/ElvUI/Modules/UnitFrames/UnitFrames.lua index c63457f..78cc67d 100644 --- a/ElvUI/Modules/UnitFrames/UnitFrames.lua +++ b/ElvUI/Modules/UnitFrames/UnitFrames.lua @@ -462,13 +462,13 @@ function UF.groupPrototype:Configure_Groups(self) if math.mod(i - 1, db.groupsPerRowCol) == 0 then if DIRECTION_TO_POINT[direction] == "LEFT" or DIRECTION_TO_POINT[direction] == "RIGHT" then if group then - group:SetPoint(point, self, point, 0, height * yMult) + E:Point(group, point, self, point, 0, height * yMult) end height = height + UNIT_HEIGHT + db.verticalSpacing newRows = newRows + 1 else if group then - group:SetPoint(point, self, point, width * xMult, 0) + E:Point(group, point, self, point, width * xMult, 0) end width = width + db.width + db.horizontalSpacing @@ -478,22 +478,22 @@ function UF.groupPrototype:Configure_Groups(self) if DIRECTION_TO_POINT[direction] == "LEFT" or DIRECTION_TO_POINT[direction] == "RIGHT" then if newRows == 1 then if group then - group:SetPoint(point, self, point, width * xMult, 0) + E:Point(group, point, self, point, width * xMult, 0) end width = width + ((db.width + db.horizontalSpacing) * 5) newCols = newCols + 1 elseif group then - group:SetPoint(point, self, point, (((db.width + db.horizontalSpacing) * 5) * (math.mod(i-1, db.groupsPerRowCol))) * xMult, ((UNIT_HEIGHT + db.verticalSpacing) * (newRows - 1)) * yMult) + E:Point(group, point, self, point, (((db.width + db.horizontalSpacing) * 5) * (math.mod(i-1, db.groupsPerRowCol))) * xMult, ((UNIT_HEIGHT + db.verticalSpacing) * (newRows - 1)) * yMult) end else if newCols == 1 then if group then - group:SetPoint(point, self, point, 0, height * yMult) + E:Point(group, point, self, point, 0, height * yMult) end height = height + ((UNIT_HEIGHT + db.verticalSpacing) * 5) newRows = newRows + 1 elseif group then - group:SetPoint(point, self, point, ((db.width + db.horizontalSpacing) * (newCols - 1)) * xMult, (((UNIT_HEIGHT + db.verticalSpacing) * 5) * (math.mod(i-1, db.groupsPerRowCol))) * yMult) + E:Point(group, point, self, point, ((db.width + db.horizontalSpacing) * (newCols - 1)) * xMult, (((UNIT_HEIGHT + db.verticalSpacing) * 5) * (math.mod(i-1, db.groupsPerRowCol))) * yMult) end end end @@ -516,8 +516,7 @@ function UF.groupPrototype:Configure_Groups(self) self:GetScript("OnSizeChanged")(self) --Mover size is not updated if frame is hidden, so call an update manually end - self:SetWidth(width - db.horizontalSpacing) - self:SetHeight(height - db.verticalSpacing) + E:Size(self, width - db.horizontalSpacing, height - db.verticalSpacing) end function UF.groupPrototype:Update(self) @@ -1037,13 +1036,13 @@ function UF:ToggleTransparentStatusBar(isTransparent, statusBar, backdropTex, ad backdropTex:ClearAllPoints() if statusBarOrientation == "VERTICAL" then - backdropTex:SetPoint("TOPLEFT", statusBar, "TOPLEFT") - backdropTex:SetPoint("BOTTOMLEFT", statusBarTex, "TOPLEFT") - backdropTex:SetPoint("BOTTOMRIGHT", statusBarTex, "TOPRIGHT") + E:Point(backdropTex, "TOPLEFT", statusBar, "TOPLEFT") + E:Point(backdropTex, "BOTTOMLEFT", statusBarTex, "TOPLEFT") + E:Point(backdropTex, "BOTTOMRIGHT", statusBarTex, "TOPRIGHT") else - backdropTex:SetPoint("TOPLEFT", statusBarTex, "TOPRIGHT") - backdropTex:SetPoint("BOTTOMLEFT", statusBarTex, "BOTTOMRIGHT") - backdropTex:SetPoint("BOTTOMRIGHT", statusBar, "BOTTOMRIGHT") + E:Point(backdropTex, "TOPLEFT", statusBarTex, "TOPRIGHT") + E:Point(backdropTex, "BOTTOMLEFT", statusBarTex, "BOTTOMRIGHT") + E:Point(backdropTex, "BOTTOMRIGHT", statusBar, "BOTTOMRIGHT") end if invertBackdropTex then @@ -1072,13 +1071,13 @@ function UF:ToggleTransparentStatusBar(isTransparent, statusBar, backdropTex, ad if adjustBackdropPoints then backdropTex:ClearAllPoints() if statusBarOrientation == "VERTICAL" then - backdropTex:SetPoint("TOPLEFT", statusBar, "TOPLEFT") - backdropTex:SetPoint("BOTTOMLEFT", statusBarTex, "TOPLEFT") - backdropTex:SetPoint("BOTTOMRIGHT", statusBarTex, "TOPRIGHT") + E:Point(backdropTex, "TOPLEFT", statusBar, "TOPLEFT") + E:Point(backdropTex, "BOTTOMLEFT", statusBarTex, "TOPLEFT") + E:Point(backdropTex, "BOTTOMRIGHT", statusBarTex, "TOPRIGHT") else - backdropTex:SetPoint("TOPLEFT", statusBarTex, "TOPRIGHT") - backdropTex:SetPoint("BOTTOMLEFT", statusBarTex, "BOTTOMRIGHT") - backdropTex:SetPoint("BOTTOMRIGHT", statusBar, "BOTTOMRIGHT") + E:Point(backdropTex, "TOPLEFT", statusBarTex, "TOPRIGHT") + E:Point(backdropTex, "BOTTOMLEFT", statusBarTex, "BOTTOMRIGHT") + E:Point(backdropTex, "BOTTOMRIGHT", statusBar, "BOTTOMRIGHT") end end diff --git a/ElvUI/Modules/UnitFrames/Units/Target.lua b/ElvUI/Modules/UnitFrames/Units/Target.lua index ce6baf7..fce91f6 100644 --- a/ElvUI/Modules/UnitFrames/Units/Target.lua +++ b/ElvUI/Modules/UnitFrames/Units/Target.lua @@ -23,7 +23,7 @@ function UF:Construct_TargetFrame(frame) frame.RaidTargetIndicator = UF:Construct_RaidIcon(frame) frame.InfoPanel = self:Construct_InfoPanel(frame) - frame:SetPoint("BOTTOMRIGHT", E.UIParent, "BOTTOM", 413, 68) + E:Point(frame, "BOTTOMRIGHT", E.UIParent, "BOTTOM", 413, 68) E:CreateMover(frame, frame:GetName().."Mover", L["Target Frame"], nil, nil, nil, "ALL,SOLO") frame.unitframeType = "target" end @@ -72,10 +72,8 @@ function UF:Update_TargetFrame(frame, db) frame.Portrait = frame.Portrait or (db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D) frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp") - frame:SetWidth(frame.UNIT_WIDTH) - frame:SetHeight(frame.UNIT_HEIGHT) - _G[frame:GetName().."Mover"]:SetWidth(frame:GetWidth()) - _G[frame:GetName().."Mover"]:SetHeight(frame:GetHeight()) + E:Size(frame, frame.UNIT_WIDTH, frame.UNIT_HEIGHT) + E:Size(_G[frame:GetName().."Mover"], frame:GetWidth(), frame:GetHeight()) UF:Configure_InfoPanel(frame) diff --git a/ElvUI/Modules/UnitFrames/Units/TargetTarget.lua b/ElvUI/Modules/UnitFrames/Units/TargetTarget.lua index 0b298e5..c517f1d 100644 --- a/ElvUI/Modules/UnitFrames/Units/TargetTarget.lua +++ b/ElvUI/Modules/UnitFrames/Units/TargetTarget.lua @@ -18,7 +18,7 @@ function UF:Construct_TargetTargetFrame(frame) frame.RaidTargetIndicator = UF:Construct_RaidIcon(frame) frame.InfoPanel = self:Construct_InfoPanel(frame) - frame:SetPoint("BOTTOM", E.UIParent, "BOTTOM", 0, 75) + E:Point(frame, "BOTTOM", E.UIParent, "BOTTOM", 0, 75) E:CreateMover(frame, frame:GetName().."Mover", L["TargetTarget Frame"], nil, nil, nil, "ALL,SOLO") frame.unitframeType = "targettarget"; end @@ -57,10 +57,8 @@ function UF:Update_TargetTargetFrame(frame, db) frame.Portrait = frame.Portrait or (db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D) frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp") frame:RegisterForClicks("LeftButtonUp", "RightButtonUp") - frame:SetWidth(frame.UNIT_WIDTH) - frame:SetHeight(frame.UNIT_HEIGHT) - _G[frame:GetName().."Mover"]:SetWidth(frame:GetWidth()) - _G[frame:GetName().."Mover"]:SetHeight(frame:GetHeight()) + E:Size(frame, frame.UNIT_WIDTH, frame.UNIT_HEIGHT) + E:Size(_G[frame:GetName().."Mover"], frame:GetWidth(), frame:GetHeight()) UF:Configure_InfoPanel(frame)