Fix all issues related to new textL_offset and text_yoffset

With the new additions of Text Y Offset and the left text offset. The indexes to disable/hide were not updated properly and thus you could not edit Per Second, percent if multifontstring was enabled. And could not even see the seperator box.

A lot of SetPoint calls were not properly updated with the new anchor settings
This commit is contained in:
Flamanis
2023-03-13 10:47:52 -05:00
parent d0ccba9e03
commit e6b1028ff4
3 changed files with 21 additions and 20 deletions
+15 -15
View File
@@ -2022,39 +2022,39 @@ end
function Details:HandleTextsOnMouseClick(row, type)
if (self.bars_inverted) then
if (type == "down") then
row.lineText4:SetPoint("left", row.statusbar, "left", 2, -1)
row.lineText4:SetPoint("left", row.statusbar, "left", -self.fontstrings_text4_anchor + 2, self.row_info.text_yoffset - 1)
if (self.row_info.no_icon) then
row.lineText1:SetPoint("right", row.statusbar, "right", -1, -1)
row.lineText1:SetPoint("right", row.statusbar, "right", self.row_info.textL_offset - 1, self.row_info.text_yoffset - 1)
else
row.lineText1:SetPoint("right", row.icone_classe, "left", -1, -1)
row.lineText1:SetPoint("right", row.icone_classe, "left",self.row_info.textL_offset - 1, self.row_info.text_yoffset - 1)
end
elseif (type == "up") then
row.lineText4:SetPoint("left", row.statusbar, "left", 1, 0)
row.lineText4:SetPoint("left", row.statusbar, "left", -self.fontstrings_text4_anchor + 1, self.row_info.text_yoffset)
if (self.row_info.no_icon) then
row.lineText1:SetPoint("right", row.statusbar, "right", -2, 0)
row.lineText1:SetPoint("right", row.statusbar, "right", self.row_info.textL_offset - 2, self.row_info.text_yoffset)
else
row.lineText1:SetPoint("right", row.icone_classe, "left", -2, 0)
row.lineText1:SetPoint("right", row.icone_classe, "left", self.row_info.textL_offset - 2, self.row_info.text_yoffset)
end
end
else
if (type == "down") then
row.lineText4:SetPoint("right", row.statusbar, "right", 1, -1)
row.lineText4:SetPoint("right", row.statusbar, "right", -self.fontstrings_text4_anchor + 1, self.row_info.text_yoffset - 1)
if (self.row_info.no_icon) then
row.lineText1:SetPoint("left", row.statusbar, "left", 3, -1)
row.lineText1:SetPoint("left", row.statusbar, "left", self.row_info.textL_offset + 3, self.row_info.text_yoffset - 1)
else
row.lineText1:SetPoint("left", row.icone_classe, "right", 4, -1)
row.lineText1:SetPoint("left", row.icone_classe, "right", self.row_info.textL_offset + 4, self.row_info.text_yoffset - 1)
end
elseif (type == "up") then
row.lineText4:SetPoint("right", row.statusbar, "right")
row.lineText4:SetPoint("right", row.statusbar, "right", -self.fontstrings_text4_anchor, self.row_info.text_yoffset)
if (self.row_info.no_icon) then
row.lineText1:SetPoint("left", row.statusbar, "left", 2, 0)
row.lineText1:SetPoint("left", row.statusbar, "left", self.row_info.textL_offset + 2, self.row_info.text_yoffset)
else
row.lineText1:SetPoint("left", row.icone_classe, "right", 3, 0)
row.lineText1:SetPoint("left", row.icone_classe, "right", self.row_info.textL_offset + 3, self.row_info.text_yoffset)
end
end
end
@@ -4693,9 +4693,9 @@ end
function Details:AdjustInLineTextPadding()
for _, row in ipairs(self.barras) do
row.lineText2:SetPoint("right", row.statusbar, "right", -self.fontstrings_text2_anchor, 0)
row.lineText3:SetPoint("right", row.statusbar, "right", -self.fontstrings_text3_anchor, 0)
row.lineText4:SetPoint("right", row.statusbar, "right", -self.fontstrings_text4_anchor, 0)
row.lineText2:SetPoint("right", row.statusbar, "right", -self.fontstrings_text2_anchor, self.row_info.text_yoffset)
row.lineText3:SetPoint("right", row.statusbar, "right", -self.fontstrings_text3_anchor, self.row_info.text_yoffset)
row.lineText4:SetPoint("right", row.statusbar, "right", -self.fontstrings_text4_anchor, self.row_info.text_yoffset)
end
end