PageRenderTime 23ms CodeModel.GetById 17ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Tukui/modules/actionbars/Bar2.lua

http://github.com/Asphyxia/Tukui
Lua | 34 lines | 25 code | 5 blank | 4 comment | 8 complexity | 8f9d701a0967ffe10435fa550dd55818 MD5 | raw file
 1local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales
 2
 3if not C["actionbar"].enable == true then return end
 4
 5---------------------------------------------------------------------------
 6-- setup MultiBarBottomLeft as bar #2
 7---------------------------------------------------------------------------
 8
 9local bar = TukuiBar2
10MultiBarBottomLeft:SetParent(bar)
11
12-- setup the bar
13for i=1, 12 do
14	local b = _G["MultiBarBottomLeftButton"..i]
15	local b2 = _G["MultiBarBottomLeftButton"..i-1]
16	b:Size(T.buttonsize, T.buttonsize)
17	b:ClearAllPoints()
18	b:SetFrameStrata("BACKGROUND")
19	b:SetFrameLevel(15)
20	
21	if C["actionbar"].mainswap then
22		if i == 1 then
23			b:Point("TOP", ActionButton1, "BOTTOM", 0, -T.buttonspacing)
24		else
25			b:Point("LEFT", b2, "RIGHT", T.buttonspacing, 0)
26		end
27	else
28		if i == 1 then
29			b:Point("BOTTOM", ActionButton1, "TOP", 0, T.buttonspacing)
30		else
31			b:Point("LEFT", b2, "RIGHT", T.buttonspacing, 0)
32		end
33	end
34end