WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   WoD Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=151)
-   -   Built-in cooldown timer text is broken (https://www.wowinterface.com/forums/showthread.php?t=49579)

Cybeloras 08-05-14 06:32 PM

Built-in cooldown timer text is broken
 
I made an official report here, but I figured I would share here as well:

http://us.battle.net/wow/en/forum/topic/13735163389#1

The new built-in cooldown timer texts are really buggy. Specifically, at some scales, they don't work at all, and are hidden. I can't find any pattern to the scales at which this happens, but it happens at very small granularity as well as very large granularity.

Here's some code that will demonstrate the issue:

Lua Code:
  1. UIParent:SetScale(1)
  2. local CD = TESTCD or CreateFrame("Cooldown", "TESTCD", UIParent)
  3. CD:SetPoint("CENTER")
  4. CD:SetSize(30, 30)
  5. CD:SetCooldown(GetTime(), 1000)
  6. local i = 0.6
  7. local step = 0.01
  8.  
  9. function TESTCD_STEP()
  10.     -- Assume that the cooldown's only region is its built-in timer text.
  11.     local text = CD:GetRegions()
  12.  
  13.     -- This will print the scale and shown state after the previous frame was drawn.
  14.     -- The show state of the text is not updated immediately after setting the scale,
  15.     -- It only updates after a frame is drawn and an OnUpdate has ran.
  16.     print(CD:GetEffectiveScale(), text:IsShown())
  17.    
  18.     -- Adjust the scale for the next time we poll it.
  19.     i = i + step
  20.     CD:SetScale(i)
  21. end
  22.  
  23. CD:SetScript("OnUpdate", function(self)
  24.         TESTCD_STEP()
  25. end)

You can manually call TESTCD_STEP() to see it step-by-step, or you can let the OnUpdate script call it to see how it happens quickly. Adjust the step in the script to see that the granularity of the scale doesn't matter. In fact, at a scale of exactly 1 and exactly 2, the text doesn't work; at 3, 4, 5, and 6 it works, and at 7 it doesn't work.

It seems that a scale of 20 or higher allows the text to be completely stable and shown all the time. Anything less than than has a significant chance of being broken.

Cybeloras 08-06-14 04:59 PM

Just when you thought it couldn't get any stranger, it does. There's more to it than this, apparently. Timers break based on where they are placed along the X axis along the screen (vertical placement doesn't matter - only horizontal)

Screenshots:

All the same scale: http://i.imgur.com/4kLjQpd.jpg

Different scales: http://i.imgur.com/1hcigA2.jpg


All times are GMT -6. The time now is 03:59 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI