View Single Post
05/04/22, 04:10 AM   #6
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,016
Is the right click changing the DrawTier, DrawLayer or DrawLevel?
Compare the tier, layer and level of the worldmap to your "base" controls (the shown labels/clickable links or the custom control you have parented them as childs to, if it is not the WorldMap which is the parent).

If not:
The map might just become "the same" tier, layer and level (or a hgher level!) and thus the controls fall behind the map again by this.
It's what I understood is the reason that the controls sometimes vanish, or that the texture controls are still shown but a clickable button all of sudden is behind the texture and not clickable anymore then.

Search the worldmap code for SetDrawTier or SetDrawLayer or SetDrawLevel, maybe you'll find the exact values that are set to the map as the map changes/updates. And you just need to set the same to your controls then and increase the drawlevel by 1 to show it on top again.

What ZOSDanBatson wrote about it:
Essentially when you experience these issues, it just means you need to increase the tier layer or level of the thing. The level of the two competing controls was ambiguous, and its just a matter of which one happens to show up in the tree first when testing. You need to remove the ambiguity.



Since the launch of the game, textures have a default layer of background, which is under controls, because when that decision was made, it was decided that of course you would never want to render a texture overtop of something like a button or a label, because it would cover it, making the label/button/etc pointless. But that can also be a pain in situations like this. Changing it so that textures an no longer defauted to background would be more explicit but at thise point would throw everything into complete and utter disarray.

It was annoying for us too, we had to fix a lot of places where we had been lazily not resolving the ambiguity because it "didnt hurt anything" and it caused bugs we had to fix. But the new hit testing logic can't work the old way anymore, and only the old way resolved the ambiguity passively

If you have a texture and a non texture both with default layers, and they overlap eachother, and they're both mouse enabled, you're gonna have a bad time, because textures by default are BACKGROUND, and you need to move the texture's layer up
You need to decide which one you want on top of the other

Last edited by Baertram : 05/04/22 at 04:13 AM.
  Reply With Quote