/Tukui/modules/blizzard/symbol.lua
Lua | 37 lines | 31 code | 3 blank | 3 comment | 2 complexity | 73eb92b6f2c3ad7ee03bd3980e3813c8 MD5 | raw file
1local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales 2 3--[[ 4 original code by alza, edited by tukz for tukui 5--]] 6 7local menuFrame = CreateFrame("Frame", "TukuiMarkingFrame", UIParent, "UIDropDownMenuTemplate") 8local menuList = { 9 {text = L.symbol_CLEAR, 10 func = function() SetRaidTarget("target", 0) end}, 11 {text = L.symbol_SKULL, 12 func = function() SetRaidTarget("target", 8) end}, 13 {text = "|cffff0000"..L.symbol_CROSS.."|r", 14 func = function() SetRaidTarget("target", 7) end}, 15 {text = "|cff00ffff"..L.symbol_SQUARE.."|r", 16 func = function() SetRaidTarget("target", 6) end}, 17 {text = "|cffC7C7C7"..L.symbol_MOON.."|r", 18 func = function() SetRaidTarget("target", 5) end}, 19 {text = "|cff00ff00"..L.symbol_TRIANGLE.."|r", 20 func = function() SetRaidTarget("target", 4) end}, 21 {text = "|cff912CEE"..L.symbol_DIAMOND.."|r", 22 func = function() SetRaidTarget("target", 3) end}, 23 {text = "|cffFF8000"..L.symbol_CIRCLE.."|r", 24 func = function() SetRaidTarget("target", 2) end}, 25 {text = "|cffffff00"..L.symbol_STAR.."|r", 26 func = function() SetRaidTarget("target", 1) end}, 27} 28 29WorldFrame:HookScript("OnMouseDown", function(self, button) 30 if(button=="LeftButton" and IsShiftKeyDown() and IsControlKeyDown() and UnitExists("mouseover")) then 31 local inParty = (GetNumPartyMembers() > 0) 32 local inRaid = (GetNumRaidMembers() > 0) 33 if(inRaid and (IsRaidLeader() or IsRaidOfficer()) or (inParty and not inRaid)) then 34 EasyMenu(menuList, menuFrame, "cursor", 0, 0, "MENU", 1) 35 end 36 end 37end)