Skip to content

Commit

Permalink
Allow usage text to be disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
solocommand committed Oct 21, 2020
1 parent 7def8db commit bd3ca83
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Scoreboard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ do
if type(sv.showLimits) ~= "boolean" then sv.showLimits = true end
if type(sv.showHeaders) ~= "boolean" then sv.showHeaders = true end
if type(sv.useShortLabels) ~= "boolean" then sv.useShortLabels = false end
if type(sv.disableUsageText) ~= "boolean" then sv.disableUsageText = false end
addon.db = sv

ldbi:Register(addonName, addon.dataobj, addon.db.minimap)
Expand Down Expand Up @@ -150,7 +151,9 @@ do
end

GameTooltip:AddLine(L["Scoreboard"].."\n")
GameTooltip:AddLine(muted(L["usageDescription"]))
if not addon.db.disableUsageText then
GameTooltip:AddLine(muted(L["usageDescription"]).."\n")
end

for i=1, size do
local c = C_CurrencyInfo.GetCurrencyListInfo(i)
Expand Down
8 changes: 8 additions & 0 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ local function build()
get = function(info) return addon.db[info[#info]] end,
set = function(info, value) return addon:setDB(info[#info], value) end,
},
disableUsageText = {
type = 'toggle',
order = 8,
name = L.disableUsageText,
desc = L.disableUsageTextDescription,
get = function(info) return addon.db[info[#info]] end,
set = function(info, value) return addon:setDB(info[#info], value) end,
},
currencies = {
type = "header",
name = L["currenciesTitle"],
Expand Down
4 changes: 2 additions & 2 deletions i18n/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ L["showHeadersDescription"] = "Show the currency groupings within the tooltip."
L["useShortLabels"] = "Use short labels";
L["useShortLabelsDescription"] = "Shorten the data text by changing the label to use an abbreviated form of the currency name."

L["showPlaceholder"] = "Show placeholder text";
L["showPlaceholderDescription"] = "When no currencies are visible, should placeholder text be shown (to allow you to quickly access settings).\nIf disabled, use the /scoreboard command to bring up this settings window."
L["disableUsageText"] = "Disable usage text"
L["disableUsageTextDescription"] = "If checked, the usage instructions will not be shown on the tooltip."

L["settingsTitle"] = "Settings";
L["settingsDescription"] = "Settings description here";
Expand Down
4 changes: 2 additions & 2 deletions i18n/ruRU.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ if locale == "ruRU" then
L["useShortLabels"] = "Сокращения";
L["useShortLabelsDescription"] = "Сокращать названия валют.";

L["showPlaceholder"] = "Show placeholder text";
L["showPlaceholderDescription"] = "When no currencies are visible, should placeholder text be shown (to allow you to quickly access settings).\nIf disabled, use the /scoreboard command to bring up this settings window.";
L["disableUsageText"] = "Disable usage text"
L["disableUsageTextDescription"] = "If checked, the usage instructions will not be shown on the tooltip."

L["settingsTitle"] = "Settings";
L["settingsDescription"] = "Settings description here";
Expand Down

0 comments on commit bd3ca83

Please sign in to comment.