vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 BW_TTIP_SORTORDER = "Specifies the sort order for the player list in the BuffWatch Window"
2 BW_TTIP_SHOWONSTARTUP = "Show the BuffWatch window on startup"
3 BW_TTIP_SHOWPETS = "Show pets in the player list"
4 BW_TTIP_SHOWCASTABLEBUFFS = "Only show buffs you can cast"
5 BW_TTIP_SHOWDEBUFFS = "Show debuffs"
6 BW_TTIP_SHOWDISPELLDEBUFFS = "Only show debuffs you can dispell"
7 BW_TTIP_DEBUFFSALWAYSVISIBLE = "Always show players with debuffs"
8 BW_TTIP_ALIGNBUFFS = "Align buff icons for all players"
9 BW_TTIP_SHOWEXPIREDWARNING = "Shows a warning if buffs have started to expire"
10 BW_TTIP_PLAYEXPIREDSOUND = "Plays a sound if buffs have started to expire"
11 BW_TTIP_HIGHLIGHTPVP = "Highlight players that are PvP Flagged"
12 BW_TTIP_PREVENTPVPBUFF = "Prevent BuffWatch from buffing players that are PvP Flagged"
13 BW_TTIP_BUFFTHRESHOLD = "Number of players missing the buff for it to cast group version"
14 BW_TTIP_ALPHA = "Sets the transparency of the BuffWatch window"
15 BW_TTIP_UPDPERSEC = "Maximum number of updates per second to refresh buffs"
16 BW_TTIP_SHOWUPDPERSEC = "Show updates per second counter"
17  
18 function BW_Options_OnLoad()
19  
20 -- Add BW_Options to the UIPanelWindows list
21 UIPanelWindows["BW_Options"] = {area = "center", pushable = 0}
22  
23 end
24  
25 function BW_Options_Init()
26 BW_Options_ShowOnStartup:SetChecked(BuffWatchConfig.show_on_startup)
27 BW_Options_ShowPets:SetChecked(BuffWatchConfig.ShowPets)
28 BW_Options_ShowOnlyCastableBuffs:SetChecked(BuffWatchConfig.ShowCastableBuffs)
29 BW_Options_ShowDebuffs:SetChecked(BuffWatchConfig.ShowDebuffs)
30 BW_Options_ShowOnlyDispellDebuffs:SetChecked(BuffWatchConfig.ShowDispellableDebuffs)
31 BW_Options_DebuffsAlwaysVisible:SetChecked(BuffWatchConfig.DebuffsAlwaysVisible)
32 BW_Options_AlignBuffs:SetChecked(BuffWatchConfig.AlignBuffs)
33 BW_Options_ShowExpiredWarning:SetChecked(BuffWatchConfig.ExpiredWarning)
34 BW_Options_PlayExpiredSound:SetChecked(BuffWatchConfig.ExpiredSound)
35 BW_Options_HighlightPvP:SetChecked(BuffWatchConfig.HighlightPvP)
36 BW_Options_PreventPvPBuff:SetChecked(BuffWatchConfig.PreventPvPBuff)
37 BW_Options_BuffThreshold:SetValue(BuffWatchConfig.BuffThreshold)
38 BW_Options_Alpha:SetValue(BuffWatchConfig.alpha)
39 BW_Options_UpdPerSec:SetValue(BuffWatchConfig.UpdPerSec)
40 BW_Options_ShowUpdPerSec:SetChecked(BuffWatchConfig.ShowUpdPerSec)
41 if BuffWatchConfig.ShowUpdPerSec == true then
42 BW_UPS:Show()
43 else
44 BW_UPS:Hide()
45 end
46 end
47  
48 function BW_Options_SortOrder_OnClick()
49 i = this:GetID()
50 UIDropDownMenu_SetSelectedID(BW_Options_SortOrder, i)
51 BuffWatchConfig.SortOrder = BW_SORTORDER_DROPDOWN_LIST[i]
52 BW_GetAllBuffs()
53 BW_UpdateBuffStatus(true)
54 BW_ResizeWindow()
55 end
56  
57 function BW_Options_SortOrder_Initialize()
58 local info
59 for i = 1, getn(BW_SORTORDER_DROPDOWN_LIST) do
60 info = {
61 text = BW_SORTORDER_DROPDOWN_LIST[i],
62 func = BW_Options_SortOrder_OnClick
63 }
64 UIDropDownMenu_AddButton(info)
65 end
66 end
67  
68 function BW_Options_SortOrder_OnLoad()
69 UIDropDownMenu_Initialize(this, BW_Options_SortOrder_Initialize)
70 UIDropDownMenu_SetText(BuffWatchConfig.SortOrder, this)
71 UIDropDownMenu_SetWidth(90, BW_Options_SortOrder)
72 end
73  
74 function BW_Options_HighlightPvP_Clicked()
75 BW_ColourAllNames()
76 end