Skip to content

Commit

Permalink
Add "List Reagents" to recipe right-click menu
Browse files Browse the repository at this point in the history
  • Loading branch information
b-morgan committed Dec 1, 2024
1 parent c2b80f3 commit aaf6c4f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
3 changes: 2 additions & 1 deletion SkilletNewsData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ Skillet.NewsData = {
},
{ name = "Changes",
data = {
{ header = "Recipes", body = "Remove 'Link Recipe' from Classic Era" },
{ header = "Recipes", body = "Remove 'Link Recipe' from Classic Era right-click menu" },
{ header = "Recipes", body = "Add 'List Reagents' to Classic Era right-click menu" },
},
},
},
Expand Down
15 changes: 14 additions & 1 deletion UI/MainFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2275,6 +2275,17 @@ function Skillet:SkillButton_OnReceiveDrag(button)
end
end

function Skillet:SkillButton_ListReagents()
DA.DEBUG(0,"SkillButton_ListReagents()")
local skill = Skillet.menuButton.skill
if skill and skill.skillIndex then
Skillet:ReagentsLinkOnClick(menuButton, skill.skillIndex, false)
else
DA.DEBUG(0,"SkillButton_ListReagents: skill= "..DA.DUMP1(skill))
return
end
end

function Skillet:SkillButton_LinkRecipe()
DA.DEBUG(0,"SkillButton_LinkRecipe()")
local skill = Skillet.menuButton.skill
Expand Down Expand Up @@ -3153,7 +3164,9 @@ local function SkillMenuList(SkilletSkillMenu, rootDescription)
end
rootDescription:CreateTitle(title);
end
if not isClassic then
if isClassic then
rootDescription:CreateButton(L["List Reagents"], function() Skillet:SkillButton_ListReagents() end);
else
rootDescription:CreateButton(L["Link Recipe"], function() Skillet:SkillButton_LinkRecipe() end);
end
rootDescription:CreateButton(L["Wowhead URL"], function() Skillet:SkillButton_WowheadURL() end);
Expand Down

0 comments on commit aaf6c4f

Please sign in to comment.