Quantcast WoWInterface - View Single Post - Frame stuttering while moving in 8.1 vs 8.0
View Single Post
01-07-19, 03:06 PM   #1
ircdirk
A Molten Giant
 
ircdirk's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2014
Posts: 777
Question Frame stuttering while moving in 8.1 vs 8.0

In addon im developing i saw frame stuttering after 8.1 release so i made test. Wrote simple addon and tested it in 8.1 and 8.0.

Here u can see the difference: https://imgur.com/a/vg4X4y1 (top image 8.1 vs 8.0 bottom)

So what did changed in 8.1? Can i do something to make frame moving in 8.1 as smooth as in 8.0?
Or Blizz changed something and i cant do anything about it?

Addon source:

Code:
local f = CreateFrame("Frame","AnimationByOnUpdate",UIParent)
f:SetSize(64,64)
local texture = f:CreateTexture(nil,"ARTWORK")
texture:SetAllPoints(true)
texture:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark")

f.xpos = 0
f.xoffset = -300
f.speed = 0.01 -- 2=faster, 0.5=slower

local function translate(self,elapsed)
  self.xpos = self.xpos + (self.xoffset*self.speed*elapsed)
  self:SetPoint("CENTER",self.xpos,0)
  if self.xpos < self.xoffset then
    self:SetPoint("CENTER",self.xoffset,0)
    self:SetScript("OnUpdate",nil)
  end
end

f:SetScript("OnUpdate",translate)

Last edited by ircdirk : 01-07-19 at 03:11 PM.
  Reply With Quote