vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | TITAN_AUTOHIDE_ID = "AutoHide"; |
2 | |||
3 | function TitanPanelAutoHideButton_OnLoad() |
||
4 | this.registry = { |
||
5 | id = TITAN_AUTOHIDE_ID, |
||
6 | builtIn = 1, |
||
7 | version = TITAN_VERSION, |
||
8 | menuText = TITAN_AUTOHIDE_MENU_TEXT, |
||
9 | tooltipTitle = TITAN_AUTOHIDE_TOOLTIP, |
||
10 | }; |
||
11 | end |
||
12 | |||
13 | function TitanPanelAutoHideButton_OnShow() |
||
14 | TitanPanelAutoHideButton_SetIcon(); |
||
15 | end |
||
16 | |||
17 | function TitanPanelAutoHideButton_OnClick(button) |
||
18 | if (button == "LeftButton") then |
||
19 | TitanPanelBarButton_ToggleAutoHide(); |
||
20 | end |
||
21 | end |
||
22 | |||
23 | function TitanPanelAutoHideButton_SetIcon() |
||
24 | local icon = TitanPanelAutoHideButtonIcon; |
||
25 | if (TitanPanelGetVar("AutoHide")) then |
||
26 | icon:SetTexture(TITAN_ARTWORK_PATH.."TitanPanelPushpinOut"); |
||
27 | else |
||
28 | icon:SetTexture(TITAN_ARTWORK_PATH.."TitanPanelPushpinIn"); |
||
29 | end |
||
30 | end |
||
31 | |||
32 | function TitanPanelRightClickMenu_PrepareAutoHideMenu() |
||
33 | TitanPanelRightClickMenu_AddTitle(TitanPlugins[TITAN_AUTOHIDE_ID].menuText); |
||
34 | TitanPanelRightClickMenu_AddCommand(TITAN_PANEL_MENU_HIDE, TITAN_AUTOHIDE_ID, TITAN_PANEL_MENU_FUNC_HIDE); |
||
35 | end |