PageRenderTime 42ms CodeModel.GetById 37ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/Tukui/modules/blizzard/gm.lua

http://github.com/Asphyxia/Tukui
Lua | 32 lines | 21 code | 4 blank | 7 comment | 0 complexity | 7ba297ab3b17f28cb0d3019c214de139 MD5 | raw file
 1local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales
 2------------------------------------------------------------------------
 3--	GM ticket position
 4------------------------------------------------------------------------
 5
 6-- create our moving area
 7local TukuiGMFrameAnchor = CreateFrame("Button", "TukuiGMFrameAnchor", UIParent)
 8TukuiGMFrameAnchor:SetFrameStrata("TOOLTIP")
 9TukuiGMFrameAnchor:SetFrameLevel(20)
10TukuiGMFrameAnchor:SetHeight(40)
11TukuiGMFrameAnchor:SetWidth(TicketStatusFrameButton:GetWidth())
12TukuiGMFrameAnchor:SetClampedToScreen(true)
13TukuiGMFrameAnchor:SetMovable(true)
14TukuiGMFrameAnchor:SetTemplate("Default")
15TukuiGMFrameAnchor:SetBackdropBorderColor(1,0,0,1)
16TukuiGMFrameAnchor:SetBackdropColor(unpack(C.media.backdropcolor))
17TukuiGMFrameAnchor:Point("TOPLEFT", 4, -40)
18TukuiGMFrameAnchor.text = T.SetFontString(TukuiGMFrameAnchor, C.media.pixelfont, C["datatext"].fontsize, "MONOCHROMEOUTLINE")
19TukuiGMFrameAnchor.text:SetPoint("CENTER")
20TukuiGMFrameAnchor.text:SetText(L.move_gmframe)
21TukuiGMFrameAnchor.text:SetParent(TukuiGMFrameAnchor)
22TukuiGMFrameAnchor:Hide()
23
24TicketStatusFrame:ClearAllPoints()
25TicketStatusFrame:SetPoint("TOP", TukuiGMFrameAnchor, "TOP")
26
27------------------------------------------------------------------------
28--	GM toggle command
29------------------------------------------------------------------------
30
31SLASH_GM1 = "/gm"
32SlashCmdList["GM"] = function() ToggleHelpFrame() end