vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | FuBartender2 = AceLibrary("AceAddon-2.0"):new("AceEvent-2.0", "AceDB-2.0", "FuBarPlugin-2.0") |
2 | |||
3 | local Tablet = AceLibrary("Tablet-2.0") |
||
4 | |||
5 | FuBartender2.name = "Bartender2" |
||
6 | FuBartender2.version = "2.0." .. string.sub("$Revision: 12402 $", 12, -3) |
||
7 | FuBartender2.date = string.sub("$Date: 2006-09-30 18:58:37 -0400 (Sat, 30 Sep 2006) $", 8, 17) |
||
8 | FuBartender2.hasIcon = "Interface\\Icons\\INV_Drink_05" |
||
9 | FuBartender2.defaultMinimapPosition = 285 |
||
10 | FuBartender2.cannotDetachTooltip = true |
||
11 | FuBartender2.hasNoColor = true |
||
12 | FuBartender2.clickableTooltip = false |
||
13 | |||
14 | function FuBartender2:OnInitialize() |
||
15 | self:RegisterDB("FuBartender2DB") |
||
16 | Bartender.options.args.fubar = { |
||
17 | type = "group", |
||
18 | name = "FuBarPlugin Config", |
||
19 | desc = "Configure the FuBar Plugin", |
||
20 | args = {}, |
||
21 | } |
||
22 | |||
23 | AceLibrary("AceConsole-2.0"):InjectAceOptionsTable(self, Bartender.options.args.fubar) |
||
24 | self.OnMenuRequest = Bartender.options |
||
25 | end |
||
26 | |||
27 | function FuBartender2:OnClick() |
||
28 | self:LockButtons() |
||
29 | PlaySoundFile("Sound\\Creature\\Murloc\\mMurlocAggroOld.wav"); |
||
30 | end |
||
31 | |||
32 | function FuBartender2:LockButtons() |
||
33 | if LOCK_ACTIONBAR == "1" then |
||
34 | LOCK_ACTIONBAR = "0" |
||
35 | Bartender:Print("ActionBar lock |cffffffcf[|r|cffff0000Off|cffffffcf]|r") |
||
36 | else |
||
37 | LOCK_ACTIONBAR = "1" |
||
38 | Bartender:Print("ActionBar lock |cffffffcf[|r|cff00ff00On|cffffffcf]|r") |
||
39 | end |
||
40 | end |
||
41 | |||
42 | function FuBartender2:OnTooltipUpdate() |
||
43 | local cat = Tablet:AddCategory('columns', 2) |
||
44 | if LOCK_ACTIONBAR == "1" then |
||
45 | cat:AddLine( 'text', "Buttons:", |
||
46 | 'text2', "Locked", |
||
47 | 'text2R', 0, |
||
48 | 'text2G', 1, |
||
49 | 'text2B', 0) |
||
50 | else |
||
51 | cat:AddLine( 'text', "Status:", |
||
52 | 'text2', "Unlocked", |
||
53 | 'text2R', 1, |
||
54 | 'text2G', 0, |
||
55 | 'text2B', 0) |
||
56 | end |
||
57 | Tablet:SetHint("Left-click to Lock/Unlock.\nRight-click to configure.") |
||
58 | end |