LibDBIcon-1.0

Allows addons to easily create a lightweight minimap icon as an alternative to heavier LDB displays.

Patreon Please support my work on Patreon/GitHub

LibDBIcon-1.0 is a small library you can throw in your addon that will create a minimap icon.

Simply get a reference to the library in your addon like so:

local icon = LibStub("LibDBIcon-1.0")

This library REQUIRES you use a separate library called LibDataBroker (LDB). After you've registered your LDB object called "MyLDB", you can do:

icon:Register("MyLDB", myLDB, savedVarTable)

Where myLDB is a object reference to your LDB display and savedVarTable is a table where the library can store data like minimap position, radius, etc.

When you create the display, the library will automatically hide or show the icon based on the "hide = true/false" key in savedVarTable. If you want to add an option to hide or show the display, you can hide or show the icon manually during play with:

icon:Hide("MyLDB")

icon:Show("MyLDB")

So in conclusion, here is a complete example (using Ace3) of how to use this library:

local addon = LibStub("AceAddon-3.0"):NewAddon("Bunnies")  
local bunnyLDB = LibStub("LibDataBroker-1.1"):NewDataObject("Bunnies", {  
	type = "data source",  
	text = "Bunnies!",  
	icon = "Interface\\Icons\\INV_Chest_Cloth_17",  
	OnClick = function() print("BUNNIES ARE TAKING OVER THE WORLD") end,  
})  
local icon = LibStub("LibDBIcon-1.0")  

function addon:OnInitialize()
	-- Assuming you have a ## SavedVariables: BunniesDB line in your TOC
	self.db = LibStub("AceDB-3.0"):New("BunniesDB", {
		profile = {
			minimap = {
				hide = false,
			},
		},
	})
	icon:Register("Bunnies", bunnyLDB, self.db.profile.minimap)
end

The LibDBIcon-1.0 Team

profile avatar
Owner
  • 53
    Followers
  • 67
    Projects
  • 510.0M
    Downloads
Donate

More from FunkehView all

  • BigWigs (Boss Timers & Tools) project image

    BigWigs (Boss Timers & Tools)

    • 194.4M
    • Addons

    BigWigs is a modular and extremely lightweight addon designed to provide you with the tools you need to beat any boss encounter.

    • 194.4M
    • June 3, 2026
    • Addons
    • +1
  • LittleWigs project image

    LittleWigs

    • 124.6M
    • Addons

    A BigWigs content plugin for dungeons, delves, and scenarios.

    • 124.6M
    • June 3, 2026
    • Addons
    • +1
  • Transcriptor project image

    Transcriptor

    • 1.0M
    • Addons

    Logging utility for boss encounters.

    • 1.0M
    • May 27, 2026
    • Addons
  • TargetPercent project image

    TargetPercent

    • 299.8K
    • Addons

    Adds a health percentage to the Blizzard target, focus & boss frames.

    • 299.8K
    • May 27, 2026
    • Addons
  • BigWigs (Boss Timers & Tools) project image

    BigWigs (Boss Timers & Tools)

    • 194.4M
    • Addons

    BigWigs is a modular and extremely lightweight addon designed to provide you with the tools you need to beat any boss encounter.

    • 194.4M
    • June 3, 2026
    • Addons
    • +1
  • LittleWigs project image

    LittleWigs

    • 124.6M
    • Addons

    A BigWigs content plugin for dungeons, delves, and scenarios.

    • 124.6M
    • June 3, 2026
    • Addons
    • +1
  • Transcriptor project image

    Transcriptor

    • 1.0M
    • Addons

    Logging utility for boss encounters.

    • 1.0M
    • May 27, 2026
    • Addons
  • TargetPercent project image

    TargetPercent

    • 299.8K
    • Addons

    Adds a health percentage to the Blizzard target, focus & boss frames.

    • 299.8K
    • May 27, 2026
    • Addons