Sluimerstand / ProfessionShoppingList

Track recipes, reagents, cooldowns, and more!
4 stars 3 forks source link

Conflict with TransmogCraftsman #8

Closed DiscordGregory closed 3 years ago

DiscordGregory commented 3 years ago

https://www.curseforge.com/wow/addons/transmog-craftsman Creates a dropdown menu where your remove from shopping list button is at

image

DiscordGregory commented 3 years ago

Possible solution

if event == "TRADE_SKILL_SHOW" then --Some variables for later use local addWidth, removeWidth, addCraft, removeCraft, addPoint, removePoint --Check if TransmogCraftsman is loaded local loaded, reason = IsAddOnLoaded("TransmogCraftsman") if loaded then TradeSkillFrame.SearchBox:SetPoint("TOPLEFT", TradeSkillFrame, "TOPLEFT", 195, -55) addWidth = 45 removeWidth = addWidth addCraft = "Add" removeCraft = "Rem" addPoint = {"TOPRIGHT", TradeSkillFrame.DetailsFrame.CreateButton, "TOPRIGHT", -220, 418} removePoint = {"TOPRIGHT", TradeSkillFrame.DetailsFrame.CreateButton, "TOPRIGHT", -170, 418} else addWidth = 90 removeWidth = 130 addCraft = "Add to list" removeCraft = "Remove from list" addPoint = {"TOPRIGHT", TradeSkillFrame.DetailsFrame.CreateButton, "TOPRIGHT", -150, 418} removePoint = {"TOPRIGHT", TradeSkillFrame.DetailsFrame.CreateButton, "TOPRIGHT", -20, 418} end

-- Create the "Add to list" button
addCraftListButton = CreateFrame("Button", nil, TradeSkillFrame, "UIPanelButtonTemplate")
addCraftListButton:SetText(addCraft)
addCraftListButton:SetWidth(addWidth)
addCraftListButton:SetPoint(unpack(addPoint))

-- Create the "Remove from list" button
removeCraftListButton = CreateFrame("Button", nil, TradeSkillFrame, "UIPanelButtonTemplate")
removeCraftListButton:SetText(removeCraft)
removeCraftListButton:SetWidth(removeWidth)
removeCraftListButton:SetPoint(unpack(removePoint))
Sluimerstand commented 3 years ago

I've added the option for smaller button sizes, this should fix the issue. It will be included in v9.0.5-002-beta.