Pet Battle Scripts

Pet Battle Scripts

265k Downloads

Can't hide minimap button and showing icon on Chocolatebar.

TreizeEU opened this issue ยท 4 comments

commented

Hello.

I recently installed this addon to make pet battling a bit less tedious, but I found an issue:

When I wanted to show the icon on my ChocolateBar addon, but also hide the minimap icon. If I try, it will make ChocolateBar to not register this addon at all, thus not showing its icon on the bar.

Any ideas?

commented

Am I doing it correctly? Or where do you want me to add the "self:Refresh()" line?

`function Minimap:OnInitialize()

local LDB = LibStub('LibDataBroker-1.1')

local function HideTooltip()
    GameTooltip:Hide()

    if LibDBIcon.tooltip then
        LibDBIcon.tooltip:Hide()
    self:Refresh()
    end
end`
commented

The self:Refresh() needs to be added at nearly the very bottom. Just use this file though, it contains the edits: https://gist.githubusercontent.com/bloerwald/b5a631033b437c1f12712a38e3d797f1/raw/25b749daa9d4a4822e37d87856fbfbbbcd884aa7/Minimap.lua

commented

Cheers. I copied the raw text from that link and it seems to let me do what I want with the minimap icon and chocolatebar icon. :D

commented

This is fixed in #32, which will hopefully be merged soon.

In the meantime, you can manually replicate the change by

  • open UI/Minimap.lua
  • in function Minimap:OnInitialize(), remove
if Addon:GetSetting('hideMinimap') then
    return
end
  • in the same function, at the very bottom add self:Refresh().