I want to change the text size of the Blizzard UI Player and Target frame.
Been trying to find a solution for good 2 hours now. My coding skill level is around “hello world” so I have to rely on code snippets I find online. I found some nifty little scripts to show the UI elements I’m trying to change, like:
It seems like that frame can be accessed with TargetFrameHealthBar.TextString on Classic.
Now how to find this yourself? Use fstack and hover on the frame you need. Press alt until you see the child frame that you need highlighted. Check which frame name is selected with the arrow on the fstack tooltip. In this case it’s a dynamically created frame (child frame with some long random number), so that’s not going to be useful. Now press ctrl (you should still have your mouse in the same position as before you started pressing alt) and a table inspect window pops up. This lets you browse frame hierarchy. Now press the small up arrow in the top left to navigate to the parent frame. In this frame you can see childFrames named LeftText, RightText and TextString. The LeftText and RightText are used for if you have percentage and overall health enabled in the interface settings. The one we’re interested in is TextString. So you combine the name of the current frame (TargetFrameHealthBar, in the title bar of the inspect frame) with TextString and you end up with TargetFrameHealthBar.TextString:SetFont(“Fonts\ARIALN.ttf”, 13, “OUTLINE”).
As a side note, the table inspect frame can also be opened with /tinspect SomeFrame.
I had that issue with the blank lua debug window as well, and that was the result of copy pasting quotation marks from this post. Turns them into some open-quote close-quote version instead of generic quotes. I’m not sure I have the fonts to see any noticeable difference with your snippets so I just assumed they’d work like this.
ooh you’re right. I double checked the strings in notepad++. There were weird quotation marks in it. I corrected them and tried your string again. No error but nothing happend. No change. My experimental strings doesnt work either. Just errors.
So there’s no easy workaround for the dynamic frame problem, isnt it?
EDIT:
I found the culprit
There were a missing blackslash in your string. Not because you forgot one but because the Forum editor just did its weird magic. Your string is definitely working!