Commit 70904399 authored by Merathilis's avatar Merathilis

Added a new Style Frame on the Topleft /-right. Will see if i keep it.

parent 1b28809d
......@@ -576,6 +576,18 @@ function MER:ReskinRole(self, role)
end
end
function MER:CreateGradientFrame(frame, w, h, o, r, g, b, a1, a2)
assert(frame, "doesn't exist!")
frame:SetSize(w, h)
frame:SetFrameStrata("BACKGROUND")
local gf = frame:CreateTexture(nil, "BACKGROUND")
gf:SetAllPoints()
gf:SetTexture(E.media.normTex)
gf:SetGradientAlpha(o, r, g, b, a1, r, g, b, a2)
end
local function Styling(f, useStripes, useGradient, useShadow, shadowOverlayWidth, shadowOverlayHeight, shadowOverlayAlpha)
assert(f, "doesn't exist!")
local frameName = f.GetName and f:GetName()
......
......@@ -610,7 +610,8 @@ function MER:SetupLayout()
MER:SetMoverPosition("MER_LocPanel_Mover", "TOP", E.UIParent, "TOP", 0, 0)
MER:SetMoverPosition("MER_MicroBarMover", "TOP", E.UIParent, "TOP", 0, -19)
MER:SetMoverPosition("MER_OrderhallMover", "TOPLEFT", E.UIParent, "TOPLEFT", 2 -2)
MER:SetMoverPosition("MER_RaidBuffReminderMover", "TOPLEFT", E.UIParent, "TOPLEFT", 9, -18)
MER:SetMoverPosition("MER_RaidBuffReminderMover", "TOPLEFT", E.UIParent, "TOPLEFT", 10, -12)
MER:SetMoverPosition("MER_RaidManager", "TOPLEFT", E.UIParent, "TOPLEFT", 180, -12)
MER:SetMoverPosition("MER_SquareMinimapButtonBarMover", "BOTTOMRIGHT", E.UIParent, "BOTTOMRIGHT", -10, 198)
--[[----------------------------------
......
......@@ -9,6 +9,7 @@ local LO = E:GetModule("Layout")
--Cache global variables
--Lua functions
local _G = _G
local unpack = unpack
--WoW API / Variables
local CreateFrame = CreateFrame
local InCombatLockdown = InCombatLockdown
......@@ -21,6 +22,7 @@ local hooksecurefunc = hooksecurefunc
-- GLOBALS: RightChatTab, RightChatPanel, ChatTab_Datatext_Panel
local PANEL_HEIGHT = 19;
local r, g, b = unpack(E.media.rgbvaluecolor)
function MERL:LoadLayout()
--Create extra panels
......@@ -358,6 +360,36 @@ function MERL:CreatePanels()
MerathilisUIButton2:SetScript("OnLeave", ChatPanels_OnLeave)
end
function MERL:CreateStylePanels()
if E.db.mui.general.panels ~= true then return end
-- Style Background for RaidBuffReminder / Raid Manager
local TopLeftStylePanel = CreateFrame("Frame", nil, E.UIParent)
TopLeftStylePanel:SetPoint("TOPLEFT", E.UIParent, "TOPLEFT", 10, -15)
MER:CreateGradientFrame(TopLeftStylePanel, _G.LeftChatPanel:GetWidth(), 28, "Horizontal", 0, 0, 0, .5, 0)
local TopLeftStylePanel1 = CreateFrame("Frame", nil, TopLeftStylePanel)
TopLeftStylePanel1:SetPoint("BOTTOM", TopLeftStylePanel, "TOP")
MER:CreateGradientFrame(TopLeftStylePanel1, _G.LeftChatPanel:GetWidth(), E.mult, "Horizontal", r, g, b, .7, 0)
local TopLeftStylePanel2 = CreateFrame("Frame", nil, TopLeftStylePanel)
TopLeftStylePanel2:SetPoint("TOP", TopLeftStylePanel, "BOTTOM")
MER:CreateGradientFrame(TopLeftStylePanel2, _G.LeftChatPanel:GetWidth(), E.mult, "Horizontal", r, g, b, .7, 0)
-- Style for the BuffFrame
local TopRightStylePanel = CreateFrame("Frame", nil, E.UIParent)
TopRightStylePanel:SetPoint("TOPRIGHT", E.UIParent, "TOPRIGHT", -10, -15)
MER:CreateGradientFrame(TopRightStylePanel, _G.LeftChatPanel:GetWidth(), 36, "Horizontal", 0, 0, 0, 0, .5)
local TopRightStylePanel1 = CreateFrame("Frame", nil, TopRightStylePanel)
TopRightStylePanel1:SetPoint("BOTTOM", TopRightStylePanel, "TOP")
MER:CreateGradientFrame(TopRightStylePanel1, _G.LeftChatPanel:GetWidth(), E.mult, "Horizontal", r, g, b, .7, 0)
local TopLeftStylePanel2 = CreateFrame("Frame", nil, TopRightStylePanel)
TopLeftStylePanel2:SetPoint("TOP", TopRightStylePanel, "BOTTOM")
MER:CreateGradientFrame(TopLeftStylePanel2, _G.LeftChatPanel:GetWidth(), E.mult, "Horizontal", r, g, b, .7, 0)
end
function MERL:regEvents()
self:ToggleChatPanel()
self:MiddleDatatextLayout()
......@@ -383,6 +415,7 @@ end
function MERL:Initialize()
self:CreatePanels()
self:CreateStylePanels()
self:ChangeLayout()
self:regEvents()
self:CreateChatButtons()
......
......@@ -60,7 +60,7 @@ function MI:CreateRaidManager()
local header = CreateFrame("Button", nil, E.UIParent)
header:SetSize(120, 28)
header:SetFrameLevel(2)
header:SetPoint("TOPLEFT", E.UIParent, "TOPLEFT", 180, -20)
header:SetPoint("TOPLEFT", E.UIParent, "TOPLEFT", 180, -12)
header:CreateBackdrop("Transparent")
header.backdrop:SetAllPoints()
header.backdrop:Styling()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment