tekkub / greedbeacon

WoW addon - Track down those needy and greedy party members

This URL has Read+Write access

tekkub (author)
Thu Apr 16 00:53:15 -0700 2009
commit  f309fd526e5aa898abfbc21397d659f4cbb93200
tree    cfeadaaee5862a5ae0041357e1289c7ed23e0109
parent  19b9bd933422d3067fffb2bf61bc38d5853563c9
greedbeacon / Config.lua
100644 47 lines (35 sloc) 1.725 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---------------------
-- Panel --
---------------------
 
local frame = CreateFrame("Frame", nil, InterfaceOptionsFramePanelContainer)
frame.name = "GreedBeacon"
frame:Hide()
frame:SetScript("OnShow", function(frame)
local title, subtitle = LibStub("tekKonfig-Heading").new(frame, "GreedBeacon", "This panel allows you to control which chat frame GreedBeacon outputs to.")
 
 
local chatframedropdown, chatframedropdowntext, chatframedropdowncontainer = LibStub("tekKonfig-Dropdown").new(frame, "Output to", "TOPLEFT", subtitle, "BOTTOMLEFT", -2, -8)
chatframedropdowntext:SetText(GreedBeaconDB.frame)
chatframedropdown.tiptext = "Select which chat frame to output to."
 
local function OnClick(self)
UIDropDownMenu_SetSelectedValue(chatframedropdown, self.value)
chatframedropdowntext:SetText(self.value)
GreedBeaconDB.frame = self.value
end
UIDropDownMenu_Initialize(chatframedropdown, function()
local selected, info = UIDropDownMenu_GetSelectedValue(chatframedropdown) or GreedBeaconDB.frame, UIDropDownMenu_CreateInfo()
 
for i=1,7 do
info.text = "ChatFrame"..i
info.value = "ChatFrame"..i
info.func = OnClick
info.checked = ("ChatFrame"..i) == selected
UIDropDownMenu_AddButton(info)
end
end)
 
 
local ident = LibStub("tekKonfig-Button").new_small(frame, "TOP", chatframedropdown, "TOP")
ident:SetPoint("RIGHT", -16, 0)
ident:SetText("Identify")
ident.tiptext = "Identify each chat frame"
ident:SetScript("OnClick", function(self) for i=1,7 do _G["ChatFrame"..i]:AddMessage("|cFF33FF99GreedBeacon|r: This is ChatFrame"..i) end end)
 
 
frame:SetScript("OnShow", nil)
end)
 
InterfaceOptions_AddCategory(frame)
LibStub("tekKonfig-AboutPanel").new("GreedBeacon", "GreedBeacon")