vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | AtlasFu = AceLibrary("AceAddon-2.0"):new("AceConsole-2.0", "AceDB-2.0", "FuBarPlugin-2.0"); |
2 | local L = AceLibrary("AceLocale-2.0"):new("AtlasFu"); |
||
3 | local Tablet = AceLibrary("Tablet-2.0"); |
||
4 | |||
5 | L:RegisterTranslations("enUS", function() return { |
||
6 | ["tabletHint"] = "Click to show Atlas.", |
||
7 | ["labelName"] = "Atlas", |
||
8 | } end); |
||
9 | |||
10 | AtlasFu:RegisterDB("AtlasFuDB"); |
||
11 | AtlasFu.hasIcon = true; |
||
12 | AtlasFu.defaultPosition = "RIGHT"; |
||
13 | |||
14 | local optionsTable = { |
||
15 | handler = AtlasFu, |
||
16 | type = "group", |
||
17 | args = {}; |
||
18 | }; |
||
19 | |||
20 | AtlasFu:RegisterChatCommand({ "/atlasfu", "/atlas2fu" }, optionsTable); |
||
21 | AtlasFu.OnMenuRequest = optionsTable; |
||
22 | |||
23 | function AtlasFu:OnTextUpdate() |
||
24 | if (self:IsTextShown()) then |
||
25 | self:ShowText(); |
||
26 | self:SetText("|cffffffff"..L"labelName".."|r"); |
||
27 | else |
||
28 | self:HideText(); |
||
29 | end |
||
30 | end |
||
31 | |||
32 | function AtlasFu:OnTooltipUpdate() |
||
33 | Tablet:SetHint(L"tabletHint"); |
||
34 | end |
||
35 | |||
36 | function AtlasFu:OnClick() |
||
37 | Atlas_Toggle(); |
||
38 | end |