- Home
- Downloads
-
Addons & Mods
Featured
World of Warcraft
4,841 Addons
-
Popular Downloads
- Top World of Warcraft Addons
- Top Rift Addons
- Top Skyrim Mods
- Top Minecraft Server Mods
- Top Terraria Maps
- Top Starcraft II Maps
- Top Runes of Magic Addons
- Top Warhammer Online Addons
- Top Age of Conan Addons
-
- Curse Client
- Premium
- News
- Giveaways
- Forums
LibDBIcon-1.0
- 1 Like
- World of Warcraft
- 375,517 Downloads
- Supports: 4.2
- 281 Average Daily Downloads
- Created 10/17/2008 9:47:12 AM
- Updated 6/28/2011 4:44:56 PM
- 39 Favorites
- Project Site
- License: GNU General Public License version 2 (GPLv2)
- Release Type: Release
- Newest File: r20
About LibDBIcon-1.0
LibDBIcon-1.0 is a small library you can throw in your LDB addon that will create a small minimap icon for you and nothing more.
Simply get a reference to the library in your addon like so;
local icon = LibStub("LibDBIcon-1.0")
Then 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 and the like.
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 Ace3 example of how to use this library
local addon = LibStub("AceAddon-3.0"):NewAddon("Bunnies", "AceConsole-3.0") 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() -- Obviously you'll need a ## SavedVariables: BunniesDB line in your TOC, duh! self.db = LibStub("AceDB-3.0"):New("BunniesDB", { profile = { minimap = { hide = false, }, }, }) icon:Register("Bunnies!", bunnyLDB, self.db.profile.minimap) self:RegisterChatCommand("bunnies", "CommandTheBunnies") end function addon:CommandTheBunnies() self.db.profile.minimap.hide = not self.db.profile.minimap.hide if self.db.profile.minimap.hide then icon:Hide("Bunnies!") else icon:Show("Bunnies!") end end
------------------------------------------------------------------------
r20 | rabbit | 2011-06-28 21:40:26 +0000 (Tue, 28 Jun 2011) | 1 line
Changed paths:
M /trunk/LibDBIcon-1.0.toc
toc bump
------------------------------------------------------------------------
r19 | rabbit | 2011-05-05 13:55:11 +0000 (Thu, 05 May 2011) | 1 line
Changed paths:
M /trunk/LibDBIcon-1.0/LibDBIcon-1.0.lua
Update the GetMinimapShape values courtesy of ethancentaurai in bug 14.
------------------------------------------------------------------------
| File Name | Release Type | Game Version | Downloads | Date |
|---|---|---|---|---|
| r20 | Release | 4.2 | 97,258 | 6/28/2011 4:44:56 PM |
| r18 | Release | 4.0.3a | 188,500 | 11/16/2010 3:57:22 PM |
| r17 | Release | 4.0.1 | 86,684 | 10/31/2010 5:19:25 PM |
| r16 | Release | 4.0.1 | 36,008 | 10/16/2010 3:16:15 AM |
| r15 | Release | 3.3.5 | 5,302 | 9/20/2010 2:26:06 AM |
| r11 | Release | 3.3.0 | - | 9/3/2009 4:22:40 AM |
| r9 | Release | 3.1.0 | - | 4/14/2009 6:24:12 AM |
Addon Packs Containing This...
-
Miakada's Addon Pack
-
Igdrazil's Addon Pack
-
Papamayo's Addon Pack
-
Tank Or Heal UI Cataclysm
-
Lilililili - Mage Pack
-
Erdras Raid/All around UI
-
riahna's Addon Pack
-
Weilandoh1's Addon Pack
-
Reptile's Addon Pack
-
Xenum's Clean Raiding Addon Pack
-
Thengel 2011
-
Zyphero's All-Around Pack
-
celastus's Addon Pack
-
JahUI [1920x1080]
-
koosmatrooss's Addon Pack
-
Simple beginner's Addons Pack
-
Alkamar's Essentials Pack
-
Paradar warrior PvE UI