From a35194228381fe12a2aa33ca0be91bc8c0070e75 Mon Sep 17 00:00:00 2001 From: Bunny67 Date: Sun, 8 Jul 2018 22:44:56 +0300 Subject: [PATCH] update --- ElvUI/Core/Config.lua | 16 ++++++------- ElvUI/Core/Movers.lua | 4 ++-- ElvUI/Core/distributor.lua | 2 +- ElvUI/Core/pixelperfect.lua | 2 +- ElvUI/Modules/Bags/Sort.lua | 2 +- ElvUI/Modules/Misc/Loot.lua | 4 ++-- ElvUI/Modules/NamePlates/NamePlates.lua | 2 +- ElvUI/Modules/Skins/Blizzard/QuestTimers.lua | 2 +- ElvUI/Modules/Skins/Skins.lua | 6 ++--- ElvUI/Modules/Tooltip/Tooltip.lua | 8 +++---- ElvUI/Modules/UnitFrames/UnitFrames.lua | 24 ++++++++++---------- 11 files changed, 36 insertions(+), 36 deletions(-) diff --git a/ElvUI/Core/Config.lua b/ElvUI/Core/Config.lua index 23aa9c1..10bcde1 100644 --- a/ElvUI/Core/Config.lua +++ b/ElvUI/Core/Config.lua @@ -215,7 +215,7 @@ function E:CreateMoverPopup() local header = CreateFrame("Button", nil, f) E:SetTemplate(header, "Default", true) E:Size(header, 100, 25) - E:Point(header, "CENTER", f, "TOP") + header:SetPoint("CENTER", f, "TOP") header:SetFrameLevel(header:GetFrameLevel() + 2) header:EnableMouse(true) header:RegisterForClicks("AnyUp", "AnyDown") @@ -224,7 +224,7 @@ function E:CreateMoverPopup() local title = header:CreateFontString("OVERLAY") E:FontTemplate(title) - E:Point(title, "CENTER", header, "CENTER") + title:SetPoint("CENTER", header, "CENTER") title:SetText("ElvUI") local desc = f:CreateFontString("ARTWORK") @@ -334,12 +334,12 @@ function E:CreateMoverPopup() header = CreateFrame("Button", "ElvUIMoverNudgeWindowHeader", nudgeFrame) E:SetTemplate(header, "Default", true) E:Size(header, 100, 25) - E:Point(header, "CENTER", nudgeFrame, "TOP") + header:SetPoint("CENTER", nudgeFrame, "TOP") header:SetFrameLevel(header:GetFrameLevel() + 2) title = header:CreateFontString("OVERLAY") E:FontTemplate(title) - E:Point(title, "CENTER", header, "CENTER") + title:SetPoint("CENTER", header, "CENTER") title:SetText(L["Nudge"]) header.title = title @@ -429,7 +429,7 @@ function E:CreateMoverPopup() end) upButton.icon = upButton:CreateTexture(nil, "ARTWORK") E:Size(upButton.icon, 13) - E:Point(upButton.icon, "CENTER", 0, 0) + upButton.icon:SetPoint("CENTER", 0, 0) upButton.icon:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]]) upButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500) @@ -444,7 +444,7 @@ function E:CreateMoverPopup() end) downButton.icon = downButton:CreateTexture(nil, "ARTWORK") E:Size(downButton.icon, 13) - E:Point(downButton.icon, "CENTER", 0, 0) + downButton.icon:SetPoint("CENTER", 0, 0) downButton.icon:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]]) downButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500) @@ -459,7 +459,7 @@ function E:CreateMoverPopup() end) leftButton.icon = leftButton:CreateTexture(nil, "ARTWORK") E:Size(leftButton.icon, 13) - E:Point(leftButton.icon, "CENTER", 0, 0) + leftButton.icon:SetPoint("CENTER", 0, 0) leftButton.icon:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]]) leftButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500) @@ -474,7 +474,7 @@ function E:CreateMoverPopup() end) rightButton.icon = rightButton:CreateTexture(nil, "ARTWORK") E:Size(rightButton.icon, 13) - E:Point(rightButton.icon, "CENTER", 0, 0) + rightButton.icon:SetPoint("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/Movers.lua b/ElvUI/Core/Movers.lua index 14b1cf2..946b77a 100644 --- a/ElvUI/Core/Movers.lua +++ b/ElvUI/Core/Movers.lua @@ -79,7 +79,7 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh local fs = f:CreateFontString(nil, "OVERLAY") E:FontTemplate(fs) fs:SetJustifyH("CENTER") - E:Point(fs, "CENTER", f) + fs:SetPoint("CENTER", f) fs:SetText(text or name) fs:SetTextColor(unpack(E["media"].rgbvaluecolor)) f:SetFontString(fs) @@ -214,7 +214,7 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh parent.mover = f parent:ClearAllPoints() - E:Point(parent, point, f, 0, 0) + parent:SetPoint(point, f) if postdrag ~= nil and type(postdrag) == "function" then f:RegisterEvent("PLAYER_ENTERING_WORLD") diff --git a/ElvUI/Core/distributor.lua b/ElvUI/Core/distributor.lua index c3db5b6..8604652 100644 --- a/ElvUI/Core/distributor.lua +++ b/ElvUI/Core/distributor.lua @@ -38,7 +38,7 @@ function D:Initialize() E:Size(self.statusBar, 250, 18) self.statusBar.text = self.statusBar:CreateFontString(nil, "OVERLAY") E:FontTemplate(self.statusBar.text) - E:Point(self.statusBar.text, "CENTER", 0, 0) + self.statusBar.text:SetPoint("CENTER", 0, 0) self.statusBar:Hide() end diff --git a/ElvUI/Core/pixelperfect.lua b/ElvUI/Core/pixelperfect.lua index 5bb37d0..3bd97fc 100644 --- a/ElvUI/Core/pixelperfect.lua +++ b/ElvUI/Core/pixelperfect.lua @@ -103,7 +103,7 @@ function E:UIScale(event) end self.UIParent:ClearAllPoints() - E:Point(self.UIParent, "CENTER", UIParent) + self.UIParent:SetPoint("CENTER", UIParent) self.diffGetLeft = E:Round(abs(UIParent:GetLeft() - self.UIParent:GetLeft())) self.diffGetRight = E:Round(abs(UIParent:GetRight() - self.UIParent:GetRight())) diff --git a/ElvUI/Modules/Bags/Sort.lua b/ElvUI/Modules/Bags/Sort.lua index ac45afe..d330387 100644 --- a/ElvUI/Modules/Bags/Sort.lua +++ b/ElvUI/Modules/Bags/Sort.lua @@ -393,7 +393,7 @@ function B:CanItemGoInBag(bag, slot, targetBag) end local bagFamily = GetItemFamily(targetBag) if itemFamily then - return (bagFamily == 0) or itemFamily == bagFamily + return (bagFamily == 0) or band(itemFamily, bagFamily) > 0 else return false end diff --git a/ElvUI/Modules/Misc/Loot.lua b/ElvUI/Modules/Misc/Loot.lua index ef744a2..1b23d90 100644 --- a/ElvUI/Modules/Misc/Loot.lua +++ b/ElvUI/Modules/Misc/Loot.lua @@ -106,7 +106,7 @@ local function createSlot(id) local iconFrame = CreateFrame("Frame", nil, frame) E:Size(iconFrame, iconSize - 2) - E:Point(iconFrame, "RIGHT", frame) + iconFrame:SetPoint("RIGHT", frame) E:SetTemplate(iconFrame, "Default") frame.iconFrame = iconFrame E["frames"][iconFrame] = nil @@ -279,7 +279,7 @@ function M:LoadLoot() lootFrame = CreateFrame("Button", "ElvLootFrame", lootFrameHolder) lootFrame:SetClampedToScreen(true) - E:Point(lootFrame, "TOPLEFT", 0, 0) + lootFrame:SetPoint("TOPLEFT", 0, 0) E:Size(lootFrame, 256, 64) E:SetTemplate(lootFrame, "Transparent") lootFrame:SetFrameStrata("FULLSCREEN") diff --git a/ElvUI/Modules/NamePlates/NamePlates.lua b/ElvUI/Modules/NamePlates/NamePlates.lua index 3f9a884..66baf81 100644 --- a/ElvUI/Modules/NamePlates/NamePlates.lua +++ b/ElvUI/Modules/NamePlates/NamePlates.lua @@ -480,7 +480,7 @@ function mod:OnCreated(frame) frame.UnitFrame = CreateFrame("Button", nil, frame) E:Size(frame.UnitFrame, 100, 20) - E:Point(frame.UnitFrame, "CENTER", 0, 0) + frame.UnitFrame:SetPoint("CENTER", 0, 0) frame.UnitFrame:SetScript("OnEvent", self.OnEvent) frame.UnitFrame:SetScript("OnClick", function() frame:Click() diff --git a/ElvUI/Modules/Skins/Blizzard/QuestTimers.lua b/ElvUI/Modules/Skins/Blizzard/QuestTimers.lua index 0f983bf..9863de3 100644 --- a/ElvUI/Modules/Skins/Blizzard/QuestTimers.lua +++ b/ElvUI/Modules/Skins/Blizzard/QuestTimers.lua @@ -21,7 +21,7 @@ local function LoadSkin() local QuestTimerFrameHolder = CreateFrame("Frame", "QuestTimerFrameHolder", E.UIParent) E:Size(QuestTimerFrameHolder, 150, 22) - E:Point(QuestTimerFrameHolder, "TOP", QuestTimerFrameMover, "TOP") + QuestTimerFrameHolder:SetPoint("TOP", QuestTimerFrameMover, "TOP") hooksecurefunc(QuestTimerFrame, "SetPoint", function(_, _, parent) if parent ~= QuestTimerFrameHolder then diff --git a/ElvUI/Modules/Skins/Skins.lua b/ElvUI/Modules/Skins/Skins.lua index f597e0f..4b928d6 100644 --- a/ElvUI/Modules/Skins/Skins.lua +++ b/ElvUI/Modules/Skins/Skins.lua @@ -81,13 +81,13 @@ function S:HandleButtonHighlight(frame) local leftGrad = frame:CreateTexture(nil, "HIGHLIGHT") E:Size(leftGrad, frame:GetWidth() * 0.5, frame:GetHeight() * 0.95) - E:Point(leftGrad, "LEFT", frame, "CENTER") + leftGrad:SetPoint("LEFT", frame, "CENTER") leftGrad:SetTexture(E.media.blankTex) leftGrad:SetGradientAlpha("Horizontal", 0.9, 0.9, 0.9, 0.35, 0.9, 0.9, 0.9, 0) local rightGrad = frame:CreateTexture(nil, "HIGHLIGHT") E:Size(rightGrad, frame:GetWidth() * 0.5, frame:GetHeight() * 0.95) - E:Point(rightGrad, "RIGHT", frame, "CENTER") + rightGrad:SetPoint("RIGHT", frame, "CENTER") rightGrad:SetTexture(E.media.blankTex) rightGrad:SetGradientAlpha("Horizontal", 0.9, 0.9, 0.9, 0, 0.9, 0.9, 0.9, 0.35) end @@ -183,7 +183,7 @@ function S:HandleNextPrevButton(btn, buttonOverride) if not btn.icon then btn.icon = btn:CreateTexture(nil, "ARTWORK") E:Size(btn.icon, 13) - E:Point(btn.icon, "CENTER", 0, 0) + btn.icon:SetPoint("CENTER", 0, 0) btn.icon:SetTexture("Interface\\AddOns\\ElvUI\\Media\\Textures\\SquareButtonTextures.blp") btn.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500) diff --git a/ElvUI/Modules/Tooltip/Tooltip.lua b/ElvUI/Modules/Tooltip/Tooltip.lua index 5ac8d80..56fd017 100644 --- a/ElvUI/Modules/Tooltip/Tooltip.lua +++ b/ElvUI/Modules/Tooltip/Tooltip.lua @@ -81,13 +81,13 @@ function TT:GameTooltip_SetDefaultAnchor(tt, parent) else local point = E:GetScreenQuadrant(TooltipMover) if point == "TOPLEFT" then - E:Point(tt, "TOPLEFT", TooltipMover) + tt:SetPoint("TOPLEFT", TooltipMover) elseif point == "TOPRIGHT" then - E:Point(tt, "TOPRIGHT", TooltipMover) + tt:SetPoint("TOPRIGHT", TooltipMover) elseif point == "BOTTOMLEFT" or point == "LEFT" then - E:Point(tt, "BOTTOMLEFT", TooltipMover) + tt:SetPoint("BOTTOMLEFT", TooltipMover) else - E:Point(tt, "BOTTOMRIGHT", TooltipMover) + tt:SetPoint("BOTTOMRIGHT", TooltipMover) end end end diff --git a/ElvUI/Modules/UnitFrames/UnitFrames.lua b/ElvUI/Modules/UnitFrames/UnitFrames.lua index c7341e5..e8273ac 100644 --- a/ElvUI/Modules/UnitFrames/UnitFrames.lua +++ b/ElvUI/Modules/UnitFrames/UnitFrames.lua @@ -1035,13 +1035,13 @@ function UF:ToggleTransparentStatusBar(isTransparent, statusBar, backdropTex, ad backdropTex:ClearAllPoints() if statusBarOrientation == "VERTICAL" then - E:Point(backdropTex, "TOPLEFT", statusBar, "TOPLEFT") - E:Point(backdropTex, "BOTTOMLEFT", statusBarTex, "TOPLEFT") - E:Point(backdropTex, "BOTTOMRIGHT", statusBarTex, "TOPRIGHT") + backdropTex:SetPoint("TOPLEFT", statusBar, "TOPLEFT") + backdropTex:SetPoint("BOTTOMLEFT", statusBarTex, "TOPLEFT") + backdropTex:SetPoint("BOTTOMRIGHT", statusBarTex, "TOPRIGHT") else - E:Point(backdropTex, "TOPLEFT", statusBarTex, "TOPRIGHT") - E:Point(backdropTex, "BOTTOMLEFT", statusBarTex, "BOTTOMRIGHT") - E:Point(backdropTex, "BOTTOMRIGHT", statusBar, "BOTTOMRIGHT") + backdropTex:SetPoint("TOPLEFT", statusBarTex, "TOPRIGHT") + backdropTex:SetPoint("BOTTOMLEFT", statusBarTex, "BOTTOMRIGHT") + backdropTex:SetPoint("BOTTOMRIGHT", statusBar, "BOTTOMRIGHT") end if invertBackdropTex then @@ -1070,13 +1070,13 @@ function UF:ToggleTransparentStatusBar(isTransparent, statusBar, backdropTex, ad if adjustBackdropPoints then backdropTex:ClearAllPoints() if statusBarOrientation == "VERTICAL" then - E:Point(backdropTex, "TOPLEFT", statusBar, "TOPLEFT") - E:Point(backdropTex, "BOTTOMLEFT", statusBarTex, "TOPLEFT") - E:Point(backdropTex, "BOTTOMRIGHT", statusBarTex, "TOPRIGHT") + backdropTex:SetPoint("TOPLEFT", statusBar, "TOPLEFT") + backdropTex:SetPoint("BOTTOMLEFT", statusBarTex, "TOPLEFT") + backdropTex:SetPoint("BOTTOMRIGHT", statusBarTex, "TOPRIGHT") else - E:Point(backdropTex, "TOPLEFT", statusBarTex, "TOPRIGHT") - E:Point(backdropTex, "BOTTOMLEFT", statusBarTex, "BOTTOMRIGHT") - E:Point(backdropTex, "BOTTOMRIGHT", statusBar, "BOTTOMRIGHT") + backdropTex:SetPoint("TOPLEFT", statusBarTex, "TOPRIGHT") + backdropTex:SetPoint("BOTTOMLEFT", statusBarTex, "BOTTOMRIGHT") + backdropTex:SetPoint("BOTTOMRIGHT", statusBar, "BOTTOMRIGHT") end end