Quantcast Alternative to MinimapButtonFrame - WoWInterface
Thread Tools Display Modes
09-28-19, 09:54 AM   #1
bonytony
A Fallenroot Satyr
 
bonytony's Avatar
Join Date: Dec 2013
Posts: 22
Alternative to MinimapButtonFrame

As the title says, I've been looking for an alternative to MBF, as I would prefer to collect all of my icons to access from a drawer somewhere on the screen, rather than have them clutter the map. I've turned off most of them, but tbh the convenience of the buttons being there is nice.

I've tried the old MBF as well as Norgana Slidebar (from auctioneer) but MBF throws LUA errors (edit: no longer giving errors, but again will not grab a lot of icons), and Slidebar only pulls about 6 icons out of the 8-9 I would like.

Honestly I'm also not opposed to some direction on how to make this myself to be honest. This is something I've been missing more than most other addons.

Last edited by bonytony : 09-28-19 at 09:56 AM.
  Reply With Quote
09-28-19, 01:53 PM   #2
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,344
I know that it hasn't been updated in a while, but, do you know how to add icons to MBF?
Notes: TO ADD OR REMOVE A BUTTON YOU CAN EITHER HAVE THE MOUSE CURSOR OVER THE BUTTON TO BE REMOVED WHEN YOU EXECUTE /MBF ADD OR /MBF REMOVE OR YOU CAN NOW TYPE IN THE NAME OF THE BUTTON. /MBF ADD [ButtonName] OR /MBF REMOVE [buttonName] The ability to add minimap icons to the table can be a general or partial name of the icons. The button override table add should be the exact name of the button that you want to override and collect
It's a bit long, but it does work (or, at least it did when I was still playing). Minimap Button Frame will not be able to "pick up" icons that either don't have a name or are used in a"special way" by the addon they represent.
__________________
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 : 09-28-19 at 01:59 PM. Reason: more blah blah blah.
  Reply With Quote
