Commit 70904399 authored by Merathilis's avatar Merathilis
Browse files

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) ...@@ -576,6 +576,18 @@ function MER:ReskinRole(self, role)
end end
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) local function Styling(f, useStripes, useGradient, useShadow, shadowOverlayWidth, shadowOverlayHeight, shadowOverlayAlpha)
assert(f, "doesn't exist!") assert(f, "doesn't exist!")
local frameName = f.GetName and f:GetName() local frameName = f.GetName and f:GetName()
......
...@@ -610,7 +610,8 @@ function MER:SetupLayout() ...@@ -610,7 +610,8 @@ function MER:SetupLayout()
MER:SetMoverPosition("MER_LocPanel_Mover", "TOP", E.UIParent, "TOP", 0, 0) MER:SetMoverPosition("MER_LocPanel_Mover", "TOP", E.UIParent, "TOP", 0, 0)
MER:SetMoverPosition("MER_MicroBarMover", "TOP", E.UIParent, "TOP", 0, -19) MER:SetMoverPosition("MER_MicroBarMover", "TOP", E.UIParent, "TOP", 0, -19)
MER:SetMoverPosition("MER_OrderhallMover", "TOPLEFT", E.UIParent, "TOPLEFT", 2 -2) 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) MER:SetMoverPosition("MER_SquareMinimapButtonBarMover", "BOTTOMRIGHT", E.UIParent, "BOTTOMRIGHT", -10, 198)
--[[---------------------------------- --[[----------------------------------
......
...@@ -9,6 +9,7 @@ local LO = E:GetModule("Layout") ...@@ -9,6 +9,7 @@ local LO = E:GetModule("Layout")
--Cache global variables --Cache global variables
--Lua functions --Lua functions
local _G = _G local _G = _G
local unpack = unpack
--WoW API / Variables --WoW API / Variables
local CreateFrame = CreateFrame local CreateFrame = CreateFrame
local InCombatLockdown = InCombatLockdown local InCombatLockdown = InCombatLockdown
...@@ -21,6 +22,7 @@ local hooksecurefunc = hooksecurefunc ...@@ -21,6 +22,7 @@ local hooksecurefunc = hooksecurefunc
-- GLOBALS: RightChatTab, RightChatPanel, ChatTab_Datatext_Panel -- GLOBALS: RightChatTab, RightChatPanel, ChatTab_Datatext_Panel
local PANEL_HEIGHT = 19; local PANEL_HEIGHT = 19;
local r, g, b = unpack(E.media.rgbvaluecolor)
function MERL:LoadLayout() function MERL:LoadLayout()
--Create extra panels --Create extra panels
...@@ -358,6 +360,36 @@ function MERL:CreatePanels() ...@@ -358,6 +360,36 @@ function MERL:CreatePanels()
MerathilisUIButton2:SetScript("OnLeave", ChatPanels_OnLeave) MerathilisUIButton2:SetScript("OnLeave", ChatPanels_OnLeave)
end 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() function MERL:regEvents()
self:ToggleChatPanel() self:ToggleChatPanel()
self:MiddleDatatextLayout() self:MiddleDatatextLayout()
...@@ -383,6 +415,7 @@ end ...@@ -383,6 +415,7 @@ end
function MERL:Initialize() function MERL:Initialize()
self:CreatePanels() self:CreatePanels()
self:CreateStylePanels()
self:ChangeLayout() self:ChangeLayout()
self:regEvents() self:regEvents()
self:CreateChatButtons() self:CreateChatButtons()
......
...@@ -60,7 +60,7 @@ function MI:CreateRaidManager() ...@@ -60,7 +60,7 @@ function MI:CreateRaidManager()
local header = CreateFrame("Button", nil, E.UIParent) local header = CreateFrame("Button", nil, E.UIParent)
header:SetSize(120, 28) header:SetSize(120, 28)
header:SetFrameLevel(2) header:SetFrameLevel(2)
header:SetPoint("TOPLEFT", E.UIParent, "TOPLEFT", 180, -20) header:SetPoint("TOPLEFT", E.UIParent, "TOPLEFT", 180, -12)
header:CreateBackdrop("Transparent") header:CreateBackdrop("Transparent")
header.backdrop:SetAllPoints() header.backdrop:SetAllPoints()
header.backdrop:Styling() 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