WoWInterface SVN KuiNameplates

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 151 to Rev 152
    Reverse comparison

Rev 151 → Rev 152

Kui_Nameplates/core.lua
66,6 → 66,10
 
------------------------------------------------------------------------ init --
function addon:OnInitialize()
if not _G['KuiNameplatesFilesLoaded-150'] then
print('|cffff3333KuiNameplates was not loaded correctly. If you installed this update while WoW was running, you must fully restart WoW for it to recognise new files (reloading the UI or logging out and back in will not work). Otherwise, please try redownloading the addon.')
end
 
self.db = LibStub('AceDB-3.0'):New('KuiNameplatesGDB', defaults)
 
-- enable ace3 profiles
Kui_Nameplates/layout.lua
8,6 → 8,8
local LSM = LibStub('LibSharedMedia-3.0')
local kn = LibStub('AceAddon-3.0'):GetAddon('KuiNameplates')
 
--KuiNameplatesDebug=true
 
-- frame to run OnUpdate
kn.f = CreateFrame('Frame')
 
70,9 → 72,11
-- store size as a key of kn.fontSizes so that it can be recalled & scaled
-- correctly. Used by SetFontSize.
local sizeKey
 
 
obj = obj or {}
obj.mono = profile.fonts.options.monochrome
obj.outline = profile.fonts.options.outline
obj.size = obj.size or 'name'
 
if type(obj.size) == 'string' then
sizeKey = obj.size
246,10 → 250,6
 
------------------------------------------------------- Frame script handlers --
local function OnFrameShow(self)
if self.carrier then
self.carrier.DoShow = true
end
 
-- reset name
self.name.text = self.oldName:GetText()
self.name:SetText(self.name.text)
382,12 → 382,23
 
self:UpdateFrame()
self:UpdateFrameCritical()
 
 
-- force health update
OnHealthValueChanged(self.oldHealth, self.oldHealth:GetValue())
 
self:SetGlowColour()
 
 
if self.carrier then
-- TODO TEST only show players
--[[if self.friend and self.player then
self.carrier.DoShow = true
else
self.carrier.DoShow = nil
self.carrier:Hide()
end]]
 
self.carrier.DoShow = true
end
 
kn:SendMessage('KuiNameplates_PostShow', self)
end
 
799,16 → 810,13
frame:SetBackdrop({bgFile=kui.m.t.solid})
frame:SetBackdropColor(1, 1, 1, .5)
 
frame.isfriend = frame:CreateFontString(frame, {
font = kn.font, size = 10, outline = 'OUTLINE' })
frame.isfriend = frame:CreateFontString(frame.overlay)
frame.isfriend:SetPoint('BOTTOM', frame, 'TOP')
 
frame.guidtext = frame:CreateFontString(frame, {
font = kn.font, size = 10, outline = "OUTLINE" })
frame.guidtext = frame:CreateFontString(frame.overlay)
frame.guidtext:SetPoint('TOP', frame, 'BOTTOM')
 
frame.nametext = frame:CreateFontString(frame, {
font = kn.font, size = 10, outline = "OUTLINE" })
frame.nametext = frame:CreateFontString(frame.overlay)
frame.nametext:SetPoint('TOP', frame.guidtext, 'BOTTOM')
end
 
1042,21 → 1050,7
end)
end
 
-- enable packed modules
--[[
if profile.castbar.enabled and modules.castbar then
modules.castbar:Enable()
end
if profile.castbar.warnings and modules.warnings then
modules.warnings:Enable()
end
if profile.general.combopoints and modules.combopoints then
modules.combopoints:Enable()
end]]
 
self.f:SetScript('OnUpdate', self.f.OnUpdate)
 
self.f:SetScript('OnUpdate', self.f.OnUpdate)
self:RegisterEvent('PLAYER_TARGET_CHANGED')
 
self.ToggleCombatEvents(profile.general.combat)
end
Kui_Nameplates/create.lua
1,6 → 1,8
local addon = LibStub('AceAddon-3.0'):GetAddon('KuiNameplates')
local kui = LibStub('Kui-1.0')
 
_G['KuiNameplatesFilesLoaded-150'] = true
 
------------------------------------------------------------------ Background --
function addon:CreateBackground(frame)
-- frame glow