WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   help me to reduce player name text size (https://www.wowinterface.com/forums/showthread.php?t=59179)

kuli2145636 07-24-22 05:32 AM

help me to reduce player name text size
 
1 Attachment(s)
hello, could you help me to reduce player name text size of defualt blizzard frames on retail.

Thank you very much!!

Xrystal 07-24-22 10:10 AM

You could try scaling it using this function:

FontString:SetTextScale(scale)

Where FontString is changed to PlayerName and assumingly the scale is a number between 0 and 1

But not sure how you would get it working without creating an addon.

kuli2145636 07-24-22 11:28 PM

Quote:

Originally Posted by Xrystal (Post 340819)
You could try scaling it using this function:

FontString:SetTextScale(scale)

Where FontString is changed to PlayerName and assumingly the scale is a number between 0 and 1

But not sure how you would get it working without creating an addon.


Thanks for the message, since I am using another language, the default makes name text size look big, but I want it to change size.

https://imgur.com/a/NtJfi4G I Hope like this

Fizzlemizz 07-25-22 10:17 AM

You could do something like:
Lua Code:
  1. local function SizeName(self)
  2.     local font, size = self.name:GetFont()
  3.     self.name:SetFont(font, size-2)
  4. end
  5. SizeName(PlayerFrame)
  6. SizeName(TargetFrame)
  7. for i=1, 4 do
  8.     SizeName(_G["PartyMemberFrame"..i])
  9. end

Add additional unit frames to size. Adjust the size to your liking.

You can play with the naming and turn it into a macro or copy/paste to addon.bool.no to create/download as a small addon that will run when you log in.

kuli2145636 07-25-22 10:58 PM

Quote:

Originally Posted by Fizzlemizz (Post 340822)
You could do something like:
Lua Code:
  1. local function SizeName(self)
  2.     local font, size = self.name:GetFont()
  3.     self.name:SetFont(font, size-2)
  4. end
  5. SizeName(PlayerFrame)
  6. SizeName(TargetFrame)
  7. for i=1, 4 do
  8.     SizeName(_G["PartyMemberFrame"..i])
  9. end

Add additional unit frames to size. Adjust the size to your liking.

You can play with the naming and turn it into a macro or copy/paste to addon.bool.no to create/download as a small addon that will run when you log in.



I appreciate your help very much. :)

kuli2145636 07-26-22 02:02 AM

Quote:

Originally Posted by Fizzlemizz (Post 340822)
You could do something like:
Lua Code:
  1. local function SizeName(self)
  2.     local font, size = self.name:GetFont()
  3.     self.name:SetFont(font, size-2)
  4. end
  5. SizeName(PlayerFrame)
  6. SizeName(TargetFrame)
  7. for i=1, 4 do
  8.     SizeName(_G["PartyMemberFrame"..i])
  9. end

Add additional unit frames to size. Adjust the size to your liking.

You can play with the naming and turn it into a macro or copy/paste to addon.bool.no to create/download as a small addon that will run when you log in.


SizeName(TargetofTargetFrame)
SizeName(FocusFrame)

I tried adding this but they didn't work.how should i do? Thank you very much.

Fizzlemizz 07-26-22 10:27 AM

You neeed to make sure you're using the correct frames
Code:

SizeName(TargetFrameToT)
SizeName(FocusFrame)

The UI uses the TargetofTargetFrameTemplate to create ToT frames but uses the parents frame name and adds the "ToT" suffix so the TargetFrame Target of Target is created as TargetFrameToT


All times are GMT -6. The time now is 06:17 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI