mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
E:Point, E:Size, E:Width, E:Height, & cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user