Earlier Versions
Name | Size | Uploaded | Game Version | Downloads | |
0.2b beta | 9.43 KB | Oct 19, 2014 | 6.0.2 | 16,756 | Download |
0.1b beta | 4.68 KB | Oct 25, 2010 | 4.0.1 | 194 | Download |
0.1b-9-gf0d2651 alpha | 9.38 KB | Oct 19, 2014 | 6.0.2 | 53 | Download |
0.1b-8-g8c3be6b alpha | 9.36 KB | Aug 28, 2012 | 5.0.4 | 423 | Download |
0.1b-6-g6da2656 alpha | 9.28 KB | Nov 13, 2010 | 4.0.1 | 783 | Download |
0.1b-5-g53054bb alpha | 4.63 KB | Nov 13, 2010 | 4.0.1 | 56 | Download |
0.1b-3-g733196d alpha | 4.58 KB | Nov 6, 2010 | 4.0.1 | 75 | Download |
0.1b-2-gf7ee88a alpha | 4.54 KB | Oct 27, 2010 | 4.0.1 | 75 | Download |
r20101024132112 alpha | 4.64 KB | Oct 24, 2010 | 4.0.1 | 52 | Download |
r20101023214552 alpha | 4.46 KB | Oct 23, 2010 | 4.0.1 | 64 | Download |
r20101023184425 alpha | 4.41 KB | Oct 23, 2010 | 4.0.1 | 25 | Download |
r20101023172728 alpha | 4.38 KB | Oct 23, 2010 | 4.0.1 | 47 | Download |
r20101023171520 alpha | 4.25 KB | Oct 23, 2010 | 4.0.1 | 50 | Download |
Description
Central registry for addons to register their frames as possible frame anchor. Other addons can then retrieve the list of anchor and then let their user anchor the addon to whatever frame they like.
To register a frame with the registry:
LibStub("LibFrameAnchorRegistry-1.0"):RegisterAnchor("MyCateogry", "NameOfFrame", "Identidy", frame)
To register with sub-categories:
LibStub("LibFrameAnchorRegistry-1.0"):RegisterAnchor("MyCateogry\001MySub-Category", "NameOfFrame", "Identidy", frame)
To retrieve the actual frame:
local anchor = LibStub("LibFrameAnchorRegistry-1.0"):GetAnchor(db.AnchorID)
To use with AceConfig:
local frame CreateFrame("Frame", nil, UIparent) local options = { type = "group", args = { drop = { name = "Test", desc = "Some testing", type = "select", width = "double", values = function() return LibStub("LibFrameAnchorRegistry-1.0"):GetAnchors(frame) end, set = function(info, ident, name, frame) db.AnchorID = ident end, get = function() return db.AnchorID end, dialogControl = "FrameAnchorDropdown", }, }, } LibStub("AceConfig-3.0"):RegisterOptionsTable("Options", options, {"/myslash", "/my"})
To use stand-alone:
local frame CreateFrame("Frame", nil, UIparent) local t = AceGUI:Create("FrameAnchorDropdown") t:SetList(FA:GetAnchors(frame )) t:SetLabel("Anchor") t:SetValue(db.FrameAnchorID) t:SetCallback("OnValueChanged", function(self, event, ident, name, frame) db.FrameAnchorID = ident end)
Add a comment