Thread Tools Display Modes
08-25-12, 04:49 PM   #1
eponine
A Fallenroot Satyr
Join Date: Aug 2012
Posts: 29
oUF help

Hi again,

I apologize for making multiple posts, please let me know if I'm supposed to keep my questions in one topic, but since this one was for a different addon I wasn't sure.

Anyway, I'm using oUF dimglass (http://www.wowinterface.com/download..._Dimglass.html) which I've modified a bit. I'm having just a few problems with it.

Here is a screenshot of what it looks like now: http://i45.tinypic.com/2lktb2u.jpg

So first, if you look at my player frame, you'll see that I've set it to have a 1px border all around. However, the right side of the frame seems to be 2px thick. How would I go about fixing that? Is it a problem with pixel perfection/UI scale, or is it something I can modify in the LUA?

Second, I would like to change the font on the unit frames. I tried to do this in config.lua but upon restarting the game, all the unit frames became grey, and the values for health, percent, resource were gone. Here's the script for it:

cfg.font = "Fonts\\ARIALN.ttf"
cfg.fontsize = 13
cfg.fontstyle = "THINOUTLINE"

Finally, I would like to make the font all caps without using a ttf that looks that way. Is it possible to do so with a script?

I apologize for the long post, but if anyone can help me, it'd be very greatly appreciated.

Thanks!
  Reply With Quote
08-25-12, 06:07 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by eponine View Post
So first, if you look at my player frame, you'll see that I've set it to have a 1px border all around. However, the right side of the frame seems to be 2px thick. How would I go about fixing that? Is it a problem with pixel perfection/UI scale, or is it something I can modify in the LUA?
It is probably a UI scaling issue. Try turning off "Use UI scale"... it's the checkbox next to the UI Scale slider under System (video/sound options) > Advanced. This will cause each UI pixel to match up exactly with a "real" pixel, so if you're running at 1920x1080 resolution, you will have 1920 UI pixels across the screen to match your 1920 real pixels.

Also make sure that your screen resolution matches your monitor's native resolution; otherwise display pixels don't match physical pixels, and you'll get a lot of blurring. If you play in non-fullscreen windowed mode, it will be very hard to get pixels to line up properly, to the extent that it's probably just hopeless.

Originally Posted by eponine View Post
Second, I would like to change the font on the unit frames. I tried to do this in config.lua but upon restarting the game, all the unit frames became grey, and the values for health, percent, resource were gone.
This probably means that the font file path you entered was incorrect. Paths are relative to the WoW program folder. If you are using a custom font, the path should look like this:

cfg.font = "Interface\\AddOns\\MyFonts\\SomeFontFile.ttf"

Make sure everything is capitalized correctly, and that all of your backslashes are doubled.

Originally Posted by eponine View Post
I would like to make the font all caps without using a ttf that looks that way. Is it possible to do so with a script?
Yes. Everywhere in the addon where object:SetText(text) is called, change it to object:SetText(strupper(text)) instead to transform the text to uppercase. If there are any instances of object:SetFormattedText(text, a, b, c) you would need to uppercase everything individually -- object:SetFormattedText(strupper(text), strupper(a), strupper(b), strupper(c)), though you can skip the strupper wrap on values that are just numbers or symbols, since they do not have an uppercase form to transform into -- or switch to the far less efficient object:SetText(strupper(format(text, a, b, c))) method. Any of these methods are pretty inefficient, though. If you want all-caps, your best bet is to use an all-caps font.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
08-25-12, 07:18 PM   #3
eponine
A Fallenroot Satyr
Join Date: Aug 2012
Posts: 29
Sorry, for some reason my browser is not letting me quote you, so I'll just type out my responses without them.

re UI scale: Where is System > Advanced? When I go to options, I only have Graphics, Advanced, Network, Languages, and Sound. Advanced only shows: triple buffering, reduce input lag, hardware cursor, and graphics API. Or am I looking in completely the wrong place?

re font paths: You're right, I did that totally wrong. I created a folder called Fonts under World of Warcraft and put the font file in there, then renamed the font in my config.lua to that. It works, thank you!

