Mercurial > wow > buffalo2
diff Modules/TalkingHead.lua @ 122:ea2c616a3b4f
Standardize anchor variables
- anchorGroup sets general position, defers to anchorPoint
- anchorPoint and anchorFrom are used in SetPoint, deferring to anchorGroup and its inverse
Artifact Power:
- scan and update triggers trimmed down
BuffFrame:
- extra values can be right clicked to hide for particular auras
LFG:
- Desolate Host link placed above Sisters when searching for best cheevos
TalkingHead
- Re-enable TalkingHeadFrame click behaviour
author | Nenue |
---|---|
date | Mon, 21 Aug 2017 22:15:46 -0400 |
parents | 1f68c46bc4de |
children | b3c0258b419d |
line wrap: on
line diff
--- a/Modules/TalkingHead.lua Mon Jul 17 11:51:31 2017 -0400 +++ b/Modules/TalkingHead.lua Mon Aug 21 22:15:46 2017 -0400 @@ -4,14 +4,16 @@ -- %file-revision% -- +local FRAME_PADDING = 2 + local print = DEVIAN_WORKSPACE and function(...) print('VnTalkingHead', ...) end or nop local thf = TalkingHeadFrame local m = { - anchorPoint = 'BOTTOMLEFT', + anchorPoint = 'TOPLEFT', anchorFrom = 'TOPLEFT', - anchorX = -4, - anchorY = 96, + anchorX = 0, + anchorY = 0, anchorFrame = 'ChatFrame1', } @@ -32,15 +34,49 @@ self:SetSize(thf:GetSize()) - hooksecurefunc(thf, 'SetPoint', function(...) - print('SetPoint', ...) - print(debugstack()) - end) + --hooksecurefunc(thf, 'SetPoint', function(...) + -- print('SetPoint', ...) + -- print(debugstack()) + --end) + + + self.Name:SetAllPoints(thf.NameFrame.Name) + self.Text:SetAllPoints(thf.TextFrame.Text) + self.Portrait:SetAllPoints(thf.PortraitFrame.Portrait) + + self:ApplySettings() self:SetShown(true) self:ClearAnchor() end +function m:ApplySettings() + + thf.NameFrame.Name:ClearAllPoints() + thf.TextFrame.Text:ClearAllPoints() + thf.PortraitFrame.Portrait:ClearAllPoints() + + print('|cFF00AAFF'..self:GetName()..'|r:OnShow()', thf:IsShown(), self:IsShown()) + thf.BackgroundFrame.TextBackground:SetColorTexture(0,0,0,.5) + + thf.NameFrame.Name:SetPoint('TOPLEFT', thf.PortraitFrame.Portrait, 'TOPRIGHT', FRAME_PADDING, 0) + thf.NameFrame.Name:SetPoint('RIGHT', thf, 'RIGHT', -FRAME_PADDING, 0) + thf.PortraitFrame.Portrait:SetPoint('TOPLEFT', thf, 'TOPLEFT', FRAME_PADDING, -FRAME_PADDING) + + + thf.TextFrame.Text:SetPoint('TOPLEFT', thf.NameFrame.Name, 'BOTTOMLEFT', 0, -FRAME_PADDING) + thf.TextFrame.Text:SetPoint('BOTTOMRIGHT', thf, 'BOTTOMRIGHT', -FRAME_PADDING, FRAME_PADDING) + + thf.BackgroundFrame.TextBackground:SetColorTexture(0,0,0,.75) + + thf.MainFrame.CloseButton:SetPoint('TOPRIGHT', thf, 'TOPRIGHT', 0, 0) + + --thf:EnableMouse(false) + thf:ClearAllPoints() + thf:SetAllPoints(self) + +end + function m:ClearAnchor() UIPARENT_MANAGED_FRAME_POSITIONS["TalkingHeadFrame"] = nil @@ -62,7 +98,7 @@ function m:Reanchor() self:ClearAllPoints() - self:SetPoint('BOTTOMLEFT', _G[self.anchorFrame], 'TOPLEFT', -4, 24) + self:SetPoint(self.anchorPoint, _G[self.anchorFrame], self.anchorFrom, self.anchorX, self.anchorY) self:SetPoint('RIGHT', _G[self.anchorFrame], 'RIGHT', 2, 0) -- independent module, end @@ -76,9 +112,5 @@ function m:Update() - print('|cFF00AAFF'..self:GetName()..'|r:OnShow()', thf:IsShown(), self:IsShown()) - thf:ClearAllPoints() - thf:SetAllPoints(self) - Veneer:InternalReanchor(self) end