This commit is contained in:
Bunny67
2018-07-08 22:44:56 +03:00
parent b2e551a37c
commit a351942283
11 changed files with 36 additions and 36 deletions
+8 -8
View File
@@ -215,7 +215,7 @@ function E:CreateMoverPopup()
local header = CreateFrame("Button", nil, f) local header = CreateFrame("Button", nil, f)
E:SetTemplate(header, "Default", true) E:SetTemplate(header, "Default", true)
E:Size(header, 100, 25) E:Size(header, 100, 25)
E:Point(header, "CENTER", f, "TOP") header:SetPoint("CENTER", f, "TOP")
header:SetFrameLevel(header:GetFrameLevel() + 2) header:SetFrameLevel(header:GetFrameLevel() + 2)
header:EnableMouse(true) header:EnableMouse(true)
header:RegisterForClicks("AnyUp", "AnyDown") header:RegisterForClicks("AnyUp", "AnyDown")
@@ -224,7 +224,7 @@ function E:CreateMoverPopup()
local title = header:CreateFontString("OVERLAY") local title = header:CreateFontString("OVERLAY")
E:FontTemplate(title) E:FontTemplate(title)
E:Point(title, "CENTER", header, "CENTER") title:SetPoint("CENTER", header, "CENTER")
title:SetText("ElvUI") title:SetText("ElvUI")
local desc = f:CreateFontString("ARTWORK") local desc = f:CreateFontString("ARTWORK")
@@ -334,12 +334,12 @@ function E:CreateMoverPopup()
header = CreateFrame("Button", "ElvUIMoverNudgeWindowHeader", nudgeFrame) header = CreateFrame("Button", "ElvUIMoverNudgeWindowHeader", nudgeFrame)
E:SetTemplate(header, "Default", true) E:SetTemplate(header, "Default", true)
E:Size(header, 100, 25) E:Size(header, 100, 25)
E:Point(header, "CENTER", nudgeFrame, "TOP") header:SetPoint("CENTER", nudgeFrame, "TOP")
header:SetFrameLevel(header:GetFrameLevel() + 2) header:SetFrameLevel(header:GetFrameLevel() + 2)
title = header:CreateFontString("OVERLAY") title = header:CreateFontString("OVERLAY")
E:FontTemplate(title) E:FontTemplate(title)
E:Point(title, "CENTER", header, "CENTER") title:SetPoint("CENTER", header, "CENTER")
title:SetText(L["Nudge"]) title:SetText(L["Nudge"])
header.title = title header.title = title
@@ -429,7 +429,7 @@ function E:CreateMoverPopup()
end) end)
upButton.icon = upButton:CreateTexture(nil, "ARTWORK") upButton.icon = upButton:CreateTexture(nil, "ARTWORK")
E:Size(upButton.icon, 13) 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:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]])
upButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500) upButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500)
@@ -444,7 +444,7 @@ function E:CreateMoverPopup()
end) end)
downButton.icon = downButton:CreateTexture(nil, "ARTWORK") downButton.icon = downButton:CreateTexture(nil, "ARTWORK")
E:Size(downButton.icon, 13) 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:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]])
downButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500) downButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500)
@@ -459,7 +459,7 @@ function E:CreateMoverPopup()
end) end)
leftButton.icon = leftButton:CreateTexture(nil, "ARTWORK") leftButton.icon = leftButton:CreateTexture(nil, "ARTWORK")
E:Size(leftButton.icon, 13) 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:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]])
leftButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500) leftButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500)
@@ -474,7 +474,7 @@ function E:CreateMoverPopup()
end) end)
rightButton.icon = rightButton:CreateTexture(nil, "ARTWORK") rightButton.icon = rightButton:CreateTexture(nil, "ARTWORK")
E:Size(rightButton.icon, 13) 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:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]])
rightButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500) rightButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500)
+2 -2
View File
@@ -79,7 +79,7 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh
local fs = f:CreateFontString(nil, "OVERLAY") local fs = f:CreateFontString(nil, "OVERLAY")
E:FontTemplate(fs) E:FontTemplate(fs)
fs:SetJustifyH("CENTER") fs:SetJustifyH("CENTER")
E:Point(fs, "CENTER", f) fs:SetPoint("CENTER", f)
fs:SetText(text or name) fs:SetText(text or name)
fs:SetTextColor(unpack(E["media"].rgbvaluecolor)) fs:SetTextColor(unpack(E["media"].rgbvaluecolor))
f:SetFontString(fs) f:SetFontString(fs)
@@ -214,7 +214,7 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh
parent.mover = f parent.mover = f
parent:ClearAllPoints() parent:ClearAllPoints()
E:Point(parent, point, f, 0, 0) parent:SetPoint(point, f)
if postdrag ~= nil and type(postdrag) == "function" then if postdrag ~= nil and type(postdrag) == "function" then
f:RegisterEvent("PLAYER_ENTERING_WORLD") f:RegisterEvent("PLAYER_ENTERING_WORLD")
+1 -1
View File
@@ -38,7 +38,7 @@ function D:Initialize()
E:Size(self.statusBar, 250, 18) E:Size(self.statusBar, 250, 18)
self.statusBar.text = self.statusBar:CreateFontString(nil, "OVERLAY") self.statusBar.text = self.statusBar:CreateFontString(nil, "OVERLAY")
E:FontTemplate(self.statusBar.text) E:FontTemplate(self.statusBar.text)
E:Point(self.statusBar.text, "CENTER", 0, 0) self.statusBar.text:SetPoint("CENTER", 0, 0)
self.statusBar:Hide() self.statusBar:Hide()
end end
+1 -1
View File
@@ -103,7 +103,7 @@ function E:UIScale(event)
end end
self.UIParent:ClearAllPoints() 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.diffGetLeft = E:Round(abs(UIParent:GetLeft() - self.UIParent:GetLeft()))
self.diffGetRight = E:Round(abs(UIParent:GetRight() - self.UIParent:GetRight())) self.diffGetRight = E:Round(abs(UIParent:GetRight() - self.UIParent:GetRight()))
+1 -1
View File
@@ -393,7 +393,7 @@ function B:CanItemGoInBag(bag, slot, targetBag)
end end
local bagFamily = GetItemFamily(targetBag) local bagFamily = GetItemFamily(targetBag)
if itemFamily then if itemFamily then
return (bagFamily == 0) or itemFamily == bagFamily return (bagFamily == 0) or band(itemFamily, bagFamily) > 0
else else
return false return false
end end
+2 -2
View File
@@ -106,7 +106,7 @@ local function createSlot(id)
local iconFrame = CreateFrame("Frame", nil, frame) local iconFrame = CreateFrame("Frame", nil, frame)
E:Size(iconFrame, iconSize - 2) E:Size(iconFrame, iconSize - 2)
E:Point(iconFrame, "RIGHT", frame) iconFrame:SetPoint("RIGHT", frame)
E:SetTemplate(iconFrame, "Default") E:SetTemplate(iconFrame, "Default")
frame.iconFrame = iconFrame frame.iconFrame = iconFrame
E["frames"][iconFrame] = nil E["frames"][iconFrame] = nil
@@ -279,7 +279,7 @@ function M:LoadLoot()
lootFrame = CreateFrame("Button", "ElvLootFrame", lootFrameHolder) lootFrame = CreateFrame("Button", "ElvLootFrame", lootFrameHolder)
lootFrame:SetClampedToScreen(true) lootFrame:SetClampedToScreen(true)
E:Point(lootFrame, "TOPLEFT", 0, 0) lootFrame:SetPoint("TOPLEFT", 0, 0)
E:Size(lootFrame, 256, 64) E:Size(lootFrame, 256, 64)
E:SetTemplate(lootFrame, "Transparent") E:SetTemplate(lootFrame, "Transparent")
lootFrame:SetFrameStrata("FULLSCREEN") lootFrame:SetFrameStrata("FULLSCREEN")
+1 -1
View File
@@ -480,7 +480,7 @@ function mod:OnCreated(frame)
frame.UnitFrame = CreateFrame("Button", nil, frame) frame.UnitFrame = CreateFrame("Button", nil, frame)
E:Size(frame.UnitFrame, 100, 20) 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("OnEvent", self.OnEvent)
frame.UnitFrame:SetScript("OnClick", function() frame.UnitFrame:SetScript("OnClick", function()
frame:Click() frame:Click()
+1 -1
View File
@@ -21,7 +21,7 @@ local function LoadSkin()
local QuestTimerFrameHolder = CreateFrame("Frame", "QuestTimerFrameHolder", E.UIParent) local QuestTimerFrameHolder = CreateFrame("Frame", "QuestTimerFrameHolder", E.UIParent)
E:Size(QuestTimerFrameHolder, 150, 22) E:Size(QuestTimerFrameHolder, 150, 22)
E:Point(QuestTimerFrameHolder, "TOP", QuestTimerFrameMover, "TOP") QuestTimerFrameHolder:SetPoint("TOP", QuestTimerFrameMover, "TOP")
hooksecurefunc(QuestTimerFrame, "SetPoint", function(_, _, parent) hooksecurefunc(QuestTimerFrame, "SetPoint", function(_, _, parent)
if parent ~= QuestTimerFrameHolder then if parent ~= QuestTimerFrameHolder then
+3 -3
View File
@@ -81,13 +81,13 @@ function S:HandleButtonHighlight(frame)
local leftGrad = frame:CreateTexture(nil, "HIGHLIGHT") local leftGrad = frame:CreateTexture(nil, "HIGHLIGHT")
E:Size(leftGrad, frame:GetWidth() * 0.5, frame:GetHeight() * 0.95) 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:SetTexture(E.media.blankTex)
leftGrad:SetGradientAlpha("Horizontal", 0.9, 0.9, 0.9, 0.35, 0.9, 0.9, 0.9, 0) leftGrad:SetGradientAlpha("Horizontal", 0.9, 0.9, 0.9, 0.35, 0.9, 0.9, 0.9, 0)
local rightGrad = frame:CreateTexture(nil, "HIGHLIGHT") local rightGrad = frame:CreateTexture(nil, "HIGHLIGHT")
E:Size(rightGrad, frame:GetWidth() * 0.5, frame:GetHeight() * 0.95) 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:SetTexture(E.media.blankTex)
rightGrad:SetGradientAlpha("Horizontal", 0.9, 0.9, 0.9, 0, 0.9, 0.9, 0.9, 0.35) rightGrad:SetGradientAlpha("Horizontal", 0.9, 0.9, 0.9, 0, 0.9, 0.9, 0.9, 0.35)
end end
@@ -183,7 +183,7 @@ function S:HandleNextPrevButton(btn, buttonOverride)
if not btn.icon then if not btn.icon then
btn.icon = btn:CreateTexture(nil, "ARTWORK") btn.icon = btn:CreateTexture(nil, "ARTWORK")
E:Size(btn.icon, 13) 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:SetTexture("Interface\\AddOns\\ElvUI\\Media\\Textures\\SquareButtonTextures.blp")
btn.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500) btn.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500)
+4 -4
View File
@@ -81,13 +81,13 @@ function TT:GameTooltip_SetDefaultAnchor(tt, parent)
else else
local point = E:GetScreenQuadrant(TooltipMover) local point = E:GetScreenQuadrant(TooltipMover)
if point == "TOPLEFT" then if point == "TOPLEFT" then
E:Point(tt, "TOPLEFT", TooltipMover) tt:SetPoint("TOPLEFT", TooltipMover)
elseif point == "TOPRIGHT" then elseif point == "TOPRIGHT" then
E:Point(tt, "TOPRIGHT", TooltipMover) tt:SetPoint("TOPRIGHT", TooltipMover)
elseif point == "BOTTOMLEFT" or point == "LEFT" then elseif point == "BOTTOMLEFT" or point == "LEFT" then
E:Point(tt, "BOTTOMLEFT", TooltipMover) tt:SetPoint("BOTTOMLEFT", TooltipMover)
else else
E:Point(tt, "BOTTOMRIGHT", TooltipMover) tt:SetPoint("BOTTOMRIGHT", TooltipMover)
end end
end end
end end
+12 -12
View File
@@ -1035,13 +1035,13 @@ function UF:ToggleTransparentStatusBar(isTransparent, statusBar, backdropTex, ad
backdropTex:ClearAllPoints() backdropTex:ClearAllPoints()
if statusBarOrientation == "VERTICAL" then if statusBarOrientation == "VERTICAL" then
E:Point(backdropTex, "TOPLEFT", statusBar, "TOPLEFT") backdropTex:SetPoint("TOPLEFT", statusBar, "TOPLEFT")
E:Point(backdropTex, "BOTTOMLEFT", statusBarTex, "TOPLEFT") backdropTex:SetPoint("BOTTOMLEFT", statusBarTex, "TOPLEFT")
E:Point(backdropTex, "BOTTOMRIGHT", statusBarTex, "TOPRIGHT") backdropTex:SetPoint("BOTTOMRIGHT", statusBarTex, "TOPRIGHT")
else else
E:Point(backdropTex, "TOPLEFT", statusBarTex, "TOPRIGHT") backdropTex:SetPoint("TOPLEFT", statusBarTex, "TOPRIGHT")
E:Point(backdropTex, "BOTTOMLEFT", statusBarTex, "BOTTOMRIGHT") backdropTex:SetPoint("BOTTOMLEFT", statusBarTex, "BOTTOMRIGHT")
E:Point(backdropTex, "BOTTOMRIGHT", statusBar, "BOTTOMRIGHT") backdropTex:SetPoint("BOTTOMRIGHT", statusBar, "BOTTOMRIGHT")
end end
if invertBackdropTex then if invertBackdropTex then
@@ -1070,13 +1070,13 @@ function UF:ToggleTransparentStatusBar(isTransparent, statusBar, backdropTex, ad
if adjustBackdropPoints then if adjustBackdropPoints then
backdropTex:ClearAllPoints() backdropTex:ClearAllPoints()
if statusBarOrientation == "VERTICAL" then if statusBarOrientation == "VERTICAL" then
E:Point(backdropTex, "TOPLEFT", statusBar, "TOPLEFT") backdropTex:SetPoint("TOPLEFT", statusBar, "TOPLEFT")
E:Point(backdropTex, "BOTTOMLEFT", statusBarTex, "TOPLEFT") backdropTex:SetPoint("BOTTOMLEFT", statusBarTex, "TOPLEFT")
E:Point(backdropTex, "BOTTOMRIGHT", statusBarTex, "TOPRIGHT") backdropTex:SetPoint("BOTTOMRIGHT", statusBarTex, "TOPRIGHT")
else else
E:Point(backdropTex, "TOPLEFT", statusBarTex, "TOPRIGHT") backdropTex:SetPoint("TOPLEFT", statusBarTex, "TOPRIGHT")
E:Point(backdropTex, "BOTTOMLEFT", statusBarTex, "BOTTOMRIGHT") backdropTex:SetPoint("BOTTOMLEFT", statusBarTex, "BOTTOMRIGHT")
E:Point(backdropTex, "BOTTOMRIGHT", statusBar, "BOTTOMRIGHT") backdropTex:SetPoint("BOTTOMRIGHT", statusBar, "BOTTOMRIGHT")
end end
end end