Skip to content

Commit

Permalink
[retail] Update calendar skin
Browse files Browse the repository at this point in the history
Fixes #54
  • Loading branch information
Gethe committed Nov 8, 2022
1 parent c3e61df commit 81c7678
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 63 deletions.
56 changes: 33 additions & 23 deletions Skin/Retail/Interface/AddOns/Blizzard_Calendar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ do --[[ AddOns\Blizzard_Calendar.xml ]]
end
function Skin.CalendarEventInviteListTemplate(Frame)
Util.HideNineSlice(Frame)
Skin.WowScrollBoxList(Frame.ScrollBox)
Skin.WowTrimScrollBar(Frame.ScrollBar)

local name = Frame:GetName()
Skin.HybridScrollBarTemplate(_G[name.."ScrollFrameScrollBar"])
Skin.CalendarEventInviteSortButtonTemplate(_G[name.."NameSortButton"])
Skin.CalendarEventInviteSortButtonTemplate(_G[name.."ClassSortButton"])
Skin.CalendarEventInviteSortButtonTemplate(_G[name.."StatusSortButton"])
Expand Down Expand Up @@ -201,8 +203,7 @@ function private.AddOns.Blizzard_Calendar()
end

Skin.UIPanelCloseButton(_G.CalendarCloseButton)
_G.CalendarCloseButton:SetSize(32, 32)
_G.CalendarCloseButton:SetPoint("TOPRIGHT", calenderBG, 5, 5)
_G.CalendarCloseButton:SetPoint("TOPRIGHT", calenderBG, -5, -5)

Skin.UIMenuTemplate(_G.CalendarContextMenu)
Skin.UIMenuTemplate(_G.CalendarInviteStatusContextMenu)
Expand All @@ -222,31 +223,35 @@ function private.AddOns.Blizzard_Calendar()
------------------
-- View Holiday --
------------------
_G.CalendarViewHolidayInfoTexture:SetAlpha(0)
Skin.DialogBorderDarkTemplate(_G.CalendarViewHolidayFrame.Border)
Skin.DialogHeaderTemplate(_G.CalendarViewHolidayFrame.Header)
Skin.UIPanelScrollFrameTemplate(_G.CalendarViewHolidayScrollFrame)
local CalendarViewHolidayFrame = _G.CalendarViewHolidayFrame
CalendarViewHolidayFrame.Texture:SetAlpha(0)
Skin.DialogBorderDarkTemplate(CalendarViewHolidayFrame.Border)
Skin.DialogHeaderTemplate(CalendarViewHolidayFrame.Header)
Skin.ScrollingFontTemplate(CalendarViewHolidayFrame.ScrollingFont)
Skin.CalendarEventCloseButtonTemplate(_G.CalendarViewHolidayCloseButton)
Skin.CalendarModalEventOverlayTemplate(_G.CalendarViewHolidayFrameModalOverlay)


---------------
-- View Raid --
---------------
Skin.DialogBorderDarkTemplate(_G.CalendarViewRaidFrame.Border)
Skin.DialogHeaderTemplate(_G.CalendarViewRaidFrame.Header)
Skin.UIPanelScrollFrameTemplate(_G.CalendarViewRaidScrollFrame)
local CalendarViewRaidFrame = _G.CalendarViewRaidFrame
Skin.DialogBorderDarkTemplate(CalendarViewRaidFrame.Border)
Skin.DialogHeaderTemplate(CalendarViewRaidFrame.Header)
Skin.ScrollingFontTemplate(CalendarViewRaidFrame.ScrollingFont)
Skin.CalendarEventCloseButtonTemplate(_G.CalendarViewRaidCloseButton)
Skin.CalendarModalEventOverlayTemplate(_G.CalendarViewRaidFrameModalOverlay)


