vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 --------------------------------------------------------------------------------
2 -- Options
3 --------------------------------------------------------------------------------
4 function AtlasLootOptions_Init()
5 --Initialise all the check boxes on the options frame
6 AtlasLootOptionsFrameSafeLinks:SetChecked(AtlasLootOptions.SafeLinks);
7 AtlasLootOptionsFrameAllLinks:SetChecked(AtlasLootOptions.AllLinks);
8 AtlasLootOptionsFrameDefaultTT:SetChecked(AtlasLootOptions.DefaultTT);
9 AtlasLootOptionsFrameLootlinkTT:SetChecked(AtlasLootOptions.LootlinkTT);
10 AtlasLootOptionsFrameItemSyncTT:SetChecked(AtlasLootOptions.ItemSyncTT);
11 AtlasLootOptionsFrameEquipCompare:SetChecked(AtlasLootOptions.EquipCompare);
12 end
13  
14 function AtlasLootOptions_OnLoad()
15 --Disable checkboxes of missing addons
16 if( not LootLink_SetTooltip ) then
17 AtlasLootOptionsFrameLootlinkTT:Disable();
18 AtlasLootOptionsFrameLootlinkTTText:SetText(ATLASLOOT_OPTIONS_LOOTLINK_TOOLTIPS_DISABLED);
19 end
20 if( not ISYNC_VERSION ) then
21 AtlasLootOptionsFrameItemSyncTT:Disable();
22 AtlasLootOptionsFrameItemSyncTTText:SetText(ATLASLOOT_OPTIONS_ITEMSYNC_TOOLTIPS_DISABLED);
23 end
24 if( not EquipCompare_RegisterTooltip ) then
25 AtlasLootOptionsFrameEquipCompare:Disable();
26 AtlasLootOptionsFrameEquipCompareText:SetText(ATLASLOOT_OPTIONS_EQUIPCOMPARE_DISABLED);
27 end
28 AtlasLootOptions_Init();
29 temp=AtlasLootOptions.SafeLinks;
30 UIPanelWindows['AtlasLootOptionsFrame'] = {area = 'center', pushable = 0};
31 end
32  
33 --Functions for toggling options check boxes.
34 function AtlasLootOptions_SafeLinksToggle()
35 if(AtlasLootOptions.SafeLinks) then
36 AtlasLootOptions.SafeLinks = false;
37 else
38 AtlasLootOptions.SafeLinks = true;
39 AtlasLootOptions.AllLinks = false;
40 end
41 AtlasLootOptions_Init();
42 end
43  
44 function AtlasLootOptions_AllLinksToggle()
45 if(AtlasLootOptions.AllLinks) then
46 AtlasLootOptions.AllLinks = false;
47 else
48 AtlasLootOptions.AllLinks = true;
49 AtlasLootOptions.SafeLinks = false;
50 end
51 AtlasLootOptions_Init();
52 end
53  
54 function AtlasLootOptions_DefaultTTToggle()
55 AtlasLootOptions.DefaultTT = true;
56 AtlasLootOptions.LootlinkTT = false;
57 AtlasLootOptions.ItemSyncTT = false;
58 AtlasLootOptions_Init();
59 end
60  
61 function AtlasLootOptions_LootlinkTTToggle()
62 AtlasLootOptions.DefaultTT = false;
63 AtlasLootOptions.LootlinkTT = true;
64 AtlasLootOptions.ItemSyncTT = false;
65 AtlasLootOptions_Init();
66 end
67  
68 function AtlasLootOptions_ItemSyncTTToggle()
69 AtlasLootOptions.DefaultTT = false;
70 AtlasLootOptions.LootlinkTT = false;
71 AtlasLootOptions.ItemSyncTT = true;
72 AtlasLootOptions_Init();
73 end
74  
75 function AtlasLootOptions_EquipCompareToggle()
76 if(AtlasLootOptions.EquipCompare) then
77 AtlasLootOptions.EquipCompare = false;
78 EquipCompare_UnregisterTooltip(AtlasLootTooltip);
79 else
80 AtlasLootOptions.EquipCompare = true;
81 EquipCompare_RegisterTooltip(AtlasLootTooltip);
82 end
83 AtlasLootOptions_Init();
84 end