Quantcast
Custom Textures and Borders Disappearing - WoWInterface
Thread Tools Display Modes
08-23-19, 05:07 PM   #1
Astrophe
A Murloc Raider
Join Date: Jul 2018
Posts: 4
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!

Last edited by Astrophe : 08-23-19 at 05:11 PM.
  Reply With Quote
08-23-19, 06:42 PM   #2
elcius
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Sep 2011
Posts: 71
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.
  Reply With Quote
08-24-19, 12:05 AM   #3
Lybrial
A Flamescale Wyrmkin
AddOn Compiler - Click to view compilations
Join Date: Jan 2010
Posts: 109
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/
  Reply With Quote
08-24-19, 11:46 AM   #4
Astrophe
A Murloc Raider
Join Date: Jul 2018
Posts: 4
Originally Posted by elcius View Post
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.
  Reply With Quote
08-24-19, 11:51 AM   #5
Astrophe
A Murloc Raider
Join Date: Jul 2018
Posts: 4
Originally Posted by Lybrial View Post
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.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Custom Textures and Borders Disappearing

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