vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | --[[ |
2 | BOptions |
||
3 | A GUI Options frame for Bongos |
||
4 | --]] |
||
5 | |||
6 | local currentFrameName = "Global"; |
||
7 | |||
8 | function BOptions_OnLoad() |
||
9 | if not IsAddOnLoaded("Bongos_ActionBar") then |
||
10 | BOptionsMenuActionBar:Hide(); |
||
11 | BOptionsMenuPaging:Hide(); |
||
12 | BOptionsMenuContext:Hide(); |
||
13 | BOptionsMenu:SetHeight(BOptionsMenu:GetHeight() - 66); |
||
14 | BOptionsMenuProfiles:ClearAllPoints(); |
||
15 | BOptionsMenuProfiles:SetPoint("TOP", BOptionsMenuVisibility, "BOTTOM", 0, -4); |
||
16 | end |
||
17 | end |
||
18 | |||
19 | function BOptions_OnShow() |
||
20 | local currentFrame = getglobal("BOptionsPanel" .. currentFrameName); |
||
21 | if not currentFrame:IsShown() then |
||
22 | currentFrame:Show() |
||
23 | getglobal("BOptionsMenu" .. currentFrameName):LockHighlight(); |
||
24 | end |
||
25 | end |
||
26 | |||
27 | function BOptions_SwitchTab(newFrameName) |
||
28 | if newFrameName ~= currentFrameName and getglobal("BOptionsPanel" .. newFrameName) then |
||
29 | this:LockHighlight(); |
||
30 | getglobal("BOptionsMenu" .. currentFrameName):UnlockHighlight(); |
||
31 | getglobal("BOptionsPanel" .. currentFrameName):Hide(); |
||
32 | getglobal("BOptionsPanel" .. newFrameName):Show(); |
||
33 | currentFrameName = newFrameName; |
||
34 | end |
||
35 | end |