09-30-19, 06:25 PM   #3
MooreaTv
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: May 2019
Posts: 31
Not sure if you're the same person that asked in discord but you may find
https://www.wowinterface.com/downloa...atMinimap.html
helpful (it's not a drawer but it auto hides buttons when you move your mouse away from the minimap and puts it back when you get back over it - and it works for all buttons not just libdbicon compliant ones)
  Reply With Quote
10-01-19, 08:18 AM   #4
sumoldguy
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jan 2015
Posts: 16
Autioneer Classic has the "Slidebar" and it does a great job at picking up buttons.. so between that and sexi map, you should be fine.. I really miss detached minimap buttons addon
For anyone ballzy enough to fix it for classic.. Detached MiniMap Buttons
  Reply With Quote
10-01-19, 11:43 AM   #5
MooreaTv
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: May 2019
Posts: 31
Originally Posted by sumoldguy View Post
Autioneer Classic has the "Slidebar" and it does a great job at picking up buttons.. so between that and sexi map, you should be fine.. I really miss detached minimap buttons addon
For anyone ballzy enough to fix it for classic.. Detached MiniMap Buttons
I can add a move everything to neat minimap if you want but I don't really expect 2019 addons to have unmoveable minimap buttons?
(or you mean removing the constraint that say libdbicon force on buttons... my addons let you move the buttons anywhere... I could add that option)
  Reply With Quote
10-01-19, 06:29 PM   #6
Terenna
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 105
I think you might want to do something like this:

Lua Code:
  1. --This block of code will move our minimap addon icons to below the minimap in a custom frame
  2. local btnblklist = { --these are the children of the minimap that we DON'T want to move to our button bar, that way when we look for other children, we only take addon icons
  3.     ['MinimapMailFrame']            = true,
  4.     ['MinimapBackdrop']             = true,
  5.     ['GameTimeFrame']               = true,
  6.     ['TimeManagerClockButton']      = true,
  7.     ['MiniMapWorldMapButton']       = true,
  8.     ['MiniMapTracking']             = true,
  9.     ['MinimapZoomIn']               = true,
  10.     ['MinimapZoomOut']              = true,
  11.     ['QueueStatusMinimapButton']    = true,
  12.     ['MinimapZoneTextButton']       = true
  13. }
  14.  
  15. local ButtonHoldBarChildren = {ButtonHoldBar:GetChildren()}
  16. local MiniMapChildren = {Minimap:GetChildren()}
  17. local function moveMinimapButtons() --stolen from bdMinimap and changed to be more efficient
  18.     ButtonHoldBarChildren = {ButtonHoldBar:GetChildren()}
  19.     MiniMapChildren = {Minimap:GetChildren()}
  20.     for k, v in pairs(MiniMapChildren) do
  21.         if not btnblklist[v:GetName()] then --check against our table made above, only add things that we want in the bar
  22.             table.insert(ButtonHoldBarChildren, v)
  23.         end
  24.     end
  25.  
  26.     local last = nil
  27.     for i = 1, #ButtonHoldBarChildren do
  28.         local f = ButtonHoldBarChildren[i]
  29.         local n = f:GetName() or ''
  30.         if ((f:GetName() and (strfind(n, 'LibDB') or strfind(n, 'Button') or strfind(n, 'Btn') or strfind(n,'AllTheThings')) and f:IsShown())) then
  31.             if not f.skinned then
  32.                 f:SetParent(ButtonHoldBar)
  33.                 local r = {f:GetRegions()}
  34.                 for o = 1, #r do
  35.                     if (r[o].GetTexture and r[o]:GetTexture()) then
  36.                         local tex = r[o]:GetTexture()
  37.                         r[o]:SetAllPoints(f)
  38.                         if (hideTextures[tex]) then
  39.                             r[o]:Hide()
  40.                         elseif not strfind(tex, 'WHITE8x8') then
  41.                             local coord = table.concat({r[o]:GetTexCoord()})
  42.                             if coord == '00011011' then
  43.                                 r[o]:SetTexCoord(0.3, 0.7, 0.3, 0.7)
  44.                             end
  45.                         end
  46.                     end
  47.                 end
  48.  
  49.                 f.tbackground = f.tbackground or CreateFrame('frame', nil, f)
  50.                 f.tbackground:SetAllPoints()
  51.                 f.tbackground:SetFrameStrata('BACKGROUND')
  52.                 f:SetHitRectInsets(0, 0, 0, 0)
  53.                 f:HookScript('OnEnter', function(self)
  54.                     local newlines = {}
  55.                     for l = 1, 10 do
  56.                         local line = _G['GameTooltipTextLeft'..l]
  57.                         if (line and line:GetText()) then
  58.                             newlines[line:GetText()] = true
  59.                         end
  60.                     end
  61.  
  62.                     GameTooltip:Hide()
  63.                     GameTooltip:SetOwner(self, 'ANCHOR_TOPLEFT', 0, 6)
  64.                     for k, v in pairs(newlines) do
  65.                         GameTooltip:AddLine(k)
  66.                     end
  67.                     GameTooltip:Show()
  68.                 end)
  69.                 f.skinned = true
  70.             end
  71.  
  72.             -- sometimes a frame can get in here twice, don't let it
  73.             f:ClearAllPoints()
  74.             f:SetSize(20, 20)
  75.             if last then
  76.                 f:SetPoint('TOPLEFT', last, 'TOPRIGHT', 4, 0)
  77.                 f:SetPoint('BOTTOMRIGHT', last, 'BOTTOMRIGHT', f:GetWidth()+4, 0)
  78.             else
  79.                 f:SetPoint('TOPLEFT', ButtonHoldBar, 'TOPLEFT', 0, 0)
  80.                 f:SetPoint('BOTTOMRIGHT', ButtonHoldBar, 'TOPLEFT', f:GetWidth(), -f:GetHeight())
  81.             end
  82.             last = f
  83.         end
  84.     end
  85. end
  86. --This block of code runs the moveMinimapButtons() once, about 1s after init
  87. --because some addons handle their minimap icons slightly after loading
  88. local g = CreateFrame('frame')
  89. g.elapsed, g.counter = 0, 0
  90. g:SetScript('OnUpdate', function(self, elapsed)
  91.     self.elapsed = self.elapsed + elapsed
  92.     while (self.elapsed > 1 and self.counter <= 1) do
  93.         moveMinimapButtons()
  94.         self.counter = self.counter + 1
  95.         self.elapsed = 0
  96.     end
  97.  
  98.     if self.counter >= 2 then g:SetScript('OnUpdate', nil) end
  99. end)

It probably isn't the most optimized code in the world, but it runs exactly twice on load in and shouldn't impact things after that. It should grab most buttons, but if for some reason you have an addon whose button doesn't, you could /fstack and get its name and add it to this line:

Lua Code:
  1. if ((f:GetName() and (strfind(n, 'LibDB') or strfind(n, 'Button') or strfind(n, 'Btn') or strfind(n,'AllTheThings')) and f:IsShown())) then
  Reply With Quote
10-06-19, 12:59 AM   #7
fyehu43
A Deviate Faerie Dragon
Join Date: Sep 2019
Posts: 12
Originally Posted by bonytony View Post
As the title says, I've been looking for an alternative to MBF, as I would prefer to collect all of my icons to access from a drawer somewhere on the screen, rather than have them clutter the map. I've turned off most of them, but tbh the convenience of the buttons being there is nice.

I've tried the old MBF as well as Norgana Slidebar (from auctioneer) but MBF throws LUA errors (edit: no longer giving errors, but again will not grab a lot of icons), and Slidebar only pulls about 6 icons out of the 8-9 I would like.

Honestly I'm also not opposed to some direction on how to make this myself to be honest. This is something I've been missing more than most other addons.
did you find an alternative yet? I have some solution but it seems people in this thread are on top of it
__________________
Shaman Raid Tank & expert in off-meta specs: Melee Hunter, Support Warrior, Priest Tank, etc...
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Alternative to MinimapButtonFrame

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