Thread Tools Display Modes
12-10-19, 11:50 PM   #1
Terenna
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 105
UI-Debuff-Overlays Square Shape with SetTexCoord

Hello,

I'm trying to get the canonical debuffType colored debuff overlay that uses the UI-Debuff-Overlays texture to fit a square rather than the rounded corner square. You'll often see code like this:
Lua Code:
  1. local overlay = button:CreateTexture(nil, 'OVERLAY')
  2. overlay:SetTexture([[Interface\Buttons\UI-Debuff-Overlays]])
  3. overlay:SetTexCoord(.296875, .5703125, 0, .515625)
  4. button.overlay = overlay

However, that SetTexCoord will make a rounded corner square. Is there a way to get the UI-Debuff-Overlays to fit a true square with 90 degree corners?

Thank you!

Or perhaps does anyone have a transparent BLP, TGA, or JPEG 32x32 square with a FFFFFF 1 pixel border?

Last edited by Terenna : 12-11-19 at 12:48 AM.
  Reply With Quote
12-11-19, 12:56 AM   #2
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
The icons are rounded directly from the file. The SetTexCoord is the only way to make sharp corners. If you want the icons sharpened directly without cropping, you'll have to add/extend the corners on the icon directly using the wow file "replace" method.
  Reply With Quote
12-11-19, 11:54 AM   #3
Terenna
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 105
Thank you Kanegasi.

I'm having a hard time creating a 32x32 TGA file with a 1 pixel white border and a transparent rest.

Here is a photo of my photoshop at the point where I've created a 32x32 1 pixel white border square with a transparent center.

At this point, I right click the layer and choose Select Pixels



However, this seems to select the entire box, not just the border or inner square.



When I create a new alpha channel with 100% opacity, I get this:



Which suggests it's applying the transparency mask to the entire texture rather than just the "inner" square that the border surrounds.

If anyone could help me create a 32x32 .tga square with a 1 pixel white border and transparent inner square, I would greatly appreciate it.

Last edited by Terenna : 12-11-19 at 04:34 PM.
  Reply With Quote
12-11-19, 02:20 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
What happens when you control-click the layer in the layer list? Or if you use the magic wand tool and click on your white border?
__________________
"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
12-11-19, 04:13 PM   #5
Terenna
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 105
Hey Seerah, thanks for the suggestions.

Ctrl clicking the layer selects the entire box. Magic wanding the border does work; however, the alpha channel still applies to the entire thing indiscriminately. I'm sure I'm doing something stupid and novice, but that's precisely my level of photoshop expertise :P
  Reply With Quote
12-12-19, 03:37 PM   #6
Terenna
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 105
For anyone who wants it, I was able to figure out the issue and successfully generated a nice 32x32 1 FFFFFF pixel border with transparent inner square for overlays. I found use in the Colored Debuff Icon. The file should be attached to this post. Thanks for your help all!
Attached Files
File Type: tga Overlaytexture.tga (4.0 KB, 173 views)
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » UI-Debuff-Overlays Square Shape with SetTexCoord

Thread Tools
Display Modes

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