re font caps: There were tons of those 'object:SetText(text)' things to replace, so I ended up getting the font I wanted (Calibri) and modifying it in a free font editor. In case anyone who might be reading this later wants to know, the program I used is Typelight (http://www.cr8software.net/typelight.html). I opened the Calibri font in the program, and copy pasted all capital letter models over the lowercase ones, then saved as calibricaps.ttf. It is a very easy program to use. I still need to do the same for all the special characters, so it's a little bit tedious, you were again correct, it is a better method than replacing the scripts.

Thank you for the reply btw, it is appreciated.

edit: Whoops, apparently it was an addon preventing me from seeing the UI scale option. I unchecked it and reloaded, but everything became off center and the 2px line wasn't fixed. Do you think it is something in the LUA for the unitframes?

Last edited by eponine : 08-25-12 at 07:25 PM.
  Reply With Quote
08-25-12, 09:13 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
If the unit frames are using a scale besides 1, then perhaps.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
08-25-12, 09:36 PM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by eponine View Post
... everything became off center and the 2px line wasn't fixed. Do you think it is something in the LUA for the unitframes?
Check the layout to see if it calls object:SetScale(x) anywhere, where x is not 1.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
08-25-12, 10:23 PM   #6
eponine
A Fallenroot Satyr
Join Date: Aug 2012
Posts: 29
Originally Posted by Phanx View Post
Check the layout to see if it calls object:SetScale(x) anywhere, where x is not 1.
In config.lua:

--scale
cfg.scale = 1.0

In core.lua:
self:SetScale(cfg.scale)

I'm assuming the self:SetScale(cfg.scale) is just taking the 1.0 already specified in config.lua.

There are some scripts regarding borders in lib.lua:

local borders = {
bgFile = "Interface\\Buttons\\WHITE8x8",
edgeFile = "Interface\\Buttons\\WHITE8x8",
edgeSize = 1,
tile = false,
insets = { left = 0, right = 0, top = 0, bottom = 0 }

CreateBorder = function(f,x)
h = CreateFrame("Frame", nil, f)
h:SetFrameLevel(1)
h:SetFrameStrata(f:GetFrameStrata())
h:SetPoint("TOPLEFT", -x, x)
h:SetPoint("BOTTOMRIGHT", x, -x)
h:SetBackdrop(borders)
h:SetBackdropColor(0.1,0.1,0.1,0.6)
--h:SetBackdropBorderColor(65/255, 74/255, 79/255)
h:SetBackdropBorderColor(0,0,0)
end

It looks like it SHOULD be 1px though, or am I reading it wrong?
  Reply With Quote
08-26-12, 03:45 AM   #7
nailertn
An Aku'mai Servant
Join Date: Oct 2008
Posts: 33
I looked into the code, it's not UI scale. For whatever reason there is a 1 pixel wide black texture created on the right side of every health bar. In lib.lua under lib.gen_hpbar:

Code:
s.reminder = s:CreateTexture(nil, "OVERLAY")
s.reminder:SetTexture("Interface\\Buttons\\WHITE8x8")
s.reminder:SetSize(1,f.height)
s.reminder:SetPoint("RIGHT", s:GetStatusBarTexture())
--s.reminder:SetVertexColor(65/255, 74/255, 79/255)
s.reminder:SetVertexColor(0,0,0)
What it's supposed to remind of and whom I have no idea. Maybe the author needed to buy milk for his cat, because there is no mention of this texture anywhere else. Delete the code and you should be fine.

Last edited by nailertn : 08-26-12 at 03:49 AM.
  Reply With Quote
08-26-12, 08:55 AM   #8
eponine
A Fallenroot Satyr
Join Date: Aug 2012
Posts: 29
YES, thank you so much! Deleted those lines and the problem was fixed. Hopefully it wasn't anything important, but so far it looks like it was just a few extra pixels of graphics.

I know it probably sounds crazy, but those few pixels were really, really, really annoying me.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » oUF help


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