Quantcast
Strange strata behavior with BattlefieldMapFrame - WoWInterface
Thread Tools Display Modes
07-28-18, 07:01 PM   #1
Theroxis
A Fallenroot Satyr
Join Date: Jun 2018
Posts: 24
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

Last edited by Theroxis : 07-28-18 at 10:27 PM.
  Reply With Quote
07-28-18, 08:46 PM   #2
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 550
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.
  Reply With Quote
07-28-18, 10:31 PM   #3
Theroxis
A Fallenroot Satyr
Join Date: Jun 2018
Posts: 24
Originally Posted by Kanegasi View Post
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
  Reply With Quote
07-29-18, 02:25 AM   #4
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,152
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.
  Reply With Quote
07-29-18, 10:50 AM   #5
Theroxis
A Fallenroot Satyr
Join Date: Jun 2018
Posts: 24
Originally Posted by myrroddin View Post
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
  Reply With Quote
07-29-18, 11:50 AM   #6
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,361
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.
__________________
Ahhhh, the vagueries of the aging mind. Wait.... What was I saying?


Carbonite <----- GitHub main module (Maps ONLY) download link. The other modules are also available on GitHub.
Carbonite-CLASSIC<----- GitHub link to Carbonite Classic. Thanks to ircdirk for this!

Last edited by jeffy162 : 07-29-18 at 11:53 AM. Reason: more blah blah blah.
  Reply With Quote
07-29-18, 01:10 PM   #7
Theroxis
A Fallenroot Satyr
Join Date: Jun 2018
Posts: 24
Originally Posted by jeffy162 View Post
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.

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
  Reply With Quote
07-29-18, 09:35 PM   #8
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,152
I took Jeffy's comment to mean "install Carbonite just to look at its code, see what it is doing and why".
  Reply With Quote
07-31-18, 06:22 AM   #9
kurapica.igas
A Flamescale Wyrmkin
Join Date: Aug 2011
Posts: 149
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()

Last edited by kurapica.igas : 07-31-18 at 06:37 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Strange strata behavior with BattlefieldMapFrame

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