----------------
-- View Event --
----------------
Skin.DialogBorderDarkTemplate(_G.CalendarViewEventFrame.Border)
Skin.DialogHeaderTemplate(_G.CalendarViewEventFrame.Header)
local CalendarViewEventFrame = _G.CalendarViewEventFrame
Skin.DialogBorderDarkTemplate(CalendarViewEventFrame.Border)
Skin.DialogHeaderTemplate(CalendarViewEventFrame.Header)
Util.HideNineSlice(_G.CalendarViewEventDescriptionContainer)
Skin.CalendarEventDescriptionScrollFrame(_G.CalendarViewEventDescriptionScrollFrame)
Skin.ScrollingFontTemplate(_G.CalendarViewEventDescriptionContainer.ScrollingFont)
Skin.WowTrimScrollBar(_G.CalendarViewEventDescriptionContainer.ScrollBar)
_G.CalendarViewEventDivider:Hide()
Skin.CalendarViewEventRSVPButtonTemplate(_G.CalendarViewEventAcceptButton)
Skin.CalendarViewEventRSVPButtonTemplate(_G.CalendarViewEventTentativeButton)
Expand All @@ -270,14 +275,15 @@ function private.AddOns.Blizzard_Calendar()
Skin.UIDropDownMenuTemplate(_G.CalendarCreateEventAMPMDropDown)
Skin.UIDropDownMenuTemplate(_G.CalendarCreateEventDifficultyOptionDropDown)
Skin.UIDropDownMenuTemplate(_G.CalendarCreateEventCommunityDropDown)
Util.HideNineSlice(_G.CalendarCreateEventDescriptionContainer)
Skin.CalendarEventDescriptionScrollFrame(_G.CalendarCreateEventDescriptionScrollFrame)
_G.CalendarCreateEventDivider:Hide()
Skin.UICheckButtonTemplate(_G.CalendarCreateEventAutoApproveCheck)
Skin.UICheckButtonTemplate(_G.CalendarCreateEventLockEventCheck)
Skin.CalendarEventInviteListTemplate(_G.CalendarCreateEventInviteList)
Skin.InputBoxTemplate(_G.CalendarCreateEventInviteEdit)
Skin.UIPanelButtonTemplate(_G.CalendarCreateEventInviteButton)
Util.HideNineSlice(_G.CalendarCreateEventDescriptionContainer)
Skin.ScrollingEditBoxTemplate(_G.CalendarCreateEventDescriptionContainer.ScrollingEditBox)
Skin.WowTrimScrollBar(_G.CalendarCreateEventDescriptionContainer.ScrollBar)
Skin.UIPanelButtonTemplate(_G.CalendarCreateEventMassInviteButton)
_G.CalendarCreateEventMassInviteButtonBorder:Hide()
Skin.UIPanelButtonTemplate(_G.CalendarCreateEventRaidInviteButton)
Expand Down Expand Up @@ -307,23 +313,27 @@ function private.AddOns.Blizzard_Calendar()
------------------
-- Event Picker --
------------------
Skin.DialogBorderDarkTemplate(_G.CalendarEventPickerFrame.Border)
local CalendarEventPickerFrame = _G.CalendarEventPickerFrame
Skin.DialogBorderDarkTemplate(CalendarEventPickerFrame.Border)
_G.CalendarEventPickerFrameButtonBackground:Hide()
Skin.DialogHeaderTemplate(_G.CalendarEventPickerFrame.Header)
Skin.HybridScrollBarTemplate(_G.CalendarEventPickerScrollBar)
Skin.DialogHeaderTemplate(CalendarEventPickerFrame.Header)
Skin.WowScrollBoxList(CalendarEventPickerFrame.ScrollBox)
Skin.WowTrimScrollBar(CalendarEventPickerFrame.ScrollBar)
Skin.CalendarEventButtonTemplate(_G.CalendarEventPickerCloseButton)
_G.CalendarEventPickerCloseButtonBorder:Hide()


--------------------
-- Texture Picker --
--------------------
_G.CalendarTexturePickerFrame:ClearAllPoints()
_G.CalendarTexturePickerFrame:SetPoint("TOPRIGHT", _G.CalendarCreateEventTypeDropDown, "BOTTOMRIGHT", -4, 0)
Skin.DialogBorderDarkTemplate(_G.CalendarTexturePickerFrame.Border)
local CalendarTexturePickerFrame = _G.CalendarTexturePickerFrame
CalendarTexturePickerFrame:ClearAllPoints()
CalendarTexturePickerFrame:SetPoint("TOPRIGHT", _G.CalendarCreateEventTypeDropDown, "BOTTOMRIGHT", -4, 0)
Skin.DialogBorderDarkTemplate(CalendarTexturePickerFrame.Border)
_G.CalendarTexturePickerFrameButtonBackground:Hide()
Skin.DialogHeaderTemplate(_G.CalendarTexturePickerFrame.Header)
Skin.HybridScrollBarTemplate(_G.CalendarTexturePickerScrollBar)
Skin.DialogHeaderTemplate(CalendarTexturePickerFrame.Header)
Skin.WowScrollBoxList(CalendarEventPickerFrame.ScrollBox)
Skin.WowTrimScrollBar(CalendarEventPickerFrame.ScrollBar)
Skin.CalendarEventButtonTemplate(_G.CalendarTexturePickerCancelButton)
_G.CalendarTexturePickerCancelButtonBorder:Hide()
Skin.CalendarEventButtonTemplate(_G.CalendarTexturePickerAcceptButton)
Expand Down
2 changes: 1 addition & 1 deletion Skin/Retail/Interface/FrameXML/FrameXML.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ https://raw.githubusercontent.com/Meorawr/wow-ui-schema/main/UI.xsd">
<Script file="..\SharedXML\Scroll\ScrollBar.lua"/>
<Script file="..\SharedXML\Scroll\ScrollTemplates.lua"/>
<Script file="..\SharedXML\Scroll\TrimScrollBar.lua"/>
<!--Script file="..\SharedXML\Scroll\OribosScrollBar.lua"/-->
<Script file="..\SharedXML\Scroll\OribosScrollBar.lua"/>
<Script file="..\SharedXML\Scroll\MinimalScrollBar.lua"/>
<!--Script file="..\SharedXML\ButtonTray\ButtonTrayUtil.lua"/-->
<!--Script file="..\SharedXML\ButtonTray\ButtonTray.lua"/-->
Expand Down
14 changes: 4 additions & 10 deletions Skin/Retail/Interface/FrameXML/UIMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,14 @@ if private.shouldSkip() then return end

