WoWInterface SVN KuiNameplates

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 137 to Rev 138
    Reverse comparison

Rev 137 → Rev 138

branches/v4/config.lua
240,6 → 240,82
},
}
},
fonts = {
name = 'Fonts',
type = 'group',
args = {
options = {
name = 'Global font settings',
type = 'group',
inline = true,
args = {
font = {
name = 'Font',
desc = 'The font used for all text on nameplates',
type = 'select',
dialogControl = 'LSM30_Font',
values = AceGUIWidgetLSMlists.font,
},
fontscale = {
name = 'Font scale',
desc = 'The scale of all fonts displayed on nameplates',
type = 'range',
min = 0.01,
softMax = 2,
},
outline = {
name = 'Outline',
desc = 'Dsiplay an outline on all fonts',
type = 'toggle',
},
monochrome = {
name = 'Monochrome',
desc = 'Don\'t anti-alias fonts',
type = 'toggle'
},
}
},
sizes = {
name = 'Sizes',
type = 'group',
inline = true,
args = {
combopoints = {
name = 'Combo points',
type = 'range',
min = 1,
softMax = 20
},
large = {
name = 'Large',
desc = 'Used for health on normal nameplates',
type = 'range',
min = 1,
softMax = 20
},
spellname = {
name = 'Spell name',
type = 'range',
min = 1,
softMax = 20
},
name = {
name = 'Name & level',
type = 'range',
min = 1,
softMax = 20
},
small = {
name = 'Small',
desc = 'Used for contextual health on normal nameplates and name on trivial nameplates',
type = 'range',
min = 1,
softMax = 20
},
}
}
}
},
reload = {
name = 'Reload UI',
type = 'execute',
250,86 → 326,6
}
}
 
local fontsOptions = {
name = 'Fonts',
handler = addon:GetOptionHandler(addon),
type = 'group',
get = 'Get',
set = 'Set',
args = {
fontoptions = {
name = 'Global font settings',
type = 'group',
inline = true,
args = {
font = {
name = 'Font',
desc = 'The font used for all text on nameplates',
type = 'select',
dialogControl = 'LSM30_Font',
values = AceGUIWidgetLSMlists.font,
},
fontscale = {
name = 'Font scale',
desc = 'The scale of all fonts displayed on nameplates',
type = 'range',
min = 0.01,
softMax = 2,
},
outline = {
name = 'Outline',
desc = 'Dsiplay an outline on all fonts',
type = 'toggle',
},
monochrome = {
name = 'Monochrome',
desc = 'Don\'t anti-alias fonts',
type = 'toggle'
},
}
},
fontsizes = {
name = 'Sizes',
type = 'group',
inline = true,
args = {
combopoints = {
name = 'Combo points',
type = 'range',
min = 1,
softMax = 20
},
large = {
name = 'Large',
desc = 'Used for health on normal nameplates',
type = 'range',
min = 1,
softMax = 20
},
spellname = {
name = 'Spell name',
type = 'range',
min = 1,
softMax = 20
},
name = {
name = 'Name & level',
type = 'range',
min = 1,
softMax = 20
},
small = {
name = 'Small',
desc = 'Used for contextual health on normal nameplates and name on trivial nameplates',
type = 'range',
min = 1,
softMax = 20
},
}
}
}
}
 
-- create module.ConfigChanged function
-- TODO cycle these when changing profiles (or something)
function addon:CreateConfigChangedListener(module)
376,9 → 372,6
 
AceConfig:RegisterOptionsTable('kuinameplates', options)
AceConfigDialog:AddToBlizOptions('kuinameplates', 'Kui Nameplates')
 
AceConfig:RegisterOptionsTable('kuinameplatesfonts', fontsOptions)
AceConfigDialog:AddToBlizOptions('kuinameplatesfonts', 'Fonts', 'Kui Nameplates')
end
 
--------------------------------------------------------------- Slash command --
branches/v4/core.lua
47,19 → 47,21
tapped = true, -- use grey health bar colour for tapped units
smooth = true -- smoothly animate health bar changes
},
fontoptions = {
font = (latin and 'Yanone Kaffesatz' or LSM:GetDefault(LSM.MediaType.FONT)),
fontscale = 1.0,
outline = true,
monochrome = false,
},
fontsizes = {
combopoints = 13,
large = 10,
spellname = 9,
name = 9,
small = 8
},
fonts = {
options = {
font = (latin and 'Yanone Kaffesatz' or LSM:GetDefault(LSM.MediaType.FONT)),
fontscale = 1.0,
outline = true,
monochrome = false,
},
sizes = {
combopoints = 13,
large = 10,
spellname = 9,
name = 9,
small = 8
},
}
}
}
 
branches/v4/layout.lua
1008,7 → 1008,7
function kn:ScaleFontSizes()
local k, size
for k, size in pairs(defaultSizes.font) do
self.fontSizes[k] = size * profile.fontoptions.fontscale
self.fontSizes[k] = size * profile.fonts.options.fontscale
 
if uiscale then
self.fontSizes[k] = self.fontSizes[k] / uiscale
1027,7 → 1027,7
self:ScaleFontSizes()
 
-- fetch font path from lsm
self.font = LSM:Fetch(LSM.MediaType.FONT, profile.fontoptions.font)
self.font = LSM:Fetch(LSM.MediaType.FONT, profile.fonts.options.font)
 
-------------------------------------- Health bar smooth update functions --
-- (spoon-fed by oUF_Smooth)
branches/v4/castbar.lua
101,7 → 101,7
frame.castbar.shield:Hide()
 
-- cast bar text -------------------------------------------------------
if self.db.profile.spellname then
if self.db.profile.display.spellname then
frame.castbar.name = frame:CreateFontString(frame.castbar, {
font = addon.font, size = 'name', outline = "OUTLINE" })
frame.castbar.name:SetPoint('TOPLEFT', frame.castbar.bg, 'BOTTOMLEFT', 2, -2)
109,7 → 109,7
frame.castbar.name:SetJustifyH('LEFT')
end
 
if self.db.profile.casttime then
if self.db.profile.display.casttime then
frame.castbar.max = frame:CreateFontString(frame.castbar, {
font = addon.font, size = 'name', outline = "OUTLINE" })
frame.castbar.max:SetPoint('TOPRIGHT', frame.castbar.bg, 'BOTTOMRIGHT', -2, -1)
145,7 → 145,7
-- scripts -------------------------------------------------------------
frame.castbar:HookScript('OnShow', function(bar)
if bar.interruptible then
bar.bar:SetStatusBarColor(unpack(self.db.profile.barcolour))
bar.bar:SetStatusBarColor(unpack(self.db.profile.display.barcolour))
bar.shield:Hide()
else
bar.bar:SetStatusBarColor(.8, .1, .1)
344,10 → 344,12
self.db = addon.db:RegisterNamespace(self.moduleName, {
profile = {
enabled = true,
casttime = true,
spellname = true,
spellicon = true,
barcolour = { .43, .47, .55, 1 },
display = {
casttime = true,
spellname = true,
spellicon = true,
barcolour = { .43, .47, .55, 1 },
}
}
})