[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? |
There is no in-game setting for this.
Type /fstack and mouse over the button. Then take its name and call framename:Hide() |
Thanks, Seerah. I was afraid that was the answer when I couldn't find anything else.
|
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. |
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. |
Gotcha, thank you :D
|
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()) |
That's the [X] to open/close the minimap itself. He's talking about the button to open the world map.
|
Oops.
Code:
/run MiniMapWorldMapButton:SetShown(not MiniMapWorldMapButton:IsShown()) |
I got it solved, thanks to you fine folks!
|
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. ;)
|
PLAYER_LOGIN then? I only need to hide it once, and it stays hidden?
|
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. |
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:12 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI