Quantcast Need Help Resizing Player and Target StatusText (Halfway there) - WoWInterface
Thread Tools Display Modes
08-11-19, 01:36 AM   #1
rippywow
A Defias Bandit
Join Date: Aug 2019
Posts: 2
Need Help Resizing Player and Target StatusText (Halfway there)

so i inserted
Lua Code:
  1. PlayerFrameHealthBarText:SetFont("Fonts\\ARIALN.ttf", 12, "OUTLINE")
  2.         PlayerFrameManaBarText:SetFont("Fonts\\ARIALN.ttf", 12, "OUTLINE")
into this
Lua Code:
  1. function UnitFramesImproved_Style_PlayerFrame()
  2.     if not InCombatLockdown() then
  3.         PlayerFrameHealthBar.lockColor = true;
  4.         PlayerFrameHealthBar.capNumericDisplay = true;
  5.         PlayerFrameHealthBar:SetWidth(119);
  6.         PlayerFrameHealthBar:SetHeight(29);
  7.         PlayerFrameHealthBar:SetPoint("TOPLEFT",106,-22);
  8.         PlayerFrameHealthBarText:SetPoint("CENTER",50,6);
  9.         PlayerFrameHealthBarText:SetFont("Fonts\\ARIALN.ttf", 12, "OUTLINE")
  10.         PlayerFrameManaBarText:SetFont("Fonts\\ARIALN.ttf", 12, "OUTLINE")
  11.     end
  12.    
  13.     PlayerFrameTexture:SetTexture("Interface\\Addons\\UnitFramesImproved\\Textures\\UI-TargetingFrame");
  14.     PlayerStatusTexture:SetTexture("Interface\\Addons\\UnitFramesImproved\\Textures\\UI-Player-Status");
  15.     PlayerFrameHealthBar:SetStatusBarColor(UnitColor("player"));
  16. end
and it worked perfectly to lower the font size.
but now i cant figure out where to insert it for TargetFrame, any help would be greatly appreciated
Lua Code:
  1. function UnitFramesImproved_Style_TargetFrame(self)
  2.     --if not InCombatLockdown() then
  3.         local classification = UnitClassification(self.unit);
  4.         if (classification == "minus") then
  5.             self.healthbar:SetHeight(12);
  6.             self.healthbar:SetPoint("TOPLEFT",7,-41);
  7.             if (self.healthbar.TextString) then
  8.                 self.healthbar.TextString:SetPoint("CENTER",-50,4);
  9.             end
  10.             self.deadText:SetPoint("CENTER",-50,4);
  11.             self.Background:SetPoint("TOPLEFT",7,-41);
  12.         else
  13.             self.healthbar:SetHeight(29);
  14.             self.healthbar:SetPoint("TOPLEFT",7,-22);
  15.             if (self.healthbar.TextString) then
  16.                 self.healthbar.TextString:SetPoint("CENTER",-50,6);
  17.             end
  18.             self.deadText:SetPoint("CENTER",-50,6);
  19.             self.nameBackground:Hide();
  20.             self.Background:SetPoint("TOPLEFT",7,-22);
  21.         end
  22.        
  23.         self.healthbar:SetWidth(119);
  24.         self.healthbar.lockColor = true;
  25.     --end
  26. end
theres also this a few lines above, if its any help figuring out this problem
Lua Code:
  1. -- Add TargetFrame status text for classic
  2.     if (not FocusFrame) then
  3.         TargetFrameHealthBar.TextString = CreateStatusBarText("Text", "TargetFrameHealthBar", TargetFrameTextureFrame, "CENTER", -50, 3)
  4.         TargetFrameHealthBar.LeftText = CreateStatusBarText("TextLeft", "TargetFrameHealthBar", TargetFrameTextureFrame, "LEFT", 8, 3)
  5.         TargetFrameHealthBar.RightText = CreateStatusBarText("TextRight", "TargetFrameHealthBar", TargetFrameTextureFrame, "RIGHT", -110, 3)
  6.         TargetFrameManaBar.TextString = CreateStatusBarText("Text", "TargetFrameManaBar", TargetFrameTextureFrame, "CENTER", -50, -8)
  7.         TargetFrameManaBar.LeftText = CreateStatusBarText("TextLeft", "TargetFrameManaBar", TargetFrameTextureFrame, "LEFT", 8, -8)
  8.         TargetFrameManaBar.RightText = CreateStatusBarText("TextRight", "TargetFrameManaBar", TargetFrameTextureFrame, "RIGHT", -110, -8)
  9.     end
  10. end
  11.  
  12. function CreateStatusBarText(name, parentName, parent, point, x, y)
  13.     local fontString = parent:CreateFontString(parentName..name, nil, "TextStatusBarText")
  14.     fontString:SetPoint(point, parent, point, x, y)
  15.    
  16.     return fontString
  17. end


(The addon is UnitFramesImproved, and I'm trying to get the statustext resized for classic)

Last edited by rippywow : 08-11-19 at 01:38 AM.
  Reply With Quote
08-11-19, 05:43 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,919
I would put it in CreateStatusBarText() like this.
Lua Code:
  1. function CreateStatusBarText(name, parentName, parent, point, x, y)
  2.     local fontString = parent:CreateFontString(parentName..name, nil, "TextStatusBarText")
  3.     fontString:SetPoint(point, parent, point, x, y)
  4.     fontString:SetFont("Fonts\\ARIALN.ttf", 12, "OUTLINE")
  5.    
  6.     return fontString
  7. end
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
08-11-19, 03:26 PM   #3
rippywow
A Defias Bandit
Join Date: Aug 2019
Posts: 2
that did the trick, thank you
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Need Help Resizing Player and Target StatusText (Halfway there)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off