--[[ Core ]]
local Aurora = private.Aurora
local Base = Aurora.Base
local Hook, Skin = Aurora.Hook, Aurora.Skin
local Skin = Aurora.Skin

do --[[ FrameXML\UIMenu.lua ]]
function Hook.UIMenuTemplate_OnShow(self)
Base.SetBackdropColor(self)
end
end
--do --[[ FrameXML\UIMenu.lua ]]
--end

do --[[ FrameXML\UIMenu.xml ]]
function Skin.UIMenuTemplate(Frame)
Frame:HookScript("OnShow", Hook.UIMenuTemplate_OnShow)

Skin.FrameTypeFrame(Frame)
Skin.TooltipBackdropTemplate(Frame)
end
end

Expand Down
2 changes: 1 addition & 1 deletion Skin/Retail/Interface/SharedXML/Pools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local _, private = ...
if private.shouldSkip() then return end

--[[ Lua Globals ]]
-- luacheck: globals select
-- luacheck: globals select tostring

-- [[ Core ]]
local Aurora = private.Aurora
Expand Down
30 changes: 30 additions & 0 deletions Skin/Retail/Interface/SharedXML/Scroll/OribosScrollBar.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
local _, private = ...
if private.shouldSkip() then return end

--[[ Lua Globals ]]
-- luacheck: globals

--[[ Core ]]
local Aurora = private.Aurora
local Skin = Aurora.Skin

--do --[[ FrameXML\OribosScrollBar.lua ]]
--end

do --[[ FrameXML\OribosScrollBar.xml ]]
function Skin.OribosScrollBarButtonScripts(Frame)
Skin.FrameTypeScrollBarButton(Frame)
end

function Skin.OribosScrollBar(Frame)
Skin.VerticalScrollBarTemplate(Frame)

Frame.Track:GetRegions():Hide() -- background
Skin.OribosScrollBarButtonScripts(Frame.Track.Thumb)
Skin.OribosScrollBarButtonScripts(Frame.Back)
Skin.OribosScrollBarButtonScripts(Frame.Forward)
end
end

--function private.SharedXML.OribosScrollBar()
--end
18 changes: 7 additions & 11 deletions Skin/Retail/Interface/SharedXML/Scroll/ScrollTemplates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,17 @@ do --[[ FrameXML\ScrollTemplates.xml ]]
function Skin.WowScrollBoxList(Frame)
Skin.ScrollBoxBaseTemplate(Frame)
end
function Skin.WowScrollBox(Frame)
Skin.ScrollBoxBaseTemplate(Frame)
end
function Skin.VerticalScrollBarTemplate(Frame)
Skin.ScrollBarBaseTemplate(Frame)
end

function Skin.OribosScrollBarButtonScripts(Frame)
Skin.FrameTypeScrollBarButton(Frame)
function Skin.ScrollingEditBoxTemplate(Frame)
Skin.WowScrollBox(Frame.ScrollBox)
end

function Skin.OribosScrollBar(Frame)
Skin.VerticalScrollBarTemplate(Frame)

