From 7d9c364662e6e6f987dc08f56d47088322084f77 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Wed, 26 Feb 2014 00:31:47 +0400 Subject: [PATCH] Options at normal config + Hide unused is now toggable --- ElvUI_SLE/locales/english.lua | 1 + ElvUI_SLE/locales/russian.lua | 1 + ElvUI_SLE/modules/datatexts/currency.lua | 5 +- ElvUI_SLE/modules/datatexts/options.lua | 82 ++++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 1 deletion(-) diff --git a/ElvUI_SLE/locales/english.lua b/ElvUI_SLE/locales/english.lua index d3b7837..b9418b8 100755 --- a/ElvUI_SLE/locales/english.lua +++ b/ElvUI_SLE/locales/english.lua @@ -192,6 +192,7 @@ L['Show Miscellaneous Currency'] = true L['Show Zero Currency'] = true L['Show Icons'] = true L['Show Faction Totals'] = true +L['Show Unsed Currency'] = true --Exp/Rep Bar-- diff --git a/ElvUI_SLE/locales/russian.lua b/ElvUI_SLE/locales/russian.lua index 2bf5bc2..2030d41 100755 --- a/ElvUI_SLE/locales/russian.lua +++ b/ElvUI_SLE/locales/russian.lua @@ -191,6 +191,7 @@ L['Show Miscellaneous Currency'] = "Показывать прочую валют L['Show Zero Currency'] = "Показывать отсутствующую валюту" L['Show Icons'] = "Показывать иконки" L['Show Faction Totals'] = "Показывать сумму по фракциям" +L['Show Unsed Currency'] = "Показывать неиспользуемую валюту" --Exp/Rep Bar-- L["Xp-Rep Text"] = "Текст Опыта/Репутации" diff --git a/ElvUI_SLE/modules/datatexts/currency.lua b/ElvUI_SLE/modules/datatexts/currency.lua index 31bf50d..b05e5bc 100644 --- a/ElvUI_SLE/modules/datatexts/currency.lua +++ b/ElvUI_SLE/modules/datatexts/currency.lua @@ -37,6 +37,7 @@ V['ElvUI_Currency'] = { ['Zero'] = true, ['Icons'] = true, ['Faction'] = true, + ['Unused'] = true, } local function ToggleOption(name) @@ -62,11 +63,13 @@ local menu = { { text = L['Show Zero Currency'], checked = function() return GetOption('Zero') end, func = function() ToggleOption('Zero') end }, { text = L['Show Icons'], checked = function() return GetOption('Icons') end, func = function() ToggleOption('Icons') end }, { text = L['Show Faction Totals'], checked = function() return GetOption('Faction') end, func = function() ToggleOption('Faction') end }, + { text = L['Show Unsed Currency'], checked = function() return GetOption('Unused') end, func = function() ToggleOption('Unused') end }, } local HiddenCurrency = {} local function UnusedCheck() + if GetOption('Unused') then HiddenCurrency = {}; return end for i = 1, GetCurrencyListSize() do local name, _, _, isUnused = GetCurrencyListInfo(i) if isUnused then @@ -90,7 +93,7 @@ local function GetCurrency(CurrencyTable, Text) local name, amount, texture, week, weekmax, maxed, discovered = GetCurrencyInfo(id) local LeftString = GetOption('Icons') and format('%s %s', format('|T%s:14:14:0:0:64:64:4:60:4:60|t', texture), name) or name local RightString = amount - local unused = SLE:SimpleTable(HiddenCurrency, name) + local unused = SLE:SimpleTable(HiddenCurrency, name) or nil if id == 392 or id == 395 then maxed = 4000 diff --git a/ElvUI_SLE/modules/datatexts/options.lua b/ElvUI_SLE/modules/datatexts/options.lua index 4991f8a..7f70371 100755 --- a/ElvUI_SLE/modules/datatexts/options.lua +++ b/ElvUI_SLE/modules/datatexts/options.lua @@ -325,6 +325,88 @@ E.Options.args.sle.args.sldatatext = { } }, }, + slcurrency = { + type = "group", + name = "S&L Currency", + order = 6, + args = { + header = { + order = 1, + type = "description", + name = L['ElvUI Improved Currency Options'], + }, + arch = { + order = 2, + type = "toggle", + name = L['Show Archaeology Fragments'], + get = function(info) return E.private['ElvUI_Currency']['Archaeology'] end, + set = function(info, value) E.private['ElvUI_Currency']['Archaeology'] = value; end, + }, + jewel = { + order = 3, + type = "toggle", + name = L['Show Jewelcrafting Tokens'], + get = function(info) return E.private['ElvUI_Currency']['Jewelcrafting'] end, + set = function(info, value) E.private['ElvUI_Currency']['Jewelcrafting'] = value; end, + }, + pvp = { + order = 4, + type = "toggle", + name = L['Show Player vs Player Currency'], + get = function(info) return E.private['ElvUI_Currency']['PvP'] end, + set = function(info, value) E.private['ElvUI_Currency']['PvP'] = value; end, + }, + dungeon = { + order = 5, + type = "toggle", + name = L['Show Dungeon and Raid Currency'], + get = function(info) return E.private['ElvUI_Currency']['Raid'] end, + set = function(info, value) E.private['ElvUI_Currency']['Raid'] = value; end, + }, + cook = { + order = 6, + type = "toggle", + name = L['Show Cooking Awards'], + get = function(info) return E.private['ElvUI_Currency']['Cooking'] end, + set = function(info, value) E.private['ElvUI_Currency']['Cooking'] = value; end, + }, + misc = { + order = 7, + type = "toggle", + name = L['Show Miscellaneous Currency'], + get = function(info) return E.private['ElvUI_Currency']['Miscellaneous'] end, + set = function(info, value) E.private['ElvUI_Currency']['Miscellaneous'] = value; end, + }, + zero = { + order = 8, + type = "toggle", + name = L['Show Zero Currency'], + get = function(info) return E.private['ElvUI_Currency']['Zero'] end, + set = function(info, value) E.private['ElvUI_Currency']['Zero'] = value; end, + }, + icons = { + order = 9, + type = "toggle", + name = L['Show Icons'], + get = function(info) return E.private['ElvUI_Currency']['Icons'] end, + set = function(info, value) E.private['ElvUI_Currency']['Icons'] = value; end, + }, + faction = { + order = 10, + type = "toggle", + name = L['Show Faction Totals'], + get = function(info) return E.private['ElvUI_Currency']['Faction'] end, + set = function(info, value) E.private['ElvUI_Currency']['Faction'] = value; end, + }, + unused = { + order = 11, + type = "toggle", + name = L['Show Unsed Currency'], + get = function(info) return E.private['ElvUI_Currency']['Unused'] end, + set = function(info, value) E.private['ElvUI_Currency']['Unused'] = value; end, + }, + }, + }, timedt = { type = "group", name = RAID_FINDER, -- 1.7.9.5