WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Strange strata behavior with BattlefieldMapFrame (https://www.wowinterface.com/forums/showthread.php?t=56467)

Theroxis 07-28-18 07:01 PM

Strange strata behavior with BattlefieldMapFrame
 
So, I'm using the Battlefield map as my Minimap (don't ask, it's something quirky I wanted to try)
And I ran into an issue where frames cannot draw on top of the BattlefieldMapFrame regardless of strata. If i call SetParent(MainMenuBar) then the frames can draw on top of the BattleieldMapFrame, but then they disappear when entering vehicles.

Here's an example of a frame I've moved onto the battlefieldmapframe:
Code:

QueueStatusMinimapButton:SetParent(MainMenuBar)
QueueStatusMinimapButton:SetAlpha(0.8)
QueueStatusMinimapButton:SetScale(1.25)
QueueStatusMinimapButton:ClearAllPoints()
QueueStatusMinimapButton:SetPoint("TOPLEFT",BattlefieldMapFrame,-5,5)
QueueStatusMinimapButtonBorder:Hide()
QueueStatusMinimapButton:SetHighlightTexture(nil)
QueueStatusMinimapButton:SetPushedTexture(nil)

Without the SetParent(MainMenuBar) the QueueStatusMinimapButton renders BEHIND the BattlefieldMapFrame no matter what strata the BattlefieldMapFrame and the QueueStatusMinimapButton are. I've tried various other parent elements, such as the MicroButtonsMover and the GameMenu, which all worked, and then other, more logical things like BattlefieldMapFrame (Since the goal is to eventually discard the Minimap itself entirely.)

This has been resolved by tinkering.
Seems if I set the parent to BattlefieldMapFrame, the FrameStrata to HIGH and the FrameLevel to 99 it shows on top just fine.
Awesome.


End result btw:
https://imgur.com/a/saSjblF

Kanegasi 07-28-18 08:46 PM

For future reference, frame level goes up to 10000. If you truly want something guaranteed to be on top, assuming its something that doesn't receive mouse events, set it to TOOLTIP with a frame level of 10000.

Theroxis 07-28-18 10:31 PM

Quote:

Originally Posted by Kanegasi (Post 329132)
For future reference, frame level goes up to 10000. If you truly want something guaranteed to be on top, assuming its something that doesn't receive mouse events, set it to TOOLTIP with a frame level of 10000.

That's good to know. I was hoping that I hadn't run into some engine side rendering constraint. I know there have been UI elements in the past with hard coded render constraints so that they cannot be manipulated.
Things turned out pretty good using the BattlefieldMap instead of the minimap:
https://imgur.com/a/saSjblF

myrroddin 07-29-18 02:25 AM

Not to completely derail the thread, but I've wondered what the difference between the two maps are? Or, to think another way: why have two, and not simply use the mini map? I'm not talking about your project, I am referring to Blizzard's decision to have two maps that essentially do the exact same thing.

Theroxis 07-29-18 10:50 AM

Quote:

Originally Posted by myrroddin (Post 329138)
Not to completely derail the thread, but I've wondered what the difference between the two maps are? Or, to think another way: why have two, and not simply use the mini map? I'm not talking about your project, I am referring to Blizzard's decision to have two maps that essentially do the exact same thing.

I'm not entirely sure their reasoning. For one the Battlefield map uses the world map resources rather than the minimap resources. At some point I'd imagine the concern was with memory consumption since the world map uses much higher resolution graphics. Aside from that, and the minimap being built with POIs and the World Map originally not having any POIs, I can't think of any reason beyond legacy compatibility

jeffy162 07-29-18 11:50 AM

I have not played in almost two years now, but, this sounds to me like you should take a look at Carbonite (the addon). It replaces the Blizzard maps (all, iIrc, but the "battlefield" map) with the option to integrate the minimap (Blizzards) with their minimap (a smaller version of their "world map") so that you can have the gold dot for active nodes. It is much more than that, though, as Carbonite has a few modules (which you can choose to install, or not) and was originally written as a quest aid. However, the main addon is the maps alone, I believe.

I know this is "long winded", but, it's my personal opinion and always considered Carbonite as my one "go-to" addon. :o

Theroxis 07-29-18 01:10 PM

Quote:

Originally Posted by jeffy162 (Post 329153)
I have not played in almost two years now, but, this sounds to me like you should take a look at Carbonite (the addon). It replaces the Blizzard maps (all, iIrc, but the "battlefield" map) with the option to integrate the minimap (Blizzards) with their minimap (a smaller version of their "world map") so that you can have the gold dot for active nodes. It is much more than that, though, as Carbonite has a few modules (which you can choose to install, or not) and was originally written as a quest aid. However, the main addon is the maps alone, I believe.

I know this is "long winded", but, it's my personal opinion and always considered Carbonite as my one "go-to" addon. :o


That would A) defeat the purpose of avoiding bloat by performing minimal modifications to already loaded blizzard interface elements.
B) prevent learning anything.

Sure, when I was much less versed and younger just looking for a way to do things, I would just install an addon

myrroddin 07-29-18 09:35 PM

I took Jeffy's comment to mean "install Carbonite just to look at its code, see what it is doing and why".

kurapica.igas 07-31-18 06:22 AM

You should use the BattlefieldMapFrame.ScrollContainer as the parent, also with a big frame level like

Lua Code:
  1. QueueStatusMinimapButton:SetParent(BattlefieldMapFrame.ScrollContainer)
  2. QueueStatusMinimapButton:SetFrameLevel(5)
  3. QueueStatusMinimapButton:ClearAllPoints()
  4. QueueStatusMinimapButton:SetPoint("TOPRIGHT", BattlefieldMapFrame.ScrollContainer)
  5. QueueStatusMinimapButton:Show()


All times are GMT -6. The time now is 06:30 AM.

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