Frame.Track:GetRegions():Hide() -- background
Skin.OribosScrollBarButtonScripts(Frame.Track.Thumb)
Skin.OribosScrollBarButtonScripts(Frame.Back)
Skin.OribosScrollBarButtonScripts(Frame.Forward)
function Skin.ScrollingFontTemplate(Frame)
Skin.WowScrollBox(Frame.ScrollBox)
end
end

Expand Down
30 changes: 16 additions & 14 deletions Skin/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@ local Aurora = private.Aurora
local Base = Aurora.Base
local Color = Aurora.Color

Aurora.classIcons = { -- adjusted for borderless icons
["WARRIOR"] = {0.01953125, 0.234375, 0.01953125, 0.234375},
["MAGE"] = {0.26953125, 0.48046875, 0.01953125, 0.234375},
["ROGUE"] = {0.515625, 0.7265625, 0.01953125, 0.234375},
["DRUID"] = {0.76171875, 0.97265625, 0.01953125, 0.234375},
["HUNTER"] = {0.01953125, 0.234375, 0.26953125, 0.484375},
["SHAMAN"] = {0.26953125, 0.48046875, 0.26953125, 0.484375},
["PRIEST"] = {0.515625, 0.7265625, 0.26953125, 0.484375},
["WARLOCK"] = {0.76171875, 0.97265625, 0.26953125, 0.484375},
["PALADIN"] = {0.01953125, 0.234375, 0.51953125, 0.734375},
["DEATHKNIGHT"] = {0.26953125, 0.48046875, 0.51953125, 0.734375},
["MONK"] = {0.515625, 0.7265625, 0.51953125, 0.734375},
["DEMONHUNTER"] = {0.76171875, 0.97265625, 0.51953125, 0.734375},
}
Aurora.classIcons = {}
if not private.isRetail then
-- adjusted for borderless icons
Aurora.classIcons.WARRIOR = {0.01953125, 0.234375, 0.01953125, 0.234375}
Aurora.classIcons.MAGE = {0.26953125, 0.48046875, 0.01953125, 0.234375}
Aurora.classIcons.ROGUE = {0.515625, 0.7265625, 0.01953125, 0.234375}
Aurora.classIcons.DRUID = {0.76171875, 0.97265625, 0.01953125, 0.234375}
Aurora.classIcons.HUNTER = {0.01953125, 0.234375, 0.26953125, 0.484375}
Aurora.classIcons.SHAMAN = {0.26953125, 0.48046875, 0.26953125, 0.484375}
Aurora.classIcons.PRIEST = {0.515625, 0.7265625, 0.26953125, 0.484375}
Aurora.classIcons.WARLOCK = {0.76171875, 0.97265625, 0.26953125, 0.484375}
Aurora.classIcons.PALADIN = {0.01953125, 0.234375, 0.51953125, 0.734375}
Aurora.classIcons.DEATHKNIGHT = {0.26953125, 0.48046875, 0.51953125, 0.734375}
Aurora.classIcons.MONK = {0.515625, 0.7265625, 0.51953125, 0.734375}
Aurora.classIcons.DEMONHUNTER = {0.76171875, 0.97265625, 0.51953125, 0.734375}
end

--[[ Base:header
These are most basic skinning functions and are the foundation of every skin in Aurora.
Expand Down
11 changes: 8 additions & 3 deletions Skin/texture.lua
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,13 @@ do -- Icons
CreateIcon(frame, texture)
end

local coords = Aurora.classIcons[name]
texture:SetTexture([[Interface\Glues\CharacterCreate\UI-CharacterCreate-Classes]])
texture:SetTexCoord(coords[1], coords[2], coords[3], coords[4])
if private.isRetail then
texture:SetAtlas("classicon-"..name:lower(), false, nil, true)
else
local coords = Aurora.classIcons[name]
texture:SetTexture([[Interface\Glues\CharacterCreate\UI-CharacterCreate-Classes]])
texture:SetTexCoord(coords[1], coords[2], coords[3], coords[4])
end
texture:SetAlpha(1)
texture:SetBlendMode("DISABLE")

Expand Down Expand Up @@ -323,6 +327,7 @@ snapshot:SetSize(256, 256)
Base.SetTexture(snapshot, "test")
--Base.SetTexture(snapshot, "shapeStar")
--Base.SetTexture(snapshot, "iconDAMAGER")
--Base.SetTexture(snapshot, "iconWARRIOR")
--Base.SetTexture(snapshot, "gradientUp")
--Base.SetTexture(snapshot, "arrowLeft")
--Base.SetTexture(snapshot, "gradientLeft")
Expand Down

0 comments on commit 81c7678

Please sign in to comment.