Skip to content
This repository has been archived by the owner on Jun 2, 2021. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollyonn committed Feb 1, 2019
1 parent 387ea20 commit 1e2ac31
Show file tree
Hide file tree
Showing 14 changed files with 90 additions and 12 deletions.
2 changes: 2 additions & 0 deletions ElvUI/Settings/Profile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
32 changes: 31 additions & 1 deletion ElvUI/modules/bags/bags.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down
11 changes: 6 additions & 5 deletions ElvUI/modules/chat/chat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions ElvUI/modules/tooltip/tooltip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
25 changes: 19 additions & 6 deletions ElvUI_Config/bags.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -155,7 +168,7 @@ E.Options.args.bags = {
}
},
itemLevelGroup = {
order = 11,
order = 13,
type = "group",
name = L["Item Level"],
guiInline = true,
Expand Down
3 changes: 3 additions & 0 deletions ElvUI_Config/locales/chinese_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"] = "降序"
Expand Down Expand Up @@ -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"] = "倒序"
Expand Down
3 changes: 3 additions & 0 deletions ElvUI_Config/locales/english_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ElvUI_Config/locales/french_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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é"
Expand Down
3 changes: 3 additions & 0 deletions ElvUI_Config/locales/german_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions ElvUI_Config/locales/korean_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"] = "내림차순"
Expand Down Expand Up @@ -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"] = "아래로 정렬"
Expand Down
3 changes: 3 additions & 0 deletions ElvUI_Config/locales/portuguese_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions ElvUI_Config/locales/russian_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"] = "Нисходящее"
Expand Down Expand Up @@ -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"] = "Инвертированная сортировка"
Expand Down
3 changes: 3 additions & 0 deletions ElvUI_Config/locales/spanish_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions ElvUI_Config/locales/taiwanese_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"] = "降序"
Expand Down Expand Up @@ -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"] = "倒序排列"
Expand Down

0 comments on commit 1e2ac31

Please sign in to comment.