Thread Tools Display Modes
09-22-19, 03:29 PM   #1
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
[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.

Suggestions?
  Reply With Quote
09-22-19, 07:23 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
There is no in-game setting for this.

Type /fstack and mouse over the button. Then take its name and call framename:Hide()
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
09-23-19, 01:24 AM   #3
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
Thanks, Seerah. I was afraid that was the answer when I couldn't find anything else.
  Reply With Quote
09-24-19, 12:55 PM   #4
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
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.

Last edited by myrroddin : 09-24-19 at 12:58 PM. Reason: hiding a parent affects children
  Reply With Quote
09-24-19, 01:15 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
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.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
09-24-19, 01:33 PM   #6
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
Gotcha, thank you
  Reply With Quote
09-24-19, 01:35 PM   #7
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
I just Hide() it along with other MM related assets when the game starts but you can test toggle it for yourself.

Code:
/run MinimapToggleButton:SetShown(not MinimapToggleButton:IsShown())
Assuming that's the button you mean
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
09-24-19, 08:22 PM   #8
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
That's the [X] to open/close the minimap itself. He's talking about the button to open the world map.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
09-24-19, 08:33 PM   #9
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
Oops.

Code:
/run MiniMapWorldMapButton:SetShown(not MiniMapWorldMapButton:IsShown())
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 09-24-19 at 09:17 PM.
  Reply With Quote
09-24-19, 09:35 PM   #10
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
I got it solved, thanks to you fine folks!
  Reply With Quote
09-25-19, 12:57 PM   #11
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
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.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
09-25-19, 01:06 PM   #12
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
PLAYER_LOGIN then? I only need to hide it once, and it stays hidden?
  Reply With Quote
09-25-19, 07:19 PM   #13
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
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.

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.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
09-26-19, 01:43 AM   #14
fyehu43
A Deviate Faerie Dragon
Join Date: Sep 2019
Posts: 12
There's also an addon that allows you to remove a great poriton of the default ui.
__________________
Shaman Raid Tank & expert in off-meta specs: Melee Hunter, Support Warrior, Priest Tank, etc...
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » [Classic] getting rid of the world map button attached to the minimap

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