WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Custom Textures and Borders Disappearing (https://www.wowinterface.com/forums/showthread.php?t=57381)

Astrophe 08-23-19 05:07 PM

Custom Textures and Borders Disappearing
 
The close button on the addon I'm making keeps disappearing. https://imgur.com/D5kWvM9

1. After I reload the UI sometimes the button appears and sometimes it doesn't, and I'm not changing anything in the code.
2. Sometimes the Normal texture appears but the OnEnter texture doesn't.

It's like sometimes certain textures are available at the time the code is run and sometimes it's not. (wtf?)

--

Second problem I'm having is the 1px borders I have around certain frames disappears and reappear when I move it around the screen. https://imgur.com/yFlUQ0B

In the screenshot you'll see the top border is gone but if I drag the frame around then the top border may appear again.. and sometimes the top will appear but then the bottom will disappear.

I'm pretty new to coding. Any help is appreciated!

elcius 08-23-19 06:42 PM

the first issue is probably a layering problem, make sure the button texture is attached to something on a higher frame level than whatever the background is.
https://wow.gamepedia.com/Widget_API#LayeredRegion

the second issue is most likely sub-pixel errors, when relying on single pixel accuracy you'll need to "pad" your dimensions and/or positions to account for floating point errors.
increase the frame size by 0.1 px or shift it a similar amount in both directions.

Lybrial 08-24-19 12:05 AM

This is not answering the question, just want to ask this:

Why you dont simply use Ace GUI? It comes with all the
UI stuff that you need for ingame interfaces. And you can
override the look of Ace GUI easily.

For the second problem: Pixel perfect!

https://www.reddit.com/r/WowUI/comme...ui_xpost_rwow/

Astrophe 08-24-19 11:46 AM

Quote:

Originally Posted by elcius (Post 333335)
the first issue is probably a layering problem, make sure the button texture is attached to something on a higher frame level than whatever the background is.
https://wow.gamepedia.com/Widget_API#LayeredRegion

the second issue is most likely sub-pixel errors, when relying on single pixel accuracy you'll need to "pad" your dimensions and/or positions to account for floating point errors.
increase the frame size by 0.1 px or shift it a similar amount in both directions.

Thanks for the help! I set the frame strata to something higher and that fixed the Close Button issue. I also increased the EdgeSize of all my borders to 1.1 and it fixed the problem. Thanks Elcius, hope you've been good btw.

Astrophe 08-24-19 11:51 AM

Quote:

Originally Posted by Lybrial (Post 333339)
This is not answering the question, just want to ask this:

Why you dont simply use Ace GUI? It comes with all the
UI stuff that you need for ingame interfaces. And you can
override the look of Ace GUI easily.

For the second problem: Pixel perfect!

https://www.reddit.com/r/WowUI/comme...ui_xpost_rwow/

That reddit post is very helpful. I'll be using that to make everything pixel perfect.

I supposed I don't use Ace because I'm new to coding and I feel that forcing myself to make everything from scratch will deepen my knowledge and make me a better developer.


All times are GMT -6. The time now is 01:34 AM.

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