WoWInterface - View Single Post - LibDBIcon ... how to hide ?
View Single Post
03-29-20, 11:44 AM   #4
A Frostmaul Preserver
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 290
Hi myrroddin,

thanks so much for your reply.

At the moment I am using only a minimal set of libraries.

Lua Code:
  1. libs\LibStub.lua
  2. libs\CallbackHandler-1.0.lua
  3. libs\LibDataBroker-1.1.lua
  4. libs\LibQTip-1.0.lua

I don't think I can use your code. Most of it relies on ACE libraries I think, or am I wrong ?!

Btw I have make it works thanks to your inputs.

Lua Code:
  1. local ldb = LibStub:GetLibrary("LibDataBroker-1.1")
  3. local dataobj = ldb:NewDataObject(ADDON, {
  4.     type    = "data source",
  5.     label   = "gmLm",
  6.     icon    = "Interface\\Addons\\"..ADDON.."\\icon.tga",
  7.     text    = ""
  8. })
  10. local icon = LibStub("LibDBIcon-1.0")
  11. icon:Register("gmLm", dataobj, minimapicondb)

And then I can call:

Lua Code:
  1. icon:Show("gmLm")
  2. or
  3. icon:Hide("gmLm")

Obviusly it is a very simple solutions and it doesnt take care of saved positions and preferences, but I dont have the libs to do it I think ... or I am wrong ?

Btw thanks so much for your help.
It is so much appreciated.
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote