Added option to show old Blizzard Trade Skill UI
This commit is contained in:
@@ -28,7 +28,8 @@ local DefaultSettings = {
|
||||
{ TableName = "BagFilter", {false,false,false,false,false} },
|
||||
{ TableName = "ItemBlacklist", { [9149] = true }},
|
||||
{ TableName = "hideMaxRank", false, CheckBox = "ProfessionMenuOptions_HideMaxRank"},
|
||||
{ TableName = "hideRank", false, CheckBox = "ProfessionMenuOptions_HideRank"}
|
||||
{ TableName = "hideRank", false, CheckBox = "ProfessionMenuOptions_HideRank"},
|
||||
{ TableName = "ShowOldTradeSkillUI", false, CheckBox = "ProfessionMenuOptions_ShowOldTradeSkillUI"}
|
||||
}
|
||||
|
||||
--[[ TableName = Name of the saved setting
|
||||
@@ -567,11 +568,22 @@ function PM:OnEnable()
|
||||
SlashCommand(msg)
|
||||
end
|
||||
PM:RegisterEvent("ADDON_LOADED")
|
||||
|
||||
if PM.db.ShowOldTradeSkillUI then
|
||||
UIParent:UnregisterEvent("TRADE_SKILL_SHOW")
|
||||
PM:RegisterEvent("TRADE_SKILL_SHOW")
|
||||
end
|
||||
|
||||
--Add the ProfessionMenu Extract Frame to the special frames tables to enable closing wih the ESC key
|
||||
tinsert(UISpecialFrames, "ProfessionMenuExtractFrame")
|
||||
end
|
||||
|
||||
function PM:TRADE_SKILL_SHOW()
|
||||
TradeSkillFrame_LoadUI()
|
||||
if TradeSkillFrame_Show then
|
||||
TradeSkillFrame_Show()
|
||||
end
|
||||
end
|
||||
|
||||
local function GetTipAnchor(frame)
|
||||
local x, y = frame:GetCenter()
|
||||
if not x or not y then return 'TOPLEFT', 'BOTTOMLEFT' end
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
## X-Category: Profession
|
||||
## X-OptionsFrame: ProfessionMenuOptionsFrame
|
||||
## DefaultState: enabled
|
||||
## Version: 1.4
|
||||
## Version: 1.5
|
||||
|
||||
embeds.xml
|
||||
|
||||
@@ -101,8 +101,25 @@ end
|
||||
hideMaxRank.Lable:SetText("Hide profession max rank")
|
||||
hideMaxRank:SetScript("OnClick", function() PM.db.hideMaxRank = not PM.db.hideMaxRank end)
|
||||
|
||||
local showOldTradeUI = CreateFrame("CheckButton", "ProfessionMenuOptions_ShowOldTradeSkillUI", ProfessionMenuOptionsFrame, "UICheckButtonTemplate")
|
||||
showOldTradeUI:SetPoint("TOPLEFT", 15, -305)
|
||||
showOldTradeUI.Lable = showOldTradeUI:CreateFontString(nil , "BORDER", "GameFontNormal")
|
||||
showOldTradeUI.Lable:SetJustifyH("LEFT")
|
||||
showOldTradeUI.Lable:SetPoint("LEFT", 30, 0)
|
||||
showOldTradeUI.Lable:SetText("Show old Blizzard Trade Skill UI")
|
||||
showOldTradeUI:SetScript("OnClick", function()
|
||||
PM.db.ShowOldTradeSkillUI = not PM.db.ShowOldTradeSkillUI
|
||||
if PM.db.ShowOldTradeSkillUI then
|
||||
UIParent:UnregisterEvent("TRADE_SKILL_SHOW")
|
||||
PM:RegisterEvent("TRADE_SKILL_SHOW")
|
||||
else
|
||||
PM:UnregisterEvent("TRADE_SKILL_SHOW")
|
||||
UIParent:RegisterEvent("TRADE_SKILL_SHOW")
|
||||
end
|
||||
end)
|
||||
|
||||
local txtSize = CreateFrame("Button", "ProfessionMenuOptions_TxtSizeMenu", ProfessionMenuOptionsFrame, "UIDropDownMenuTemplate")
|
||||
txtSize:SetPoint("TOPLEFT", 15, -310)
|
||||
txtSize:SetPoint("TOPLEFT", 15, -345)
|
||||
txtSize.Lable = txtSize:CreateFontString(nil , "BORDER", "GameFontNormal")
|
||||
txtSize.Lable:SetJustifyH("LEFT")
|
||||
txtSize.Lable:SetPoint("LEFT", txtSize, 190, 0)
|
||||
|
||||
Reference in New Issue
Block a user