Thread Tools Display Modes
01-31-12, 04:26 PM   #1
lerb
A Frostmaul Preserver
 
lerb's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 264
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!
  Reply With Quote
01-31-12, 05:28 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
I don't see a difference between the two. What do you mean by "isn't looking very good"?
__________________
"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
01-31-12, 05:41 PM   #3
Waky
A Cobalt Mageweaver
 
Waky's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2010
Posts: 200
Originally Posted by Seerah View Post
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!
  Reply With Quote
01-31-12, 06:12 PM   #4
nin
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 213
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.
  Reply With Quote
01-31-12, 08:45 PM   #5
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
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.

Click image for larger version

Name:	lerb Icons.jpg
Views:	303
Size:	54.9 KB
ID:	6776 (Click for a larger picture)

I'm kind of curious what those little grey "pips" are between the frames, though.
__________________
Ahhhh, the vagueries of the aging mind. Wait.... What was I saying?


Carbonite <----- GitHub main module (Maps ONLY) download link. The other modules are also available on GitHub.
Carbonite-CLASSIC<----- GitHub link to Carbonite Classic. Thanks to ircdirk for this!

Last edited by jeffy162 : 01-31-12 at 08:53 PM.
  Reply With Quote
02-01-12, 03:05 AM   #6
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by jeffy162 View Post
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.
  Reply With Quote
02-01-12, 07:43 AM   #7
lerb
A Frostmaul Preserver
 
lerb's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 264
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
  Reply With Quote
02-01-12, 08:09 AM   #8
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
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)
  Reply With Quote
02-01-12, 02:07 PM   #9
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
Originally Posted by lerb View Post
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.
__________________
Ahhhh, the vagueries of the aging mind. Wait.... What was I saying?


Carbonite <----- GitHub main module (Maps ONLY) download link. The other modules are also available on GitHub.
Carbonite-CLASSIC<----- GitHub link to Carbonite Classic. Thanks to ircdirk for this!
  Reply With Quote
02-03-12, 01:40 AM   #10
lerb
A Frostmaul Preserver
 
lerb's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 264
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!
  Reply With Quote
02-03-12, 01:46 AM   #11
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by lerb View Post
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*
  Reply With Quote
02-03-12, 02:06 AM   #12
lerb
A Frostmaul Preserver
 
lerb's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 264
Originally Posted by suicidalkatt View Post
You could just not use any textcoords and just use my Clean Icons - Thin :P

*shameless self promotion*
Hey that's awesome! Thanks alot
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Help with iconborders


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