WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Help with iconborders (https://www.wowinterface.com/forums/showthread.php?t=42504)

lerb 01-31-12 04:26 PM

Help with iconborders
 
Hey guys!

I'm writing a new UI for my laptop, and I've decided to use rActionBarStyler and rActionButtonStyler as bar mods.

Problem is, I have my own borders I'm using all around the UI with no problem, but on the action bars it looks bad, here's a screen to show what I mean;



As you can see, the left icon looks good, but the right one isn't looking very good. I'm pretty sure the problem lies within the position or "croping" och the actual icon, not the border, but I might be wrong there. It's been a while since I was writing LUA so I could use some help on this one.

As I said, the borders work fine on everything else. Unitframes, panels, castbars.. But not the actionbars. I've tried scaling and resizing buttons but nothing works, there's always some icons looking a bit off. That doesn't work for me!

Seerah 01-31-12 05:28 PM

I don't see a difference between the two. What do you mean by "isn't looking very good"?

Waky 01-31-12 05:41 PM

Quote:

Originally Posted by Seerah (Post 251878)
I don't see a difference between the two. What do you mean by "isn't looking very good"?

I'm pretty sure he's referring to the 1px black border around the icon being blurred and faded on the right one.

I'm not entirely sure what could be causing though, mostly because I don't use rActionBarStyler, sorry!

nin 01-31-12 06:12 PM

is the black inner 1px border part of your texture?

I only had that happen when using textures with small borders, thats one of the reasons i always try too use a backdrop instead when i want 1px borders.. seems too adjust and follow icons perfect no matter size or resolution compared too a texture that has too be the right size too look right in my experience.

jeffy162 01-31-12 08:45 PM

1 Attachment(s)
The thing I noticed (because I copied the image and opened it in Photoshop and zoomed in on it) is that it appears that not just the border is blurred on the right image. The icon even appears to be blurred.

Attachment 6776 (Click for a larger picture)

I'm kind of curious what those little grey "pips" are between the frames, though.

suicidalkatt 02-01-12 03:05 AM

Quote:

Originally Posted by jeffy162 (Post 251892)
The thing I noticed (because I copied the image and opened it in Photoshop and zoomed in on it) is that it appears that not just the border is blurred on the right image. The icon even appears to be blurred.

Attachment 6776 (Click for a larger picture)

I'm kind of curious what those little grey "pips" are between the frames, though.

The frames may technically be perfect, however depending on your UI scaling and frame placements (ie not exactly on a whole number point) or the spacing there between buttons you'll get the half pixel 'fade' as your game tries to display them as precisely as possible.

If you have any code to show, feel free to show it.

lerb 02-01-12 07:43 AM

Wow, thanks for the big response! I'll try to answer you all, but please remember that I'm still pretty rookie to LUA ;)

Seerah - just like Waky says, it's that inner 1-px black border I really want.

Nin - Yeah, it's part of my border texture. But I can see where you're heading at and I understand what you mean, but the problem is I need to "shrink" or crop the actual icon in order for the backdrop to leave that 1-px border, but I don't know how to do that :(

Jeffy162 - Those "pipes" between the icons is just the border of a panel at the bottom of my UI, silly of me to include them in the screenshot, sorry! I don't know about the blurry icon-thingy though, I find it hard to tell whether it's blurry or not since it's a very bright icon.

suicidalkatt - I get what you're saying, and I have a launch.lua file that configures most UI settings. It sets the scale to "0.89999997615814", which to my eyes is a bloody weird number, but maybe not to someone elses.

Thanks again for all your replies guys, I love this community :)

Aftermathhqt 02-01-12 08:09 AM

LUA Code:
  1. local PerfectBorders = 768/string.match(GetCVar("gxResolution"), "%d+x(%d+)")/UISCALESIZE
  2. local PerfectScale = function(ScaleObject)
  3.     return PerfectBorders*math.floor(ScaleObject/PerfectBorders+2.5)
  4. end
  5.  
  6. ["bordersize"] = PerfectBorders+PerfectScale(7),     -- changes size on the borders
  7.  
  8. CreateBorderLight(self.Health, AftermathhUI.media.bordersize, AftermathhUI.bordercolor, AftermathhUI.bordercolor, AftermathhUI.bordercolor, 68, 3, 3, 3, 68, 22, 3, 22)

jeffy162 02-01-12 02:07 PM

Quote:

Originally Posted by lerb (Post 251909)
Jeffy162 - Those "pipes" between the icons is just the border of a panel at the bottom of my UI, silly of me to include them in the screenshot, sorry! I don't know about the blurry icon-thingy though, I find it hard to tell whether it's blurry or not since it's a very bright icon.

Thank you for the reply. I really didn't know what those were, and it was just curiosity on my part and not silly of you to leave them in at all.

Again, thanks. Now I'll let the people that actually know something about this stuff help you to figure this out.

lerb 02-03-12 01:40 AM

Just reporting that I did try to edit my texture - I removed the inner 1-pixel black border, and set my UI scaling to 1.0, not that odd loads-of-digits scale I used before. This seemed to improve border quality throughout the whole UI combined with what Game posted, thanks man! Good to see you're still rolling :)

Although, even after all this the actionbar still looked like crap, but after playing with the scale of the bars and size of buttons (ended up with scale 2.2 and buttonsize 32 >.<) it looks good. I think rActionBarStyler shrinks the buttons to pieces, because with that scale and buttonsize, they are still smaller than the standard actionbuttons. 'Tis weird.

Anyways, case solved, hopefully someone finds this thread useful in the future :) Thanks for the help!

suicidalkatt 02-03-12 01:46 AM

Quote:

Originally Posted by lerb (Post 251986)
Just reporting that I did try to edit my texture - I removed the inner 1-pixel black border, and set my UI scaling to 1.0, not that odd loads-of-digits scale I used before. This seemed to improve border quality throughout the whole UI combined with what Game posted, thanks man! Good to see you're still rolling :)

Although, even after all this the actionbar still looked like crap, but after playing with the scale of the bars and size of buttons (ended up with scale 2.2 and buttonsize 32 >.<) it looks good. I think rActionBarStyler shrinks the buttons to pieces, because with that scale and buttonsize, they are still smaller than the standard actionbuttons. 'Tis weird.

Anyways, case solved, hopefully someone finds this thread useful in the future :) Thanks for the help!

You could just not use any textcoords and just use my Clean Icons - Thin :P

*shameless self promotion*

lerb 02-03-12 02:06 AM

Quote:

Originally Posted by suicidalkatt (Post 251987)
You could just not use any textcoords and just use my Clean Icons - Thin :P

*shameless self promotion*

Hey that's awesome! :D Thanks alot :)


All times are GMT -6. The time now is 08:26 AM.

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