WoWInterface (
-   AddOn Help/Support (
-   -   [Classic] getting rid of the world map button attached to the minimap (

myrroddin 09-22-19 03:29 PM

[Classic] getting rid of the world map button attached to the minimap
I don't need that button when I know to press "m" to get to my world map. Is there a way to disable or get rid of that button altogether?

My possibly relevant installed addons include Mapster, AdvancedInterfaceOptions, and ElvUI. Between those plus the game's built-in options, I can't find a way to hide or disable this.


Seerah 09-22-19 07:23 PM

There is no in-game setting for this.

Type /fstack and mouse over the button. Then take its name and call framename:Hide()

myrroddin 09-23-19 01:24 AM

Thanks, Seerah. I was afraid that was the answer when I couldn't find anything else.

myrroddin 09-24-19 12:55 PM

I found the frame's name (don't remember it, but I can find it again). Is the only thing I need to do is call Hide() on it? There are scripts like OnClick, perhaps others. Do I need to SetScript and nil those? Or securely hook with an empty function?

If I do need to hook or securely hook all the scripts, how do I find out which scripts exist on the frame without guessing how many and which ones? OnClick was a gimme as clicking the button opens the world map. Going from memory, I'd guess there is OnEnter or somesuch.

**EDIT** Probably wrong here, but just in case: calling Hide() on the frame will cause all children to also hide; that ought to affect any mouse interaction too. Am I overcomplicating this, and should stick to a simple Hide() and be done with it?

I have never messed directly with Blizzard's UI code before, so my questions are noob level 0.

Seerah 09-24-19 01:15 PM

If it's hidden, you can't click on it. If it even has children that you don't want to hide (I don't think it does), then that can be fixed.

As soon as you reload the UI or restart the game, everything will be back to the way it was before.

myrroddin 09-24-19 01:33 PM

Gotcha, thank you :D

Fizzlemizz 09-24-19 01:35 PM

I just Hide() it along with other MM related assets when the game starts but you can test toggle it for yourself.


/run MinimapToggleButton:SetShown(not MinimapToggleButton:IsShown())
Assuming that's the button you mean :)

Seerah 09-24-19 08:22 PM

That's the [X] to open/close the minimap itself. He's talking about the button to open the world map.

Fizzlemizz 09-24-19 08:33 PM



/run MiniMapWorldMapButton:SetShown(not MiniMapWorldMapButton:IsShown())

myrroddin 09-24-19 09:35 PM

I got it solved, thanks to you fine folks!

Seerah 09-25-19 12:57 PM

Just FYI, your addon code gets reloaded and re-executed every time you reload the UI or log back in. Using PLAYER_ENTERING_WORLD for that purpose does nothing. What it does do, is rehide the texture every time you see a loading screen (zoning into an instance, for example). I don't think the UI tells the texture to reappear in this case. ;)

myrroddin 09-25-19 01:06 PM

PLAYER_LOGIN then? I only need to hide it once, and it stays hidden?

Seerah 09-25-19 07:19 PM

Sure. If it hasn't been created by the UI yet when your addon loads (which it might be - did you check?) then you can do it on PLAYER_LOGIN to make it only run your code once. That, or you can unregister the PLAYER_ENTERING_WORLD event after doing what you need to.

Your code could possibly be only 1 line. :D

That said, we are talking a negligible performance/footprint increase because the addon is so small and does so little anyway. I was just clearing up your misconception.

fyehu43 09-26-19 01:43 AM

There's also an addon that allows you to remove a great poriton of the default ui.

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

vBulletin © 2021, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI