diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua index 20c48c5..b3a2f40 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua @@ -34,33 +34,39 @@ CALENDAR STYLER local function CalendarStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.calendar ~= true then return - end; + end _G["CalendarFrame"]:Formula409() CalendarFrame:SetPanelTemplate("Halftone") STYLE:ApplyCloseButtonStyle(CalendarCloseButton) CalendarCloseButton:Point("TOPRIGHT", CalendarFrame, "TOPRIGHT", -4, -4) STYLE:ApplyPaginationStyle(CalendarPrevMonthButton) STYLE:ApplyPaginationStyle(CalendarNextMonthButton) + do - local d = CalendarFilterFrame; - local e = CalendarFilterButton; - d:Formula409() - d:Width(155) - _G[d:GetName().."Text"]:ClearAllPoints() - _G[d:GetName().."Text"]:Point("RIGHT", e, "LEFT", -2, 0) - e:ClearAllPoints() - e:Point("RIGHT", d, "RIGHT", -10, 3) - hooksecurefunc(e, "SetPoint", function(f, g, h, i, j, k) - if g ~= "RIGHT"or h ~= d or i ~= "RIGHT"or j ~= -10 or k ~= 3 then - f:ClearAllPoints() - f:Point("RIGHT", d, "RIGHT", -10, 3) - end - end) - STYLE:ApplyPaginationStyle(e, true) - d:SetPanelTemplate("Default") - d.Panel:Point("TOPLEFT", 20, 2) - d.Panel:Point("BOTTOMRIGHT", e, "BOTTOMRIGHT", 2, -2) - end; + local cfframe = _G["CalendarFilterFrame"]; + + if(cfframe) then + cfframe:Formula409() + cfframe:Width(155) + cfframe:SetPanelTemplate("Default") + + local cftext = _G["CalendarFilterFrameText"] + if(cftext) then + cftext:ClearAllPoints() + cftext:Point("RIGHT", cfbutton, "LEFT", -2, 0) + end + + local cfbutton = _G["CalendarFilterButton"]; + if(cfbutton) then + cfbutton:ClearAllPoints() + cfbutton:Point("RIGHT", cfframe, "RIGHT", -10, 3) + STYLE:ApplyPaginationStyle(cfbutton, true) + cfframe.Panel:Point("TOPLEFT", 20, 2) + cfframe.Panel:Point("BOTTOMRIGHT", cfbutton, "BOTTOMRIGHT", 2, -2) + end + end + end + local l = CreateFrame("Frame", "CalendarFrameBackdrop", CalendarFrame) l:SetFixedPanelTemplate("Default") l:Point("TOPLEFT", 10, -72) @@ -78,7 +84,7 @@ local function CalendarStyle() end) for u = 1, 42 do _G["CalendarDayButton"..u]:SetFrameLevel(_G["CalendarDayButton"..u]:GetFrameLevel()+1) - end; + end CalendarCreateEventFrame:Formula409() CalendarCreateEventFrame:SetFixedPanelTemplate("Transparent", true) CalendarCreateEventFrame:Point("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) @@ -117,7 +123,7 @@ local function CalendarStyle() local F = e:GetNormalTexture() F:SetTexture("Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes") F:SetTexCoord(E[1]+0.015, E[2]-0.02, E[3]+0.018, E[4]-0.02) - end; + end CalendarClassButton1:Point("TOPLEFT", CalendarClassButtonContainer, "TOPLEFT", 5, 0) CalendarClassTotalsButton:Formula409() CalendarClassTotalsButton:SetPanelTemplate("Default") @@ -161,7 +167,7 @@ local function CalendarStyle() STYLE:ApplyScrollStyle(CalendarViewEventInviteListScrollFrameScrollBar) for _,btn in pairs(CalendarButtons)do _G[btn]:SetButtonTemplate() - end; + end CalendarEventPickerFrame:Formula409() CalendarEventPickerTitleFrame:Formula409() CalendarEventPickerFrame:SetFixedPanelTemplate("Transparent", true) @@ -170,7 +176,7 @@ local function CalendarStyle() STYLE:ApplyScrollStyle(CalendarCreateEventDescriptionScrollFrameScrollBar) STYLE:ApplyScrollStyle(CalendarCreateEventInviteListScrollFrameScrollBar) STYLE:ApplyScrollStyle(CalendarViewEventDescriptionScrollFrameScrollBar) -end; +end --[[ ########################################################## STYLE LOADING