mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-03 04:00:02 +00:00
thirdparty: add MrPlow bagsorting integration
This commit is contained in:
+2
-1
@@ -712,7 +712,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("thirdparty", "ktm", "dock", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "wim", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "healcomm", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "sortbags", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "sortbags", "enable", "0")
|
||||
pfUI:UpdateConfig("thirdparty", "mrplow", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "flightmap", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "atlasloot", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "druidmana", "enable", "1")
|
||||
|
||||
Vendored
+1
@@ -306,6 +306,7 @@ pfUI_translation["deDE"] = {
|
||||
["Modules"] = nil,
|
||||
["Money"] = nil,
|
||||
["Mousewheel Scroll Speed"] = nil,
|
||||
["MrPlow"] = nil,
|
||||
["ms"] = nil,
|
||||
["Name"] = nil,
|
||||
["Nameplates"] = nil,
|
||||
|
||||
Vendored
+1
@@ -306,6 +306,7 @@ pfUI_translation["enUS"] = {
|
||||
["Modules"] = nil,
|
||||
["Money"] = nil,
|
||||
["Mousewheel Scroll Speed"] = nil,
|
||||
["MrPlow"] = nil,
|
||||
["ms"] = nil,
|
||||
["Name"] = nil,
|
||||
["Nameplates"] = nil,
|
||||
|
||||
Vendored
+1
@@ -306,6 +306,7 @@ pfUI_translation["esES"] = {
|
||||
["Modules"] = "Módulos",
|
||||
["Money"] = "Moneda",
|
||||
["Mousewheel Scroll Speed"] = "Velocidad de Rueda",
|
||||
["MrPlow"] = nil,
|
||||
["ms"] = "ms",
|
||||
["Name"] = "Nombre",
|
||||
["Nameplates"] = "Placas Indentificativas",
|
||||
|
||||
Vendored
+1
@@ -306,6 +306,7 @@ pfUI_translation["frFR"] = {
|
||||
["Modules"] = "Modules",
|
||||
["Money"] = "Argent",
|
||||
["Mousewheel Scroll Speed"] = nil,
|
||||
["MrPlow"] = nil,
|
||||
["ms"] = nil,
|
||||
["Name"] = "Nom",
|
||||
["Nameplates"] = "Barres de vie flottantes",
|
||||
|
||||
Vendored
+1
@@ -306,6 +306,7 @@ pfUI_translation["koKR"] = {
|
||||
["Modules"] = "모듈",
|
||||
["Money"] = "골드",
|
||||
["Mousewheel Scroll Speed"] = nil,
|
||||
["MrPlow"] = nil,
|
||||
["ms"] = "핑",
|
||||
["Name"] = "이름",
|
||||
["Nameplates"] = "상바",
|
||||
|
||||
Vendored
+1
@@ -306,6 +306,7 @@ pfUI_translation["ruRU"] = {
|
||||
["Modules"] = "Модули",
|
||||
["Money"] = "Деньги",
|
||||
["Mousewheel Scroll Speed"] = "Скорость прокрутки колесика мыши",
|
||||
["MrPlow"] = nil,
|
||||
["ms"] = "мс",
|
||||
["Nameplates"] = "Индикаторы здоровья",
|
||||
["Nameplate Width"] = "Ширина индикатора здоровья",
|
||||
|
||||
Vendored
+1
@@ -306,6 +306,7 @@ pfUI_translation["zhCN"] = {
|
||||
["Modules"] = "模块",
|
||||
["Money"] = "金钱",
|
||||
["Mousewheel Scroll Speed"] = "鼠标滚轮翻滚速度",
|
||||
["MrPlow"] = nil,
|
||||
["ms"] = "毫秒",
|
||||
["Nameplates"] = "姓名板",
|
||||
["Nameplate Width"] = "姓名板宽度",
|
||||
|
||||
Vendored
+1
@@ -306,6 +306,7 @@ pfUI_translation["zhTW"] = {
|
||||
["Modules"] = "高級選項",
|
||||
["Money"] = "金錢",
|
||||
["Mousewheel Scroll Speed"] = nil,
|
||||
["MrPlow"] = nil,
|
||||
["ms"] = "毫秒",
|
||||
["Nameplates"] = "姓名板",
|
||||
["Nameplate Width"] = "姓名板高度",
|
||||
|
||||
@@ -1237,6 +1237,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
CreateConfig(nil, this, T["WIM"], C.thirdparty.wim, "enable", "checkbox")
|
||||
CreateConfig(nil, this, T["HealComm"], C.thirdparty.healcomm, "enable", "checkbox")
|
||||
CreateConfig(nil, this, T["SortBags"], C.thirdparty.sortbags, "enable", "checkbox")
|
||||
CreateConfig(nil, this, T["MrPlow"], C.thirdparty.mrplow, "enable", "checkbox")
|
||||
CreateConfig(nil, this, T["FlightMap"], C.thirdparty.flightmap, "enable", "checkbox")
|
||||
CreateConfig(nil, this, T["AtlasLoot"], C.thirdparty.atlasloot, "enable", "checkbox")
|
||||
CreateConfig(nil, this, T["DruidManaBar"], C.thirdparty.druidmana, "enable", "checkbox")
|
||||
|
||||
@@ -466,6 +466,7 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
end)
|
||||
|
||||
AddIntegration("SortBags", function()
|
||||
if C.thirdparty.mrplow.enable == "1" then return end
|
||||
if C.thirdparty.sortbags.enable == "0" then return end
|
||||
|
||||
pfUI.thirdparty.sortbags = CreateFrame("Frame", nil)
|
||||
@@ -550,6 +551,95 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
end)
|
||||
end)
|
||||
|
||||
AddIntegration("MrPlow", function()
|
||||
if C.thirdparty.sortbags.enable == "1" then return end
|
||||
if C.thirdparty.mrplow.enable == "0" then return end
|
||||
|
||||
local MrPlowL = AceLibrary and AceLibrary("AceLocale-2.2"):new("MrPlow")
|
||||
if not (MrPlowL and MrPlowL["Bank"]) then return end
|
||||
|
||||
pfUI.thirdparty.mrplow = CreateFrame("Frame", nil)
|
||||
pfUI.thirdparty.mrplow:RegisterEvent("BANKFRAME_OPEN")
|
||||
pfUI.thirdparty.mrplow:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
pfUI.thirdparty.mrplow:SetScript("OnEvent", function()
|
||||
-- make sure bagframe was already created
|
||||
if not pfUI.bag or not pfUI.bag.right then return end
|
||||
pfUI.thirdparty.mrplow:UnregisterAllEvents()
|
||||
|
||||
-- draw the button
|
||||
if not pfUI.bag.right.sort then
|
||||
pfUI.bag.right.sort = CreateFrame("Button", "pfBagSlotSort", UIParent)
|
||||
pfUI.bag.right.sort:SetParent(pfUI.bag.right)
|
||||
pfUI.bag.right.sort:SetPoint("TOPRIGHT", -C.appearance.border.default*14 - 45, -C.appearance.border.default)
|
||||
pfUI.bag.right.sort:SetPoint("TOPRIGHT", pfUI.bag.right.keys, "TOPLEFT", -C.appearance.border.default*3, 0)
|
||||
|
||||
CreateBackdrop(pfUI.bag.right.sort)
|
||||
pfUI.bag.right.sort:SetHeight(12)
|
||||
pfUI.bag.right.sort:SetWidth(12)
|
||||
pfUI.bag.right.sort:SetTextColor(1,1,.25,1)
|
||||
pfUI.bag.right.sort:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
||||
pfUI.bag.right.sort.texture = pfUI.bag.right.sort:CreateTexture("pfBagArrowUp")
|
||||
pfUI.bag.right.sort.texture:SetTexture("Interface\\AddOns\\pfUI\\img\\sort")
|
||||
pfUI.bag.right.sort.texture:ClearAllPoints()
|
||||
pfUI.bag.right.sort.texture:SetPoint("TOPLEFT", pfUI.bag.right.sort, "TOPLEFT", 2, -2)
|
||||
pfUI.bag.right.sort.texture:SetPoint("BOTTOMRIGHT", pfUI.bag.right.sort, "BOTTOMRIGHT", -2, 2)
|
||||
pfUI.bag.right.sort.texture:SetVertexColor(.25,.25,.25,1)
|
||||
|
||||
pfUI.bag.right.sort:SetScript("OnEnter", function ()
|
||||
pfUI.bag.right.sort.backdrop:SetBackdropBorderColor(1,1,.25,1)
|
||||
pfUI.bag.right.sort.texture:SetVertexColor(1,1,.25,1)
|
||||
end)
|
||||
|
||||
pfUI.bag.right.sort:SetScript("OnLeave", function ()
|
||||
CreateBackdrop(pfUI.bag.right.sort)
|
||||
pfUI.bag.right.sort.texture:SetVertexColor(.25,.25,.25,1)
|
||||
end)
|
||||
|
||||
pfUI.bag.right.sort:SetScript("OnClick", function()
|
||||
MrPlow:Works()
|
||||
end)
|
||||
|
||||
pfUI.bag.right.search:ClearAllPoints()
|
||||
pfUI.bag.right.search:SetPoint("TOPLEFT", pfUI.bag.right, "TOPLEFT", C.appearance.border.default, -C.appearance.border.default)
|
||||
pfUI.bag.right.search:SetPoint("TOPRIGHT", pfUI.bag.right.sort, "TOPLEFT", -C.appearance.border.default*3, -C.appearance.border.default)
|
||||
end
|
||||
|
||||
-- draw the button
|
||||
if not pfUI.bag.left.sort then
|
||||
pfUI.bag.left.sort = CreateFrame("Button", "pfBankSlotSort", UIParent)
|
||||
pfUI.bag.left.sort:SetParent(pfUI.bag.left)
|
||||
pfUI.bag.left.sort:SetPoint("TOPRIGHT", -C.appearance.border.default*14 - 45, -C.appearance.border.default)
|
||||
pfUI.bag.left.sort:SetPoint("TOPRIGHT", pfUI.bag.left.bags, "TOPLEFT", -C.appearance.border.default*3, 0)
|
||||
|
||||
CreateBackdrop(pfUI.bag.left.sort)
|
||||
pfUI.bag.left.sort:SetHeight(12)
|
||||
pfUI.bag.left.sort:SetWidth(12)
|
||||
pfUI.bag.left.sort:SetTextColor(1,1,.25,1)
|
||||
pfUI.bag.left.sort:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
||||
pfUI.bag.left.sort.texture = pfUI.bag.left.sort:CreateTexture("pfBagArrowUp")
|
||||
pfUI.bag.left.sort.texture:SetTexture("Interface\\AddOns\\pfUI\\img\\sort")
|
||||
pfUI.bag.left.sort.texture:ClearAllPoints()
|
||||
pfUI.bag.left.sort.texture:SetPoint("TOPLEFT", pfUI.bag.left.sort, "TOPLEFT", 2, -2)
|
||||
pfUI.bag.left.sort.texture:SetPoint("BOTTOMRIGHT", pfUI.bag.left.sort, "BOTTOMRIGHT", -2, 2)
|
||||
pfUI.bag.left.sort.texture:SetVertexColor(.25,.25,.25,1)
|
||||
|
||||
pfUI.bag.left.sort:SetScript("OnEnter", function ()
|
||||
pfUI.bag.left.sort.backdrop:SetBackdropBorderColor(1,1,.25,1)
|
||||
pfUI.bag.left.sort.texture:SetVertexColor(1,1,.25,1)
|
||||
end)
|
||||
|
||||
pfUI.bag.left.sort:SetScript("OnLeave", function ()
|
||||
CreateBackdrop(pfUI.bag.left.sort)
|
||||
pfUI.bag.left.sort.texture:SetVertexColor(.25,.25,.25,1)
|
||||
end)
|
||||
|
||||
pfUI.bag.left.sort:SetScript("OnClick", function()
|
||||
MrPlow:Works(MrPlowL["Bank"])
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
AddIntegration("FlightMap", function()
|
||||
if C.thirdparty.flightmap.enable == "0" then return end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user