diff --git a/api/config.lua b/api/config.lua index 35b592c0..1bc7d9e4 100644 --- a/api/config.lua +++ b/api/config.lua @@ -82,6 +82,8 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("appearance", "castbar", "castbarcolor", ".7,.7,.9,.8") pfUI:UpdateConfig("appearance", "castbar", "channelcolor", ".9,.9,.7,.8") pfUI:UpdateConfig("appearance", "infight", "screen", "0") + pfUI:UpdateConfig("appearance", "bags", "unusable", "1") + pfUI:UpdateConfig("appearance", "bags", "unusable_color", ".9,.2,.2,1") pfUI:UpdateConfig("appearance", "bags", "borderlimit", "1") pfUI:UpdateConfig("appearance", "bags", "borderonlygear", "0") pfUI:UpdateConfig("appearance", "bags", "movable", "0") diff --git a/env/translations_deDE.lua b/env/translations_deDE.lua index 9ab2f3cd..33163b2a 100644 --- a/env/translations_deDE.lua +++ b/env/translations_deDE.lua @@ -249,6 +249,7 @@ pfUI_translation["deDE"] = { ["Hide Totems"] = nil, ["Highlight Settings That Require Reload"] = nil, ["Highlight Target Nameplate"] = nil, + ["Highlight Unusable Items"] = nil, ["Hit Indicator"] = nil, ["Hit Indicator Text Font"] = nil, ["Hit Indicator Text Size"] = nil, @@ -444,6 +445,7 @@ pfUI_translation["deDE"] = { ["Unit Frame Text Size"] = nil, ["Unit String"] = nil, ["Unlock"] = nil, + ["Unusable Item Color"] = nil, ["Use Chat Colors for Meters"] = nil, ["Use Defaults"] = nil, ["Use Item Rarity Color For Loot-Roll Timer"] = nil, diff --git a/env/translations_enUS.lua b/env/translations_enUS.lua index 44cdef93..553ab9c2 100644 --- a/env/translations_enUS.lua +++ b/env/translations_enUS.lua @@ -249,6 +249,7 @@ pfUI_translation["enUS"] = { ["Hide Totems"] = nil, ["Highlight Settings That Require Reload"] = nil, ["Highlight Target Nameplate"] = nil, + ["Highlight Unusable Items"] = nil, ["Hit Indicator"] = nil, ["Hit Indicator Text Font"] = nil, ["Hit Indicator Text Size"] = nil, @@ -444,6 +445,7 @@ pfUI_translation["enUS"] = { ["Unit Frame Text Size"] = nil, ["Unit String"] = nil, ["Unlock"] = nil, + ["Unusable Item Color"] = nil, ["Use Chat Colors for Meters"] = nil, ["Use Defaults"] = nil, ["Use Item Rarity Color For Loot-Roll Timer"] = nil, diff --git a/env/translations_esES.lua b/env/translations_esES.lua index fd382010..6ca915d7 100644 --- a/env/translations_esES.lua +++ b/env/translations_esES.lua @@ -249,6 +249,7 @@ pfUI_translation["esES"] = { ["Hide Totems"] = "Ocultar Tótems", ["Highlight Settings That Require Reload"] = "Resaltar las Configuraciones que Requieren Recarga", ["Highlight Target Nameplate"] = "Resaltar las Placas Indentificativas del Objetivo", + ["Highlight Unusable Items"] = nil, ["Hit Indicator"] = "Indicador de Golpe", ["Hit Indicator Text Font"] = "Fuente del Texto del Indicador de Golpe", ["Hit Indicator Text Size"] = "Tamaño del Texto del Indicador de Golpe", @@ -444,6 +445,7 @@ pfUI_translation["esES"] = { ["Unit Frame Text Size"] = "Tamaño del Texto del Marco de Unidad", ["Unit String"] = "Cadena de Caracteres de Unidad", ["Unlock"] = "Desbloquear", + ["Unusable Item Color"] = nil, ["Use Chat Colors for Meters"] = "Usar los Colores del Chat para los Medidores", ["Use Defaults"] = "Predeterminado", ["Use Item Rarity Color For Loot-Roll Timer"] = "Usar el Color de la Rareza del Objeto para el Temporizador para Tirar los Dados", diff --git a/env/translations_frFR.lua b/env/translations_frFR.lua index 4d69be51..8560882c 100644 --- a/env/translations_frFR.lua +++ b/env/translations_frFR.lua @@ -249,6 +249,7 @@ pfUI_translation["frFR"] = { ["Hide Totems"] = nil, ["Highlight Settings That Require Reload"] = nil, ["Highlight Target Nameplate"] = nil, + ["Highlight Unusable Items"] = nil, ["Hit Indicator"] = nil, ["Hit Indicator Text Font"] = nil, ["Hit Indicator Text Size"] = nil, @@ -444,6 +445,7 @@ pfUI_translation["frFR"] = { ["Unit Frame Text Size"] = "Taille de la police du texte des cadres d'unité", ["Unit String"] = "Texte des cadres d'unité", ["Unlock"] = "Débloquer l'interface", + ["Unusable Item Color"] = nil, ["Use Chat Colors for Meters"] = nil, ["Use Defaults"] = "Utiliser le défaut", ["Use Item Rarity Color For Loot-Roll Timer"] = nil, diff --git a/env/translations_koKR.lua b/env/translations_koKR.lua index 21794690..c87ac085 100644 --- a/env/translations_koKR.lua +++ b/env/translations_koKR.lua @@ -249,6 +249,7 @@ pfUI_translation["koKR"] = { ["Hide Totems"] = nil, ["Highlight Settings That Require Reload"] = nil, ["Highlight Target Nameplate"] = nil, + ["Highlight Unusable Items"] = nil, ["Hit Indicator"] = nil, ["Hit Indicator Text Font"] = nil, ["Hit Indicator Text Size"] = nil, @@ -444,6 +445,7 @@ pfUI_translation["koKR"] = { ["Unit Frame Text Size"] = "유닛프레임 텍스트 크기", ["Unit String"] = "단위 문자열", ["Unlock"] = "잠그 해체", + ["Unusable Item Color"] = nil, ["Use Chat Colors for Meters"] = nil, ["Use Defaults"] = "기본값 사용", ["Use Item Rarity Color For Loot-Roll Timer"] = nil, diff --git a/env/translations_ruRU.lua b/env/translations_ruRU.lua index b10a36df..ec9c830e 100644 --- a/env/translations_ruRU.lua +++ b/env/translations_ruRU.lua @@ -249,6 +249,7 @@ pfUI_translation["ruRU"] = { ["Hide Totems"] = "Скрыть тотемы", ["Highlight Settings That Require Reload"] = "Выделить параметры, требующие перезагрузки", ["Highlight Target Nameplate"] = "Выделить индикатор здоровья цели", + ["Highlight Unusable Items"] = nil, ["Hit Indicator Text Font"] = "Шрифт текста индикатора попадания", ["Hit Indicator Text Size"] = "Размер текста индикатора попадания", ["Hit Indicator"] = "Индикатор попадания", @@ -402,8 +403,8 @@ pfUI_translation["ruRU"] = { ["Show PvP Icon"] = "Показать PvP иконку", ["Show Self in Group Frames"] = "Показать себя в окне группы", ["Show Totems as Buff Indicators"] = "Показать тотемы как индикаторы баффов", - ["Skin"] = "оболочка", ["Skins"] = "Оболочки", + ["Skin"] = "оболочка", ["Slow"] = "Медленно", ["Small"] = "Маленький", ["Some settings need to reload the UI to take effect.\nDo you want to reloadUI now?"] = "Некоторым настройкам необходимо перезагрузить пользовательский интерфейс, чтобы вступить в силу.\nВы хотите перезагрузить пользовательский интерфейс сейчас?", @@ -444,6 +445,7 @@ pfUI_translation["ruRU"] = { ["Unit Frame Text Size"] = "Размер текста окна юнита", ["Unit String"] = "Уровень и имя", ["Unlock"] = "Разблокировать", + ["Unusable Item Color"] = nil, ["Use Chat Colors for Meters"] = "Использовать цвета чата для счетчиков", ["Use Defaults"] = "По умолчанию", ["Use Item Rarity Color For Loot-Roll Timer"] = "Использовать цвет кач-ва предмета для таймера распределения добычи", diff --git a/env/translations_zhCN.lua b/env/translations_zhCN.lua index a4e6817f..ec60a534 100644 --- a/env/translations_zhCN.lua +++ b/env/translations_zhCN.lua @@ -249,6 +249,7 @@ pfUI_translation["zhCN"] = { ["Hide Totems"] = "隐藏图腾", ["Highlight Settings That Require Reload"] = "用[!]突出需要重新加载UI的设置", ["Highlight Target Nameplate"] = "高亮目标姓名板", + ["Highlight Unusable Items"] = nil, ["Hit Indicator Text Font"] = "命中指示器文本字体", ["Hit Indicator Text Size"] = "命中指示器文本大小", ["Hit Indicator"] = "启用命中指示器", @@ -402,8 +403,8 @@ pfUI_translation["zhCN"] = { ["Show PvP Icon"] = "显示PVP图标", ["Show Self in Group Frames"] = "在小队列表中显示自己", ["Show Totems as Buff Indicators"] = "显示图腾作为buff指示器", - ["Skin"] = "皮肤", ["Skins"] = "皮肤", + ["Skin"] = "皮肤", ["Slow"] = "慢速", ["Small"] = "小", ["Some settings need to reload the UI to take effect.\nDo you want to reloadUI now?"] = "有些设置需要重新加载UI生效。\n您要重新载入UI吗?", @@ -444,6 +445,7 @@ pfUI_translation["zhCN"] = { ["Unit Frame Text Size"] = "头像框架字体字号", ["Unit String"] = "等级和名字", ["Unlock"] = "解锁排版", + ["Unusable Item Color"] = nil, ["Use Chat Colors for Meters"] = "使用聊天框着色(其他插件的接口,如DPSMate,KTM等)", ["Use Defaults"] = "使用默认值", ["Use Item Rarity Color For Loot-Roll Timer"] = "为战利品Roll点计时框启用物品稀有颜色", diff --git a/env/translations_zhTW.lua b/env/translations_zhTW.lua index f845c4aa..bb57f025 100644 --- a/env/translations_zhTW.lua +++ b/env/translations_zhTW.lua @@ -249,6 +249,7 @@ pfUI_translation["zhTW"] = { ["Hide Totems"] = "隱藏圖騰", ["Highlight Settings That Require Reload"] = "用[!]突出需要重新加載UI的設置", ["Highlight Target Nameplate"] = "高亮目標姓名板", + ["Highlight Unusable Items"] = nil, ["Hit Indicator Text Font"] = "命中指示器文本字體", ["Hit Indicator Text Size"] = "命中指示器文本大小", ["Hit Indicator"] = "命中指示器", @@ -402,8 +403,8 @@ pfUI_translation["zhTW"] = { ["Show PvP Icon"] = "顯示PVP圖示", ["Show Self in Group Frames"] = "在小隊清單中顯示自己", ["Show Totems as Buff Indicators"] = "顯示圖騰作為buff指示器", - ["Skin"] = "皮膚", ["Skins"] = "皮膚", + ["Skin"] = "皮膚", ["Slow"] = "慢速", ["Small"] = "小", ["Some settings need to reload the UI to take effect.\nDo you want to reloadUI now?"] = "有些設置需要重新載入UI生效。\n您要重新載入UI嗎?", @@ -444,6 +445,7 @@ pfUI_translation["zhTW"] = { ["Unit Frame Text Size"] = "頭像框架字體字型大小", ["Unit String"] = "等級和名字", ["Unlock"] = "解鎖排版", + ["Unusable Item Color"] = nil, ["Use Chat Colors for Meters"] = "使用聊天框著色(其他插件的介面,如DPSMate,KTM等)", ["Use Defaults"] = "使用預設值", ["Use Item Rarity Color For Loot-Roll Timer"] = "為戰利品Roll點計時框啟用物品稀有顏色", diff --git a/modules/gui.lua b/modules/gui.lua index 88e28d03..153f6cab 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -926,6 +926,8 @@ pfUI:RegisterModule("gui", function () if not this.setup then CreateConfig(nil, this, T["Disable Item Quality Color For \"Common\" Items"], C.appearance.bags, "borderlimit", "checkbox") CreateConfig(nil, this, T["Enable Item Quality Color For Equipment Only"], C.appearance.bags, "borderonlygear", "checkbox") + CreateConfig(nil, this, T["Highlight Unusable Items"], C.appearance.bags, "unusable", "checkbox") + CreateConfig(nil, this, T["Unusable Item Color"], C.appearance.bags, "unusable_color", "color") CreateConfig(nil, this, T["Enable Movable Bags"], C.appearance.bags, "movable", "checkbox") CreateConfig(nil, this, T["Hide Chat When Bags Are Opened"], C.appearance.bags, "hidechat", "checkbox") CreateConfig(nil, this, T["Bagslots Per Row"], C.appearance.bags, "bagrowlength") diff --git a/modules/unusable.lua b/modules/unusable.lua index 65ae0ff4..4989f787 100644 --- a/modules/unusable.lua +++ b/modules/unusable.lua @@ -1,6 +1,8 @@ pfUI:RegisterModule("unusable", function () if not pfUI.bag then return end + if C.appearance.bags.unusable ~= "1" then return end + pfUI.unusable = CreateFrame("Frame") pfUI.unusable:RegisterEvent("PLAYER_LEVEL_UP") pfUI.unusable:RegisterEvent("SKILL_LINES_CHANGED") @@ -12,6 +14,7 @@ pfUI:RegisterModule("unusable", function () local scanner = libtipscan:GetScanner("unusable") local dura_capture = string.gsub(DURABILITY_TEMPLATE, "%%[^%s]+", "(.+)") + local r, g, b, a = strsplit(",", C.appearance.bags.unusable_color) function pfUI.unusable:UpdateSlot(bag, slot) local frame = pfUI.bags[bag].slots[slot].frame @@ -28,7 +31,7 @@ pfUI:RegisterModule("unusable", function () local left = scanner:Line(red_line) local _,_, is_durability = string.find(left,dura_capture,1) if not is_durability then - _G.SetItemButtonTextureVertexColor(_G[name], 0.9, 0, 0) + _G.SetItemButtonTextureVertexColor(_G[name],r,g,b,a) self.cache[bag][slot] = true end else