Skip to content

Commit

Permalink
Add Burning Crusade Classic compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
b-morgan committed May 14, 2021
1 parent e59bb48 commit a01bae5
Show file tree
Hide file tree
Showing 7 changed files with 199 additions and 154 deletions.
2 changes: 1 addition & 1 deletion RecipeGroups.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ local L = LibStub("AceLocale-3.0"):GetLocale("Skillet")
--
-- The code that currently doesn't work is enabled / disabled in MainFrame.lua line 258:
-- 257: SkilletGroupLabel:SetText(L["Grouping"])
-- 258: SkilletRecipeGroupOperations:Disable() -- It is broken in Skillet-Classic
-- 258: SkilletRecipeGroupOperations:Disable()
--
--

Expand Down
6 changes: 6 additions & 0 deletions UI/IgnoreList.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ local function createIgnoreListFrame(self)
else
frame:SetFrameStrata("HIGH")
end
if not frame.SetBackdrop then
Mixin(frame, BackdropTemplateMixin)
end
frame:SetBackdrop(FrameBackdrop)
frame:SetBackdropColor(0.1, 0.1, 0.1)
-- A title bar stolen from the Ace2 Waterfall window.
Expand Down Expand Up @@ -93,6 +96,9 @@ local function createIgnoreListFrame(self)
-- The frame enclosing the scroll list needs a border and a background .....
--
local backdrop = SkilletIgnoreListParent
if not backdrop.SetBackdrop then
Mixin(backdrop, BackdropTemplateMixin)
end
if TSM_API then
backdrop:SetFrameStrata("HIGH")
end
Expand Down
26 changes: 25 additions & 1 deletion UI/MainFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ function Skillet:CreateTradeSkillWindow()
if frame:GetHeight() < 545 then
frame:SetHeight(545)
end
if not frame.SetBackdrop then
Mixin(frame, BackdropTemplateMixin)
end
if TSM_API then
frame:SetFrameStrata("HIGH")
frame:SetBackdrop(TSMBackdrop)
Expand Down Expand Up @@ -314,6 +317,9 @@ function Skillet:CreateTradeSkillWindow()
-- The frame enclosing the scroll list needs a border and a background .....
--
local backdrop = SkilletSkillListParent
if not backdrop.SetBackdrop then
Mixin(backdrop, BackdropTemplateMixin)
end
backdrop:SetBackdrop(ControlBackdrop)
backdrop:SetBackdropBorderColor(0.6, 0.6, 0.6)
backdrop:SetBackdropColor(0.05, 0.05, 0.05)
Expand All @@ -322,6 +328,9 @@ function Skillet:CreateTradeSkillWindow()
-- Frame enclosing the reagent list
--
backdrop = SkilletReagentParent
if not backdrop.SetBackdrop then
Mixin(backdrop, BackdropTemplateMixin)
end
backdrop:SetBackdrop(ControlBackdrop)
backdrop:SetBackdropBorderColor(0.6, 0.6, 0.6)
backdrop:SetBackdropColor(0.05, 0.05, 0.05)
Expand All @@ -330,6 +339,9 @@ function Skillet:CreateTradeSkillWindow()
-- Frame enclosing the queue
--
backdrop = SkilletQueueParent
if not backdrop.SetBackdrop then
Mixin(backdrop, BackdropTemplateMixin)
end
backdrop:SetBackdrop(ControlBackdrop)
backdrop:SetBackdropBorderColor(0.6, 0.6, 0.6)
backdrop:SetBackdropColor(0.05, 0.05, 0.05)
Expand All @@ -338,12 +350,18 @@ function Skillet:CreateTradeSkillWindow()
-- frame enclosing the pop out notes panel
--
backdrop = SkilletRecipeNotesFrame
if not backdrop.SetBackdrop then
Mixin(backdrop, BackdropTemplateMixin)
end
backdrop:SetBackdrop(ControlBackdrop)
backdrop:SetBackdropColor(0.1, 0.1, 0.1)
backdrop:SetBackdropBorderColor(0.6, 0.6, 0.6)
backdrop:SetResizable(true)
backdrop:Hide() -- initially hidden
backdrop = SkilletQueueManagementParent
if not backdrop.SetBackdrop then
Mixin(backdrop, BackdropTemplateMixin)
end
backdrop:SetBackdrop(ControlBackdrop)
backdrop:SetBackdropBorderColor(0.6, 0.6, 0.6)
backdrop:SetBackdropColor(0.05, 0.05, 0.05)
Expand Down Expand Up @@ -1206,7 +1224,7 @@ function Skillet:UpdateTradeSkillWindow()
button:LockHighlight()
else
-- not selected
button:SetBackdropColor(0.8, 0.2, 0.2)
-- button:SetBackdropColor(0.8, 0.2, 0.2)
button:UnlockHighlight()
end
show_button(button, self.currentTrade, skillIndex, i)
Expand Down Expand Up @@ -1283,6 +1301,9 @@ function Skillet:SkillButton_OnEnter(button)
return
end
local tip = SkilletTradeskillTooltip
if not tip.SetBackdrop then
Mixin(tip, BackdropTemplateMixin)
end
ShoppingTooltip1:Hide()
ShoppingTooltip2:Hide()
tip:SetOwner(button, "ANCHOR_BOTTOMRIGHT",-300);
Expand Down Expand Up @@ -3089,6 +3110,9 @@ function Skillet:CreateStandaloneQueueFrame()
if not frame then
return nil
end
if not frame.SetBackdrop then
Mixin(frame, BackdropTemplateMixin)
end
if TSM_API then
frame:SetFrameStrata("HIGH")
end
Expand Down
5 changes: 4 additions & 1 deletion UI/MainFrame.xml
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@
# Tool tip to be used when hovering over recipe lines in the skill list
#
-->
<GameTooltip name="SkilletTradeskillTooltip" frameStrata="TOOLTIP" hidden="true">
<GameTooltip name="SkilletTradeskillTooltip" frameStrata="TOOLTIP" hidden="true" parent="UIParent" inherits="GameTooltipTemplate">
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<EdgeSize>
<AbsValue val="16"/>
Expand Down Expand Up @@ -1981,6 +1981,9 @@
</Frames>
<Scripts>
<OnLoad>
if not self.SetBackdrop then
Mixin(self, BackdropTemplateMixin)
end
self:SetBackdropBorderColor(TOOLTIP_DEFAULT_COLOR.r, TOOLTIP_DEFAULT_COLOR.g, TOOLTIP_DEFAULT_COLOR.b)
self:SetBackdropColor(0.0, 0.0, 0.0, 0.9)
</OnLoad>
Expand Down
3 changes: 3 additions & 0 deletions UI/RecipeNotes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ end

local function get_edit_box()
local editbox = CreateFrame("EditBox", nil, nil)
if not editbox.SetBackdrop then
Mixin(editbox, BackdropTemplateMixin)
end
editbox:SetTextInsets(5,5,3,3)
editbox:SetMaxLetters(256)
editbox:SetAutoFocus(true)
Expand Down
6 changes: 6 additions & 0 deletions UI/ShoppingList.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ local function createShoppingListFrame(self)
if not frame then
return nil
end
if not frame.SetBackdrop then
Mixin(frame, BackdropTemplateMixin)
end
if TSM_API then
frame:SetFrameStrata("HIGH")
end
Expand Down Expand Up @@ -123,6 +126,9 @@ local function createShoppingListFrame(self)
-- The frame enclosing the scroll list needs a border and a background
--
local backdrop = SkilletShoppingListParent
if not backdrop.SetBackdrop then
Mixin(backdrop, BackdropTemplateMixin)
end
if TSM_API then
backdrop:SetFrameStrata("HIGH")
end
Expand Down
Loading

0 comments on commit a01bae5

Please sign in to comment.