vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 --Changing Anchors Routine--------------------------------------------------------------------------------------
2 ----------------------------------------------------------------------------------------------------------------
3 function aftt_GameTooltip_SetDefaultAnchor(tooltip, parent)
4  
5  
6  
7 --Set X and Y Default Offset-------------------------------
8 -----------------------------------------------------------
9 if (AF_ToolTip[aftt_localUser]["PositionX"] == nil) then
10 AF_ToolTip[aftt_localUser]["PositionX"] = 0;
11 end
12 if (AF_ToolTip[aftt_localUser]["PositionY"] == nil) then
13 AF_ToolTip[aftt_localUser]["PositionY"] = 15;
14 end
15  
16  
17  
18 --Follow Mouse---------------------------------------------
19 -----------------------------------------------------------
20 if (AF_ToolTip[aftt_localUser]["Anchor"] == "mouse") then
21 tooltip:SetOwner(parent, "ANCHOR_CURSOR");
22  
23  
24  
25 --Top Row--------------------------------------------------
26 -----------------------------------------------------------
27 elseif (AF_ToolTip[aftt_localUser]["Anchor"] == "topleft") then
28 tooltip:SetOwner(parent, "ANCHOR_NONE");
29 tooltip:SetPoint("TOPLEFT", "UIParent", "TOPLEFT", AF_ToolTip[aftt_localUser]["PositionX"], -AF_ToolTip[aftt_localUser]["PositionY"]);
30  
31 elseif (AF_ToolTip[aftt_localUser]["Anchor"] == "top") then
32 tooltip:SetOwner(parent, "ANCHOR_NONE");
33 tooltip:SetPoint("TOP", "UIParent", "TOP", AF_ToolTip[aftt_localUser]["PositionX"], -AF_ToolTip[aftt_localUser]["PositionY"]);
34  
35 elseif (AF_ToolTip[aftt_localUser]["Anchor"] == "topright") then
36 tooltip:SetOwner(parent, "ANCHOR_NONE");
37 tooltip:SetPoint("TOPRIGHT", "UIParent", "TOPRIGHT", -AF_ToolTip[aftt_localUser]["PositionX"], -AF_ToolTip[aftt_localUser]["PositionY"]);
38  
39  
40  
41 --Center Row-----------------------------------------------
42 -----------------------------------------------------------
43 elseif (AF_ToolTip[aftt_localUser]["Anchor"] == "left") then
44 tooltip:SetOwner(parent, "ANCHOR_NONE");
45 tooltip:SetPoint("LEFT", "UIParent", "LEFT", AF_ToolTip[aftt_localUser]["PositionX"], AF_ToolTip[aftt_localUser]["PositionY"]);
46  
47 elseif (AF_ToolTip[aftt_localUser]["Anchor"] == "center") then
48 tooltip:SetOwner(parent, "ANCHOR_NONE");
49 tooltip:SetPoint("CENTER", "UIParent", "CENTER", AF_ToolTip[aftt_localUser]["PositionX"], AF_ToolTip[aftt_localUser]["PositionY"]);
50  
51 elseif (AF_ToolTip[aftt_localUser]["Anchor"] == "right") then
52 tooltip:SetOwner(parent, "ANCHOR_NONE");
53 tooltip:SetPoint("RIGHT", "UIParent", "RIGHT", -AF_ToolTip[aftt_localUser]["PositionX"], AF_ToolTip[aftt_localUser]["PositionY"]);
54  
55  
56  
57 --Bottom Row-----------------------------------------------
58 -----------------------------------------------------------
59 elseif (AF_ToolTip[aftt_localUser]["Anchor"] == "bottomleft") then
60 tooltip:SetOwner(parent, "ANCHOR_NONE");
61 tooltip:SetPoint("BOTTOMLEFT", "UIParent", "BOTTOMLEFT", AF_ToolTip[aftt_localUser]["PositionX"], AF_ToolTip[aftt_localUser]["PositionY"]);
62  
63 elseif (AF_ToolTip[aftt_localUser]["Anchor"] == "bottom") then
64 tooltip:SetOwner(parent, "ANCHOR_NONE");
65 tooltip:SetPoint("BOTTOM", "UIParent", "BOTTOM", AF_ToolTip[aftt_localUser]["PositionX"], AF_ToolTip[aftt_localUser]["PositionY"]);
66  
67 elseif (AF_ToolTip[aftt_localUser]["Anchor"] == "bottomright") then
68 tooltip:SetOwner(parent, "ANCHOR_NONE");
69 tooltip:SetPoint("BOTTOMRIGHT", "UIParent", "BOTTOMRIGHT", -AF_ToolTip[aftt_localUser]["PositionX"], AF_ToolTip[aftt_localUser]["PositionY"]);
70  
71  
72  
73 --Default--------------------------------------------------
74 -----------------------------------------------------------
75 else
76 aftt_OriginalGameTooltip_SetDefaultAnchor(tooltip, parent);
77 end
78 end