From 1e2ac31ee28d806ad28f4394373d98dd82ea363a Mon Sep 17 00:00:00 2001 From: Apollyonn Date: Fri, 1 Feb 2019 16:25:13 +0200 Subject: [PATCH] update --- ElvUI/Settings/Profile.lua | 2 ++ ElvUI/modules/bags/bags.lua | 32 +++++++++++++++++++++- ElvUI/modules/chat/chat.lua | 11 ++++---- ElvUI/modules/tooltip/tooltip.lua | 5 ++++ ElvUI_Config/bags.lua | 25 +++++++++++++---- ElvUI_Config/locales/chinese_config.lua | 3 ++ ElvUI_Config/locales/english_config.lua | 3 ++ ElvUI_Config/locales/french_config.lua | 3 ++ ElvUI_Config/locales/german_config.lua | 3 ++ ElvUI_Config/locales/korean_config.lua | 3 ++ ElvUI_Config/locales/portuguese_config.lua | 3 ++ ElvUI_Config/locales/russian_config.lua | 3 ++ ElvUI_Config/locales/spanish_config.lua | 3 ++ ElvUI_Config/locales/taiwanese_config.lua | 3 ++ 14 files changed, 90 insertions(+), 12 deletions(-) diff --git a/ElvUI/Settings/Profile.lua b/ElvUI/Settings/Profile.lua index 266bb0f..39af6ee 100644 --- a/ElvUI/Settings/Profile.lua +++ b/ElvUI/Settings/Profile.lua @@ -154,6 +154,8 @@ P["bags"] = { ["disableBagSort"] = false, ["disableBankSort"] = false, ["strata"] = "DIALOG", + ["qualityColors"] = true, + ["showBindType"] = false, ["colors"] = { ["profession"] = { ["quiver"] = {r = 1, g = 0.56, b = 0.73}, diff --git a/ElvUI/modules/bags/bags.lua b/ElvUI/modules/bags/bags.lua index 067c4bc..c20bdc0 100644 --- a/ElvUI/modules/bags/bags.lua +++ b/ElvUI/modules/bags/bags.lua @@ -298,6 +298,7 @@ function B:UpdateSlot(bagID, slotID) slot.QuestIcon:Hide() slot.JunkIcon:Hide() slot.itemLevel:SetText("") + slot.bindType:SetText("") if B.ProfessionColors[bagType] then slot:SetBackdropBorderColor(unpack(B.ProfessionColors[bagType])) @@ -313,6 +314,31 @@ function B:UpdateSlot(bagID, slotID) r, g, b = GetItemQualityColor(slot.rarity) end + if B.db.showBindType and slot.rarity and slot.rarity > 1 then + E.ScanTooltip:SetOwner(self, "ANCHOR_NONE") + E.ScanTooltip:SetBagItem(bagID, slotID) + E.ScanTooltip:Show() + + for i = 2, 6 do -- trying line 2 to 6 for the bind texts, don't think they are further down + local line = _G[E.ScanTooltip:GetName().."TextLeft"..i]:GetText() + if (not line) or (line == ITEM_SOULBOUND or line == ITEM_BIND_TO_ACCOUNT) then + break + end + if line == ITEM_BIND_ON_EQUIP then + slot.bindType:SetText(L["BoE"]) + slot.bindType:SetVertexColor(GetItemQualityColor(slot.rarity)) + break + end + if line == ITEM_BIND_ON_USE then + slot.bindType:SetText(L["BoU"]) + slot.bindType:SetVertexColor(GetItemQualityColor(slot.rarity)) + break + end + end + + E.ScanTooltip:Hide() + end + --Item Level if iLvl and B.db.itemLevel and (itemEquipLoc ~= nil and itemEquipLoc ~= "" and itemEquipLoc ~= "INVTYPE_AMMO" and itemEquipLoc ~= "INVTYPE_BAG" and itemEquipLoc ~= "INVTYPE_QUIVER" and itemEquipLoc ~= "INVTYPE_TABARD") and (slot.rarity and slot.rarity > 1) then if iLvl >= E.db.bags.itemLevelThreshold then @@ -339,7 +365,7 @@ function B:UpdateSlot(bagID, slotID) elseif (isQuestItem and not invalidQuestItem) or (isQuestStarter and not isQuestActive) then slot:SetBackdropBorderColor(unpack(B.QuestColors.questItem)) slot.ignoreBorderColors = true - elseif slot.rarity and slot.rarity > 1 then + elseif B.db.qualityColors and slot.rarity and slot.rarity > 1 then slot:SetBackdropBorderColor(r, g, b) slot.ignoreBorderColors = true else @@ -612,6 +638,10 @@ function B:Layout(isBank) f.Bags[bagID][slotID].slotID = slotID end + f.Bags[bagID][slotID].bindType = f.Bags[bagID][slotID]:CreateFontString(nil, "OVERLAY") + f.Bags[bagID][slotID].bindType:Point("TOP", 0, -2) + f.Bags[bagID][slotID].bindType:FontTemplate(E.LSM:Fetch("font", E.db.bags.itemLevelFont), E.db.bags.itemLevelFontSize, E.db.bags.itemLevelFontOutline) + f.Bags[bagID][slotID].itemLevel = f.Bags[bagID][slotID]:CreateFontString(nil, "OVERLAY") f.Bags[bagID][slotID].itemLevel:Point("BOTTOMRIGHT", 0, 3) f.Bags[bagID][slotID].itemLevel:FontTemplate(LSM:Fetch("font", E.db.bags.itemLevelFont), E.db.bags.itemLevelFontSize, E.db.bags.itemLevelFontOutline) diff --git a/ElvUI/modules/chat/chat.lua b/ElvUI/modules/chat/chat.lua index 58cd9b3..8821fca 100644 --- a/ElvUI/modules/chat/chat.lua +++ b/ElvUI/modules/chat/chat.lua @@ -1358,16 +1358,17 @@ function CH:SetChatFont(chatFrame, fontSize) end function CH:ChatEdit_AddHistory(_, line) - if find(line, "/rl") then return end + line = line and strtrim(line) + + if line and strlen(line) > 0 then + if strfind(line, "/rl") then return end - if strlen(line) > 0 then for _, text in pairs(ElvCharacterDB.ChatEditHistory) do - if text == line then - return - end + if text == line then return end end tinsert(ElvCharacterDB.ChatEditHistory, #ElvCharacterDB.ChatEditHistory + 1, line) + if #ElvCharacterDB.ChatEditHistory > 20 then tremove(ElvCharacterDB.ChatEditHistory, 1) end diff --git a/ElvUI/modules/tooltip/tooltip.lua b/ElvUI/modules/tooltip/tooltip.lua index 637b2fe..264ff13 100644 --- a/ElvUI/modules/tooltip/tooltip.lua +++ b/ElvUI/modules/tooltip/tooltip.lua @@ -601,6 +601,11 @@ end function TT:Initialize() self.db = E.db.tooltip + E.ScanTooltip = CreateFrame("GameTooltip", "ElvUI_ScanTooltip", UIParent, "GameTooltipTemplate") + E.ScanTooltip:SetPoint("CENTER") + E.ScanTooltip:SetSize(200, 200) + GameTooltip_SetDefaultAnchor(E.ScanTooltip, UIParent) + if E.private.tooltip.enable ~= true then return end E.Tooltip = TT diff --git a/ElvUI_Config/bags.lua b/ElvUI_Config/bags.lua index 7cf4c98..0dae681 100644 --- a/ElvUI_Config/bags.lua +++ b/ElvUI_Config/bags.lua @@ -80,32 +80,45 @@ E.Options.args.bags = { desc = L["Display the junk icon on all grey items that can be vendored."], set = function(info, value) E.db.bags[ info[#info] ] = value B:UpdateAllBagSlots() end }, - clearSearchOnClose = { + qualityColors = { order = 6, type = "toggle", + name = L["Show Quality Color"], + desc = L["Colors the border according to the Quality of the Item."], + set = function(info, value) E.db.bags[info[#info]] = value B:UpdateAllBagSlots() end + }, + showBindType = { + order = 7, + type = "toggle", + name = L["Show Bind on Equip/Use Text"], + set = function(info, value) E.db.bags[info[#info]] = value B:UpdateAllBagSlots() end + }, + clearSearchOnClose = { + order = 8, + type = "toggle", name = L["Clear Search On Close"], set = function(info, value) E.db.bags[info[#info]] = value end }, reverseSlots = { - order = 7, + order = 9, type = "toggle", name = L["Reverse Bag Slots"], set = function(info, value) E.db.bags[info[#info]] = value B:UpdateAll() end, }, disableBagSort = { - order = 8, + order = 10, type = "toggle", name = L["Disable Bag Sort"], set = function(info, value) E.db.bags[info[#info]] = value B:ToggleSortButtonState(false) end }, disableBankSort = { - order = 9, + order = 11, type = "toggle", name = L["Disable Bank Sort"], set = function(info, value) E.db.bags[info[#info]] = value B:ToggleSortButtonState(true) end }, countGroup = { - order = 10, + order = 12, type = "group", name = L["Item Count Font"], guiInline = true, @@ -155,7 +168,7 @@ E.Options.args.bags = { } }, itemLevelGroup = { - order = 11, + order = 13, type = "group", name = L["Item Level"], guiInline = true, diff --git a/ElvUI_Config/locales/chinese_config.lua b/ElvUI_Config/locales/chinese_config.lua index c17372d..1f977f5 100644 --- a/ElvUI_Config/locales/chinese_config.lua +++ b/ElvUI_Config/locales/chinese_config.lua @@ -204,6 +204,7 @@ L["Bottom to Top"] = "底部到顶部" L["Button Size (Bag)"] = "背包格子尺寸" L["Button Size (Bank)"] = "银行背包格子尺寸" L["Clear Search On Close"] = "关闭时清除搜索" +L["Colors the border according to the Quality of the Item."] = true L["Condensed"] = "巨集" L["Custom Color"] = "自定义颜色" L["Descending"] = "降序" @@ -238,8 +239,10 @@ L["Search Syntax"] = "搜索语法" L["Sell Interval"] = "售卖周期" L["Set the size of your bag buttons."] = "设置背包按钮尺寸" L["Short (Whole Numbers)"] = "短(完整数字)" +L["Show Bind on Equip/Use Text"] = true L["Show Coins"] = "显示硬币" L["Show Junk Icon"] = "显示垃圾图标" +L["Show Quality Color"] = true L["Smart"] = "智能" L["Sort Direction"] = "排列方向" L["Sort Inverted"] = "倒序" diff --git a/ElvUI_Config/locales/english_config.lua b/ElvUI_Config/locales/english_config.lua index a1dba9e..371a5b0 100644 --- a/ElvUI_Config/locales/english_config.lua +++ b/ElvUI_Config/locales/english_config.lua @@ -199,6 +199,7 @@ L["Bottom to Top"] = true L["Button Size (Bag)"] = true L["Button Size (Bank)"] = true L["Clear Search On Close"] = true +L["Colors the border according to the Quality of the Item."] = true L["Condensed"] = true L["Custom Color"] = true L["Descending"] = true @@ -233,8 +234,10 @@ L["Search Syntax"] = true L["Sell Interval"] = true L["Set the size of your bag buttons."] = true L["Short (Whole Numbers)"] = true +L["Show Bind on Equip/Use Text"] = true L["Show Coins"] = true L["Show Junk Icon"] = true +L["Show Quality Color"] = true L["Smart"] = true L["Sort Direction"] = true --Also used in Buffs and Debuffs L["Sort Inverted"] = true diff --git a/ElvUI_Config/locales/french_config.lua b/ElvUI_Config/locales/french_config.lua index d739e7e..ff708fc 100644 --- a/ElvUI_Config/locales/french_config.lua +++ b/ElvUI_Config/locales/french_config.lua @@ -206,6 +206,7 @@ L["Bottom to Top"] = "Du bas vers le haut" L["Button Size (Bag)"] = "Taille des boutons (Sac)" L["Button Size (Bank)"] = "Taille des boutons (Banque)" L["Clear Search On Close"] = "Effacer la recherche lors de la fermeture" +L["Colors the border according to the Quality of the Item."] = true L["Condensed"] = "Condensé" L["Custom Color"] = true L["Descending"] = "Descendant" @@ -240,8 +241,10 @@ L["Search Syntax"] = "Syntaxe pour la recherche" L["Sell Interval"] = true L["Set the size of your bag buttons."] = "Définissez la taille de vos boutons de sac." L["Short (Whole Numbers)"] = "Court (nombres entiers)" +L["Show Bind on Equip/Use Text"] = true L["Show Coins"] = "Afficher les pièces" L["Show Junk Icon"] = "Afficher l'icône camelotte" +L["Show Quality Color"] = true L["Smart"] = "Intelligent" L["Sort Direction"] = "Type de direction" --Also used in Buffs and Debuffs L["Sort Inverted"] = "Tri inversé" diff --git a/ElvUI_Config/locales/german_config.lua b/ElvUI_Config/locales/german_config.lua index b9410ee..3620c61 100644 --- a/ElvUI_Config/locales/german_config.lua +++ b/ElvUI_Config/locales/german_config.lua @@ -207,6 +207,7 @@ L["Bottom to Top"] = "Von unten nach oben" L["Button Size (Bag)"] = "Tasten Größe (Tasche)" L["Button Size (Bank)"] = "Tasten Größe (Bank)" L["Clear Search On Close"] = "Leere Suche beim Schließen" +L["Colors the border according to the Quality of the Item."] = "Färbt den Rand entsprechend der Qualität von einem Gegenstand." L["Condensed"] = "Gekürzt" L["Custom Color"] = "Benutzerdefinierte Farbe" L["Descending"] = "Absteigend" @@ -241,8 +242,10 @@ L["Search Syntax"] = "Suchsyntax" L["Sell Interval"] = "Verkaufsintervall" L["Set the size of your bag buttons."] = "Setze die Größe der Taschentasten." L["Short (Whole Numbers)"] = "Kurz (ganze Zahlen)" +L["Show Bind on Equip/Use Text"] = "Zeigt gebunden beim Aufheben/Anlegen Text" L["Show Coins"] = "Währungssymbole anzeigen" L["Show Junk Icon"] = "Zeige Müll Symbol" +L["Show Quality Color"] = "Zeige Qualitätsfarbe" L["Smart"] = "Elegant" L["Sort Direction"] = "Sortierrichtung" --Also used in Buffs and Debuffs L["Sort Inverted"] = "Umgekehrtes sortieren" diff --git a/ElvUI_Config/locales/korean_config.lua b/ElvUI_Config/locales/korean_config.lua index 395d86c..ee4d61d 100644 --- a/ElvUI_Config/locales/korean_config.lua +++ b/ElvUI_Config/locales/korean_config.lua @@ -252,6 +252,7 @@ L["Bottom to Top"] = "상단 아래쪽으로 이동" L["Button Size (Bag)"] = "슬롯 크기 (가방)" L["Button Size (Bank)"] = "슬롯 크기 (은행)" L["Clear Search On Close"] = "닫으면 검색 칸 비우기" +L["Colors the border according to the Quality of the Item."] = true L["Condensed"] = "간략하게" L["Custom Color"] = true L["Descending"] = "내림차순" @@ -286,8 +287,10 @@ L["Search Syntax"] = "아이템 검색법" L["Sell Interval"] = true L["Set the size of your bag buttons."] = "가방바에서 슬롯의 크기를 결정합니다." L["Short (Whole Numbers)"] = "골드만" +L["Show Bind on Equip/Use Text"] = true L["Show Coins"] = "동전 이미지로 보기" L["Show Junk Icon"] = "잡템 아이콘 표시" +L["Show Quality Color"] = true L["Smart"] = "스마트" L["Sort Direction"] = "정렬 방법" L["Sort Inverted"] = "아래로 정렬" diff --git a/ElvUI_Config/locales/portuguese_config.lua b/ElvUI_Config/locales/portuguese_config.lua index 2da38b4..5712345 100644 --- a/ElvUI_Config/locales/portuguese_config.lua +++ b/ElvUI_Config/locales/portuguese_config.lua @@ -206,6 +206,7 @@ L["Bottom to Top"] = "De baixo para cima" L["Button Size (Bag)"] = "Tamanho do Botão (Bolsas)" L["Button Size (Bank)"] = "Tamanho do Botão (Banco)" L["Clear Search On Close"] = true +L["Colors the border according to the Quality of the Item."] = true L["Condensed"] = true L["Custom Color"] = true L["Descending"] = "Descendente" @@ -240,8 +241,10 @@ L["Search Syntax"] = true L["Sell Interval"] = true L["Set the size of your bag buttons."] = "Define o tamanho dos botões das Bolsas" L["Short (Whole Numbers)"] = true +L["Show Bind on Equip/Use Text"] = true L["Show Coins"] = true L["Show Junk Icon"] = true +L["Show Quality Color"] = true L["Smart"] = true L["Sort Direction"] = "Direção de organização" L["Sort Inverted"] = "Oganizar Invertido" diff --git a/ElvUI_Config/locales/russian_config.lua b/ElvUI_Config/locales/russian_config.lua index ee35823..f6400dc 100644 --- a/ElvUI_Config/locales/russian_config.lua +++ b/ElvUI_Config/locales/russian_config.lua @@ -206,6 +206,7 @@ L["Bottom to Top"] = "Снизу вверх" L["Button Size (Bag)"] = "Размер слотов сумок" L["Button Size (Bank)"] = "Размер слотов банка" L["Clear Search On Close"] = "Сбрасывать поиск при закрытии" +L["Colors the border according to the Quality of the Item."] = true L["Condensed"] = "Через запятую" L["Custom Color"] = "Свой цвет" L["Descending"] = "Нисходящее" @@ -240,8 +241,10 @@ L["Search Syntax"] = "Синтаксис поиска" L["Sell Interval"] = "Интервал продажи" L["Set the size of your bag buttons."] = "Установите размер кнопок на панели." L["Short (Whole Numbers)"] = "Короткий (целые)" +L["Show Bind on Equip/Use Text"] = true L["Show Coins"] = "Показывать монеты" L["Show Junk Icon"] = "Иконки мусора" +L["Show Quality Color"] = true L["Smart"] = "Умный" L["Sort Direction"] = "Направление сортировки" --Also used in Buffs and Debuffs L["Sort Inverted"] = "Инвертированная сортировка" diff --git a/ElvUI_Config/locales/spanish_config.lua b/ElvUI_Config/locales/spanish_config.lua index eb07a0a..feeac6f 100644 --- a/ElvUI_Config/locales/spanish_config.lua +++ b/ElvUI_Config/locales/spanish_config.lua @@ -206,6 +206,7 @@ L["Bottom to Top"] = "De Abajo hacia Arriba" L["Button Size (Bag)"] = "Tamaño de los Botones (Bolsas)" L["Button Size (Bank)"] = "Tamaño de los Botones (Banco)" L["Clear Search On Close"] = true +L["Colors the border according to the Quality of the Item."] = true L["Condensed"] = true L["Custom Color"] = true L["Descending"] = "Descendente" @@ -240,8 +241,10 @@ L["Search Syntax"] = true L["Sell Interval"] = true L["Set the size of your bag buttons."] = "Establece el tamaño de tus botones de la bolsa." L["Short (Whole Numbers)"] = true +L["Show Bind on Equip/Use Text"] = true L["Show Coins"] = true L["Show Junk Icon"] = true +L["Show Quality Color"] = true L["Smart"] = true L["Sort Direction"] = "Dirección de Ordenado" L["Sort Inverted"] = "Ordenado Invertido" diff --git a/ElvUI_Config/locales/taiwanese_config.lua b/ElvUI_Config/locales/taiwanese_config.lua index b7f727c..111b8ba 100644 --- a/ElvUI_Config/locales/taiwanese_config.lua +++ b/ElvUI_Config/locales/taiwanese_config.lua @@ -206,6 +206,7 @@ L["Bottom to Top"] = "底部至頂部" L["Button Size (Bag)"] = "單個格子尺寸 (背包)" L["Button Size (Bank)"] = "單個格子尺寸 (銀行)" L["Clear Search On Close"] = "關閉時清空搜尋" +L["Colors the border according to the Quality of the Item."] = true L["Condensed"] = "濃縮" L["Custom Color"] = "自定顏色" L["Descending"] = "降序" @@ -240,8 +241,10 @@ L["Search Syntax"] = "搜尋語法" L["Sell Interval"] = "販賣間格" L["Set the size of your bag buttons."] = "設定你的背包格子大小." L["Short (Whole Numbers)"] = "短 (完整數字)" +L["Show Bind on Equip/Use Text"] = true L["Show Coins"] = "顯示硬幣" L["Show Junk Icon"] = "顯示垃圾圖示" +L["Show Quality Color"] = true L["Smart"] = "智慧" L["Sort Direction"] = "排序方向" L["Sort Inverted"] = "倒序排列"