Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Rolecheck / ReadyCheck / Clear All
- local function CreateRaidButton(btnName,text,x,y)
- local frame = CreateFrame("Button", btnName, gWorldmarkers, "SecureActionButtonTemplate");
- frame:SetPoint("CENTER", gWorldmarkers,x,y)
- frame:SetWidth(60);
- frame:SetHeight(25);
- frame:SetBackdrop({
- bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
- edgeFile = "Interface\\Buttons\\WHITE8x8", edgeSize = 1,
- insets = {left = -0, right = -0, top = -0, bottom = -0}
- })
- frame:SetBackdropBorderColor(G.bordercolor.r, G.bordercolor.g, G.bordercolor.b, G.bordercolor.a)
- frame:SetBackdropColor(0,0,0,0)
- frame:SetAttribute("type", "macro");
- t = frame:CreateFontString("raidbutton")
- t:SetFont("Interface\\AddOns\\gempUI\\media\\fonts\\square.ttf", 13, "THINOUTLINE");
- t:SetText(text);
- t:SetPoint("CENTER", frame, "CENTER", 2,0);
- local buttonOverlay = CreateFrame("Frame", nil, frame)
- buttonOverlay:SetWidth(58)
- buttonOverlay:SetHeight(24)
- buttonOverlay:SetPoint("CENTER", frame, "CENTER", 0,0)
- buttonOverlay:SetBackdrop({
- bgFile = [[Interface\Buttons\WHITE8x8]],
- edgeFile = [[Interface\Buttons\WHITE8x8]],
- edgeSize = 1,
- })
- buttonOverlay:SetBackdropColor(0,0,0,0)
- buttonOverlay:SetBackdropBorderColor(0, 0, 0,0)
- frame:SetScript('OnEnter', function() buttonOverlay:SetBackdropColor(1,1,1,0.15) end)
- frame:SetScript('OnLeave', function() buttonOverlay:SetBackdropColor(0,0,0,0) end)
- end
- CreateRaidButton("wReadycheck","Ready", -59, 23);
- wReadycheck:SetAttribute("macrotext", "/readycheck");
- CreateRaidButton("wRolecheck","Role", 0, 23);
- wRolecheck:SetAttribute("macrotext", "/run InitiateRolePoll()");
- CreateRaidButton("wClearAll","Clear", 59, 23);
- wClearAll:SetAttribute("macrotext", "/cwm all");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement