Skip to content

Commit

Permalink
Fixed name alignment when Level for Unitframes is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
muleyo committed Nov 29, 2023
1 parent 57e4aa8 commit 17100c8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions Modules/UnitFrames/_Target.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ function Module:OnEnable()
-- Adjust Target Name position
TargetFrame.TargetFrameContent.TargetFrameContentMain.Name:ClearAllPoints()
TargetFrame.TargetFrameContent.TargetFrameContentMain.Name:SetPoint("TOP", self, "TOP", -45, -26)
elseif UnitLevel(self.unit) < 10 then
-- Adjust Target Name position
TargetFrame.TargetFrameContent.TargetFrameContentMain.Name:ClearAllPoints()
TargetFrame.TargetFrameContent.TargetFrameContentMain.Name:SetPoint("TOP", self, "TOP", -37.5, -26)
else
-- Adjust Target Name position
TargetFrame.TargetFrameContent.TargetFrameContentMain.Name:ClearAllPoints()
TargetFrame.TargetFrameContent.TargetFrameContentMain.Name:SetPoint("TOP", self, "TOP", -30, -26)
end
end
end)
Expand All @@ -47,6 +55,14 @@ function Module:OnEnable()
-- Adjust Focus Name position
FocusFrame.TargetFrameContent.TargetFrameContentMain.Name:ClearAllPoints()
FocusFrame.TargetFrameContent.TargetFrameContentMain.Name:SetPoint("TOP", self, "TOP", -45, -26)
elseif UnitLevel(self.unit) < 10 then
-- Adjust Target Name position
FocusFrame.TargetFrameContent.TargetFrameContentMain.Name:ClearAllPoints()
FocusFrame.TargetFrameContent.TargetFrameContentMain.Name:SetPoint("TOP", self, "TOP", -37.5, -26)
else
-- Adjust Target Name position
FocusFrame.TargetFrameContent.TargetFrameContentMain.Name:ClearAllPoints()
FocusFrame.TargetFrameContent.TargetFrameContentMain.Name:SetPoint("TOP", self, "TOP", -30, -26)
end
end
end)
Expand Down
2 changes: 1 addition & 1 deletion SUI.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Interface: 100200
## Author: Syiana & Muleyo
## Version: 10.2.06
## Version: 10.2.07
## Title: |cffea00ffS|r|cff00a2ffUI|r
## SavedVariables: SUIDB
## IconTexture: Interface\AddOns\SUI\Media\Icons\SUI
Expand Down

0 comments on commit 17100c8

Please sign in to comment.