WoWInterface (
-   AddOn Help/Support (
-   -   UI-Debuff-Overlays Square Shape with SetTexCoord (

Terenna 12-10-19 11:50 PM

UI-Debuff-Overlays Square Shape with SetTexCoord

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?

Kanegasi 12-11-19 12:56 AM

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.

Terenna 12-11-19 11:54 AM

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.

Seerah 12-11-19 02:20 PM

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?

Terenna 12-11-19 04:13 PM

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

Terenna 12-12-19 03:37 PM

1 Attachment(s)
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!

All times are GMT -6. The time now is 07:19 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI