Include an option that will allow the user to show a realm abbreviation next to their character name.
This commit is contained in:
parent
691540a108
commit
4262c0cdb6
1 changed files with 19 additions and 0 deletions
|
@ -20,6 +20,7 @@ local defaults = {
|
||||||
sortType = 1,
|
sortType = 1,
|
||||||
sortDirection = 1,
|
sortDirection = 1,
|
||||||
currentOnTop = false,
|
currentOnTop = false,
|
||||||
|
showServer = false,
|
||||||
instances = {
|
instances = {
|
||||||
[Z['Baradin Hold']] = { abbreviation = 'BH', enable = true, removed = false, },
|
[Z['Baradin Hold']] = { abbreviation = 'BH', enable = true, removed = false, },
|
||||||
[Z['Firelands']] = { abbreviation = 'FL', enable = true, removed = false, },
|
[Z['Firelands']] = { abbreviation = 'FL', enable = true, removed = false, },
|
||||||
|
@ -79,6 +80,20 @@ local options = {
|
||||||
get = function(info) return core.db.profile.sortDirection end,
|
get = function(info) return core.db.profile.sortDirection end,
|
||||||
set = function(info, value) core.db.profile.sortDirection = value end,
|
set = function(info, value) core.db.profile.sortDirection = value end,
|
||||||
},
|
},
|
||||||
|
otherHeader = {
|
||||||
|
name = '',
|
||||||
|
type = 'header',
|
||||||
|
order = 20,
|
||||||
|
},
|
||||||
|
showServer = {
|
||||||
|
name = L['Show Server'],
|
||||||
|
desc = L['Show the server abbreviation next to a character name in the list.'],
|
||||||
|
type = 'toggle',
|
||||||
|
width = 'full',
|
||||||
|
order = 21,
|
||||||
|
get = function(info) return core.db.profile.showServer end,
|
||||||
|
set = function(info, value) core.db.profile.showServer = value end,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
instances = {
|
instances = {
|
||||||
|
@ -528,6 +543,10 @@ function core:DrawTooltip()
|
||||||
end
|
end
|
||||||
|
|
||||||
for _,information in pairs(tooltipTable) do
|
for _,information in pairs(tooltipTable) do
|
||||||
|
if self.db.profile.showServer then
|
||||||
|
information.name = information.name .. '-' .. string.sub(information.realm,0,3)
|
||||||
|
end
|
||||||
|
|
||||||
local characterLine = self.tooltip:AddLine('')
|
local characterLine = self.tooltip:AddLine('')
|
||||||
self.tooltip:SetCell(characterLine, 1, information.name, self.fontObjects[information.class], 'LEFT')
|
self.tooltip:SetCell(characterLine, 1, information.name, self.fontObjects[information.class], 'LEFT')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue