This repository has been archived by the owner on Jun 23, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollBar.lua
77 lines (58 loc) · 1.66 KB
/
rollBar.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
--[[
rollBar
A dominos frame for rolling on items when in a party
--]]
local L = LibStub('AceLocale-3.0'):GetLocale('Dominos')
local ContainerFrame = Dominos:CreateClass('Frame', Dominos.Frame)
do
function ContainerFrame:New(id, frame, tooltip)
local bar = ContainerFrame.proto.New(self, id, tooltip)
bar.repositionedFrame = frame
bar:Layout()
return bar
end
function ContainerFrame:GetDefaults()
return {
point = 'LEFT',
columns = 1,
spacing = 2,
showInPetBattleUI = true,
showInOverrideUI = true,
}
end
function ContainerFrame:Layout()
local frame = self.repositionedFrame
frame:ClearAllPoints()
frame:SetPoint('BOTTOM', self.header)
local pW, pH = self:GetPadding()
self:SetSize(317 + pW, 119 + pH)
end
function ContainerFrame:CreateMenu()
local menu = Dominos:NewMenu(self.id)
local L = LibStub('AceLocale-3.0'):GetLocale('Dominos-Config')
local panel = menu:NewPanel(L.Layout)
panel.opacitySlider = panel:NewOpacitySlider()
panel.fadeSlider = panel:NewFadeSlider()
panel.scaleSlider = panel:NewScaleSlider()
panel.paddingSlider = panel:NewPaddingSlider()
self.menu = menu
end
end
local ContainerFrameModule = Dominos:NewModule('ContainerFrames')
do
function ContainerFrameModule:OnInitialize()
_G['GroupLootContainer'].ignoreFramePositionManager = true
_G['AlertFrame'].ignoreFramePositionManager = true
end
function ContainerFrameModule:Load()
self.frames = {
ContainerFrame:New('roll', _G.GroupLootContainer, L.TipRollBar),
ContainerFrame:New('alerts', _G.AlertFrame),
}
end
function ContainerFrameModule:Unload()
for i, frame in pairs(self.frames) do
frame:Free()
end
end
end