Get an Epic Experience with Premium

LibDDI-1.0

Libraries Login to Add Favorites
  • 0 Likes
  • World of Warcraft
  • 1,208 Monthly Downloads
  • Supports: 6.0.2
  • 11,520 Total Downloads
  • Updated 10/14/2014
  • Created 11/28/2010
  • 5 Favorites
  • Project Site
  • Release Type: Release
  • License: GNU Lesser General Public License version 2.1 (LGPLv2.1)
  • Newest File: r22-release
or
Support development! **
Donate

About LibDDI-1.0

Provides several dropdown item types that can be used with AceGUI-3.0's AceGUIWidget-DropDown in order to style font, statusbar and sound-dropdowns properly, making it easier for the user to select the preferred item.
LibDDI can also be used with AceConfig option tables with the 'select' type, using the itemControl property.

The following item types are available: DDI-Font, DDI-Statusbar, DDI-Sound and DDI-RaidIcon.

Pull LibDDI-1.0 in via your TOC/embeds.xml and make sure it's loaded after AceGUI-3.0 and LibSharedMedia-3.0, and it's ready to be used. There's no real API; LibDDI just provides a few widget types for AceGUI.

Example

-- If you're using AceOptions tables;
local fonts = LibStub("LibSharedMedia-3.0"):List("font")
local option = {
  type = "select",
  name = "Font",
  values = fonts,
  get = function()
    for i, v in next, fonts do
      if v == db.font then return i end
    end
  end,
  set = function(_, value)
    db.font = fonts[value]
  end,
  itemControl = "DDI-Font",
}
-- If you're using AceGUI-3.0 directly;
local dropdown = AceGUI:Create("Dropdown")
dropdown:SetLabel("Font")
dropdown:SetList(fonts, nil, "DDI-Font")
dropdown:SetCallback("OnValueChanged", function(_, _, value)
  db.font = fonts[value]
end)
for i, v in next, fonts do
  if v == db.font then
    dropdown:SetValue(i)
    break
  end
end


updateToggle(self)

Common

Parameters

self


------------------------------------------------------------------------
r22 | funkydude | 2014-10-14 20:52:58 +0000 (Tue, 14 Oct 2014) | 1 line
Changed paths:
   A /tags/r22-release (from /trunk:21)

Tagging as r22-release
------------------------------------------------------------------------
r21 | funkydude | 2014-10-14 19:58:52 +0000 (Tue, 14 Oct 2014) | 1 line
Changed paths:
   M /trunk/LibDDI-1.0.toc

bump toc
------------------------------------------------------------------------

Login to Curse

Don't have an account? Create One.

Get an epic experience with Curse Premium
  • Faster addon downloads
  • Premium-Only Beta Giveaways
  • Ad-Free Curse experience
  • Premium Curse Client
  • and many More Features
  • Learn More »

VIP trip to SMITE World Championship