Skip to content

Commit

Permalink
Add option to select top recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
b-morgan committed Oct 24, 2024
1 parent c45eca7 commit 5c95df7
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
8 changes: 8 additions & 0 deletions Skillet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ local defaults = {
queue_glyph_reagents = false, -- not in Classic
display_required_level = false,
display_item_level = false,
select_top_recipe = false,
display_shopping_list_at_bank = true,
display_shopping_list_at_auction = true,
display_shopping_list_at_merchant = true,
Expand Down Expand Up @@ -1547,6 +1548,13 @@ function Skillet:ShowTradeSkillWindow()
else
self:UpdateTradeSkillWindow()
end
if self.db.profile.select_top_recipe then
if SkilletScrollButton1.skill.skillIndex then
self:SetSelectedSkill(SkilletScrollButton1.skill.skillIndex)
else
self:SetSelectedSkill(SkilletScrollButton2.skill.skillIndex)
end
end
DA.DEBUG(0,"ShowTradeSkillWindow complete")
end

Expand Down
9 changes: 9 additions & 0 deletions SkilletNewsData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ local isCata = WOW_PROJECT_ID == WOW_PROJECT_CATACLYSM_CLASSIC

Skillet.NewsName = "Skillet-Classic News"
Skillet.NewsData = {
{ version = "2.02",
data = {
{ name = "Changes",
data = {
{ header = "Recipes", body = "Add option to select top recipe" },
},
},
},
},
{ version = "2.01",
data = {
{ name = "Changes",
Expand Down
20 changes: 17 additions & 3 deletions SkilletOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,20 @@ Skillet.options =
width = "full",
order = 2
},
select_top_recipe = {
type = "toggle",
name = L["SELECTTOPRECIPENAME"],
desc = L["SELECTTOPRECIPEDESC"],
get = function()
return Skillet.db.profile.select_top_recipe
end,
set = function(self,value)
Skillet.db.profile.select_top_recipe = value
Skillet:UpdateTradeSkillWindow()
end,
width = "full",
order = 3,
},
enhanced_recipe_display = {
type = "toggle",
name = L["ENHANCHEDRECIPEDISPLAYNAME"],
Expand All @@ -507,7 +521,7 @@ Skillet.options =
Skillet:UpdateTradeSkillWindow()
end,
width = "full",
order = 3,
order = 4,
},
interrupt_clears_queue = {
type = "toggle",
Expand All @@ -520,7 +534,7 @@ Skillet.options =
Skillet.db.profile.interrupt_clears_queue = value
end,
width = "full",
order = 4,
order = 5,
},
sound_on_empty_queue = {
type = "toggle",
Expand All @@ -533,7 +547,7 @@ Skillet.options =
Skillet.db.profile.sound_on_empty_queue = value
end,
width = "full",
order = 5,
order = 6,
},
clamp_to_screen = {
type = "toggle",
Expand Down

0 comments on commit 5c95df7

Please sign in to comment.