Mercurial > wow > buffalo2
diff ObjectiveFrame.lua @ 9:2698173edd40
ObjectiveUI & ObjectiveEvents
- securehook to API calls for compatibility with addons that work with the objective tracking interface
- let the API hooks invoke ObjectiveUI functions when possible
- ObjectiveUI framescript handlers should use the corresponding API call if possible, so that addon space can be fully aware of our actions
- Sanity check cached data when possible during 'Remove' hooks
ObjectiveInfo
- Add cheevID to criteria info
ObjectiveCore
- Index quest tracker blocks by their watch offset, and use that to verify whether the given block frame should be released into pool
ObjectiveFrame
- Differentiate between visible and non-visible unused buttons, and only release when their quest has been dropped
- Reset 'actualBlocks' count during full updates
- Reset scroll Position when the wrapper size shrinks
author | Nenue |
---|---|
date | Fri, 01 Apr 2016 14:54:01 -0400 |
parents | 7923243ae972 |
children | f03c75f63566 |
line wrap: on
line diff
--- a/ObjectiveFrame.lua Fri Apr 01 14:40:14 2016 -0400 +++ b/ObjectiveFrame.lua Fri Apr 01 14:54:01 2016 -0400 @@ -161,7 +161,6 @@ local r = Scroll:GetHeight() - Scroller:GetHeight() local s = B.Conf.ObjectiveScroll - delta * floor(r/5+.5) local from = self:GetVerticalScroll() - if r == 0 then return end if s >= r then s = r elseif s < 1 then @@ -539,7 +538,7 @@ previousBlock = handler.Tracker local numWatched = handler.GetNumWatched() local numBlocks = handler.numBlocks - local actualBlocks = handler.actualBlocks + local actualBlocks = 0 for watchIndex = 1, 25 do blockIndex = blockIndex + 1 if watchIndex <= numWatched then @@ -612,18 +611,10 @@ -- Update frame dimensions if scrollHeight > wrapperMaxHeight then print(' is larger than', wrapperMaxHeight) - --ScrollBar:Show() - --scrollWidth = wrapperMaxWidth - scrollBarWidth wrapperHeight = wrapperMaxHeight - -- Make ThumbTexture reflect the viewing scale (smaller for longer scroll, bigger for shorter) - --ScrollBar:GetThumbTexture():SetHeight((wrapperMaxHeight/scrollHeight) * (wrapperMaxHeight)) - --ScrollBar:SetWidth(scrollBarWidth) - --ScrollBar:SetPoint('TOPRIGHT', Scroller, 'TOPRIGHT', 0, 0) - --ScrollBar:SetPoint('BOTTOMLEFT', Scroller, 'BOTTOMRIGHT', -scrollBarWidth, 0) - --ScrollBar:SetMinMaxValues(1, scrollHeight - wrapperMaxHeight) else - --ScrollBar:Hide() wrapperHeight = scrollHeight + B.Conf.ObjectiveScroll = 0 end scrollWidth = floor(scrollWidth+.5) scrollHeight = floor(scrollHeight+.5)